-
Notifications
You must be signed in to change notification settings - Fork 37
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
guess P2SH / P2PKH / P2WSH / P2WPKH type #189
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## main #189 +/- ##
========================================
Coverage 96.21% 96.22%
========================================
Files 66 74 +8
Lines 1718 1958 +240
Branches 235 264 +29
========================================
+ Hits 1653 1884 +231
- Misses 65 74 +9
Continue to review full report at Codecov.
|
Deploy preview for jellyfish-defi ready! Built with commit 9e78608 |
…wn, added unit test for all 4 types of address (so far), base58 and bech32 address is extensible for other network use
rebase/merge main branch, I will check in abit |
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.
https://github.com/DeFiCh/jellyfish/blob/main/CONTRIBUTING.md
I am going to refactor myself instead based on the contributing guidelines.
* updated order of jellyfish-address * rename file to lower snakecase * rename test class * fix and rename * reorder packages in introduction.md
…ield simply h160 to bs58 address construction, must specify address type (p2pkh or p2sh)
* updated order of jellyfish-address * rename file to lower snakecase * rename test class * fix and rename * reorder packages in introduction.md
…' into feature/wallet-address-validator
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.
@@ Coverage Diff @@
## main #189 +/- ##
========================================
Coverage 96.21% 96.22%
========================================
Files 66 74 +8
Lines 1718 1958 +240
Branches 235 264 +29
========================================
+ Hits 1653 1884 +231
- Misses 65 74 +9
Mixed feelings about this PR. I would expect around <15
code logical branches for this ticket but there are +29
which is 10% more than the current combined mono repo code base.
#237 has only +7
for comparison and it has a much more complex implementation design. Clearly, there is much to optimize, the more code there is, the more there is to maintain. Less is more.
I would take it as it is now as it functionally works, but I think I will revisit and refactor this implementation in the future. I will create a ticket to refactor this at a future date.
What kind of PR is this?:
/kind feature
What this PR does / why we need it:
an
Address
library to check (user) input string is a valid address type and guess the typeWhich issue(s) does this PR fixes?:
Fixes #
Additional comments?: