Tradehub.Wallet.address_from_public_key

You're seeing just the function address_from_public_key, go back to Tradehub.Wallet module for more information.
Link to this function

address_from_public_key(public_key, network \\ :testnet)

View Source

Specs

address_from_public_key(String.t(), atom()) ::
  {:ok, String.t()} | {:error, String.t()}

Look for the wallet address of based on the given public key within a network.

Examples

iex> Tradehub.Wallet.address_from_public_key("02e6193b57b672df29997fe495d78b4fd3eaae9daae0a5e2803129e2c21b504e23")
{:ok, "tswth174cz08dmgluavwcz2suztvydlptp4a8f8t5h4t"}

iex> Tradehub.Wallet.address_from_public_key(<<2, 230, 25, 59, 87, 182, 114, 223, 41, 153, 127, 228, 149, 215, 139, 79, 211, 234, 174, 157, 170, 224, 165, 226, 128, 49, 41, 226, 194, 27, 80, 78, 35>>)
{:ok, "tswth174cz08dmgluavwcz2suztvydlptp4a8f8t5h4t"}

iex> Tradehub.Wallet.address_from_public_key("02e6193b57b672df29997fe495d78b4fd3eaae9daae0a5e2803129e2c21b504e23", :mainnet)
{:ok, "swth174cz08dmgluavwcz2suztvydlptp4a8fru98vw"}