add P2WPKH to Bitcoinex.Address.Encode#87
Open
michaelknowles wants to merge 1 commit intoRiverFinancial:masterfrom
Open
add P2WPKH to Bitcoinex.Address.Encode#87michaelknowles wants to merge 1 commit intoRiverFinancial:masterfrom
michaelknowles wants to merge 1 commit intoRiverFinancial:masterfrom
Conversation
joaothallis
reviewed
May 5, 2024
test/address_test.exs
Outdated
| end | ||
|
|
||
| test "return true for encoding p2wpkh" do | ||
| # script_hash = "0014751e76e8199196d454941c45d1b3a323f1433bd6" |
There was a problem hiding this comment.
Suggested change
| # script_hash = "0014751e76e8199196d454941c45d1b3a323f1433bd6" |
Author
There was a problem hiding this comment.
mattludwigs
reviewed
May 6, 2024
mix.exs
Outdated
| {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, | ||
| {:benchee, ">= 1.0.0", only: :dev} | ||
| {:benchee, ">= 1.0.0", only: :dev}, | ||
| {:binary, "~> 0.0.5"} |
Contributor
There was a problem hiding this comment.
I am curious as to why we'd add a dependency that will do a pass through to :binary.bin_to_list/1?
Seem's like we can remove the dependency and call :binary.bin_to_list/1 directly, am I missing something?
Author
There was a problem hiding this comment.
Thanks for the feedback. Updated. https://github.com/RiverFinancial/bitcoinex/compare/407bdae54377eef81df33e9e10117ccd34dc5fc9..eb8cf16d6b7a55b7a022d3e7803bdb6d96fde498
407bdae to
eb8cf16
Compare
SachinMeier
reviewed
Apr 1, 2025
| Base58.encode(<<decimal_prefix>> <> script_hash) | ||
| end | ||
|
|
||
| def encode(script_hash, network_name, :p2wpkh) do |
Contributor
There was a problem hiding this comment.
can we rename script_hash to pubkey_hash? Otherwise LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #82