taproot – Subscribe PSBT inputs by way of Golang

I wrote the code to partially signal the PSBT. Briefly the server sends me a PSBT in Base64 format and N inputs to be signed. I encode the PSBT, signal the inputs with PK utilizing Schnorr technique. I replace it again to Base64 and ship it to the server (not finalised PSBT with unsigned enter 0).

That is the way it ought to seem like after processing (appropriate):

{
    { ‘consequence’: {
        { ‘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’.
            }
        ],
        ‘price": 1.328e-5,
        ‘subsequent": { ‘updater’
    },
    ‘error": null,
    ‘id": null
}

That is what it seems like after being processed by my script. The Updater standing ought to change to finaliser for these inputs I signed, nevertheless it does not (incorrect) :

{
    "consequence": {
        "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,
        "price": 2.002e-5,
        "subsequent": "updater"
    },
    "error": null,
    "id": null
}

I checked signatures (they’re appropriate), in contrast appropriate partially signed PSBT and my very own (no variations besides txid, which will probably be distinctive each time), even tried to finalise PSBT (though it’s completely not want), however I nonetheless could not perceive why the standing of inputs stays Updater, when it’s despatched with finilize when signed by way of any pockets extension.I do not even perceive the place the error could possibly be, since I do the logs BEFORE signing and AFTER signing, and their standing within the logs is up to date. Additionally, for those who take the PSBT after my code has processed it and decoded it, it does replace and isn’t any completely different from the proper one aside from the TXid.

I am an entire beginner at coding, sorry if I mentioned something flawed

Leave a Reply

Your email address will not be published. Required fields are marked *