eth_event v0.1.1 EthEvent.Transport View Source

Transport layer for JSON RPC from Ethereum nodes.

Link to this section Summary

Functions

Perform request and raise in case of error

Execute remote method with some optional parameters

Sends a JSON RPC request to a Ethereum node. Receives an id, a method and a list for method parameters

Link to this section Types

Link to this type option() View Source
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

Link to this function request!(client \\ %Tesla.Client{}, options) View Source
request!(Tesla.Env.client(), [option()]) :: Tesla.Env.t() | no_return()

Perform request and raise in case of error.

This is similar to request/2 behaviour from Tesla 0.x

See request/2 for list of available options.

Link to this function rpc(method, parameters \\ []) View Source
rpc(binary(), term()) :: {:ok, term()} | {:error, term()}

Execute remote method with some optional parameters.

Link to this function rpc(id, method, params) View Source
rpc(integer(), binary(), term()) :: {:ok, term()} | {:error, term()}

Sends a JSON RPC request to a Ethereum node. Receives an id, a method and a list for method parameters.