• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

multi signature – Signing a Bech32 Multisig with Bitcoin Core

Moussa by Moussa
April 3, 2026
in Bitcoin
0
How do Bitcoin mining pools typically handle payout frequency versus thresholds?
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


I’ve created a multisig address with Bitcoin Core:

$ bitcoin-cli -named createmultisig nrequired=2 keys=""'["'$pubkey1'","'$pubkey2'"]''' address_type=bech32
{
  "address": "tb1q8cg6qwhhv58zp005w6qnpfx8g6606awkjmf5yzlkulg0sc9phx8sqkltdd",
  "redeemScript": "5221039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d3312103c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c052ae",
  "descriptor": "wsh(multi(2,039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d331,03c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c0))#k626xmlq"
}

I then created a watch-only address to make it easy to access transactions sent to the address:

$ bitcoin-cli -rpcwallet="watchmulti" listunspent
[
  {
    "txid": "eb41b6d829e83d32ae8e3bd80ece0330db959a90a2c2a3d7f9bf7a177836133e",
    "vout": 1,
    "address": "tb1q8cg6qwhhv58zp005w6qnpfx8g6606awkjmf5yzlkulg0sc9phx8sqkltdd",
    "label": "",
    "witnessScript": "5221039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d3312103c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c052ae",
    "scriptPubKey": "00203e11a03af7650e20bdf4768130a4c746b4fd75d696d3420bf6e7d0f860a1b98f",
    "amount": 0.00200000,
    "confirmations": 23,
    "spendable": true,
    "solvable": true,
    "desc": "wsh(multi(2,[38101947]039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d331,[0394feb3]03c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c0))#n5s3dxtx",
    "parent_descs": [
      "wsh(multi(2,039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d331,03c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c0))#k626xmlq"
    ],
    "safe": true
  }
]

I then created a transaction to spend some of the money:

utxo_txid=$(bitcoin-cli -rpcwallet="watchmulti" listunspent | jq -r '.[0] | .txid') 
utxo_vout=$(bitcoin-cli -rpcwallet="watchmulti" listunspent | jq -r '.[0] | .vout')
utxo_pubkey=$(bitcoin-cli -rpcwallet="watchmulti" listunspent | jq -r '.[0] | .scriptPubKey')

redeem_script="5221039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d3312103c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c052ae"

