Skip to content

Instantly share code, notes, and snippets.

@nopara73
Last active April 15, 2019 22:18
Show Gist options
  • Save nopara73/18d77ccb2242d04c508ab1d237fe2ae5 to your computer and use it in GitHub Desktop.
Save nopara73/18d77ccb2242d04c508ab1d237fe2ae5 to your computer and use it in GitHub Desktop.
Coldcard + Wasabi

1. PSBT passed to Coldcard (Hex + Decoded)

cHNidP8BAFIBAAAAAc7zcL29QILOKmfw2HxoIPW+ptT73rk9dlDTKAKnDZTvAQAAAAD/////AXjzAgAAAAAAFgAUyI/BVg66hOg6mhA75T7jNY4Q9LcAAAAAAAEBH0ANAwAAAAAAFgAUqzA+o/d8FXwN9KUcOx8sOnTCrlEiBgIn178QYmbFrS8Bge/N+qOdlTmwHmXldAfk1XwRUxUutBh6iOeiVAAAgAAAAIAAAACAAAAAAAEAAAAAIgICCkeqqmQACENtyZREwn1I4O7gA6eAVfNwPgEeYM/EaisYeojnolQAAIAAAACAAAAAgAAAAAADAAAAAA==


{
  "tx": {
    "txid": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
    "hash": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
    "version": 1,
    "size": 82,
    "vsize": 82,
    "weight": 328,
    "locktime": 0,
    "vin": [
      {
        "txid": "ef940da70228d350763db9defbd4a6bef520687cd8f0672ace8240bdbd70f3ce",
        "vout": 1,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967295
      }
    ],
    "vout": [
      {
        "value": 0.00193400,
        "n": 0,
        "scriptPubKey": {
          "asm": "0 c88fc1560eba84e83a9a103be53ee3358e10f4b7",
          "hex": "0014c88fc1560eba84e83a9a103be53ee3358e10f4b7",
          "reqSigs": 1,
          "type": "witness_v0_keyhash",
          "addresses": [
            "bc1qez8uz4swh2zwsw56zqa720hrxk8ppa9he6gfmx"
          ]
        }
      }
    ]
  },
  "unknown": {
  },
  "inputs": [
    {
      "witness_utxo": {
        "amount": 0.00200000,
        "scriptPubKey": {
          "asm": "0 ab303ea3f77c157c0df4a51c3b1f2c3a74c2ae51",
          "hex": "0014ab303ea3f77c157c0df4a51c3b1f2c3a74c2ae51",
          "type": "witness_v0_keyhash",
          "address": "bc1q4vcraglh0s2hcr0555wrk8ev8f6v9tj3chsdep"
        }
      },
      "bip32_derivs": [
        {
          "pubkey": "0227d7bf106266c5ad2f0181efcdfaa39d9539b01e65e57407e4d57c1153152eb4",
          "master_fingerprint": "7a88e7a2",
          "path": "m/84'/0'/0'/0/1"
        }
      ]
    }
  ],
  "outputs": [
    {
      "bip32_derivs": [
        {
          "pubkey": "020a47aaaa640008436dc99444c27d48e0eee003a78055f3703e011e60cfc46a2b",
          "master_fingerprint": "7a88e7a2",
          "path": "m/84'/0'/0'/0/3"
        }
      ]
    }
  ],
  "fee": 0.00006600
}

2. Signed PSBT got from Coldcard (Hex + Decoded)

cHNidP8BAFIBAAAAAc7zcL29QILOKmfw2HxoIPW+ptT73rk9dlDTKAKnDZTvAQAAAAD/////AXjzAgAAAAAAFgAUyI/BVg66hOg6mhA75T7jNY4Q9LcAAAAAAAEBH0ANAwAAAAAAFgAUqzA+o/d8FXwN9KUcOx8sOnTCrlEBAwQBAAAAIgICJ9e/EGJmxa0vAYHvzfqjnZU5sB5l5XQH5NV8EVMVLrRGMEQCICehU3gWZZ7JIVhC/Oxup5uhsEQLDevGowh27i6kU5SHAiBIo/iRhFyuEcgkdThd1pa5g/DmoIrVTo9r8lXd+5f37SIGAifXvxBiZsWtLwGB7836o52VObAeZeV0B+TVfBFTFS60GHqI56JUAACAAAAAgAAAAIAAAAAAAQAAAAAiAgIKR6qqZAAIQ23JlETCfUjg7uADp4BV83A+AR5gz8RqKxh6iOeiVAAAgAAAAIAAAACAAAAAAAMAAAAA
{
  "tx": {
    "txid": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
    "hash": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
    "version": 1,
    "size": 82,
    "vsize": 82,
    "weight": 328,
    "locktime": 0,
    "vin": [
      {
        "txid": "ef940da70228d350763db9defbd4a6bef520687cd8f0672ace8240bdbd70f3ce",
        "vout": 1,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967295
      }
    ],
    "vout": [
      {
        "value": 0.00193400,
        "n": 0,
        "scriptPubKey": {
          "asm": "0 c88fc1560eba84e83a9a103be53ee3358e10f4b7",
          "hex": "0014c88fc1560eba84e83a9a103be53ee3358e10f4b7",
          "reqSigs": 1,
          "type": "witness_v0_keyhash",
          "addresses": [
            "bc1qez8uz4swh2zwsw56zqa720hrxk8ppa9he6gfmx"
          ]
        }
      }
    ]
  },
  "unknown": {
  },
  "inputs": [
    {
      "witness_utxo": {
        "amount": 0.00200000,
        "scriptPubKey": {
          "asm": "0 ab303ea3f77c157c0df4a51c3b1f2c3a74c2ae51",
          "hex": "0014ab303ea3f77c157c0df4a51c3b1f2c3a74c2ae51",
          "type": "witness_v0_keyhash",
          "address": "bc1q4vcraglh0s2hcr0555wrk8ev8f6v9tj3chsdep"
        }
      },
      "partial_signatures": {
        "0227d7bf106266c5ad2f0181efcdfaa39d9539b01e65e57407e4d57c1153152eb4": "3044022027a1537816659ec9215842fcec6ea79ba1b0440b0debc6a30876ee2ea4539487022048a3f891845cae11c82475385dd696b983f0e6a08ad54e8f6bf255ddfb97f7ed"
      },
      "sighash": "ALL",
      "bip32_derivs": [
        {
          "pubkey": "0227d7bf106266c5ad2f0181efcdfaa39d9539b01e65e57407e4d57c1153152eb4",
          "master_fingerprint": "7a88e7a2",
          "path": "m/84'/0'/0'/0/1"
        }
      ]
    }
  ],
  "outputs": [
    {
      "bip32_derivs": [
        {
          "pubkey": "020a47aaaa640008436dc99444c27d48e0eee003a78055f3703e011e60cfc46a2b",
          "master_fingerprint": "7a88e7a2",
          "path": "m/84'/0'/0'/0/3"
        }
      ]
    }
  ],
  "fee": 0.00006600
}

