pub trait TransactionBuilderServer: Sized + Send + Sync + 'static {
Show 16 methods
// Required methods
fn transfer_object<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
object_id: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
recipient: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn transfer_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
iota_object_id: ObjectID,
gas_budget: BigInt<u64>,
recipient: IotaAddress,
amount: Option<BigInt<u64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pay<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipients: Vec<IotaAddress>,
amounts: Vec<BigInt<u64>>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pay_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipients: Vec<IotaAddress>,
amounts: Vec<BigInt<u64>>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pay_all_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipient: IotaAddress,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn move_call<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
package_object_id: ObjectID,
module: String,
function: String,
type_arguments: Vec<IotaTypeTag>,
arguments: Vec<IotaJsonValue>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
execution_mode: Option<IotaTransactionBlockBuilderMode>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn publish<'life0, 'async_trait>(
&'life0 self,
sender: IotaAddress,
compiled_modules: Vec<Base64>,
dependencies: Vec<ObjectID>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn split_coin<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coin_object_id: ObjectID,
split_amounts: Vec<BigInt<u64>>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn split_coin_equal<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coin_object_id: ObjectID,
split_count: BigInt<u64>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn merge_coin<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
primary_coin: ObjectID,
coin_to_merge: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn batch_transaction<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
single_transaction_params: Vec<RPCTransactionRequestParams>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
txn_builder_mode: Option<IotaTransactionBlockBuilderMode>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_add_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coins: Vec<ObjectID>,
amount: Option<BigInt<u64>>,
validator: IotaAddress,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_withdraw_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
staked_iota: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_add_timelocked_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
locked_balance: ObjectID,
validator: IotaAddress,
gas: ObjectID,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_withdraw_timelocked_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
timelocked_staked_iota: ObjectID,
gas: ObjectID,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + 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 TransactionBuilder
RPC API.
Required Methods§
sourcefn transfer_object<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
object_id: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
recipient: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer_object<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
object_id: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
recipient: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to transfer an object from one address to another. The object’s type must allow public transfers
sourcefn transfer_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
iota_object_id: ObjectID,
gas_budget: BigInt<u64>,
recipient: IotaAddress,
amount: Option<BigInt<u64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
iota_object_id: ObjectID,
gas_budget: BigInt<u64>,
recipient: IotaAddress,
amount: Option<BigInt<u64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to send IOTA coin object to a Iota address. The IOTA object is also used as the gas object.
sourcefn pay<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipients: Vec<IotaAddress>,
amounts: Vec<BigInt<u64>>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pay<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipients: Vec<IotaAddress>,
amounts: Vec<BigInt<u64>>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send Coin<T>
to a list of addresses, where T
can be any coin type, following a list of amounts,
The object specified in the gas
field will be used to pay the gas fee for the transaction.
The gas object can not appear in input_coins
. If the gas object is not specified, the RPC server
will auto-select one.
sourcefn pay_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipients: Vec<IotaAddress>,
amounts: Vec<BigInt<u64>>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pay_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipients: Vec<IotaAddress>,
amounts: Vec<BigInt<u64>>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send IOTA coins to a list of addresses, following a list of amounts. This is for IOTA coin only and does not require a separate gas coin object. Specifically, what pay_iota does are:
- debit each input_coin to create new coin following the order of amounts and assign it to the corresponding recipient.
- accumulate all residual IOTA from input coins left and deposit all IOTA to the first input coin, then use the first input coin as the gas coin object.
- the balance of the first input coin after tx is sum(input_coins) - sum(amounts) - actual_gas_cost
- all other input coints other than the first one are deleted.
sourcefn pay_all_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipient: IotaAddress,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pay_all_iota<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
input_coins: Vec<ObjectID>,
recipient: IotaAddress,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send all IOTA coins to one recipient. This is for IOTA coin only and does not require a separate gas coin object. Specifically, what pay_all_iota does are:
- accumulate all IOTA from input coins and deposit all IOTA to the first input coin
- transfer the updated first coin to the recipient and also use this first coin as gas coin object.
- the balance of the first input coin after tx is sum(input_coins) - actual_gas_cost.
- all other input coins other than the first are deleted.
sourcefn move_call<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
package_object_id: ObjectID,
module: String,
function: String,
type_arguments: Vec<IotaTypeTag>,
arguments: Vec<IotaJsonValue>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
execution_mode: Option<IotaTransactionBlockBuilderMode>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn move_call<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
package_object_id: ObjectID,
module: String,
function: String,
type_arguments: Vec<IotaTypeTag>,
arguments: Vec<IotaJsonValue>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
execution_mode: Option<IotaTransactionBlockBuilderMode>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package.
sourcefn publish<'life0, 'async_trait>(
&'life0 self,
sender: IotaAddress,
compiled_modules: Vec<Base64>,
dependencies: Vec<ObjectID>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn publish<'life0, 'async_trait>(
&'life0 self,
sender: IotaAddress,
compiled_modules: Vec<Base64>,
dependencies: Vec<ObjectID>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to publish a Move package.
sourcefn split_coin<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coin_object_id: ObjectID,
split_amounts: Vec<BigInt<u64>>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn split_coin<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coin_object_id: ObjectID,
split_amounts: Vec<BigInt<u64>>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to split a coin object into multiple coins.
sourcefn split_coin_equal<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coin_object_id: ObjectID,
split_count: BigInt<u64>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn split_coin_equal<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coin_object_id: ObjectID,
split_count: BigInt<u64>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to split a coin object into multiple equal-size coins.
sourcefn merge_coin<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
primary_coin: ObjectID,
coin_to_merge: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn merge_coin<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
primary_coin: ObjectID,
coin_to_merge: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned transaction to merge multiple coins into one coin.
sourcefn batch_transaction<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
single_transaction_params: Vec<RPCTransactionRequestParams>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
txn_builder_mode: Option<IotaTransactionBlockBuilderMode>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch_transaction<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
single_transaction_params: Vec<RPCTransactionRequestParams>,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
txn_builder_mode: Option<IotaTransactionBlockBuilderMode>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create an unsigned batched transaction.
sourcefn request_add_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coins: Vec<ObjectID>,
amount: Option<BigInt<u64>>,
validator: IotaAddress,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_add_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
coins: Vec<ObjectID>,
amount: Option<BigInt<u64>>,
validator: IotaAddress,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add stake to a validator’s staking pool using multiple coins and amount.
sourcefn request_withdraw_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
staked_iota: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_withdraw_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
staked_iota: ObjectID,
gas: Option<ObjectID>,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Withdraw stake from a validator’s staking pool.
sourcefn request_add_timelocked_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
locked_balance: ObjectID,
validator: IotaAddress,
gas: ObjectID,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_add_timelocked_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
locked_balance: ObjectID,
validator: IotaAddress,
gas: ObjectID,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add timelocked stake to a validator’s staking pool using multiple balances and amount.
sourcefn request_withdraw_timelocked_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
timelocked_staked_iota: ObjectID,
gas: ObjectID,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_withdraw_timelocked_stake<'life0, 'async_trait>(
&'life0 self,
signer: IotaAddress,
timelocked_staked_iota: ObjectID,
gas: ObjectID,
gas_budget: BigInt<u64>,
) -> Pin<Box<dyn Future<Output = RpcResult<TransactionBlockBytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Withdraw timelocked stake from a validator’s staking pool.