Even though missing
is optional, all its field are also all optional.
estimated_vsize
is optional (calculate alongside estimated_feerate
).
Make estimated_feerate
output numeric.
Even though missing
is optional, all its field are also all optional.
estimated_vsize
is optional (calculate alongside estimated_feerate
).
Make estimated_feerate
output numeric.
1873- " \"redeemscript\" : \"hash\" (string) Hash160 of the redeemScript that is missing\n"
1874- " \"witnessscript\" : \"hash\" (string) SHA256 of the witnessScript that is missing\n"
1875+ " \"redeemscript\" : \"hash\" (string, optional) Hash160 of the redeemScript that is missing\n"
1876+ " \"witnessscript\" : \"hash\" (string, optional) SHA256 of the witnessScript that is missing\n"
1877 " }\n"
1878 " \"next\" : \"role\" (string) Role of the next person that this input needs to go to\n"
Looks like next
(inside inputs) is also optional. i.e for:
bitcoin-cli analyzepsbt "cHNidP8BAJoCAAAAAljoeiG1ba8MI76OcHBFbDNvfLqlyHV5JPVFiHuyq911AAAAAAD/////g40EJ9DsZQpoqka7CwmK6kQiwHGyyng1Kgd5WdB86h0BAAAAAP////8CcKrwCAAAAAAWABTYXCtx0AYLCcmIauuBXlCZHdoSTQDh9QUAAAAAFgAUAK6pouXw+HaliN9VRuh0LR2HAI8AAAAAAAEAuwIAAAABqtc5MQGL0l+ErkALaISL4J23BurCrBgpi6vucatlb4sAAAAASEcwRAIgWPb8fGoz4bMVSNSByCbAFb0wE1qtQs1neQ2rZtKtJDsCIEoc7SYExnNbY5PltBaR3XiwDwxZQvufdRhW+qk4FX26Af7///8CgPD6AgAAAAAXqRQPuUY0IWlrgsgzryQceMF9295JNIfQ8gonAQAAABepFCnKdPigj4GZlCgYXJe12FLkBj9hh2UAAAABB9oARzBEAiB0AYrUGACXuHMyPAAVcgs2hMyBI4kQSOfbzZtVrWecmQIgc9Npt0Dj61Pc76M4I8gHBRTKVafdlUTxV8FnkTJhEYwBSDBFAiEA9hA4swjcHahlo0hSdG8BV3KTQgjG0kRUOTzZm98iF3cCIAVuZ1pnWm0KArhbFOXikHTYolqbV2C+ooFvZhkQoAbqAUdSIQKVg785rgpgl0etGZrd1jT6YQhVnWxc05tMIYPxq5bgfyEC2rYf9JoU22p9ArDNH7t4/EsYMStbTlTa5Nui+/71NtdSrgABASAAwusLAAAAABepFLf1+vQOPUClpFmx2zU18rcvqSHohwEHIyIAIIwjUxc3Q7WV37Sge3K6jkLjeX2nTof+fZ10l+OyAokDAQjaBABHMEQCIGLrelVhB6fHP0WsSrWh3d9vcHX7EnWWmn84Pv/3hLyyAiAMBdu3Rw2/LwhVfdNWxzJcHtMJE+mWzThAlF2xIijaXwFHMEQCIGX0W6WZi1mif/4ae+0BavHx+Q1Us6qPdFCqX1aiUQO9AiB/ckcDrR7blmgLKEtW1P/LiPf7dZ6rvgiqMPKbhROD0gFHUiEDCJ3BDHrG21T5EymvYXMz2ziM6tDCMfcjN50bmQMLAtwhAjrdkE89bc9Z3bkGsN7iNSm3/7ntUOXoYVGSaGAiHw5zUq4AIgIDqaTDf1mW06ol26xrVwrwZQOUSSlCRgs1R1Ptnuylh3EQ2QxqTwAAAIAAAACABAAAgAAiAgJ/Y5l1fS7/VaE2rQLGhLGDi2VW5fG2s0KCqUtrUAUQlhDZDGpPAAAAgAAAAIAFAACAAA=="
0{
1 "inputs": [
2 {
3 "has_utxo": true,
4 "is_final": true
5 },
6 {
7 "has_utxo": true,
8 "is_final": true
9 }
10 ],
11 "next": "extractor",
12 "estimated_vsize": 463,
13 "estimated_feerate": "0.00021598 BTC/kB",
14 "fee": 0.00010000
15}
Will update.
estimated_feerate
is a string.
Eh, it’s not supposed to be.
"estimated_feerate": "0.00021598 BTC/kB",
I don’t think a formatted string is a good way to represent these on the RPC. Better to not leave the clients to strip off the unit, leave this as number and report the unit in the documentation.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
1883- " \"estimated_vsize\" : vsize (numeric) Estimated vsize of the final signed transaction\n"
1884+ " \"estimated_vsize\" : vsize (numeric, optional) Estimated vsize of the final signed transaction\n"
1885 " \"estimated_feerate\" : feerate (numeric, optional) Estimated feerate of the final signed transaction. Shown only if all UTXO slots in the PSBT have been filled.\n"
1886 " \"fee\" : fee (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.\n"
1887- " \"next\" : \"role\" (string) Role of the next person that this psbt needs to go to\n"
1888+ " \"next\" : \"role\" (string) Role of the next person that this psbt needs to go to\n"
0 " \"next\" : \"role\" (string) Role of the next person that this psbt needs to go to\n"
1874- " \"witnessscript\" : \"hash\" (string) SHA256 of the witnessScript that is missing\n"
1875+ " \"redeemscript\" : \"hash\" (string, optional) Hash160 of the redeemScript that is missing\n"
1876+ " \"witnessscript\" : \"hash\" (string, optional) SHA256 of the witnessScript that is missing\n"
1877 " }\n"
1878- " \"next\" : \"role\" (string) Role of the next person that this input needs to go to\n"
1879+ " \"next\" : \"role\" (string, optional) Role of the next person that this input needs to go to\n"
0 " \"next\" : \"role\" (string, optional) Role of the next person that this input needs to go to\n"
1880 " }\n"
1881 " ,...\n"
1882 " ]\n"
1883- " \"estimated_vsize\" : vsize (numeric) Estimated vsize of the final signed transaction\n"
1884+ " \"estimated_vsize\" : vsize (numeric, optional) Estimated vsize of the final signed transaction\n"
1885 " \"estimated_feerate\" : feerate (numeric, optional) Estimated feerate of the final signed transaction. Shown only if all UTXO slots in the PSBT have been filled.\n"
0 " \"estimated_feerate\" : feerate (numeric, optional) Estimated feerate of the final signed transaction in " + CURRENCY_UNIT + "/kB. Shown only if all UTXO slots in the PSBT have been filled.\n"
Updated with marcos suggestions.
src/bitcoin-cli analyzepsbt
0analyzepsbt "psbt"
1
2Analyzes and provides information about the current status of a PSBT and its inputs
3
4Arguments:
51. psbt (string, required) A base64 string of a PSBT
6
7Result:
8{
9 "inputs" : [ (array of json objects)
10 {
11 "has_utxo" : true|false (boolean) Whether a UTXO is provided
12 "is_final" : true|false (boolean) Whether the input is finalized
13 "missing" : { (json object, optional) Things that are missing that are required to complete this input
14 "pubkeys" : [ (array, optional)
15 "keyid" (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing
16 ]
17 "signatures" : [ (array, optional)
18 "keyid" (string) Public key ID, hash160 of the public key, of a public key whose signature is missing
19 ]
20 "redeemscript" : "hash" (string, optional) Hash160 of the redeemScript that is missing
21 "witnessscript" : "hash" (string, optional) SHA256 of the witnessScript that is missing
22 }
23 "next" : "role" (string, optional) Role of the next person that this input needs to go to
24 }
25 ,...
26 ]
27 "estimated_vsize" : vsize (numeric, optional) Estimated vsize of the final signed transaction
28 "estimated_feerate" : feerate (numeric, optional) Estimated feerate of the final signed transaction in BTC/kB. Shown only if all UTXO slots in the PSBT have been filled.
29 "fee" : fee (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.
30 "next" : "role" (string) Role of the next person that this psbt needs to go to
31}
32
33Examples:
34> bitcoin-cli analyzepsbt "psbt"