铭文指引

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.

本指南涵盖:

  1. 安装 Groestlcoin Core
  2. 同步比特币区块链
  3. 创建 Groestlcoin Core 钱包
  4. Using ord wallet receive to receive gros
  5. 使用ord wallet inscribe创建铭文
  6. 使用 ord wallet send发送铭文
  7. 使用ord wallet receive收取铭文

寻求帮助

If you get stuck, try asking for help on the Groestlcoin Discord Server, or checking GitHub for relevant issues.

安装 Groestlcoin Core

Groestlcoin Core is available from groestlcoin.org.

制作铭文需要Groestlcoin Core 24 或者更新版本。

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.

配置 Groestlcoin Core

ord requires Groestlcoin Core's transaction index and rest interface.

配置你的Groestlcoin Core阶段去维护一个交易索引,需要在groestlcoin.conf里面添加:

txindex=1

或者, 运行 groestlcoind-txindex:

groestlcoind -txindex

Details on creating or modifying your groestlcoin.conf file can be found here.

比特币区块同步

区块同步,运行:

groestlcoind -txindex

…直到运行 getblockcount:

groestlcoin-cli getblockcount

像区块链浏览器the mempool.space block explorer一样对区块进行记述. ordgroestlcoind进行交互, 所以你在使用ord时候需要让groestlcoind 在后台运行。

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.

故障排除

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.

安装 ord

The ord utility is written in Rust and can be built from source. Pre-built binaries are available on the releases page.

你也可以在命令行中使用下面命令来安装最新的文件:

curl --proto '=https' --tlsv1.2 -fsLS https://raw.githubusercontent.com/Groestlcoin/ord-groestlcoin/master/install.sh | bash -s

ord 成功安装以后,你可以运行 :

ord --version

这会返回 ord的版本信息.

创建一个Groestlcoin Core钱包

ord 使用Groestlcoin Core来管理私钥,签署交易以及向比特币网络广播交易。

创建一个名为ord 的Groestlcoin Core 钱包,运行:

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.

为你的 ord 钱包创建一个新地址,运行:

ord wallet receive

向上面地址发送一些资金。

你可以使用以下命令看到交易情况:

ord wallet transactions

一旦交易确认,你应该可以使用 ord wallet outputs看到交易的输出;

创建铭文内容

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.

另外,铭文是包含在交易中的,所以内容越大,铭文交易需要支付的费用就越高。

铭文内容包含在交易见证中,获得见证折扣。要计算写入交易将支付的大概费用,请将内容大小除以四,然后乘以费率。

铭文交易必须少于 400,000 个权重计量单位,否则不会被 Groestlcoin Core 中继。一个字节的铭文内容需要一个权重计量单位。 由于铭文交易不只是铭文内容,铭文内容限制在400,000权重计量单位以内。390,000 个权重计量单位应该是安全的。

创建铭文

FILE的内容创建一个铭文,需要运行:

ord wallet inscribe --fee-rate FEE_RATE FILE

Ord会输出两个交易ID,一个是commit交易,一个是reveal交易,还有铭文ID。铭文 ID 的格式为TXIDiN,其中TXID 是揭示交易的交易 ID,N 是揭示交易中铭文的索引。

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.

一旦reveal交易完成记账,你可以使用以下命令查询铭文ID:

ord wallet inscriptions

Parent-Child Inscriptions

Parent-child inscriptions enable what is colloquially known as collections, see provenance for more information.

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 ord wallet inscriptions and copy the inscription id (<PARENT_INSCRIPTION_ID>).

Now inscribe the child inscription and specify the parent like so:

ord wallet inscribe --fee-rate FEE_RATE --parent <PARENT_INSCRIPTION_ID> CHILD_FILE

This relationship cannot be added retroactively, the parent has to be present at inception of the child.

发送铭文

铭文接收方使用一下命令生成地址

ord wallet receive

使用命令格式发送铭文:

ord wallet send --fee-rate <FEE_RATE> <ADDRESS> <INSCRIPTION_ID>

检查未完成交易情况:

ord wallet transactions

一旦交易确认,接收方可以使用一下命令查看接收到的铭文

ord wallet inscriptions

接收铭文

使用以下命令生成一个新的接收地址

ord wallet receive

发送方使用命令发送铭文到你的地址

ord wallet send ADDRESS INSCRIPTION_ID

检查未完成交易情况:

ord wallet transactions

一旦交易确认,你可以使用以下命令确认收到

ord wallet inscriptions