Package-level declarations
Types
Link copied to clipboard
class AccountSequenceManager(val accountAddress: AccountAddress, fetchSequenceNumber: suspend (AccountAddress) -> AptosResult<ULong>)
Concurrency-safe reservation of a sender's Aptos sequence numbers.
Link copied to clipboard
@Serializable
Link copied to clipboard
interface TransactionService
Kotlin-native transaction operations exposed by xyz.mcxross.kaptos.Aptos.
Link copied to clipboard
class TransactionWorker(scope: CoroutineScope, sequenceManager: AccountSequenceManager, capacity: Int = DEFAULT_CAPACITY, submitTransaction: suspend (UnsignedTransaction) -> AptosResult<PendingTransactionResponse>, isSequenceMismatch: (AptosError) -> Boolean = ::defaultSequenceMismatch)
Bounded, single-sender transaction pipeline.
Link copied to clipboard
Observable lifecycle event emitted by TransactionWorker.
Link copied to clipboard
Whether worker shutdown drains queued work or cancels it immediately.
Functions
Link copied to clipboard
inline suspend fun <T1> TransactionService.build(sender: AccountAddressInput, function: String, arguments: List<Any?> = emptyList(), options: TransactionOptions? = null): AptosResult<UnsignedTransaction.Simple>
Builds a single-sender transaction inferring a single type argument from T1.
suspend fun TransactionService.build(sender: AccountAddressInput, function: String, typeArguments: List<String>, arguments: List<Any?> = emptyList(), options: TransactionOptions? = null): AptosResult<UnsignedTransaction.Simple>
Builds a single-sender transaction directly from string type arguments.
Link copied to clipboard
inline suspend fun <T1> TransactionService.signAndSubmit(signer: TransactionSigner, function: String, arguments: List<Any?> = emptyList(), options: TransactionOptions? = null, secondarySigners: List<TransactionSigner> = emptyList(), feePayer: TransactionSigner? = null): AptosResult<PendingTransactionResponse>
Builds, signs, and submits inferring a single type argument from T1.
suspend fun TransactionService.signAndSubmit(signer: TransactionSigner, function: String, typeArguments: List<String>, arguments: List<Any?> = emptyList(), options: TransactionOptions? = null, secondarySigners: List<TransactionSigner> = emptyList(), feePayer: TransactionSigner? = null): AptosResult<PendingTransactionResponse>
Builds, signs, and submits with string type arguments.
Link copied to clipboard
inline suspend fun <T1> TransactionService.submitAndWait(signer: TransactionSigner, function: String, arguments: List<Any?> = emptyList(), transactionOptions: TransactionOptions? = null, secondarySigners: List<TransactionSigner> = emptyList(), feePayer: TransactionSigner? = null, waitOptions: WaitForTransactionOptions = WaitForTransactionOptions()): AptosResult<TransactionResponse>
Builds, signs, submits, and waits inferring a single type argument from T1.
suspend fun TransactionService.submitAndWait(signer: TransactionSigner, function: String, typeArguments: List<String>, arguments: List<Any?> = emptyList(), transactionOptions: TransactionOptions? = null, secondarySigners: List<TransactionSigner> = emptyList(), feePayer: TransactionSigner? = null, waitOptions: WaitForTransactionOptions = WaitForTransactionOptions()): AptosResult<TransactionResponse>
Builds, signs, submits, and waits with string type arguments.