Struct exonum::blockchain::ApiContext
[−]
[src]
pub struct ApiContext { /* fields omitted */ }
Provides the current node state to api handlers.
Methods
impl ApiContext
[src]
Provides the current node state to api handlers.
fn new(node: &Node) -> ApiContext
[src]
Constructs context for the given Node
.
fn from_parts(
blockchain: &Blockchain,
node_channel: ApiSender,
public_key: &PublicKey,
secret_key: &SecretKey
) -> ApiContext
[src]
blockchain: &Blockchain,
node_channel: ApiSender,
public_key: &PublicKey,
secret_key: &SecretKey
) -> ApiContext
Constructs context from raw parts.
fn blockchain(&self) -> &Blockchain
[src]
Returns reference to the node's blockchain.
fn node_channel(&self) -> &ApiSender
[src]
Returns reference to the transaction sender.
fn public_key(&self) -> &PublicKey
[src]
Returns the public key of current node.
fn secret_key(&self) -> &SecretKey
[src]
Returns the secret key of current node.