AddressConverter
Converts addresses into different formats. Currently supports EVM (H160) addresses into Substrate (SS58).
Installation
If available in Hex, the package can be installed
by adding address_converter to your list of dependencies in mix.exs:
def deps do
[
{:address_converter, "~> 0.1.0"}
]
endUsage
Convert an EVM address into a Substrate one:
AddressConverter.to_ss58("0x10E0271ec47d55511a047516f2a7301801d55eaB")
"5GDXvqASMPKNbnmSEt69CkbL6YwiN3sLbVqdPFW4cvC43zSH"Docs
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/address_converter.