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=="
{
"inputs": [
{
"has_utxo": true,
"is_final": true
},
{
"has_utxo": true,
"is_final": true
}
],
"next": "extractor",
"estimated_vsize": 463,
"estimated_feerate": "0.00021598 BTC/kB",
"fee": 0.00010000
}
Will update.
estimated_feerateis 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.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
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.
utACK 983e4e9b005e54307f315f00f8ea90959482376c
Concept ACK
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"
" \"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"
" \"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"
" \"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"
ACK
Updated with marcos suggestions.
src/bitcoin-cli analyzepsbt
analyzepsbt "psbt"
Analyzes and provides information about the current status of a PSBT and its inputs
Arguments:
1. psbt (string, required) A base64 string of a PSBT
Result:
{
"inputs" : [ (array of json objects)
{
"has_utxo" : true|false (boolean) Whether a UTXO is provided
"is_final" : true|false (boolean) Whether the input is finalized
"missing" : { (json object, optional) Things that are missing that are required to complete this input
"pubkeys" : [ (array, optional)
"keyid" (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing
]
"signatures" : [ (array, optional)
"keyid" (string) Public key ID, hash160 of the public key, of a public key whose signature is missing
]
"redeemscript" : "hash" (string, optional) Hash160 of the redeemScript that is missing
"witnessscript" : "hash" (string, optional) SHA256 of the witnessScript that is missing
}
"next" : "role" (string, optional) Role of the next person that this input needs to go to
}
,...
]
"estimated_vsize" : vsize (numeric, optional) Estimated vsize of the final signed transaction
"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.
"fee" : fee (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.
"next" : "role" (string) Role of the next person that this psbt needs to go to
}
Examples:
> bitcoin-cli analyzepsbt "psbt"
utACK 335931df4a37467299a2ee0ba521ecd5c4e6d39e
utACK 335931df4a37467299a2ee0ba521ecd5c4e6d39e