amountcommitment or valuecommitment
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by inspecting the listunspent and gettxout RPC implementations and their existing tests, if present, to compare how the commitment fields are exposed. Clarify the intended field name and compatibility or deprecation requirements; done means the two RPC outputs follow the agreed naming consistently with appropriate coverage.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 418
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 15
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ElementsProject/elements
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
ElementsProject/elements#1555 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
ElementsProject/elements#1521 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
ElementsProject/elements#1516 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ElementsProject/elements#1502 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
ElementsProject/elements#1500 · 2 comments ·
All issues in ElementsProject/elements
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100