Package-level declarations

This package contains all the data classes used by Ksui. These are mostly Sui type wrappers.

Types

Link copied to clipboard
@Serializable(with = AccountAddressSerializer::class)
data class AccountAddress(val data: ByteArray)

Represents an account address.

Link copied to clipboard
@Serializable
enum AppId : Enum<AppId>
Link copied to clipboard
enum B : Enum<B>
Link copied to clipboard
@Serializable
sealed class CallArg
Link copied to clipboard
@Serializable
data class CheckpointId(val digest: String? = null, val sequenceNumber: Long? = null)
Link copied to clipboard

General type definition for client headers

Link copied to clipboard
@Serializable
data class Data(val messageVersion: String, val transaction: DataTransaction, val sender: String, val gasData: GasData)
Link copied to clipboard
@Serializable
data class DataTransaction(val kind: String, val inputs: List<DataTransactionInput> = emptyList(), val transactions: List<TransactionKind> = emptyList())
Link copied to clipboard
@Serializable
abstract class DataTransactionInput
Link copied to clipboard
@Serializable
data class Digest(val data: ByteArray)
Link copied to clipboard
@Serializable
class EmptySignInfo
Link copied to clipboard
@Serializable
data class Envelope<T>(var data: T)
Link copied to clipboard
@Serializable
data class Epoch(val id: String)
Link copied to clipboard
data class EventFilter(val sender: String? = null, val transactionDigest: String? = null, val emittingModule: String? = null, val eventType: String? = null)
Link copied to clipboard
data class ExecuteTransactionBlockResponseOptions(val showBalanceChanges: Boolean = false, val showEffects: Boolean = false, val showRawEffects: Boolean = false, val showEvents: Boolean = false, val showInput: Boolean = false, val showObjectChanges: Boolean = false, val showRawInput: Boolean = false)
Link copied to clipboard
data class FaucetConfig(val headers: Map<String, Any>? = null, val authToken: String? = null)

A Faucet only configuration object

Link copied to clipboard
@Serializable
data class FaucetRequest(val fixedAmountRequest: FixedAmountRequest)
Link copied to clipboard
@Serializable
data class FaucetResponse(val transferredGasObjects: List<TransferredGasObject>, val error: String? = null)
Link copied to clipboard
@Serializable
data class FixedAmountRequest(val recipient: String)
Link copied to clipboard
data class FullNodeConfig(var headers: Map<String, Any>? = null) : ClientHeadersType

A Fullnode only configuration object.

Link copied to clipboard
@Serializable
data class GasData(val payment: List<ObjectReference>, val owner: AccountAddress, val price: ULong, val budget: ULong)
Link copied to clipboard
@Serializable
data class GraphqlQuery(val query: String, val variables: Map<String, String>? = null)
Link copied to clipboard
data class IndexerConfig(var headers: Map<String, Any>? = null) : ClientHeadersType

An Indexer only configuration object.

Link copied to clipboard
@Serializable
data class Intent(val scope: IntentScope, val version: IntentVersion, val appId: AppId)
Link copied to clipboard
@Serializable
data class IntentMessage<T>(val intent: Intent, val value: T)
Link copied to clipboard
@Serializable
enum IntentScope : Enum<IntentScope>
Link copied to clipboard
@Serializable
enum IntentType : Enum<IntentType>
Link copied to clipboard
@Serializable
enum IntentVersion : Enum<IntentVersion>
Link copied to clipboard
abstract class MoveFunctionArgType
Link copied to clipboard
Link copied to clipboard

Enum class representing the network to connect to.

Link copied to clipboard
@Serializable
sealed class ObjectArg
Link copied to clipboard
data class ObjectDataOptions(val showBcs: Boolean = false, val showContent: Boolean = false, val showDisplay: Boolean = false, val showType: Boolean = false, val showOwner: Boolean = false, val showPreviousTransaction: Boolean = false, val showStorageRebate: Boolean = false)

Object data options

Link copied to clipboard
@Serializable
data class ObjectDigest(val digest: Digest)
Link copied to clipboard
@Serializable
data class ObjectId(val hash: AccountAddress)
Link copied to clipboard
data class ObjectRef(val address: Any, val version: Any, val digest: String)
Link copied to clipboard
@Serializable
data class ObjectReference(val reference: Reference, val version: Long, val digest: ObjectDigest)
Link copied to clipboard
@Serializable(with = OptionSerializer::class)
sealed class Option<out T>
Link copied to clipboard
@Serializable
data class Reference(val accountAddress: AccountAddress)
Link copied to clipboard
abstract class RequestOptions
Link copied to clipboard
sealed class Result<out V, out E>
Link copied to clipboard
@Serializable
data class SenderSignedData(val senderSignedTransactions: List<SenderSignedTransaction>)
Link copied to clipboard
@Serializable
data class SenderSignedTransaction(val intentMessage: IntentMessage<TransactionData>, val txSignatures: List<String>)
Link copied to clipboard
@Serializable
data class StructTag(val address: String, val module: String, val name: String, val typeParams: List<TypeTag> = emptyList())

Represents the fully-qualified identifier of a Move struct.

Link copied to clipboard
Link copied to clipboard
class SuiConfig(settings: SuiSettings? = null)
Link copied to clipboard
data class SuiSettings(val network: Network? = null, val fullNode: String? = null, val faucet: String? = null, val indexer: String? = null, val clientConfig: ClientConfig = ClientConfig.default, val fullNodeConfig: FullNodeConfig? = null, val indexerConfig: IndexerConfig? = null, val faucetConfig: FaucetConfig? = null)
Link copied to clipboard
@Serializable
data class Transaction(val data: Data, val txSignatures: List<String>)
Link copied to clipboard
data class TransactionBlockFilter(val function: String? = null, val kind: TransactionBlockKindInput? = null, val afterCheckpoint: String? = null, val atCheckpoint: String? = null, val beforeCheckpoint: String? = null, val affectedAddress: String? = null, val sentAddress: String? = null, val inputObject: String? = null, val changedObject: String? = null, val transactionIds: List<String>? = emptyList())
Link copied to clipboard
data class TransactionBlockResponseOptions(val first: Int? = null, val last: Int? = null, val before: String? = null, val after: String? = null, val showBalanceChanges: Boolean? = null, val showEffects: Boolean? = null, val showRawEffects: Boolean? = null, val showEvents: Boolean? = null, val showInput: Boolean? = null, val showObjectChanges: Boolean? = null, val showRawInput: Boolean? = null)
Link copied to clipboard
@Serializable(with = V1Serializer::class)
sealed class TransactionData
Link copied to clipboard
Link copied to clipboard
@Serializable
data class TransactionDataV1(val a: B = B.A, val kind: TransactionKind, val sender: AccountAddress, val gasData: GasData, val expiration: TransactionExpiration) : TransactionDataVersion
Link copied to clipboard
Link copied to clipboard
@Serializable
data class TransactionDigest(val value: String)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class TransactionMetaData(val sender: String? = null, val gasPrice: Long? = null, val gasObjects: List<ObjectRef>? = emptyList(), val gasBudget: Long?, val gasSponsor: AccountAddress)
Link copied to clipboard
@Serializable
data class TransferredGasObject(val amount: Long, val id: String, val transferTxDigest: String)
Link copied to clipboard
Link copied to clipboard
@Serializable(with = TypeTagSerializer::class)
sealed class TypeTag

A sealed class representing a fully-qualified Move type. This provides a type-safe way to represent types for transaction building, eliminating the need for raw strings.

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun Txn.data(): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
infix fun TransactionData.with(txSignatures: List<String>): Txn