W3WS.Message (w3ws v0.2.1)

W3WS Messages for ethereum jsonrpc

See Ethereum JSON-RPC docs for more information.

This is not meant to be an exhaustive list of all possible messages. Users are encouraged to use their own messages when necessary.

Summary

Functions

Dencode the message from json

Encode the message as json

Create an eth_blockNumber request

Create an eth_getLogs request.

Create an eth_subscribe request

Create an eth_subscribe request for "logs".

Create an eth_unsubscribe request.

Set the message id

Functions

Link to this function

decode!(message)

Dencode the message from json

Link to this function

encode!(message)

Encode the message as json

Link to this function

eth_block_number(opts \\ [])

Create an eth_blockNumber request

Link to this function

eth_get_logs(opts \\ [])

Create an eth_getLogs request.

Takes a params argument which will be used as the params field in the message.

Link to this function

eth_subscribe(params, opts \\ [])

Create an eth_subscribe request

Takes a params argument which will be used as the params field in the message.

Link to this function

eth_subscribe_logs(topics, opts \\ [])

Create an eth_subscribe request for "logs".

This is a convenience function and not part of the JSON-RPC spec.

Link to this function

eth_unsubscribe(subscription, opts \\ [])

Create an eth_unsubscribe request.

Takes a subscription argument which will be used as the subscription identifier in the request.

Link to this function

set_id(message, id)

Set the message id