I am preventing with PSBT to do a 2: 2 multisig with bitcoin-cli on testnet. These are the steps I comply with:

  • Create a multisig with bitcoin-cli 2 “[“pubkey1”, “pubkey2″]”

  • Create the psbt with createpsbt:

    bitcoin-cli createpsbt ‘[{“txid”: “578b667a5b2498bce06cf4b31e027a5a045af321f2465d3a7d8f302ac61759e6”, “vout”: 1 }, { “txid”: “237bda433527d32ddce8da640e96efcbf3fddc1fbde8add362abe197cc3c151f”, “vout”: 0 }]’ ‘{“knowledge”: “49879816ffbca992d07559d56c0cb8cbc14aa7eb896bc79f532d272595b5906f”, “tb1q369frc2yk5vfly8ya57ed2qr7p3jef6fzaqyz6”: 0.00009500 }’

  • On one signer, name to walletprocesspsbt: bitcoin-cli walletprocesspsbt $psbt

  • If I name right here to analyzepsbt $psbt, that is what I get:

{
  "inputs": [
    {
      "has_utxo": true,
      "is_final": false,
      "next": "updater",
      "missing": {
        "redeemscript": "e6b13137de705c19718f1aaf6f80709a9e6c1a7c"
      }
    },
    {
      "has_utxo": true,
      "is_final": false,
      "next": "updater",
      "missing": {
        "redeemscript": "e6b13137de705c19718f1aaf6f80709a9e6c1a7c"
      }
    }
  ],
  "payment": 0.00000500,
  "subsequent": "updater"
}

So as to add the redeemscript it says is lacking, ¿can I take advantage of walletcreatefundedpsbt? I do this:

bitcoin-cli walletcreatefundedpsbt '[{"txid": "578b667a5b2498bce06cf4b31e027a5a045af321f2465d3a7d8f302ac61759e6", "vout": 1, "scriptPubKey": "a914e6b13137de705c19718f1aaf6f80709a9e6c1a7c87", "witnessScript": "5221021efcdb8d9afb724ae7c58a3886656b56e3311e26f80a1d88e5f1f49e04d30d4b210345beb99ed5fd6ecad0e4a26b797b604495ebf85630c34e126a83c110b76dffdd52ae","amount":0.00005000}, {"txid": "237bda433527d32ddce8da640e96efcbf3fddc1fbde8add362abe197cc3c151f", "vout": 0, "scriptPubKey": "a914e6b13137de705c19718f1aaf6f80709a9e6c1a7c87", "witnessScript": "5221021efcdb8d9afb724ae7c58a3886656b56e3311e26f80a1d88e5f1f49e04d30d4b210345beb99ed5fd6ecad0e4a26b797b604495ebf85630c34e126a83c110b76dffdd52ae","amount":0.00005000}]'  '[{"data": "49879816ffbca992d07559d56c0cb8cbc14aa7eb896bc79f532d272595b5906f"}, {"tb1q369frc2yk5vfly8ya57ed2qr7p3jef6fzaqyz6": 0.00009500 }']

however I get “Inadequate funds” (error -4) ¿What I’ lacking or put it fallacious on walletcreatefundedpsbt command?

Thanks very a lot! 😀

Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here