文章分类: Mixin Safe
本条还可参阅:

如何用 Bitcoin Core 命令行审批交易

如果你还没有使用 Bitcoin Core 作为持有人创建 Safe 金库,请先参考文档
如何用 Bitcoin Core 创建 Safe 金库

创建交易


1、选择要转账的钱包,输入金额和地址:



2、预览并创建交易

3、共管人批准交易



持有人批准交易



1、脚本钱包签名



复制未签名的数据用脚本钱包签名:

$ ./bitcoin-cli --rpcwallet=mixin-safe walletprocesspsbt cHNidP8BAKQCAAAAASTY9uNSG688NchO7NjP2WGb/FAhI8zvvLbe6JgKRW/XAAAAAAD/////AxAnAAAAAAAAIgAgDzOHef9wqSM7pHlAuRNu9/b1x1JLSbsBrWa6rZ2IZNxtaAEAAAAAACIAIA8zh3n/cKkjO6R5QLkTbvf29cdSS0m7Aa1muq2diGTcAAAAAAAAAAASahDLcBbbY1VD+rUrnZAmgUguAAAAAAABASt9jwEAAAAAACIAIA8zh3n/cKkjO6R5QLkTbvf29cdSS0m7Aa1muq2diGTcAQMEgQAAAAEFeCEDsI7quYJvELaFaf+a8m6jUGdenVz5J0wZkM/l188rGGysfCECYTAMsjPwksbC94cTliS4jqTHdOd5s6JXs2ovzxhqCaesk3yCkmMhAm436m4emgGHU+Mok4cwbY1gU1GANJcCHBp89+bAqNq2rQKwAbKSaJNShwAAAAA= true "ALL|ANYONECANPAY"
{
  "psbt": "cHNidP8BAKQCAAAAASTY9uNSG688NchO7NjP2WGb/FAhI8zvvLbe6JgKRW/XAAAAAAD/////AxAnAAAAAAAAIgAgDzOHef9wqSM7pHlAuRNu9/b1x1JLSbsBrWa6rZ2IZNxtaAEAAAAAACIAIA8zh3n/cKkjO6R5QLkTbvf29cdSS0m7Aa1muq2diGTcAAAAAAAAAAASahDLcBbbY1VD+rUrnZAmgUguAAAAAAABASt9jwEAAAAAACIAIA8zh3n/cKkjO6R5QLkTbvf29cdSS0m7Aa1muq2diGTcAQMEgQAAAAEFeCEDsI7quYJvELaFaf+a8m6jUGdenVz5J0wZkM/l188rGGysfCECYTAMsjPwksbC94cTliS4jqTHdOd5s6JXs2ovzxhqCaesk3yCkmMhAm436m4emgGHU+Mok4cwbY1gU1GANJcCHBp89+bAqNq2rQKwAbKSaJNShyIGAmEwDLIz8JLGwveHE5YkuI6kx3TnebOiV7NqL88YagmnBPsUllsiBgJuN+puHpoBh1PjKJOHMG2NYFNRgDSXAhwafPfmwKjatgTDYFu9IgYDsI7quYJvELaFaf+a8m6jUGdenVz5J0wZkM/l188rGGwEr1RUCQABAXghA7CO6rmCbxC2hWn/mvJuo1BnXp1c+SdMGZDP5dfPKxhsrHwhAmEwDLIz8JLGwveHE5YkuI6kx3TnebOiV7NqL88YagmnrJN8gpJjIQJuN+puHpoBh1PjKJOHMG2NYFNRgDSXAhwafPfmwKjatq0CsAGykmiTUociAgJhMAyyM/CSxsL3hxOWJLiOpMd053mzolezai/PGGoJpwT7FJZbIgICbjfqbh6aAYdT4yiThzBtjWBTUYA0lwIcGnz35sCo2rYEw2BbvSICA7CO6rmCbxC2hWn/mvJuo1BnXp1c+SdMGZDP5dfPKxhsBK9UVAkAAQF4IQOwjuq5gm8QtoVp/5rybqNQZ16dXPknTBmQz+XXzysYbKx8IQJhMAyyM/CSxsL3hxOWJLiOpMd053mzolezai/PGGoJp6yTfIKSYyECbjfqbh6aAYdT4yiThzBtjWBTUYA0lwIcGnz35sCo2ratArABspJok1KHIgICYTAMsjPwksbC94cTliS4jqTHdOd5s6JXs2ovzxhqCacE+xSWWyICAm436m4emgGHU+Mok4cwbY1gU1GANJcCHBp89+bAqNq2BMNgW70iAgOwjuq5gm8QtoVp/5rybqNQZ16dXPknTBmQz+XXzysYbASvVFQJAAA=",
  "complete": false
}


注意最后加 true "ALL|ANYONECANPAY" 参数。

2、私钥钱包签名

用私钥钱包签名步骤 1 返回的 psbt 数据:

./bitcoin-cli --rpcwallet=mixin-safe-holder walletprocesspsbt cHNidP8BAKQCAAAAASTY9uNSG688NchO7NjP2WGb/FAhI8zvvLbe6JgKRW/XAAAAAAD/////AxAnAAAA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puHpoBh1PjKJOHMG2NYFNRgDSXAhwafPfmwKjatgTDYFu9IgIDsI7quYJvELaFaf+a8m6jUGdenVz5J0wZkM/l188rGGwEr1RUCQABAXghA7CO6rmCbxC2hWn/mvJuo1BnXp1c+SdMGZDP5dfPKxhsrHwhAmEwDLIz8JLGwveHE5YkuI6kx3TnebOiV7NqL88YagmnrJN8gpJjIQJuN+puHpoBh1PjKJOHMG2NYFNRgDSXAhwafPfmwKjatq0CsAGykmiTUociAgJhMAyyM/CSxsL3hxOWJLiOpMd053mzolezai/PGGoJpwT7FJZbIgICbjfqbh6aAYdT4yiThzBtjWBTUYA0lwIcGnz35sCo2rYEw2BbvSICA7CO6rmCbxC2hWn/mvJuo1BnXp1c+SdMGZDP5dfPKxhsBK9UVAkAAA==",
  "complete": false
}


注意最后加 true "ALL|ANYONECANPAY" 参数。

3、粘贴签名

复制步骤 2 签名返回的 psbt 数据并粘贴到输入框,点击批准按钮完成操作。


持有人拒绝交易



1、私钥钱包签名



复制未签名的数据用私钥钱包签名:

./bitcoin-cli --rpcwallet=mixin-safe-holder signmessage 1Gz4GoSjNV8MxLFt8bE8JTfqJp6b2bXhvZ REVOKE:7bcc9a68-51a0-4e66-95f0-eea16417d802:3af37ce1c54dc1fd03344fcb805f55868fc6ea394dbcc8ab383ec47f65bc5777 
IPpiNMq9aqGuMaDOSs9GdWk+SJIkpSRAY4FY7Ub01WVDfGRjqte89Xmiokyk45Q8cgEmY7b7w+iCrUPIgAQG8Hc=


注意 signmessage 第一个参数是私钥钱包的地址。如果你忘记了私钥钱包的地址,可以根据地址标签查询: ./bitcoin-cli --rpcwallet=mixin-safe-holder getaddressesbylabel safe

2、粘贴签名
复制步骤 1 签名返回的数据并粘贴到输入框,点击拒绝按钮完成操作。

常见问题



error: timeout on transient error: Could not connect to the server 127.0.0.1:8332
可能的原因是因为您重启电脑没有自动运行比特币客户端,执行 ./bitcoind -daemon 并稍等 15 秒(加载索引)再执行就可以了。

error code: -28 error message: Loading block index…
刚执行完 ./bitcoind -daemon 需要等待比特币客户端加载区块索引。

error code: -28 error message: Verifying blocks…
刚执行完 ./bitcoind -daemon 需要等待比特币客户端验证区块数据。

error code: -18 error message: Requested wallet does not exist or is not loaded
可能是因为比特币客户端启动的时候默认没有加载钱包,先执行 ./bitcoin-cli listwallets 命名查看已加载的钱包,确定不在列表里再尝试执行 ./bitcoin-cli loadwallet mixin-safe-holder 手动加载金库的私钥钱包或者脚本钱包。

更新于: 02/08/2023