View Source DiodeClient.Wallet (Diode Client v1.2.0)

Representation of an Ethereum Wallet. This struct can hold keys in three levels of completeness

  1. Full key (including private key, public key and address)
  2. Public Key (including public key and address)
  3. Address (only the 20 byte Ethereum address)

A wallet can be instantiated from any of those, but accessors for higher level components will fail when the data is not available

Summary

Types

@type address() :: <<_::160>>
Link to this type

compressed_public_key()

View Source
@type compressed_public_key() :: <<_::264>>
@type private_key() :: <<_::256>>
@type t() ::
  {:wallet, privkey :: nil | <<_::256>>, pubkey :: nil | <<_::264>>,
   address :: <<_::160>>}

Functions

@spec address(t()) :: {:error, nil} | {:ok, <<_::160>>}
@spec address!(t()) :: <<_::160>>
@spec from_address(<<_::160>> | integer()) :: t()
@spec from_privkey(<<_::256>> | integer()) :: t()
@spec from_pubkey(<<_::264>>) :: t()
@spec new() :: t()
Link to this macro

wallet(args \\ [])

View Source (macro)
Link to this macro

wallet(record, args)

View Source (macro)