Tangem Wallet Pack of 2 - Secure Crypto Wallet - Trusted Cold Storage for Bitcoin, Ethereum, NFT's &

Tangem Wallet Pack of 2 - Secure Crypto Wallet - Trusted Cold Storage for Bitcoin, Ethereum, NFT's &
Key item features Ultimate Security: Generates a private key that remains on the card, safeguarding crypto and NFTs from hackers with EAL6+ certification and audited firmware. Versatile Compatibility: Manages over 13,000 tokens across 70+ blockchains, supporting DeFi, NFTs, and DeEx without wires, Bluetooth, or USB. Effortless Operation: Utilizes NFC for secure transactions via a mobile device and the Tangem app, enabling buying and selling crypto with various payment methods. Smart Backup: Features a second Tangem Wallet as a backup, eliminating the need for paper, pictures, or seed phrases for recovery. Durable Design: Boasts IP68 protection against environmental conditions, ensuring longevity and robust physical security. Comprehensive Support: Compatible with Bitcoin, Ethereum, Solana, XRP, USDT, and over 6,000 cryptocurrencies, integrating with dApps and WalletConnect.

LBANK

How to Sign a Musig with Bitcoin Core

I created a musig descriptor with Bitcoin Core:

My addresses:

tpubDCWbaTx1wFG3JHpT5sK7HD2yBDLdoonfz7SN5Jnk3UGXf3EAMNECcDrGQQXP6jccdgcczRnSDTBAXauK19EAbf3KvnHmRCsKk2gGdWP3Xke
tpubDCis6zc7jL21KnV9Rz7zRz2AsFartHsdQx9uVdnd2kVuNpCNX5mhHaMwYrR7YvdT3GKqKVKNDRSz966Z9DjXqUvyz7gHkfh751GBJ68CYab

The keys were master keys from other wallets.

Here was my descriptor:

tr(musig(tpubDCWbaTx1wFG3JHpT5sK7HD2yBDLdoonfz7SN5Jnk3UGXf3EAMNECcDrGQQXP6jccdgcczRnSDTBAXauK19EAbf3KvnHmRCsKk2gGdWP3Xke,tpubDCis6zc7jL21KnV9Rz7zRz2AsFartHsdQx9uVdnd2kVuNpCNX5mhHaMwYrR7YvdT3GKqKVKNDRSz966Z9DjXqUvyz7gHkfh751GBJ68CYab)/<0;1>/*)

No problem with importing or deriving addresses:

$ bitcoin-cli -rpcwallet=musig importdescriptors '''[{ "desc": "'$DESC_WITH_CS'", "timestamp": "now" }]'''

[
  {
    "success": true,
    "warnings": [
      "Range not given, using default keypool range"
    ]
  }
]

$ bitcoin-cli deriveaddresses $DESC_WITH_CS 0
[
  [
    "tb1p8ec2pt8z0djun9q93ld6zex5ep4surrqhqa5za455mw53qdruw6srfsshm"
  ],
  [
    "tb1p3k5h98dr8a7qnzt94sc0mxrkpkdmzuzfp6vgavk62mz63x8nhxyq3ns6ue"
  ]
]

But after I sent funds to address I haven't had any success spending it.

When I tried to create a PSBT, I could walletprocesspsbt with results from my watch-only wallet with the descriptor, but the wallets with the master private keys did nothing.

When I tried to create a raw transaction and tried to sign with the keys, I got "signrawtransactionwithkey". When I instead tried to sign with the wallet, I got "error": "Witness program was passed an empty witness".

$ echo $rawtxhex
0200000001b08b225fa135d9a8826339ac2fa37ef51a61acbbf9b8933ebc98a4b4e15753230000000000fdffffff015099070000000000225120aac35fe91f20d48816b3c83011d117efa35acd2414d36c1e02b0f29fc3106d9000000000

$ bitcoin-cli signrawtransactionwithkey $rawtxhex "[\"tprv8ZgxMBicQKsPeSdLpZFD8rq5tsayj5PbX4Uo9Lm5PkebmzNXnR5aYTixCSJ4AYgPAPrvDHx7K6B3WdoxigCWKnBeR6DSxXzqpCPHQx2EZx9/0/0\", \"tprv8ZgxMBicQKsPdeCH2GoLphFYHXxr1YzG7Fxpc83SAhJukmLD7V73qqRUEN3b4gCrhc4ZaQJjQMXFtpQvc2r7W38FNxLfswiWK3xco12aMPK/0/0\"]"
error code: -5
error message:
Invalid private key

$ bitcoin-cli -rpcwallet=mainwallet signrawtransactionwithwallet $rawtxhex
{
  "hex": "0200000001b08b225fa135d9a8826339ac2fa37ef51a61acbbf9b8933ebc98a4b4e15753230000000000fdffffff015099070000000000225120aac35fe91f20d48816b3c83011d117efa35acd2414d36c1e02b0f29fc3106d9000000000",
  "complete": false,
  "errors": [
    {
      "txid": "235357e1b4a498bc3e93b8f9bbac611af57ea32fac396382a8d935a15f228bb0",
      "vout": 0,
      "witness": [
      ],
      "scriptSig": "",
      "sequence": 4294967293,
      "error": "Witness program was passed an empty witness"
    }
  ]
}

What's the best practice for doing this? (PSBT or raw transaction?)

And what am I doing wrong?

Thanks!



from Recent Questions - Bitcoin Stack Exchange https://ift.tt/9yBmPq7
via IFTTT

Popular posts from this blog

Crypto Exec Warns Tokenization Is Moving Faster Than Expected

Bitcoin Mining Could Be Strengthening The Ruble, Russian Central Bank Says

Nigerian SEC Partners With Police To Tackle Crypto Ponzi Schemes – Details