Skip to content

elements-cli decodepsbt doesn't set inputs.witness_utxo.asset field #1371

@roconnor-blockstream

Description

@roconnor-blockstream

Example:

$ VOUT=0

$ TXID=905e43dfb58c9d7d02512b17f118e44205d773fa5c414a9f8899ffc24f399751

$ PSET=$(result/bin/elements-cli utxoupdatepsbt $(result/bin/elements-cli createpsbt "[{\"txid\": \"$TXID\", \"vout\": $VOUT, \"sequence\": 4294967294}]" "[{\"tex1qyh6tyhspd9w8jhqee8a2uzvyk9lnwp2n8ssur0\": 0.000008, \"blinder_index\": 0}, {\"fee\": 0.000001}]"))

$ result/bin/elements-cli decodepsbt $PSET
{
  "global_xpubs": [
  ],
  "tx_version": 2,
  "fallback_locktime": 0,
  "input_count": 1,
  "output_count": 1,
  "psbt_version": 2,
  "proprietary": [
  ],
  "fees": {
    "bitcoin": 0.00000100
  },
  "unknown": {
  },
  "inputs": [
    {
      "witness_utxo": {
        "amount": 0.00000900,
        "scriptPubKey": {
          "asm": "0 25f4b25e01695c795c19c9faae0984b17f370553",
          "desc": "addr(tex1qyh6tyhspd9w8jhqee8a2uzvyk9lnwp2n8ssur0)#d4ydyt2f",
          "hex": "001425f4b25e01695c795c19c9faae0984b17f370553",
          "address": "tex1qyh6tyhspd9w8jhqee8a2uzvyk9lnwp2n8ssur0",
          "type": "witness_v0_keyhash"
        }
      },
      "previous_txid": "905e43dfb58c9d7d02512b17f118e44205d773fa5c414a9f8899ffc24f399751",
      "previous_vout": 0,
      "sequence": 4294967294
    }
  ],
  "outputs": [
    {
      "amount": 0.00000800,
      "script": {
        "asm": "0 25f4b25e01695c795c19c9faae0984b17f370553",
        "desc": "addr(tex1qyh6tyhspd9w8jhqee8a2uzvyk9lnwp2n8ssur0)#d4ydyt2f",
        "hex": "001425f4b25e01695c795c19c9faae0984b17f370553",
        "address": "tex1qyh6tyhspd9w8jhqee8a2uzvyk9lnwp2n8ssur0",
        "type": "witness_v0_keyhash"
      },
      "asset": "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49",
      "blinder_index": 0
    },
    {
      "amount": 0.00000100,
      "script": {
        "asm": "",
        "desc": "raw()#58lrscpx",
        "hex": "",
        "type": "fee"
      },
      "asset": "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49"
    }
  ]
}

Without the "asset" field from the utxo data, a taproot signature cannot be made.

Other PSET style commands such as walletcreatefundedpsbt appear to have the same issue.

I'm not really sure how/if taproot PSET even works at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions