Skip to content

elements-cli unblindrawtransaction cannot unblind own sent payments #1375

Description

@SwapMarket

There are two bugs:

  1. unblindrawtransaction method changes TxId of the transaction
  2. it does not unblind all outputs, but only those coming back to the wallet (change or deposits)

Have a look:

~ $ elements-cli listtransactions
...
 {
    "address": "tex1q5w27zcjlvrry5fkgez2mvk5jsp8t8c887w7kj9",
    "category": "send",
    "amount": -0.00001234,
    "txid": "97bd4529dcbc5b04b600976031d0ace907ab458121b1d61049029ee1a36c94ae",
...                                                                                                            ...
~ $ elements-cli getrawtransaction 97bd4529dcbc5b04b600976031d0ace907ab458121b1d61049029ee1a36c94ae true
{
  "txid": "97bd4529dcbc5b04b600976031d0ace907ab458121b1d61049029ee1a36c94ae",
...
  "vout": [
    {
      "value-minimum": 0.00000001,
      "value-maximum": 45035996.27370496,
...
    },
    {
      "value-minimum": 0.00000001,
      "value-maximum": 45035996.27370496,
...    },
    {
      "value": 0.00000026,
...        "type": "fee"
      }
..  "hex": "0200000001011a2b2ac527...715192888e9d55f52c0000",
...
}
~ $ elements-cli unblindrawtransaction 0200000001011a2b2ac527...88e9d55f52c0000
{
  "hex": "0200000001011a2b2ac...192888e9d55f52c0000"
}
~ $ elements-cli decoderawtransaction 0200000001011a2b2ac...192888e9d55f52c0000
{
  "txid": "7e7a2d8f297509bab56b9493c95e299b00fef58e80f77f523b96b78e56edcc30",
...
  "vout": [
    {
      "value": 0.00002112,
      "asset": "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49",
...
    },
    {
      "value-minimum": 0.00000001,
      "value-maximum": 45035996.27370496,
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions