Guide d’inscription ordinale
Individual gros can be inscribed with arbitrary content, creating Groestlcoin-native digital artifacts that can be held in a Groestlcoin wallet and transferred using Groestlcoin transactions. Inscriptions are as durable, immutable, secure, and decentralized as Groestlcoin itself.
Working with inscriptions requires a Groestlcoin full node, to give you a view of the current state of the Groestlcoin blockchain, and a wallet that can create inscriptions and perform gro control when constructing transactions to send inscriptions to another wallet.
Groestlcoin Core provides both a Groestlcoin full node and wallet. However, the Groestlcoin Core wallet cannot create inscriptions and does not perform gro control.
This requires ord
, the ordinal utility. ord
doesn't implement its own wallet, so ord wallet
subcommands interact with Groestlcoin Core wallets.
Ce guide couvre :
- Installing Groestlcoin Core
- Syncing the Groestlcoin blockchain
- Creating a Groestlcoin Core wallet
- Using
ord wallet receive
to receive gros - La création d’inscriptions à l’aide de
ord wallet inscribe
- L’envoi d’inscriptions à l’aide de
ord wallet send
- La réception d’inscriptions avec
ord wallet receive
Obtenir de l’aide
If you get stuck, try asking for help on the Groestlcoin Discord Server, or checking GitHub for relevant issues.
Installing Groestlcoin Core
Groestlcoin Core is available from groestlcoin.org.
Making inscriptions requires Groestlcoin Core 24 or newer.
This guide does not cover installing Groestlcoin Core in detail. Once Groestlcoin Core is installed, you should be able to run groestlcoind -version
successfully from the command line. Do NOT use groestlcoin-qt
.
Configuring Groestlcoin Core
ord
requires Groestlcoin Core's transaction index and rest interface.
To configure your Groestlcoin Core node to maintain a transaction index, add the following to your groestlcoin.conf
:
txindex=1
Or, run groestlcoind
with -txindex
:
groestlcoind -txindex
Details on creating or modifying your groestlcoin.conf
file can be found here.
Syncing the Groestlcoin Blockchain
Pour synchroniser la blockchain, exécutez :
groestlcoind -txindex
...et laissez-la s’exécuter jusqu’à ce que getblockcount
:
groestlcoin-cli getblockcount
agrees with the block count on a block explorer like the mempool.space block explorer. ord
interacts with groestlcoind
, so you should leave groestlcoind
running in the background when you're using ord
.
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 groestlcoin-cli
and ord
to find.
Résolution des problèmes
Make sure you can access groestlcoind
with groestlcoin-cli -getinfo
and that it is fully synced.
If groestlcoin-cli -getinfo
returns Could not connect to the server
, groestlcoind
is not running.
Make sure rpcuser
, rpcpassword
, or rpcauth
are NOT set in your groestlcoin.conf
file. ord
requires using cookie authentication. Make sure there is a file .cookie
in your groestlcoin data directory.
If groestlcoin-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 groestlcoin-cli -rpccookiefile=<your_groestlcoin_datadir>/.cookie -getinfo
. When running ord
you must specify the cookie file location with --cookie-file=<your_groestlcoin_datadir>/.cookie
.
Make sure you do NOT have disablewallet=1
in your groestlcoin.conf
file. If groestlcoin-cli listwallets
returns Method not found
then the wallet is disabled and you won't be able to use ord
.
Make sure txindex=1
is set. Run groestlcoin-cli getindexinfo
and it should return something like
{
"txindex": {
"synced": true,
"best_block_height": 776546
}
}
If it only returns {}
, txindex
is not set. If it returns "synced": false
, groestlcoind
is still creating the txindex
. Wait until "synced": true
before using ord
.
If you have maxuploadtarget
set it can interfere with fetching blocks for ord
index. Either remove it or set whitebind=127.0.0.1:1331
.
L’installation de ord
The ord
utility is written in Rust and can be built from source. Pre-built binaries are available on the releases page.
Vous pouvez installer le dernier binaire préconstruit à partir de la ligne de commande suivante :
curl --proto '=https' --tlsv1.2 -fsLS https://raw.githubusercontent.com/Groestlcoin/ord-groestlcoin/master/install.sh | bash -s
Une fois ord
installé, vous devriez être en mesure d’exécuter :
ord --version
Ce qui indiquera le numéro de version de ord
.
Creating a Groestlcoin Core Wallet
ord
uses Groestlcoin Core to manage private keys, sign transactions, and broadcast transactions to the Groestlcoin network.
To create a Groestlcoin Core wallet named ord
for use with ord
, run:
ord wallet create
Receiving Gros
Inscriptions are made on individual gros, using normal Groestlcoin transactions that pay fees in gros, so your wallet will need some gros.
Obtenez une nouvelle adresse à partir de votre portefeuille ord
en exécutant :
ord wallet receive
Et envoyez-y des fonds.
Vous pouvez voir les transactions en attente en exécutant :
ord wallet transactions
Une fois la transaction confirmée, vous devriez être en mesure de voir les sorties de transactions avec ord wallet outputs
.
Créer du contenu pour les inscriptions
Gros can be inscribed with any kind of content, but the ord
wallet only supports content types that can be displayed by the ord
block explorer.
En outre, les inscriptions sont incluses dans les transactions, donc plus le contenu est volumineux, plus les frais à payer pour la transaction de l’inscription sont élevés.
Le contenu des inscriptions est inclus dans les témoins de transaction, qui bénéficient de la réduction pour témoins. Afin de calculer le montant approximatif des frais de transaction d’une inscription, divisez la taille du contenu par quatre et multipliez par le taux de frais.
Inscription transactions must be less than 400,000 weight units, or they will not be relayed by Groestlcoin 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.
La création d’inscriptions
Pour créer une inscription avec le contenu de FILE
, exécutez :
ord wallet inscribe --fee-rate FEE_RATE FILE
Ord affichera deux identifiants de transaction, l’un pour la transaction d’engagement et l’autre pour la transaction de révélation, ainsi que l’identifiant de l’inscription. Les identifiants d’inscription ont le format TXIDiN
, TXID
étant l’identifiant de la transaction de révélation et N
l’index de l’inscription dans la transaction de révélation.
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 gro of the input that contains the corresponding tapscript.
Wait for the reveal transaction to be mined. You can check the status of the commit and reveal transactions using the esplora block explorer.
Une fois que la transaction de révélation a été minée, l’identifiant d’inscription devrait apparaître lorsque vous exécutez :
ord wallet inscriptions
Inscriptions parent-enfant
Les inscriptions parent-enfant permettent ce que l’on appelle des collections en langage courant (voir provenance pour plus d’informations).
Pour faire d’une inscription l’enfant d’une autre, l’inscription parent doit être inscrite et présente dans le portefeuille. Pour choisir un parent, lancez ord wallet inscriptions
et copiez l’identifiant de l’inscription (<PARENT_INSCRIPTION_ID>
).
Inscrivez maintenant l’inscription enfant et spécifiez le parent comme suit :
ord wallet inscribe --fee-rate FEE_RATE --parent <PARENT_INSCRIPTION_ID> CHILD_FILE
Cette relation ne peut pas être ajoutée rétroactivement, le parent doit être présent lors de la création de l’enfant.
L’envoi d’inscriptions
Demandez au destinataire de générer une nouvelle adresse en exécutant :
ord wallet receive
Envoyez l’inscription en exécutant :
ord wallet send --fee-rate <FEE_RATE> <ADDRESS> <INSCRIPTION_ID>
Voyez la transaction en attente avec la commande :
ord wallet transactions
Une fois que la transaction d’envoi est confirmée, le destinataire peut confirmer la réception en exécutant :
ord wallet inscriptions
La réception d’inscriptions
Générez une nouvelle adresse de réception en utilisant :
ord wallet receive
L’expéditeur peut transférer l’inscription à votre adresse en utilisant :
ord wallet send ADDRESS INSCRIPTION_ID
Voyez la transaction en attente avec la commande :
ord wallet transactions
Une fois que la transaction d’envoi est confirmée, vous pouvez confirmer la réception en exécutant :
ord wallet inscriptions