Skip to content

amountcommitment or valuecommitment #1389

Description

@carnhofdaki

In listunspent RPC there is ammountcommitment:

$ elements-cli -rpcwallet=real listunspent
[
  {
    "txid": "2ef46ad30a0a002fadb5214c1c746d361a4adfdde1d47a3a6bd77e29229c3151",
    "vout": 1,
    "address": "H4iZbR67ywSKvpRgYqGSuqfmAtJLxgiTQ4",
    "label": "c2",
    "redeemScript": "001489a5ca6bfa43e3e60bc8545fd448262bc29cd587",
    "scriptPubKey": "a914ec395de045564b4851f188d8991b3a11ac7408db87",
    "amount": 0.00000001,
    "assetcommitment": "0b80363e4a0f0332e9a6cd338eed1247eb59242e047b8c2dacdbc9590c609484c6",
    "asset": "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d",
    "amountcommitment": "09ff0377d7f474048fff55c41bfa369624db069f9b30a7e574ab49d335c3a0cbee",
    "amountblinder": "258f64b23ae417a63bf8167728aeecb95889464b1af9b8d1c48ba29670e58933",
    "assetblinder": "75082cc0e11be120913e7f5b8ca74b2019af64812488dfd858a47a3e8db39db8",
    "confirmations": 299187,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([8baa2a22/0'/0'/1213']0274c2569ed3907d21b5b4850daf6a324a402c96e9b4fb67f5bb72f35ce38ce84d))#vs2k8pq9",
    "safe": true
  }
]

But in gettxout RPC output the same is written as valuecommitment:

$ elements-cli -rpcwallet=real gettxout 2ef46ad30a0a002fadb5214c1c746d361a4adfdde1d47a3a6bd77e29229c3151 1
{
  "bestblock": "9fd47ccb007675fc1fb6147c1d62cd9346f76d9e5edbcf4af17d0fc19813d23a",
  "confirmations": 299189,
  "valuecommitment": "09ff0377d7f474048fff55c41bfa369624db069f9b30a7e574ab49d335c3a0cbee",
  "assetcommitment": "0b80363e4a0f0332e9a6cd338eed1247eb59242e047b8c2dacdbc9590c609484c6",
  "commitmentnonce": "",
  "scriptPubKey": {
    "asm": "OP_HASH160 ec395de045564b4851f188d8991b3a11ac7408db OP_EQUAL",
    "desc": "addr(H4iZbR67ywSKvpRgYqGSuqfmAtJLxgiTQ4)#8v4mh22p",
    "hex": "a914ec395de045564b4851f188d8991b3a11ac7408db87",
    "address": "H4iZbR67ywSKvpRgYqGSuqfmAtJLxgiTQ4",
    "type": "scripthash"
  },
  "coinbase": false
}

Could be something to deprecate in the future version. @delta1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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