Expand description
Interface that provides functions to access the offchain functionality.
These functions are being made available to the runtime and are called by the runtime.
Structs§
- Host
Functions - Provides implementations for the extern host functions.
Functions§
- http_
request_ add_ header - Append header to the request.
- http_
request_ start - Initiates a http request given HTTP verb and the URL.
- http_
request_ write_ body - Write a chunk of request body.
- http_
response_ headers - Read all response headers.
- http_
response_ read_ body - Read a chunk of body response to given buffer.
- http_
response_ wait - Block and wait for the responses for given requests.
- is_
validator - Returns if the local node is a potential validator.
- local_
storage_ clear - Remove a value from the local storage.
- local_
storage_ compare_ and_ set - Sets a value in the local storage if it matches current value.
- local_
storage_ get - Gets a value from the local storage.
- local_
storage_ set - Sets a value in the local storage.
- network_
state - Returns information about the local node’s network state.
- random_
seed - Returns a random seed.
- set_
authorized_ nodes - Set the authorized nodes and authorized_only flag.
- sleep_
until - Pause the execution until
deadline
is reached. - submit_
transaction - Submit an encoded transaction to the pool.
- timestamp
- Returns current UNIX timestamp (in millis)