Skip to content

Conversation

@michaelknowles
Copy link

Resolves #82

end

test "return true for encoding p2wpkh" do
# script_hash = "0014751e76e8199196d454941c45d1b3a323f1433bd6"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# script_hash = "0014751e76e8199196d454941c45d1b3a323f1433bd6"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelknowles michaelknowles force-pushed the michaelknowles--add-p2wpkh-address-encode branch from 407bdae to eb8cf16 Compare May 6, 2024 04:09
Base58.encode(<<decimal_prefix>> <> script_hash)
end

def encode(script_hash, network_name, :p2wpkh) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename script_hash to pubkey_hash? Otherwise LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing implementation for Bitcoinex.Address.encode P2WPKH.

4 participants