Skip to main content

ClientTransactionBuilderInterface

interface ClientTransactionBuilderInterface

A builder for creating transactions which uses a GraphQL client to automatically resolve inputs. Use finish to finalize the transaction data.

Inheritors

ClientTransactionBuilder

Functions

NameSummary
dryRunabstract suspend fun dryRun(skipChecks: Boolean = false): DryRunResult
Dry run the transaction.
executeabstract suspend fun execute(signer: TransactionSigner, waitFor: WaitForTx? = null): TransactionEffects
Execute the transaction and optionally wait for finalization.
executeWithSponsorabstract suspend fun executeWithSponsor(signer: TransactionSigner, sponsorSigner: TransactionSigner, waitFor: WaitForTx? = null): TransactionEffects
Execute the transaction and optionally wait for finalization.
expirationabstract fun expiration(epoch: ULong): ClientTransactionBuilder
Set the expiration of the transaction to be a specific epoch.
finishabstract suspend fun finish(): Transaction
Convert this builder into a transaction.
gasabstract fun gas(objectIds: List<ObjectId>): ClientTransactionBuilder
Add gas coins that will be consumed. Optional.
gasBudgetabstract fun gasBudget(budget: ULong): ClientTransactionBuilder
Set the gas budget for the transaction.
gasPriceabstract fun gasPrice(price: ULong): ClientTransactionBuilder
Set the gas price for the transaction.
gasStationSponsorabstract fun gasStationSponsor(url: String, duration: Duration? = null, headers: Map<String, List<String>>? = null): ClientTransactionBuilder
Set the gas station sponsor.
makeMoveVecabstract fun makeMoveVec(elements: List<MoveArg>, typeTag: TypeTag, name: String): ClientTransactionBuilder
Make a move vector from a list of elements. The elements must all be of the type indicated by type_tag.
mergeCoinsabstract fun mergeCoins(primaryCoin: PtbArgument, consumedCoins: List<PtbArgument>): ClientTransactionBuilder
Merge multiple coins into one.
moveCallabstract fun moveCall(package: Address, module: Identifier, function: Identifier, arguments: List<PtbArgument> = listOf(), typeArgs: List<TypeTag> = listOf(), names: List<String> = listOf()): ClientTransactionBuilder
Call a Move function with the given arguments.
payabstract fun pay(coins: List<PtbArgument>, payments: List<Payment>): ClientTransactionBuilder
Send coins to multiple recipients, each paired with the amount to send.
payIotaabstract fun payIota(payments: List<Payment>): ClientTransactionBuilder
Send IOTA to multiple recipients, each paired with the amount to send.
publishPackageabstract fun publishPackage(packageData: MovePackageData, upgradeCapName: String): ClientTransactionBuilder
Publish a list of modules with the given dependencies. The result assigned to upgrade_cap_name is the 0x2::package::UpgradeCap Move type. Note that the upgrade capability needs to be handled after this call:
sendCoinsabstract fun sendCoins(coins: List<PtbArgument>, recipient: Address, amount: PtbArgument? = null): ClientTransactionBuilder
Transfer some coins to a recipient address. If multiple coins are provided then they will be merged.
sendIotaabstract fun sendIota(recipient: Address, amount: PtbArgument): ClientTransactionBuilder
Send IOTA to a recipient address.
setSenderabstract fun setSender(sender: Address)
Set the sender address.
splitCoinsabstract fun splitCoins(coin: PtbArgument, amounts: List<PtbArgument>, names: List<String> = listOf()): ClientTransactionBuilder
Split a coin into many.
sponsorabstract fun sponsor(sponsor: Address): ClientTransactionBuilder
Set the sponsor of the transaction.
stakeabstract fun stake(stake: PtbArgument, validatorAddress: Address): ClientTransactionBuilder
Add stake to a validator's staking pool.
transferObjectsabstract fun transferObjects(recipient: Address, objects: List<PtbArgument>): ClientTransactionBuilder
Transfer a list of objects to the given address, without producing any result.
unstakeabstract fun unstake(stakedIota: PtbArgument): ClientTransactionBuilder
Withdraw stake from a validator's staking pool.
upgradeabstract fun upgrade(packageId: ObjectId, packageData: MovePackageData, upgradeTicket: PtbArgument, name: String? = null): ClientTransactionBuilder
Upgrade a Move package.