Transaction

interface Transaction

Transaction API namespace. This interface provides functionality to reading and writing transactions.

Inheritors

Properties

Link copied to clipboard
abstract val buildTransaction: Build

Builds a transaction to be submitted to the chain

Link copied to clipboard

Simulate transaction before signing

Link copied to clipboard

Submits a transaction to the chain

Functions

Link copied to clipboard
abstract suspend fun getGasPriceEstimation(): GasEstimation

Gives an estimate of the gas unit price required to get a transaction on chain in a reasonable amount of time. For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}

Link copied to clipboard
abstract suspend fun getTransactionByHash(transactionHash: String): Option<TransactionResponse>

Queries on-chain transaction by transaction hash. This function will return pending transactions.

Link copied to clipboard
abstract suspend fun getTransactionByVersion(ledgerVersion: Long): Option<TransactionResponse>

Queries on-chain transaction by version. This function will not return pending transactions.

Link copied to clipboard
abstract suspend fun isPendingTransaction(transactionHash: HexInput): Boolean

Defines if specified transaction is currently in pending state

Link copied to clipboard
abstract suspend fun publishPackageTransaction(account: AccountAddressInput, metadataBytes: HexInput, moduleBytecode: List<HexInput>, options: InputGenerateTransactionOptions = InputGenerateTransactionOptions()): SimpleTransaction

Generates a transaction to publish a move package to chain.

Link copied to clipboard
abstract fun sign(signer: Account, transaction: AnyRawTransaction): AccountAuthenticator

Sign a transaction that can later be submitted to chain

Link copied to clipboard

Sign and submit a single signer transaction to chain

Link copied to clipboard
abstract suspend fun waitForTransaction(transactionHash: HexInput, options: WaitForTransactionOptions = WaitForTransactionOptions()): Option<TransactionResponse>