Packages

Elixir HTTP/Websockets client library for official Steemit API and standard steemd JSONRPC interface. Includes module for pseudo realtime streaming of block, transaction and operation events.

Current section

Files

Jump to
steemex lib block.ex
Raw

lib/block.ex

defmodule Steemex.Block do
defstruct [:height, :previous, :extensions, :timestamp, :transaction_merkle_root, :transactions, :witness, :witness_signature]
use ExConstructor
def parse_raw_data(block) do
Map.put(block, :timestamp, block.timestamp <> "Z" |> NaiveDateTime.from_iso8601!())
end
end