pay

suspend fun pay(signer: SuiAddress, inputCoins: List<ObjectId>, recipients: List<SuiAddress>, amounts: List<Long>, gas: ObjectId? = null, gasBudget: Long): TransactionBlockBytes

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.

Return

TransactionBlockBytes The transaction block bytes after the payment is completed.

Parameters

signer

The transaction signer's Sui address.

inputCoins

The list of Sui coins to be used in this transaction.

recipients

The list of recipients' addresses, the length of this vector must be the same as amounts.

amounts

The amounts to be transferred to recipients, following the same order.

gas

The gas object to be used in this transaction, node will pick one from the signer's possession if not provided.

gasBudget

The gas budget, the transaction will fail if the gas cost exceed the budget.

Throws

if there is an error during the payment process.