TransactionBuilderInterface
interface TransactionBuilderInterface
A builder for creating transactions. Use finish to finalize the transaction data.
Inheritors
| TransactionBuilder |
Functions
| Name | Summary |
|---|---|
| executeWithGasStation | abstract suspend fun executeWithGasStation(signer: TransactionSigner): Value Execute the transaction using the gas station and return the JSON transaction effects. This will fail unless data is set with the gas_station_sponsor function. |
| expiration | abstract fun expiration(epoch: ULong): TransactionBuilder Set the expiration of the transaction to be a specific epoch. |
| finish | abstract fun finish(): Transaction Convert this builder into a transaction. |
| gas | abstract fun gas(objectRefs: List<ObjectReference>): TransactionBuilder Add gas coins that will be consumed. Optional. |
| gasBudget | abstract fun gasBudget(budget: ULong): TransactionBuilder Set the gas budget for the transaction. |
| gasPrice | abstract fun gasPrice(price: ULong): TransactionBuilder Set the gas price for the transaction. |
| gasStationSponsor | abstract fun gasStationSponsor(url: String, duration: Duration? = null, headers: Map<String, List<String>>? = null): TransactionBuilder Set the gas station sponsor. |
| makeMoveVec | abstract fun makeMoveVec(elements: List<MoveArg>, typeTag: TypeTag, name: String): TransactionBuilder Make a move vector from a list of elements. The elements must all be of the type indicated by type_tag. |
| mergeCoins | abstract fun mergeCoins(primaryCoin: PtbArgument, consumedCoins: List<PtbArgument>): TransactionBuilder Merge multiple coins into one. |
| moveCall | abstract fun moveCall(package: Address, module: Identifier, function: Identifier, arguments: List<PtbArgument> = listOf(), typeArgs: List<TypeTag> = listOf(), names: List<String> = listOf()): TransactionBuilder Call a Move function with the given arguments. |
| pay | abstract fun pay(coins: List<PtbArgument>, payments: List<Payment>): TransactionBuilder Send coins to multiple recipients, each paired with the amount to send. |
| payIota | abstract fun payIota(payments: List<Payment>): TransactionBuilder Send IOTA to multiple recipients, each paired with the amount to send. |
| publishPackage | abstract fun publishPackage(packageData: MovePackageData, upgradeCapName: String): TransactionBuilder 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: |
| sendCoins | abstract fun sendCoins(coins: List<PtbArgument>, recipient: Address, amount: PtbArgument? = null): TransactionBuilder Transfer some coins to a recipient address. If multiple coins are provided then they will be merged. |
| sendIota | abstract fun sendIota(recipient: Address, amount: PtbArgument): TransactionBuilder Send IOTA to a recipient address. |
| setSender | abstract fun setSender(sender: Address) Set the sender address. |
| splitCoins | abstract fun splitCoins(coin: PtbArgument, amounts: List<PtbArgument>, names: List<String> = listOf()): TransactionBuilder Split a coin by the provided amounts. |
| sponsor | abstract fun sponsor(sponsor: Address): TransactionBuilder Set the sponsor of the transaction. |
| stake | abstract fun stake(stake: PtbArgument, validatorAddress: Address): TransactionBuilder Add stake to a validator's staking pool. |
| transferObjects | abstract fun transferObjects(recipient: Address, objects: List<PtbArgument>): TransactionBuilder Transfer a list of objects to the given address, without producing any result. |
| unstake | abstract fun unstake(stakedIota: PtbArgument): TransactionBuilder Withdraw stake from a validator's staking pool. |
| upgrade | abstract fun upgrade(packageId: ObjectId, packageData: MovePackageData, upgradeTicket: PtbArgument, name: String? = null): TransactionBuilder Upgrade a Move package. |
| withClient | abstract fun withClient(client: GraphQlClient): ClientTransactionBuilder |