-
Notifications
You must be signed in to change notification settings - Fork 866
Support output descriptor #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ef4f091 to
e5bbb1a
Compare
* Preparet test vectors from bitcoin core. * Allow to parse private keys * Inject ISigningRepository to pickup private key info when parsing * Prevent parsing Uncompressed pubkey when it is in witness context.
* Before this commit, Parser did not allow whitespace around
'(', ')' and ','. By removing all whitespace as a preprocess
for parsing, it is now rebust against user inputs.
Also it is now bit faster because we don't have to call `.Token`
combinator anymore.
* Remove useless `Tag` field from OutputDescriptor and PubKeyProvider * Refactor pattern match for `Equals` method. Both for the sake of consiceness.
... for `OutputDescriptor`, `PubKeyProvider`, `OutputDescriptorParser` and `ISiginingRepository`
...for OutputDescriptor and PubKeyProvider Since user must always access these types through parent type, there are no point for repeating the prefix twice. Thus we can simplify by dropping the its prefix (in this case `Descriptor` and `PubKeyProvider`)
lontivero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments for your consideration.
* Add null check to everywhere public * Add check for user-provided enum value. * Make an indentation for switch expression a bit more natual.
When you want to do this, you can just declare the abstract/virtual methods internal. |
But doesn't it make it impossible for user to use the method? |
|
@joemphilips yes, one thing often used also is have a method "BlahBlah" public and another one "BlahBlahCore" internal/protected. |
|
@lontivero you plan to still review some stuff or should I start review as well? |
|
I will not review it more. |
|
@joemphilips I think I will merge that soon. One question: About |
|
I can try using |
|
After testing a bit, I think it is possible to use e.g. I want to use the api like I suppose it is out of the scope for this PR, if you really want to make (which I don’t think is necessary though btw, having wrapper types like |
* To perform the property test which uses an RPC.
|
@joemphilips don't refactor to use uint160/uint256 instead I just want to know, why you need those Ids classes rather than just ScriptPubKey |
|
|
Would you consider merging this? I have a plan to use it. @NicolasDorier |
2626fe4 to
3cb820c
Compare
* Implement `OutputDescriptorJsonConverter`.
3cb820c to
65abec5
Compare
|
Released a new version. (.62) |
depends on #694 , previous attempt is #684
Currently it is independent from #695 , and it follows bitcoin core's spec.