Operate v0.1.0-beta.10 Operate.Adapter.Bob View Source
Adapter module for loading tapes and Ops from BOB.
Examples
iex> Operate.Adapter.Bob.fetch_tx(txid, api_key: "mykey")
{:ok, %Operate.BPU.Transaction{}} Link to this section Summary
Functions
Callback implementation for Operate.Adapter.fetch_ops/2.
Callback implementation for Operate.Adapter.fetch_ops!/2.
Callback implementation for Operate.Adapter.fetch_tx/2.
Callback implementation for Operate.Adapter.fetch_tx!/2.
Fetches a list of transactions by the given query map, and returns the result
in an :ok / :error tuple pair.
Callback implementation for Operate.Adapter.fetch_tx_by!/2.
Converts the map from the Planaria HTTP response to a Operate.BPU.Transaction.t/0.
Link to this section Types
Specs
option() ::
{:method, Tesla.Env.method()}
| {:url, Tesla.Env.url()}
| {:query, Tesla.Env.query()}
| {:headers, Tesla.Env.headers()}
| {:body, Tesla.Env.body()}
| {:opts, Tesla.Env.opts()}
Link to this section Functions
Callback implementation for Operate.Adapter.fetch_ops/2.
Callback implementation for Operate.Adapter.fetch_ops!/2.
Callback implementation for Operate.Adapter.fetch_tx/2.
Callback implementation for Operate.Adapter.fetch_tx!/2.
Fetches a list of transactions by the given query map, and returns the result
in an :ok / :error tuple pair.
The query parameter should be a valid Bitquery. The project attribute
cannot be used and unless otherwise specified, limit defaults to 10.
Options
The accepted options are:
:api_key- Planaria API key
Examples
Operate.Adapter.Bob.fetch_tx_by(%{
"find" => %{
"out.tape.cell" => %{
"$elemMatch" => %{
"i" => 0,
"s" => "1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5"
}
}
}
}) Callback implementation for Operate.Adapter.fetch_tx_by!/2.
Specs
to_bpu(map()) :: Operate.BPU.Transaction.t() | [Operate.BPU.Transaction.t(), ...]
Converts the map from the Planaria HTTP response to a Operate.BPU.Transaction.t/0.