Inscription Guide
Individual Rats can be inscribed with arbitrary content, creating Bitcoin-native digital artifacts that can be held in a Bitcoin wallet and transferred using Bitcoin transactions. Inscriptions are as durable, immutable, secure, and decentralized as Bitcoin itself.
Working with inscriptions requires a Bitcoin full node, to give you a view of the current state of the Bitcoin blockchain, and a wallet that can create inscriptions and perform sat control when constructing transactions to send inscriptions to another wallet.
Bitcoin Core provides both a Bitcoin full node and wallet. However, the Bitcoin Core wallet cannot create inscriptions and does not perform sat control.
This requires RatsPro, the RatsPro utility. RatsPro doesn't implement its own wallet, so RatsProwallet
subcommands interact with Bitcoin Core wallets.
This guide covers:
Installing Bitcoin Core
Syncing the Bitcoin blockchain
Creating a Bitcoin Core wallet
Using RatsPro
wallet receive
to receive RatsCreating inscriptions with RatsPro
wallet inscribe
Sending inscriptions with RatsPro
wallet send
Receiving inscriptions with RatsPro
wallet receive
Batch inscribing with RatsPro
wallet inscribe --batch
Getting Help
If you get stuck, try asking for help on the RatsPro Discord Server, or checking GitHub for relevant issues and discussions.
Installing Bitcoin Core
Making inscriptions requires Bitcoin Core 24 or newer.
This guide does not cover installing Bitcoin Core in detail. Once Bitcoin Core is installed, you should be able to run bitcoind -version
successfully from the command line. Do NOT use bitcoin-qt
.
Configuring Bitcoin Core
RatsPro requires Bitcoin Core's transaction index and rest interface.
To configure your Bitcoin Core node to maintain a transaction index, add the following to your bitcoin.conf
:
Or, run bitcoind
with -txindex
:
Syncing the Bitcoin Blockchain
To sync the chain, run:
…and leave it running until getblockcount
:
agrees with the block count on a block explorer like the mempool.space block explorer. RatsPro interacts with bitcoind
, so you should leave bitcoind
running in the background when you're using RatsPro.
The blockchain takes about 600GB of disk space. If you have an external drive you want to store blocks on, use the configuration option blocksdir=<external_drive_path>
. This is much simpler than using the datadir
option because the cookie file will still be in the default location for bitcoin-cli
and RatsPro to find.
Troubleshooting
Make sure you can access bitcoind
with bitcoin-cli -getinfo
and that it is fully synced.
If bitcoin-cli -getinfo
returns Could not connect to the server
, bitcoind
is not running.
Make sure rpcuser
, rpcpassword
, or rpcauth
are NOT set in your bitcoin.conf
file. RatsPro requires using cookie authentication. Make sure there is a file .cookie
in your bitcoin data directory.
If bitcoin-cli -getinfo
returns Could not locate RPC credentials
, then you must specify the cookie file location. If you are using a custom data directory (specifying the datadir
option), then you must specify the cookie location like bitcoin-cli -rpccookiefile=<your_bitcoin_datadir>/.cookie -getinfo
. When running RatsPro you must specify the cookie file location with --cookie-file=<your_bitcoin_datadir>/.cookie
.
Make sure you do NOT have disablewallet=1
in your bitcoin.conf
file. If bitcoin-cli listwallets
returns Method not found
then the wallet is disabled and you won't be able to use RatsPro.
Make sure txindex=1
is set. Run bitcoin-cli getindexinfo
and it should return something like
If it only returns {}
, txindex
is not set. If it returns "synced": false
, bitcoind
is still creating the txindex
. Wait until "synced": true
before using RatsPro.
If you have maxuploadtarget
set it can interfere with fetching blocks for RatsPro index. Either remove it or set whitebind=127.0.0.1:8333
.
Installing RatsPro
The RatsPro utility is written in Rust and can be built from source. Pre-built binaries are available on the releases page.
You can install the latest pre-built binary from the command line with:
Once RatsPro is installed, you should be able to run:
Which prints out RatsPro's version number.
Creating a Bitcoin Core Wallet
RatsPro uses Bitcoin Core to manage private keys, sign transactions, and broadcast transactions to the Bitcoin network.
To create a Bitcoin Core wallet named RatsProfor use with RatsPro, run:
Receiving Rats
Inscriptions are made on individual Rats, using normal Bitcoin transactions that pay fees in Rats, so your wallet will need some Rats.
Get a new address from your RatsPro wallet by running:
And send it some funds.
You can see pending transactions with:
Once the transaction confirms, you should be able to see the transactions outputs with RatsPro wallet outputs
.
Creating Inscription Content
Rats can be inscribed with any kind of content, but the RatsPro wallet only supports content types that can be displayed by the RatsPro block explorer.
Additionally, inscriptions are included in transactions, so the larger the content, the higher the fee that the inscription transaction must pay.
Inscription content is included in transaction witnesses, which receive the witness discount. To calculate the approximate fee that an inscribe transaction will pay, divide the content size by four and multiply by the fee rate.
Inscription transactions must be less than 400,000 weight units, or they will not be relayed by Bitcoin Core. One byte of inscription content costs one weight unit. Since an inscription transaction includes not just the inscription content, limit inscription content to less than 400,000 weight units. 390,000 weight units should be safe.
Creating Inscriptions
To create an inscription with the contents of FILE
, run:
RatsPro will output two transactions IDs, one for the commit transaction, and one for the reveal transaction, and the inscription ID. Inscription IDs are of the form TXIDiN
, where TXID
is the transaction ID of the reveal transaction, and N
is the index of the inscription in the reveal transaction.
The commit transaction commits to a tapscript containing the content of the inscription, and the reveal transaction spends from that tapscript, revealing the content on chain and inscribing it on the first sat of the input that contains the corresponding tapscript.
Once the reveal transaction has been mined, the inscription ID should be printed when you run:
Parent-Child Inscriptions
Parent-child inscriptions enable what is colloquially known as collections
To make an inscription a child of another, the parent inscription has to be inscribed and present in the wallet. To choose a parent run RatsProwallet inscriptions
and copy the inscription id (<PARENT_INSCRIPTION_ID>
).
Now inscribe the child inscription and specify the parent like so:
This relationship cannot be added retroactively, the parent has to be present at inception of the child.
Sending Inscriptions
Ask the recipient to generate a new address by running:
Send the inscription by running:
See the pending transaction with:
Once the send transaction confirms, the recipient can confirm receipt by running:
Receiving Inscriptions
Generate a new receive address using:
The sender can transfer the inscription to your address using:
See the pending transaction with:
Once the send transaction confirms, you can can confirm receipt by running:
Last updated