View Source Avalanche.Bindings (Avalanche v0.11.5)
Prepares bindings from list of values.
Link to this section Summary
Functions
Encodes the given values into an indexed map of bindings.
Link to this section Functions
Encodes the given values into an indexed map of bindings.
Examples:
iex> values = [123, 1.23, "uno, dos, tres", false, ~N[2015-01-14 13:00:07], DateTime.from_unix!(1_464_096_368), ~D[2015-01-15]]
iex> Avalanche.Bindings.encode_params(values)
%{
"1" => %{type: "FIXED", value: "123"},
"2" => %{type: "REAL", value: "1.23"},
"3" => %{type: "TEXT", value: "uno, dos, tres"},
"4" => %{type: "BOOLEAN", value: false},
"5" => %{type: "TEXT", value: "2015-01-14T13:00:07"},
"6" => %{type: "TEXT", value: "2016-05-24T13:26:08Z"},
"7" => %{type: "TEXT", value: "2015-01-15"}
}