3. PSBT after Finalize() (Hex + Decoded)

cHNidP8BAFIBAAAAAc7zcL29QILOKmfw2HxoIPW+ptT73rk9dlDTKAKnDZTvAQAAAAD/////AXjzAgAAAAAAFgAUyI/BVg66hOg6mhA75T7jNY4Q9LcAAAAAAAEBH0ANAwAAAAAAFgAUqzA+o/d8FXwN9KUcOx8sOnTCrlEBCGsCRzBEAiAnoVN4FmWeySFYQvzsbqebobBECw3rxqMIdu4upFOUhwIgSKP4kYRcrhHIJHU4XdaWuYPw5qCK1U6Pa/JV3fuX9+0BIQIn178QYmbFrS8Bge/N+qOdlTmwHmXldAfk1XwRUxUutAAiAgIKR6qqZAAIQ23JlETCfUjg7uADp4BV83A+AR5gz8RqKxh6iOeiVAAAgAAAAIAAAACAAAAAAAMAAAAA
{
  "tx": {
    "txid": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
    "hash": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
    "version": 1,
    "size": 82,
    "vsize": 82,
    "weight": 328,
    "locktime": 0,
    "vin": [
      {
        "txid": "ef940da70228d350763db9defbd4a6bef520687cd8f0672ace8240bdbd70f3ce",
        "vout": 1,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967295
      }
    ],
    "vout": [
      {
        "value": 0.00193400,
        "n": 0,
        "scriptPubKey": {
          "asm": "0 c88fc1560eba84e83a9a103be53ee3358e10f4b7",
          "hex": "0014c88fc1560eba84e83a9a103be53ee3358e10f4b7",
          "reqSigs": 1,
          "type": "witness_v0_keyhash",
          "addresses": [
            "bc1qez8uz4swh2zwsw56zqa720hrxk8ppa9he6gfmx"
          ]
        }
      }
    ]
  },
  "unknown": {
  },
  "inputs": [
    {
      "witness_utxo": {
        "amount": 0.00200000,
        "scriptPubKey": {
          "asm": "0 ab303ea3f77c157c0df4a51c3b1f2c3a74c2ae51",
          "hex": "0014ab303ea3f77c157c0df4a51c3b1f2c3a74c2ae51",
          "type": "witness_v0_keyhash",
          "address": "bc1q4vcraglh0s2hcr0555wrk8ev8f6v9tj3chsdep"
        }
      },
      "final_scriptwitness": [
        "3044022027a1537816659ec9215842fcec6ea79ba1b0440b0debc6a30876ee2ea4539487022048a3f891845cae11c82475385dd696b983f0e6a08ad54e8f6bf255ddfb97f7ed01",
        "0227d7bf106266c5ad2f0181efcdfaa39d9539b01e65e57407e4d57c1153152eb4"
      ]
    }
  ],
  "outputs": [
    {
      "bip32_derivs": [
        {
          "pubkey": "020a47aaaa640008436dc99444c27d48e0eee003a78055f3703e011e60cfc46a2b",
          "master_fingerprint": "7a88e7a2",
          "path": "m/84'/0'/0'/0/3"
        }
      ]
    }
  ],
  "fee": 0.00006600
}

4. Transaction after Extraction, before Broadcasting (Hex + Decoded)

0100000001cef370bdbd4082ce2a67f0d87c6820f5bea6d4fbdeb93d7650d32802a70d94ef0100000000ffffffff0178f3020000000000160014c88fc1560eba84e83a9a103be53ee3358e10f4b700000000
{
  "txid": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
  "hash": "a56d84c1aa8ed65c4b572352d630e0c6706a63c87667ba42a373eab195c0273f",
  "version": 1,
  "size": 82,
  "vsize": 82,
  "weight": 328,
  "locktime": 0,
  "vin": [
    {
      "txid": "ef940da70228d350763db9defbd4a6bef520687cd8f0672ace8240bdbd70f3ce",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00193400,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 c88fc1560eba84e83a9a103be53ee3358e10f4b7",
        "hex": "0014c88fc1560eba84e83a9a103be53ee3358e10f4b7",
        "reqSigs": 1,
        "type": "witness_v0_keyhash",
        "addresses": [
          "bc1qez8uz4swh2zwsw56zqa720hrxk8ppa9he6gfmx"
        ]
      }
    }
  ]
}

5. Bitcoin Core sendrawtransaction Error

non-mandatory-script-verify-flag (Witness program hash mismatch) (code 64) (code -26)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment