ExPlasma.Transaction.TypeMapper (ExPlasma v0.3.0)

Provides wire format's tx/output type values and mapping to modules which decodes them.

Link to this section Summary

Functions

Returns wire format type value of known output type

Returns module atom that is able to decode output of given type

Returns wire format type value of known transaction type

Returns module atom that is able to decode transaction of given type

Link to this section Types

Link to this type

tx_type_to_output_module_map()

Specs

tx_type_to_output_module_map() :: %{
  required(0) => ExPlasma.Output.Type.AbstractPayment,
  required(1) => ExPlasma.Output.Type.PaymentV1,
  required(2) => ExPlasma.Output.Type.Fee
}
Link to this type

tx_type_to_tx_module_map()

Specs

tx_type_to_tx_module_map() :: %{
  required(1) => ExPlasma.Transaction.Type.PaymentV1,
  required(3) => ExPlasma.Transaction.Type.Fee
}

Link to this section Functions

Link to this function

output_type_for(output_type)

Specs

output_type_for(output_type :: atom()) :: non_neg_integer()

Returns wire format type value of known output type

Link to this function

output_type_modules()

Specs

output_type_modules() :: tx_type_to_output_module_map()

Returns module atom that is able to decode output of given type

Link to this function

tx_type_for(tx_type)

Specs

tx_type_for(tx_type :: atom()) :: non_neg_integer()

Returns wire format type value of known transaction type

Link to this function

tx_type_modules()

Specs

tx_type_modules() :: tx_type_to_tx_module_map()

Returns module atom that is able to decode transaction of given type