Trait iota_json_rpc_api::WriteApiServer
source · pub trait WriteApiServer: Sized + Send + Sync + 'static {
// Required methods
fn execute_transaction_block<'life0, 'async_trait>(
&'life0 self,
tx_bytes: Base64,
signatures: Vec<Base64>,
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaTransactionBlockResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dev_inspect_transaction_block<'life0, 'async_trait>(
&'life0 self,
sender_address: IotaAddress,
tx_bytes: Base64,
gas_price: Option<BigInt<u64>>,
epoch: Option<BigInt<u64>>,
additional_args: Option<DevInspectArgs>,
) -> Pin<Box<dyn Future<Output = RpcResult<DevInspectResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dry_run_transaction_block<'life0, 'async_trait>(
&'life0 self,
tx_bytes: Base64,
) -> Pin<Box<dyn Future<Output = RpcResult<DryRunTransactionBlockResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the WriteApi
RPC API.
Required Methods§
sourcefn execute_transaction_block<'life0, 'async_trait>(
&'life0 self,
tx_bytes: Base64,
signatures: Vec<Base64>,
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaTransactionBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_transaction_block<'life0, 'async_trait>(
&'life0 self,
tx_bytes: Base64,
signatures: Vec<Base64>,
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaTransactionBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the transaction and wait for results if desired. Request types:
- WaitForEffectsCert: waits for TransactionEffectsCert and then return to client. This mode is a proxy for transaction finality.
- WaitForLocalExecution: waits for TransactionEffectsCert and make sure the node
executed the transaction locally before returning the client. The local execution
makes sure this node is aware of this transaction when client fires subsequent queries.
However if the node fails to execute the transaction locally in a timely manner,
a bool type in the response is set to false to indicated the case.
request_type is default to be
WaitForEffectsCert
unless options.show_events or options.show_effects is true
sourcefn dev_inspect_transaction_block<'life0, 'async_trait>(
&'life0 self,
sender_address: IotaAddress,
tx_bytes: Base64,
gas_price: Option<BigInt<u64>>,
epoch: Option<BigInt<u64>>,
additional_args: Option<DevInspectArgs>,
) -> Pin<Box<dyn Future<Output = RpcResult<DevInspectResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dev_inspect_transaction_block<'life0, 'async_trait>(
&'life0 self,
sender_address: IotaAddress,
tx_bytes: Base64,
gas_price: Option<BigInt<u64>>,
epoch: Option<BigInt<u64>>,
additional_args: Option<DevInspectArgs>,
) -> Pin<Box<dyn Future<Output = RpcResult<DevInspectResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs the transaction in dev-inspect mode. Which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.
sourcefn dry_run_transaction_block<'life0, 'async_trait>(
&'life0 self,
tx_bytes: Base64,
) -> Pin<Box<dyn Future<Output = RpcResult<DryRunTransactionBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dry_run_transaction_block<'life0, 'async_trait>(
&'life0 self,
tx_bytes: Base64,
) -> Pin<Box<dyn Future<Output = RpcResult<DryRunTransactionBlockResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return transaction execution effects including the gas cost summary, while the effects are not committed to the chain.
Provided Methods§
Object Safety§
This trait is not object safe.