Closed Vasu-08 closed 11 months ago
Patch coverage: 90.93
% and project coverage change: +0.69
:tada:
Comparison is base (
bb0375e
) 69.56% compared to head (5b09c3f
) 70.26%.:exclamation: Current head 5b09c3f differs from pull request most recent head f388594. Consider uploading reports for the commit f388594 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Incorrect position in pubkeyProvider
object.
Replication:
sh(wsh(sortedmulti(2,[e7dd1c50/48\'/1\'/10\'/1\']tpubDEh4Cah3FYZ7ePUoCcmTBSRuySQjo24F6RPZ6fM7xcDPUqLZgo2j9vwZkafwMUUvFJ9Foa5wXcwuft2Dv1UQNYXpQ81KMG5aFv1RzNbCvag/0/*,[e7dd1c50/48\'/1\'/13\'/1\']tpubDFkbvhzqd71DQHRYZze7MvRwvv2xFkbibRdW96Juo2uJrHAULe5CqW1QvGGHSsQSzoPUpF5ncedLDq79i8nQMQnyELX2ZSBH48kABC7Wabs/0/*,[aedb3d12/48\'/1\'/0\'/1\']tpubDEbuxto5Kftus28NyPddiEev2yUhzZGpkpQdCK732KBge5FJDhaMdhG1iVw3rMJ2qvABkaLR9HxobkeFkmQZ4RqQgN1KJadDjPn9ANBLo8V/0/*)))
On parsing this descriptor. The pos
value in pubkeyProvider
object is et to 0
for all 3 keys.
Screenshot is attached below.
BUG Report:
Incorrect position in
pubkeyProvider
object.Replication:
- Parse the following descriptor:
sh(wsh(sortedmulti(2,[e7dd1c50/48\'/1\'/10\'/1\']tpubDEh4Cah3FYZ7ePUoCcmTBSRuySQjo24F6RPZ6fM7xcDPUqLZgo2j9vwZkafwMUUvFJ9Foa5wXcwuft2Dv1UQNYXpQ81KMG5aFv1RzNbCvag/0/*,[e7dd1c50/48\'/1\'/13\'/1\']tpubDFkbvhzqd71DQHRYZze7MvRwvv2xFkbibRdW96Juo2uJrHAULe5CqW1QvGGHSsQSzoPUpF5ncedLDq79i8nQMQnyELX2ZSBH48kABC7Wabs/0/*,[aedb3d12/48\'/1\'/0\'/1\']tpubDEbuxto5Kftus28NyPddiEev2yUhzZGpkpQdCK732KBge5FJDhaMdhG1iVw3rMJ2qvABkaLR9HxobkeFkmQZ4RqQgN1KJadDjPn9ANBLo8V/0/*)))
On parsing this descriptor. The
pos
value inpubkeyProvider
object is et to0
for all 3 keys. Screenshot is attached below.![]()
Fixed
I think we can get by without passing context
in fromString()
in various descriptor types. I think we can make it an optional parameter with the default value TOP
I think we can get by without passing
context
infromString()
in various descriptor types. I think we can make it an optional parameter with the default valueTOP
Yup this should be handled internally.
See https://github.com/bitcoin/bitcoin/pull/26076
We might need to switch our hardened marker in all outputs to h
instead of '
.
I modified the bitcoin core descriptor test to output a JSON blob and all those vectors passed your tests except where bitcoin core used h
in the output
This pr implements getdescriptorinfo rpc by adding a descriptor module.
If the argument string of getdescriptorinfo() rpc is a valid string it is parsed into a AbstractDescriptor object. Along with that various parts of the string, such as origin information, keys (Public/Private), and derivation path (along with hardened or unhardened information) are parsed into PubKeyProvider object respectively. If the descriiptor string contains a checksum it will be validiated and if a checksum is not present we will calculate one.
Note: The input descriptor string doesn't require checksum to be present.
The AbstractDescriptor class has PKDescriptor, PKHDescriptor, WPKHDescriptor, AddressDescriptor, MultisigDescriptor, WSHDescriptor, SHDescriptor, RawDescriptor, ComboDescriptor as its subclasses.
The KeyProvider class will have ConstPubkeyProvider (for parsing constant keys with/without origin info) and HDKeyProvider (for parsing extended (hd - bip32) keys with/without origin info) as its subclasses.
Functions for parsing descriptor string will be present as global function in parser.js. Checksum functions are implemented in common.js.
Functions checking isRange(), isSolvable(), hasPrivateKeys() etc. will be present in the AbstractDescriptor class.