Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An Ethereum EIP-55 address encoder and validator in Elixir.

License

NotificationsYou must be signed in to change notification settings

unnawut/eip_55

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encode and validate an Ethereum address againstEIP-55 checksum in Elixir.

Installation

The package can be installed by adding:eip_55 to your list of dependencies inmix.exs:

defpdepsdo[{:eip_55,"~> 0.1"}]end

Usage

Encoding:

iex>EIP55.encode("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed"){:ok,"0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"}iex>EIP55.encode(<<90,174,182,5,63,62,148,201,185,160,...>159,51,102,148,53,231,239,27,234,237>>){:ok,"0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"}

Validation:

iex>EIP55.valid?("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed")trueiex>EIP55.valid?("0x5AAEB6053f3e94c9b9a09f33669435e7ef1beaed")false

Full documentation can be found athttps://hexdocs.pm/eip_55.

Performance

This library uses:ex_sha3 which is a pure Elixir implementation making itsignificantly slower than an NIF-based library like:sha3.

If you have a demand for high-performance EIP-55 encoding/validation, let me know.Maybe we can then add a NIF-based version.

License

EIP-55 is released under the MIT License. SeeLICENSE for further details.

About

An Ethereum EIP-55 address encoder and validator in Elixir.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp