ForgeSdk v0.27.4 ForgeSdk.Wallet.Util View Source

Helper functions for wallet.

Link to this section Summary

Functions

Sign the transaction with extra private key, usually used for exchange and other transactions that requires involvment for multiple party. Note this is not for multisig wallet, but for a multisig transaction

Converts a (pseudo) publick key to address

Link to this section Functions

Link to this function

create(type, passphrase \\ "") View Source
create(ForgeAbi.WalletType.t(), String.t()) ::
  ForgeAbi.WalletInfo.t() | {:error, term()}

Link to this function

get_filename(path, address) View Source
get_filename(String.t(), String.t()) :: String.t()

Link to this function

load(address, passphrase) View Source
load(binary() | map() | any(), binary()) ::
  ForgeAbi.WalletInfo.t() | {:error, term()}

Sign the transaction with extra private key, usually used for exchange and other transactions that requires involvment for multiple party. Note this is not for multisig wallet, but for a multisig transaction.

Link to this function

recover(type, sk, passphrase \\ "") View Source

Link to this function

remove(address) View Source
remove(String.t()) :: :ok | {:error, term()}

Link to this function

save(wallet, passphrase) View Source
save(ForgeAbi.WalletInfo.t(), binary()) :: :ok

Link to this function

to_address(data, wallet_type) View Source
to_address(binary(), ForgeAbi.WalletType.t()) :: String.t()
to_address(binary(), AbtDid.Type.t()) :: String.t()

Converts a (pseudo) publick key to address.

Link to this function

to_wallet_type(did_type) View Source
to_wallet_type(AbtDid.Type.t()) :: ForgeAbi.WalletType.t()

Link to this function

verify(wallet, data, signature) View Source