Tradehub.Wallet.from_mnemonic

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

from_mnemonic(mnemonic, network \\ :testnet)

View Source

Specs

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

Open a wallet based on its mnemonic.

Examples

iex> {:ok, wallet} = Tradehub.Wallet.from_mnemonic("wrist coyote fuel wet evil tag shoot yellow morning history visit mosquito")
iex> wallet.address
"tswth174cz08dmgluavwcz2suztvydlptp4a8f8t5h4t"

iex> {:ok, wallet} = Tradehub.Wallet.from_mnemonic("wrist coyote fuel wet evil tag shoot yellow morning history visit mosquito", :mainnet)
iex> wallet.address
"swth174cz08dmgluavwcz2suztvydlptp4a8fru98vw"