Struct diem_key_manager::diem_interface::JsonRpcDiemInterface[][src]

pub struct JsonRpcDiemInterface { /* fields omitted */ }
Expand description

This implements the DiemInterface by talking directly to the JSON RPC API.

DISCLAIMER: this implementation assumes that the json rpc client explicitly trusts the json rpc server that is responding to its requests (e.g., the client assumes the server has already been authenticated, provides encrypted and freshness protected messages, etc.). As such, the security of the server will need to be verified in production before this interface should be used. Pointing the client to an untrusted (and potentially malicious) json rpc server, can result in denial-of-service attacks (e.g., against the key manager).

TODO(joshlind): add proof checks to the JsonRpcClient to verify the state returned by the json rpc server we’re talking to. Although we won’t be able to guarantee freshness, it’s better than simply trusting the response for correctness..

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Retrieves the current time from the blockchain, this is returned as microseconds.

Retrieves the last reconfiguration time from the blockchain, this is returned as microseconds. Read more

Retrieve current sequence number for the provided account.

Submits a transaction to the block chain and returns successfully if the transaction was successfully submitted. It does not necessarily mean the transaction successfully executed. Read more

Retrieves the ValidatorConfig at the specified AccountAddress if one exists.

Retrieves the ValidatorInfo for the specified account from the current ValidatorSet if one exists. Read more

Fetches the AccountState associated with a specific account. This is currently only used by test code, but it’s not completely inconceivable that non-test code will want access to this in the future. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.