ExWeb3EcRecover.SignedType (ex_web3_ec_recover v0.4.0) View Source

This module was written based on nomenclature and algorithm specified in the EIP-712

Link to this section Summary

Types

The map shape of this field must conform to

Link to this section Types

Specs

field() :: %{required(String.t()) => String.t()}

The map shape of this field must conform to:

%{
  "name" => String.t(),
  "type" => String.t()
}

Specs

types() :: %{required(String.t()) => [field()]}

Link to this section Functions

Link to this function

encode(message, opts \\ [])

View Source
Link to this function

encode(message, types, primary_type, opts \\ [])

View Source

Specs

encode(map(), [field()], String.t(), Keyword.t()) :: binary()

Encodes a message according to EIP-712

Link to this function

encode_array(data, primary_type, types, opts)

View Source
Link to this function

encode_type(data, primary_type, types, encoder)

View Source

Specs

encode_type(map(), String.t(), types(), module()) :: binary()
Link to this function

encode_types(types, primary_type)

View Source
Link to this function

hash_message(message, types, primary_type, opts \\ [])

View Source

Specs

hash_message(map(), types(), String.t(), Keyword.t()) :: hash :: binary()

Returns a hash of a message.