$ rawtxhex=$(bitcoin-cli -named createrawtransaction inputs=""'[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs=""'{ "'$recipient'": 0.01, "'$change'": 0.0099  }''')

$ bitcoin-cli decoderawtransaction $rawtxhex
{
  "txid": "2f07d92f7e13c13ced08ebaf63881fb804d05e5413d0013dbb559dc0805ee8f0",
  "hash": "2f07d92f7e13c13ced08ebaf63881fb804d05e5413d0013dbb559dc0805ee8f0",
  "version": 2,
  "size": 125,
  "vsize": 125,
  "weight": 500,
  "locktime": 0,
  "vin": [
    {
      "txid": "eb41b6d829e83d32ae8e3bd80ece0330db959a90a2c2a3d7f9bf7a177836133e",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.01000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 933439cf21eeff085ad1cc9ceb506810fd823779",
        "desc": "addr(tb1qjv6rnnepamlsskk3ejwwk5rgzr7cydmeyaktds)#md8rtul5",
        "hex": "0014933439cf21eeff085ad1cc9ceb506810fd823779",
        "address": "tb1qjv6rnnepamlsskk3ejwwk5rgzr7cydmeyaktds",
        "type": "witness_v0_keyhash"
      }
    },
    {
      "value": 0.00990000,
      "n": 1,
      "scriptPubKey": {
        "asm": "0 3e11a03af7650e20bdf4768130a4c746b4fd75d696d3420bf6e7d0f860a1b98f",
        "desc": "addr(tb1q8cg6qwhhv58zp005w6qnpfx8g6606awkjmf5yzlkulg0sc9phx8sqkltdd)#vjkdfwda",
        "hex": "00203e11a03af7650e20bdf4768130a4c746b4fd75d696d3420bf6e7d0f860a1b98f",
        "address": "tb1q8cg6qwhhv58zp005w6qnpfx8g6606awkjmf5yzlkulg0sc9phx8sqkltdd",
        "type": "witness_v0_scripthash"
      }
    }
  ]
}

But when I try to sign with a wallet holding one of the private keys, I get “Witness program was passed an empty witness”

$ bitcoin-cli -rpcwallet="" -named signrawtransactionwithwallet hexstring=$rawtxhex prevtxs=""'[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout', "scriptPubKey": "'$utxo_pubkey'", "redeemScript": "5221039395fa19d6512f03043210cd3e9a03a850f7a8d986c8f35d30f2efc281a8d3312103c57ed70775d7a616778514e738fef0946b4be4ee32440b19f65ddd6e345983c052ae", "amount": 0.02 } ]'''
{
  "hex": "02000000013e133678177abff9d7a3c2a2909a95db3003ce0ed83b8eae323de829d8b641eb0100000000fdffffff0240420f0000000000160014933439cf21eeff085ad1cc9ceb506810fd823779301b0f00000000002200203e11a03af7650e20bdf4768130a4c746b4fd75d696d3420bf6e7d0f860a1b98f00000000",
  "complete": false,
  "errors": [
    {
      "txid": "eb41b6d829e83d32ae8e3bd80ece0330db959a90a2c2a3d7f9bf7a177836133e",
      "vout": 1,
      "witness": [
      ],
      "scriptSig": "",
      "sequence": 4294967293,
      "error": "Witness program was passed an empty witness"
    }
  ]
}

Any ideas what I’m missing here.

(Obviously, PSBTs are the most up to date way to do this, but I want to demonstrate one of the classic bitcoin-cli methods before going there, and since I can’t dump private keys any more, this seems like the only option.)



Source link

Related articles

Ethereum Leaving Cryptocurrency Exchanges At Historic Rate, Are Traders Preparing For A Potential Rally?

Ethereum Leaving Cryptocurrency Exchanges At Historic Rate, Are Traders Preparing For A Potential Rally?

April 2, 2026
Ethereum Absorbs $1B In An Hour As Trump Signals Escalation

Ethereum Absorbs $1B In An Hour As Trump Signals Escalation

April 2, 2026
Share76Tweet47

Related Posts

Ethereum Leaving Cryptocurrency Exchanges At Historic Rate, Are Traders Preparing For A Potential Rally?

Ethereum Leaving Cryptocurrency Exchanges At Historic Rate, Are Traders Preparing For A Potential Rally?

by Moussa
April 2, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure The Ethereum price temporarily flipped bullish on...

Ethereum Absorbs $1B In An Hour As Trump Signals Escalation

Ethereum Absorbs $1B In An Hour As Trump Signals Escalation

by Moussa
April 2, 2026
0

Ethereum is fighting to hold $2,000. The market is volatile. And the reason has nothing to do with on-chain data,...

Coinbase Receives OCC Nod To Form National Trust Company

Coinbase Receives OCC Nod To Form National Trust Company

by Moussa
April 2, 2026
0

Coinbase has received conditional approval from the Office of the Comptroller of the Currency to establish Coinbase National Trust Company,...

CFTC and DOJ Sue 3 States as Jurisdiction Battle Raises Stakes for Prediction Markets – Regulation Bitcoin News

CFTC and DOJ Sue 3 States as Jurisdiction Battle Raises Stakes for Prediction Markets – Regulation Bitcoin News

by Moussa
April 2, 2026
0

CFTC-DOJ Lawsuits Target State Control Over Prediction Markets Authority The Commodity Futures Trading Commission (CFTC), the U.S. derivatives regulator, and...

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

vanity address – Bitcoin Vanitygen > how to edit .cl kernel file to so that it will verify the public key directly instead

by Moussa
April 2, 2026
0

Each additional specific character you want in your vanity address will make the search 58x as long. In other words,...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTIwdHlwZSUzRCUyMnRleHQlMjIlMjBuYW1lJTNEJTIybm4lMjIlMjBpZCUzRCUyMnRucC0xJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1lbWFpbCUyMiUzRSUzQ2xhYmVsJTIwZm9yJTNEJTIydG5wLTIlMjIlM0VFbWFpbCUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1lbWFpbCUyMiUyMHR5cGUlM0QlMjJlbWFpbCUyMiUyMG5hbWUlM0QlMjJuZSUyMiUyMGlkJTNEJTIydG5wLTIlMjIlMjB2YWx1ZSUzRCUyMiUyMiUyMHJlcXVpcmVkJTNFJTNDJTJGZGl2JTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJ0bnAtZmllbGQlMjB0bnAtcHJpdmFjeS1maWVsZCUyMiUzRSUzQ2xhYmVsJTNFJTNDaW5wdXQlMjB0eXBlJTNEJTIyY2hlY2tib3glMjIlMjBuYW1lJTNEJTIybnklMjIlMjByZXF1aXJlZCUyMGNsYXNzJTNEJTIydG5wLXByaXZhY3klMjIlM0UlQzIlQTBCeSUyMGNvbnRpbnVpbmclMkMlMjB5b3UlMjBhY2NlcHQlMjB0aGUlMjBwcml2YWN5JTIwcG9saWN5JTNDJTJGbGFiZWwlM0UlM0MlMkZkaXYlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1idXR0b24lMjIlM0UlM0NpbnB1dCUyMGNsYXNzJTNEJTIydG5wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News