Subscribe PSBT inputs via Golang

I wrote the code to partially sign the PSBT. Briefly the server sends me a PSBT in Base64 format and N inputs to be signed. I encode the PSBT, sign the inputs with PK using Schnor method. I update it back to Base64 and send it to the server (not finalised PSBT with unsigned input 0).

This is how it should look like after processing (correct): { { ‘result’: { { ‘inputs’: [ { ‘has_utxo": true, ‘is_final": false, { ‘next’: { ‘updater’. }, { ‘has_utxo": true, ‘is_final": false, { ‘next’: ‘finalizer’. }, { ‘has_utxo": true, ‘is_final": false, { ‘next’: ‘finalizer’. } ], ‘fee": 1.328e-5, ‘next": { ‘updater’ }, ‘error": null, ‘id": null }

This is what it looks like after being processed by my script. The Updater status should change to finaliser for those inputs I signed, but it doesn't (incorrect) :

{ "result": { "inputs": [ { "has_utxo": true, "is_final": false, "next": "updater" }, { "has_utxo": true, "is_final": false, "next": "updater" } ], "estimated_vsize": 286, "estimated_feerate": 7.0e-5, "fee": 2.002e-5, "next": "updater" }, "error": null, "id": null }

I checked signatures (they are correct), compared correct partially signed PSBT and my own (no differences except txid, which will be unique every time), even tried to finalise PSBT (although it is absolutely not need), but I still couldn't understand why the status of inputs remains Updater, when it is sent with finilize when signed via any wallet extension.I don't even understand where the error could be, since I do the logs BEFORE signing and AFTER signing, and their status in the logs is updated. Also, if you take the PSBT after my code has processed it and decoded it, it does update and is no different from the correct one except for the TXid.

I'm a complete newbie at coding, sorry if I said anything wrong



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

Popular posts from this blog

Do Kwon’s Detention Prolonged Until 2024 As Montenegro Responds To Extradition Requests

Sam Bankman-Fried Trial Begins Tomorrow: 3 Reasons Ex-SEC Official Foresees Conviction

April’s Crypto Game-Changers: 7 Events Set To Drastically Impact The Course Of Digital Currencies