Web Interstitial Ad Example

Finalize inputs for a merged psbt ‘Can not finalize input #0’

[ad_1]

I have a scenario:
UserA (bc1pmd3tdzucfnpmq2m3d82yzqmht6hp7smfc2g0tze6ywkxn6h258aszxjdn6): wants to sell an inscription. (5d8c42c867f9c09c0a44397ad2c91d73e8ebb7734e75f54f7caba8ea95eba3b6:2)
He signs a psbt with sighashType: SIGHASH_SINGLE | SIGHASH_ANYONECANPAY
This is UserA’s signature:

cHNidP8BAF4CAAAAAbaj65XqqKt8T/V1TnO36+hzHcnSejlECpzA+WfIQoxdAgAAAAD9////Afw6AAAAAAAAIlEg22K2i5hMw7ArcWnUQQN3Xq4fQ2nCkPWLOiOsaerqofsAAAAAAAEA/d4BAgAAAASMSzjR6QUgXDSWOA+sQNf4bWzOYReGHF8N4BIXQ2MjtgUAAAAXFgAU3Wl+KvEF2QESbS+RClYF1qE8d3D/////jEs40ekFIFw0ljgPrEDX+G1szmEXhhxfDeASF0NjI7YEAAAAFxYAFN1pfirxBdkBEm0vkQpWBdahPHdw/////9wqL+G0eFkucpOt6S1icj94cznajBhyztn5rDi5pt8mAAAAAAD9////jEs40ekFIFw0ljgPrEDX+G1szmEXhhxfDeASF0NjI7YGAAAAFxYAFN1pfirxBdkBEm0vkQpWBdahPHdw/////wewBAAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+hxAnAAAAAAAAF6kUWXajjbgezznlfskb/aNjx8WZZD6HmDoAAAAAAAAiUSDbYraLmEzDsCtxadRBA3derh9DacKQ9Ys6I6xp6uqh+yICAAAAAAAAF6kUWXajjbgezznlfskb/aNjx8WZZD6HWAIAAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPodYAgAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+hyi+CAAAAAAAF6kUWXajjbgezznlfskb/aNjx8WZZD6HAAAAAAEBK5g6AAAAAAAAIlEg22K2i5hMw7ArcWnUQQN3Xq4fQ2nCkPWLOiOsaerqofsBCEMBQc+gB2WxaZdqFFPBFOkrOlmn61/UN39sSe6JUftkbY7FDLk0sjzxX18861YQkQ5tTd+u3L0E7y1opoDb2FaS2ViDAAEFIGAnaBw9mcI54tN3rw56wA35VtGaAEzaA3jW9JAf9RUzIQdgJ2gcPZnCOeLTd68OesAN+VbRmgBM2gN41vSQH/UVMxkAS8dMe1YAAIAAAACAAAAAgAEAAAALAAAAAA==

Analizepsbt(userA’s signature) =>

{
  "inputs": [
    {
      "has_utxo": true,
      "is_final": true,
      "next": "extractor"
    }
  ],
  "estimated_vsize": 112,
  "estimated_feerate": -0.00000892,
  "fee": -0.00000100,
  "next": "extractor"
}

UserB wants to buy this, so he signs a psbt with sighashType: SIGHASH_ALL.
UserB’s psbt before signing:

cHNidP8BAP2ZAQIAAAAEtqPrleqoq3xP9XVOc7fr6HMdydJ6OUQKnMD5Z8hCjF0FAAAAAP////+2o+uV6qirfE/1dU5zt+vocx3J0no5RAqcwPlnyEKMXQQAAAAA/////7aj65XqqKt8T/V1TnO36+hzHcnSejlECpzA+WfIQoxdAgAAAAD/////tqPrleqoq3xP9XVOc7fr6HMdydJ6OUQKnMD5Z8hCjF0GAAAAAP////8HsAQAAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPoeYOgAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+h/w6AAAAAAAAIlEg22K2i5hMw7ArcWnUQQN3Xq4fQ2nCkPWLOiOsaerqofsiAgAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+h1gCAAAAAAAAF6kUWXajjbgezznlfskb/aNjx8WZZD6HWAIAAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPodaNAgAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+hwAAAAAAAQD9ZQMCAAAAAAEEjEs40ekFIFw0ljgPrEDX+G1szmEXhhxfDeASF0NjI7YFAAAAFxYAFN1pfirxBdkBEm0vkQpWBdahPHdw/////4xLONHpBSBcNJY4D6xA1/htbM5hF4YcXw3gEhdDYyO2BA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jbgezznlfskb/aNjx8WZZD6HWAIAAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPodYAgAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+hyi+CAAAAAAAF6kUWXajjbgezznlfskb/aNjx8WZZD6HAkcwRAIgG53i/OqVmJENQK5KVQreSWpwk88Io5C9SeZejI68hPkCIDiUPYjSBAdK2l6q7JlRsSBPBmsv7+iYOiMftmlV1GQVAiEDlpQmd3flMdeEOmfbEHTspwJg+jZ92F/RZE0m291bovgCSDBFAiEAsNlrxKViMCAJjX7iS2yGKWwbgWMHP3XspiU1VQUAMqECIFsGhFHWh8pKEd9qJu5hJOs5vzhRC1bcqyUAOkkfa2yqAiEDlpQmd3flMdeEOmfbEHTspwJg+jZ92F/RZE0m291bovgBQfAFGLcxgcEHHr3GT6ajB85OUQS7PorIs/ZesM1+9DL+LKEO7GbhXmblpHi951Ca5G8xafOQTzwOUkZXgTwBziiDAkcwRAIgcO5Hu1GyC36IWa5PUoxoF1DnB9hm/OrWu93n2ztgoiMCIE9I318vatw868LFWGDjnbp3kTf0fhq38eANIZ7cjzBeAiEDlpQmd3flMdeEOmfbEHTspwJg+jZ92F/RZE0m291bovgAAAAAAQEgKL4IAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPocBBxcWABTdaX4q8QXZARJtL5EKVgXWoTx3cAEIbAJIMEUCIQCXlWsj2VH9pfBIi57sGWKOUlL0e4zml8VLF7H8V55WxgIgPyQzPWQemUJqsFO8HXCK0FVos0YdL/n619lxfK5LFbIBIQOWlCZ3d+Ux14Q6Z9sQdOynAmD6Nn3YX9FkTSbb3Vui+AAAAAAAAAAA

Analizepsbt(userB’s signature) =>

{
  "inputs": [
    {
      "has_utxo": true,
      "is_final": true,
      "next": "extractor"
    },
    {
      "has_utxo": true,
      "is_final": true,
      "next": "extractor"
    },
    {
      "has_utxo": true,
      "is_final": false,
      "next": "finalizer"
    },
    {
      "has_utxo": true,
      "is_final": true,
      "next": "extractor"
    }
  ],
  "estimated_vsize": 576,
  "estimated_feerate": 0.00049000,
  "fee": 0.00028224,
  "next": "finalizer"
}

(the 3rd input is not finalized because it is the UserA’s incription)

Merging UserA and UserB signature (copying the UserA’s inputs[0] singature over the UserB’s inpust[2] singature):

(buyerSignedPsbt.data.globalMap.unsignedTx as any).tx.ins[2] = (
      sellerSignedPsbt.data.globalMap.unsignedTx as any
    ).tx.ins[0];
    buyerSignedPsbt.data.inputs[2] = sellerSignedPsbt.data.inputs[0];
cHNidP8BAP2ZAQIAAAAEtqPrleqoq3xP9XVOc7fr6HMdydJ6OUQKnMD5Z8hCjF0FAAAAAP////+2o+uV6qirfE/1dU5zt+vocx3J0no5RAqcwPlnyEKMXQQAAAAA/////7aj65XqqKt8T/V1TnO36+hzHcnSejlECpzA+WfIQoxdAgAAAAD9////tqPrleqoq3xP9XVOc7fr6HMdydJ6OUQKnMD5Z8hCjF0GAAAAAP////8HsAQAAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPoeYOgAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+h/w6AAAAAAAAIlEg22K2i5hMw7ArcWnUQQN3Xq4fQ2nCkPWLOiOsaerqofsiAgAAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+h1gCAAAAAAAAF6kUWXajjbgezznlfskb/aNjx8WZZD6HWAIAAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPodaNAgAAAAAABepFFl2o424Hs855X7JG/2jY8fFmWQ+hwAAAAAAAQD9ZQMCAAAAAAEEjEs40ekFIFw0ljgPrEDX+G1szmEXhhxfDeASF0NjI7YFAAAAFxYAFN1pfirxBdkBEm0vkQpWBdahPHdw/////4xLONHpBSBcNJY4D6xA1/htbM5hF4YcXw3gEhdDYyO2BAAAABcWABTdaX4q8QXZARJtL5EKVgXWoTx3cP/////cKi/htHhZLnKTrektYnI/eHM52owYcs7Z+aw4uabfJgAAAAAA/f///4xLONHpBSBcNJY4D6xA1/htbM5hF4Y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jzBeAiEDlpQmd3flMdeEOmfbEHTspwJg+jZ92F/RZE0m291bovgAAAAAAQEgKL4IAAAAAAAXqRRZdqONuB7POeV+yRv9o2PHxZlkPocBBxcWABTdaX4q8QXZARJtL5EKVgXWoTx3cAEIbAJIMEUCIQCXlWsj2VH9pfBIi57sGWKOUlL0e4zml8VLF7H8V55WxgIgPyQzPWQemUJqsFO8HXCK0FVos0YdL/n619lxfK5LFbIBIQOWlCZ3d+Ux14Q6Z9sQdOynAmD6Nn3YX9FkTSbb3Vui+AAAAAAAAAAA

Analizepsbt(merged signatures) =>

{
  "inputs": [
    {
      "has_utxo": true,
      "is_final": false,
      "next": "finalizer"
    },
    {
      "has_utxo": true,
      "is_final": false,
      "next": "finalizer"
    },
    {
      "has_utxo": true,
      "is_final": true,
      "next": "extractor"
    },
    {
      "has_utxo": true,
      "is_final": true,
      "next": "extractor"
    }
  ],
  "estimated_vsize": 576,
  "estimated_feerate": 0.00056000,
  "fee": 0.00032256,
  "next": "finalizer"
}

I find this result very odd because the base psbt in this merge is the UserB’s signature. but somehow the merging process alters the validity of UserB’s inputs singatures.
If I try to finalize the inputs, I receive: ‘Can not finalize input #0’

Any clue?

Thx a lot

[ad_2]

Source link