Transaction

class Transaction(val config: SuiConfig) : Transaction

The concrete implementation of the Transaction interface.

This class provides all the functions related to building, executing, and querying transactions.

Constructors

Link copied to clipboard
constructor(config: SuiConfig)

Properties

Link copied to clipboard

The SuiConfig object specifying the RPC endpoint and connection settings.

Functions

Link copied to clipboard
open suspend override fun devInspectTransactionBlock(txBytes: String, txMetaData: TransactionMetaData, options: ExecuteTransactionBlockResponseOptions): Result<DevInspectTransactionBlockQuery.Data?, SuiError>

Runs a special developer-focused inspection of a transaction block.

Link copied to clipboard
open suspend override fun dryRunTransactionBlock(txBytes: String, option: ExecuteTransactionBlockResponseOptions): Result<DryRunTransactionBlockQuery.Data?, SuiError>

Simulates the execution of a transaction block without committing it to the network.

Link copied to clipboard
open suspend override fun executeTransactionBlock(txBytes: String, signatures: List<String>, option: ExecuteTransactionBlockResponseOptions): Result<ExecuteTransactionBlockMutation.Data?, SuiError>

Submits a pre-signed transaction block to the Sui network for execution.

Link copied to clipboard
open suspend override fun getTotalTransactionBlocks(): Result<GetTotalTransactionBlocksQuery.Data?, SuiError>

Fetches the total number of transaction blocks processed by the network.

Link copied to clipboard
open suspend override fun getTransactionBlock(digest: String, options: TransactionBlockResponseOptions): Result<GetTransactionBlockQuery.Data?, SuiError>

Fetches the details of a specific transaction block by its digest.

Link copied to clipboard
open suspend override fun paginateTransactionBlockLists(digest: String, hasMoreEvents: Boolean, hasMoreBalanceChanges: Boolean, hasMoreObjectChanges: Boolean, afterEvents: String?, afterBalanceChanges: String?, afterObjectChanges: String?): Result<PaginateTransactionBlockListsQuery.Data?, SuiError>

Fetches paginated lists of components within a specific transaction block.

Link copied to clipboard
open suspend override fun queryTransactionBlocks(filter: TransactionBlockFilter, options: TransactionBlockResponseOptions): Result<QueryTransactionBlocksQuery.Data?, SuiError>

Fetches a paginated list of transaction blocks matching a specified filter.

Link copied to clipboard
open suspend override fun signAndExecuteTransactionBlock(signer: Account, ptb: ProgrammableTransaction, gasBudget: ULong, options: ExecuteTransactionBlockResponseOptions): Result<ExecuteTransactionBlockMutation.Data?, SuiError>

A convenience method that signs and executes a transaction block in a single step.

Link copied to clipboard
open override fun signTransaction(message: ByteArray, signer: Account): ByteArray

Creates a cryptographic signature for a given message using a signer's private key.