Cover photo

WINDOWS下BTC全节点铸造sats域名

前言

     迫于第三方工具铸造BTC NFT手续费较高,批量注册成本较大,远不如花几百块买个固态硬盘同步全节点自己铸造,自己动手丰衣足食。

     记录一下从下载BTC core钱包同步全节点到铸造一枚sats域名的全过程(铸造图片同理),及过程中碰到的一些问题和解决方法。

     如果对你有所帮助,点个关注 : )

https://twitter.com/jack_yc

下载BTC core钱包,同步全节点

官网下载BTC core钱包并安装,建议安装在单独的固态硬盘(容量1TB及以上)内,等待全节点同步完成。

同步全节点后
同步全节点后

启用RPC服务器

启用RPC服务器
启用RPC服务器

使用ord铸造sats/图片

从github下载ord,下载完成后鼠标右键在当前目录打开命令行(如果没有打开命令行选项,尝试shift+鼠标右键)

post image
  • 创建供ord使用的BTC钱包

    创建钱包命令: ord.exe wallet create(powershell命令行下,ord.exe换为.\ord.exe)

  • 生成Taproot格式 地址,往该地址转入任意金额btc供后续使用。

    生成Taproot格式 地址命令:ord.exe --bitcoin-data-dir "E:\Bitcoin\blocks" --cookie-file "E:\Bitcoin\.cookie" wallet receive

  • 铸造铭文

    命令:ord.exe --bitcoin-data-dir "E:\Bitcoin\blocks" --cookie-file "E:\Bitcoin\.cookie" wallet inscribe "E:\Bitcoin\nftFiles\xxxx.sats.txt" --fee-rate 5

    E:\Bitcoin\nftFiles\xxxx.sats.txt 为你stats文件的文件地址(换成图片地址,就是铸造图片)

    -fee-rate 5 为费率,一般填5-25之间

    xxxx.sats.txt为sats域名文件,xxxx为你要注册的域名,内容如下:

    { "p": "sns", "op": "reg", "name": "xxx.sats" }

铸造bypass.sats
铸造bypass.sats
铸造成功
铸造成功
  • 查询域名是否被注册

    铸造sats域名前先到官网查一下是否已被注册,查询方式:https://api.sats.id/names/xxx.sats,xxx即为你要注册的域名,显示{"error":"xxx.sats not found"}则表示该域名尚未被注册。

payload.sats未被注册
payload.sats未被注册

可能遇到的一些报错

一、执行 ord.exe wallet create等命令时,报错 error: failed to connect to Bitcoin Core RPC at 127.0.0.1:8332/wallet/ord using cookie file

post image

解决方法:

在btc core钱包安装目录下找到.cookie文件和blocks文件夹,右键复制文件地址分别填入--cookie-file--bitcoin-data-dir参数后,命令示例:ord.exe --bitcoin-data-dir "E:\Bitcoin\blocks" --cookie-file "E:\Bitcoin\.cookie" wallet create

二、铸造铭文时报错:ERROR ord::index::updater] Couldn't receive txs Failed to fetch raw transaction: code -5 message No such mempool transaction. Use -txindex or provide a block hash to enable blockchain transaction queries. Use gettransaction for wallet transactions.

post image

解决方法:

同步比特币区块链,执行bitcoind.exe -txindex(或bitcoind.exe --datadir=E:\Bitcoin)bitcoin-cli.exe getblockcount

bitcoind.exebitcoin-cli.exe在BTC core安装目录的daemon目录下。(若执行报错,或未解决问题,试一下问题三的解决方法)

三、执行bitcoind.exebitcoin-cli.exe 命令时报错

post image
post image

解决方法:

在BTC core安装目录找到bitcoin.conf文件(没有就新建一个),输入以下内容:

rpcallowip=127.0.0.1 rpcbind=127.0.0.1:8332 rpcport=8332 server=1 datadir=E:\Bitcoin txindex=1

datadir 参数为你的BTC core钱包的安装目录,保存文件后,重启BTC core钱包。如果执行bitcoind.exe --datadir=E:\Bitcoin仍然提示错误如下:

post image

关闭BTC core钱包,执行命令bitcoind.exe --datadir=E:\Bitcoin,成功开始同步区块后再打开BTC core钱包。(关键点是关闭BTC core钱包防止占用端口,bitcoind.exe同步完成后再打开钱包)

post image
post image

执行命令bitcoin-cli.exe -datadir=E:\Bitcoin getblockcount获取最新区块高度

post image

四、报错:error: JSON-RPC error: RPC error response: RpcError { code: -18, message: "Wallet file verification failed. Failed to load database path 'E:\\Bitcoin\\ord'. Data is not in recognized format.", data: None }

post image

解决方法:

找到wallet.dat和wallet.dat-journal文件(非必须),放入ord目录,如:E:\\Bitcoin\\ord目录

post image

常用链接:

https://mempool.space/zh/

< https://hub.cryptocell.guru/ordinalsturbo/>

https://ordinals.com/