View Source Stellar.Horizon.Mapping (Elixir Stellar SDK v0.22.0)

Takes a result map or list of maps from Horizon response and returns a struct (e.g. %Horizon.Transaction{}) or list of structs.

Summary

Types

@type attr_type() ::
  :integer
  | :float
  | :date_time
  | {:map, Keyword.t()}
  | {:struct, module()}
  | {:list, atom(), Keyword.t() | module()}
@type attr_value() :: any()

Functions

@spec build(module :: struct(), attrs :: map()) :: struct()
@spec parse(module :: struct(), mapping :: Keyword.t()) :: struct()