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
data class AdditionalProperties(val type: String, val format: String, val minimum: Int)
Link copied to clipboard
object Address : TypeTag
Link copied to clipboard
@Serializable
enum AppId : Enum<AppId>
Link copied to clipboard
@Serializable
sealed class Argument
Link copied to clipboard
@Serializable
data class AtVersion(val objectId: String, val sequenceNumber: Long)
Link copied to clipboard
@Serializable
data class AuthorityPublicKeyBytes(val description: String, val allOf: List<Schema>)
Link copied to clipboard
@Serializable
data class AuthSignInfo(val epoch: Int, val signature: String, val signersMap: List<Int>)
Link copied to clipboard
@Serializable
data class Balance(val coinType: String, val coinObjectCount: Int, val totalBalance: Long, val lockedBalance: LockedBalance)
Link copied to clipboard
@Serializable
data class BalanceChange(val owner: Owner, val coinType: String, val amount: String)
Link copied to clipboard
object Bool : TypeTag
Link copied to clipboard
interface Builder
Link copied to clipboard
@Serializable
sealed class BuilderArg
Link copied to clipboard
@Serializable
sealed class CallArg
Link copied to clipboard
@Serializable
data class Certificate(val transactionDigest: String, val data: Data, val txSignatures: List<String>, val authSignInfo: AuthSignInfo)
Link copied to clipboard
@Serializable
data class Checkpoint(val epoch: Long, val sequenceNumber: String, val digest: String, val networkTotalTransactions: Long, val previousDigest: String = "", val epochRollingGasCostSummary: GasCostSummary, val timestampMs: Long, val transactions: List<String>, val checkpointCommitments: List<String> = emptyList())
Link copied to clipboard
data class CheckpointContents(val transactions: List<Transaction>, val userSignatures: List<String>)
Link copied to clipboard
@Serializable
data class CheckpointContentsDigest(val digest: CheckpointDigest)
Link copied to clipboard
@Serializable
data class CheckpointDigest(val digest: Digest)
Link copied to clipboard
@Serializable
data class CheckpointId(val digest: String)
Link copied to clipboard
@Serializable
data class CheckpointPage(val data: List<Checkpoint>, val nextCursor: String? = "", val hasNextPage: Boolean = false)
Link copied to clipboard
@Serializable
data class CheckpointSequenceNumber(val sequenceNumber: Long)
Link copied to clipboard
@Serializable
data class CheckpointSequenceNumberResult(val value: CheckpointSequenceNumber)
Link copied to clipboard
@Serializable
data class CheckpointSummary(val contentsDigest: CheckpointContentsDigest, val endOfEpochData: EndOfEpochData, val epoch: Long, val epochRollingGasCostSummary: GasCostSummary, val networkTotalTransactions: Long, val previousDigest: CheckpointDigest, val sequenceNumber: Long, val timestampMs: Long, val versionSpecificData: VersionSpecificData)
Link copied to clipboard
@Serializable
data class CoinData(val coinType: String, val coinObjectId: String, val version: Long, val digest: String, val balance: Long, val lockedUntilEpoch: Long? = null, val previousTransaction: String?)
Link copied to clipboard
@Serializable
data class CoinObjectCount(val type: String, val format: String, val minimum: Int)
Link copied to clipboard
@Serializable
data class CoinPage(val data: List<CoinData> = emptyList(), val nextCursor: String? = null, val hasNextPage: Boolean)
Link copied to clipboard
@Serializable
data class CoinType(val type: String)
Link copied to clipboard
@Serializable
open class Command
Link copied to clipboard
@Serializable
abstract class CommitteeInfo
Link copied to clipboard
@Serializable
data class Components(val schemas: SchemaItem)
Link copied to clipboard
@Serializable
data class Contact(val name: String, val url: String, val email: String)
Link copied to clipboard
@Serializable
data class Content(val dataType: String, val type: String, val hasPublicTransfer: Boolean, val fields: Fields)
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 DelegatedStake(val validatorAddress: String, val stakingPool: String, val stakes: List<Stake>)
Link copied to clipboard
@Serializable
data class Details(val objectId: String, val version: Int, val digest: Digest, val type: String, val owner: Owner_, val previousTransaction: Transaction, val storageRebate: Int, val content: Content)
Link copied to clipboard
@Serializable
data class DevInspectResults(val effects: List<TransactionEffect>, val event: List<Event>, val results: List<Array<Pair<UInt, SuiExecutionResultOrString>>>)
Link copied to clipboard
@Serializable
data class Digest(val value: String)
Link copied to clipboard
@Serializable
data class DiscoverBalance(val type: String, val required: List<String>, val properties: Properties)
Link copied to clipboard
@Serializable
data class DiscoverBalanceChange(val type: String, val required: List<String>)
Link copied to clipboard
@Serializable
data class Discovery(val openrpc: String, val info: Info, val methods: List<Method>)
Link copied to clipboard
@Serializable
data class DryRunTransactionBlockResponse(val effects: TransactionBlockEffects, val events: List<Event>, val objectChanges: List<ObjectChange>, val balanceChanges: List<BalanceChange>, val input: TransactionBlockData)
Link copied to clipboard
@Serializable
data class DynamicFieldName(val type: String, val value: String)
Link copied to clipboard
@Serializable
data class Effects(val messageVersion: String, val status: Status, val executedEpoch: String, val gasUsed: GasUsed, val modifiedAtVersions: List<AtVersion> = emptyList(), val sharedObjects: List<SharedObject> = emptyList(), val transactionDigest: String, val created: List<Object> = emptyList(), val mutated: List<Object> = emptyList(), val gasObject: GasObject, val eventsDigest: String = "", val dependencies: List<String> = emptyList())
Link copied to clipboard
@Serializable
data class EndOfEpochData(val value: String)
Link copied to clipboard
@Serializable
data class EpochId(val id: String)
Link copied to clipboard
@Serializable
data class Event(val id: EventID, val packageId: String, val transactionModule: String, val sender: String, val type: String, val parsedJson: String, val bcs: String)
Link copied to clipboard
@Serializable
data class EventEnvelope(val id: EventID, val packageId: String, val transactionModule: String, val sender: String, val type: String, val parsedJson: EventParsedJson, val bcs: String, val timestampMs: String)
Link copied to clipboard
@Serializable(with = EventFilterSerializer::class)
open class EventFilter
Link copied to clipboard
abstract class EventFilterMutable
Link copied to clipboard
@Serializable
data class EventID(val txDigest: String, val eventSeq: Long)
Link copied to clipboard
@Serializable
data class EventPage(val data: List<EventEnvelope>, val nextCursor: NextCursor?, val hasNextPage: Boolean)
Link copied to clipboard
@Serializable(with = EventParsedJsonSerializer::class)
data class EventParsedJson(val data: String)
Link copied to clipboard
@Serializable(with = EventResponseSerializer::class)
sealed class EventResponse
Link copied to clipboard
@Serializable
abstract class EventTmp
Link copied to clipboard
@Serializable(with = FaucetResponseSerializer::class)
sealed class FaucetResponse
Link copied to clipboard
@Serializable
data class Fields(val balance: Balance, val id: ID)
Link copied to clipboard
@Serializable
data class Filter(val condition: FilterCondition)
Link copied to clipboard
@Serializable
sealed class FilterCondition
Link copied to clipboard
@Serializable
data class Friend(val address: String, val name: String)
Link copied to clipboard
@Serializable
data class Gas(val objectId: String, val version: Int, val digest: String)
Link copied to clipboard
@Serializable
data class GasCostSummary(val computationCost: Long, val storageCost: Long, val storageRebate: Long)
Link copied to clipboard
@Serializable
data class GasData(val payment: List<ObjectReference>, val owner: String, val price: ULong, val budget: ULong)
Link copied to clipboard
@Serializable
data class GasObject(val owner: Owner.AddressOwner, val reference: ObjectReference)
Link copied to clipboard
@Serializable
data class GasPrice(val cost: Long)
Link copied to clipboard
@Serializable
data class GasUsed(val computationCost: String, val storageCost: String, val storageRebate: String, val nonRefundableStorageFee: String)
Link copied to clipboard
@Serializable
data class ID(val value: String)
Link copied to clipboard
@Serializable
data class ImmOrOwnedMoveObject(val objectId: String, val version: Int, val digest: String)
Link copied to clipboard
@Serializable
data class Info(val title: String, val description: String, val contact: Contact, val license: License, val version: String)
Link copied to clipboard
@Serializable
data class Input(val type: String, val valueType: String, val value: String)
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
@Serializable
data class License(val name: String, val url: String)
Link copied to clipboard
@Serializable
data class LoadedChildObject(val objectId: String, val sequenceNumber: String)
Link copied to clipboard
@Serializable
data class LoadedChildObjectsResponse(val loadedChildObjects: List<LoadedChildObject>)
Link copied to clipboard
@Serializable
class LockedBalance
Link copied to clipboard
@Serializable
data class LockedBalanceProperties(val type: String, val additionalProperties: AdditionalProperties)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Method(val name: String, val tags: List<Tag>, val description: String = "", val params: List<Param>, val result: Result)
Link copied to clipboard
@Serializable
data class ModuleExposedFunction(val name: String, val normalized: MoveNormalizedFunction)
Link copied to clipboard
Link copied to clipboard
abstract class MoveFunctionArgType
Link copied to clipboard
Link copied to clipboard
@Serializable
data class MoveNormalizedFunction(val visibility: String, val isEntry: Boolean, val typeParameters: List<SuiMoveAbilitySet> = emptyList(), val parameters: List<MoveFunctionParameter> = emptyList(), val returnType: List<MoveFunctionParameter>)
Link copied to clipboard
@Serializable
data class MoveNormalizedModule(val fileFormatVersion: Long, val address: String, val name: String, val friends: List<Friend> = emptyList(), val structs: String, val exposedFunctions: List<ModuleExposedFunction> = emptyList())
Link copied to clipboard
@Serializable
data class NameServicePage(val data: List<String>, val hasNextPage: Boolean, val nextCursor: String? = null)
Link copied to clipboard
@Serializable
data class NextCursor(val txDigest: String, val eventSeq: Long)
Link copied to clipboard
@Serializable
data class Object(val owner: Owner, val reference: ObjectReference)
Link copied to clipboard
@Serializable
sealed class ObjectArg
Link copied to clipboard
@Serializable
abstract class ObjectChange
Link copied to clipboard
@Serializable
data class ObjectData(val data: ObjectInfo)
Link copied to clipboard
@Serializable
data class ObjectId(val hash: String)
Link copied to clipboard
@Serializable
data class ObjectInfo(val objectId: String, val version: String, val digest: String, val type: String, val previousTransaction: String, val storageRebateL: String)
Link copied to clipboard
@Serializable
data class ObjectReference(val objectId: String, val version: Long, val digest: String)
Link copied to clipboard
@Serializable(with = ObjectResponseSerializer::class)
sealed class ObjectResponse
Link copied to clipboard
@Serializable
data class ObjectResponseQuery(val filter: Filter, val options: ObjectResponse.ObjectDataOptions)
Link copied to clipboard
@Serializable
data class ObjectsPage(val data: List<ObjectData>, val nextCursor: String? = null, val hasNextPage: Boolean)
Link copied to clipboard
Link copied to clipboard
@Serializable(with = OptionSerializer::class)
sealed class Option<out T>
Link copied to clipboard
interface Owner
Link copied to clipboard
@Serializable
data class Owner_(val address: SuiAddress)
Link copied to clipboard
@Serializable
data class Param(val name: String, val description: String? = null, val required: Boolean? = null, val schema: Schema)
Link copied to clipboard
@Serializable
data class PastObjectRequest(val objectId: ObjectId, val version: Long)
Link copied to clipboard
@Serializable
data class PastObjectResponse(val status: String, val details: ObjectResponse)
Link copied to clipboard
@Serializable
data class Payment(val objectId: String, val version: Long, val digest: String)
Link copied to clipboard
@Serializable
data class ProgrammableMoveCall(val pakage: ObjectId, val module: String, val function: String, val typeArguments: List<TypeTag>, val arguments: List<Argument>)
Link copied to clipboard
@Serializable
data class ProgrammableTransaction(val inputs: List<CallArg>, val commands: List<Command>) : TransactionKind
Link copied to clipboard
@Serializable
data class Properties(val coinObjectCount: CoinObjectCount, val coinType: CoinType, val lockedBalance: LockedBalanceProperties, val totalBalance: TotalBalance)
Link copied to clipboard
Link copied to clipboard
@Serializable(with = ResponseSerializer::class)
sealed class Response<out T>

A sealed class representing the response of an API call.

Link copied to clipboard
@Serializable
data class Result(val name: String, val required: Boolean? = null, val schema: Schema)
Link copied to clipboard
@Serializable
data class Schema(val type: String? = null, val format: String? = null, val minimum: Double? = null, val ref: String? = null)
Link copied to clipboard
@Serializable
data class SchemaItem(val authorityPublicKeyBytes: AuthorityPublicKeyBytes, val balance: DiscoverBalance, val balanceChange: DiscoverBalanceChange)
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 SharedObject(val objectId: String, val version: Long, val digest: String)
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Stake(val stakedSuiId: String, val stakeRequestEpoch: String, val stakeActiveEpoch: String, val principal: String, val status: String, val estimatedReward: String = "")
Link copied to clipboard
@Serializable
data class Status(val status: String)
Link copied to clipboard
@Serializable
data class SuiAddress(val pubKey: String)
Link copied to clipboard
@Serializable
data class SuiCoinMetadata(val decimals: UByte, val description: String, val iconUrl: String?, val id: String = "", val name: String, val symbol: String)
Link copied to clipboard
@Serializable
sealed class SuiExecutionResultOrString
Link copied to clipboard
@Serializable
data class SuiMoveAbilitySet(val abilities: List<String> = emptyList())
Link copied to clipboard
data class SuiObjectInfo(var objectId: String, val version: Long, val digest: Digest, val type: String, val owner: Owner.AddressOwner, val previousTransaction: Transaction)
Link copied to clipboard
@Serializable
data class SuiObjectResponse(val status: Status, val details: Details)
Link copied to clipboard
@Serializable
data class SuiSystemStateSummary(val epoch: Long, val protocolVersion: Long, val systemStateVersion: Long, val storageFundTotalObjectStorageRebates: Long, val storageFundNonRefundableBalance: Long, val referenceGasPrice: Long, val safeMode: Boolean, val safeModeStorageRewards: Long, val safeModeComputationRewards: Long, val safeModeStorageRebates: Long, val safeModeNonRefundableStorageFee: Long, val epochStartTimestampMs: Long, val epochDurationMs: Long, val stakeSubsidyStartEpoch: Long, val maxValidatorCount: Int, val minValidatorJoiningStake: Long, val validatorLowStakeThreshold: Long, val validatorVeryLowStakeThreshold: Long, val validatorLowStakeGracePeriod: Long, val stakeSubsidyBalance: String, val stakeSubsidyDistributionCounter: Long, val stakeSubsidyCurrentDistributionAmount: Long, val stakeSubsidyPeriodLength: Long, val stakeSubsidyDecreaseRate: Long, val totalStake: Long, val activeValidators: List<SuiValidatorSummary>, val pendingActiveValidatorsId: String, val pendingActiveValidatorsSize: Long, val pendingRemovals: List<String>, val stakingPoolMappingsId: String, val stakingPoolMappingsSize: Long, val inactivePoolsId: String, val inactivePoolsSize: Int, val validatorCandidatesId: String, val validatorCandidatesSize: Long, val atRiskValidators: List<String>, val validatorReportRecords: List<ValidatorReportRecord>)

Latest SUI system state object on-chain

Link copied to clipboard
@Serializable
data class SuiValidatorSummary(val suiAddress: String, val protocolPubkeyBytes: String, val networkPubkeyBytes: String, val workerPubkeyBytes: String, val proofOfPossessionBytes: String, val name: String, val description: String, val imageUrl: String, val projectUrl: String, val netAddress: String, val p2pAddress: String, val primaryAddress: String, val workerAddress: String, val nextEpochProtocolPubkeyBytes: String? = null, val nextEpochProofOfPossession: String? = null, val nextEpochNetworkPubkeyBytes: String? = null, val nextEpochWorkerPubkeyBytes: String? = null, val nextEpochNetAddress: String? = null, val nextEpochP2pAddress: String? = null, val nextEpochPrimaryAddress: String? = null, val nextEpochWorkerAddress: String? = null, val votingPower: Long, val operationCapId: String, val gasPrice: Long, val commissionRate: Long, val nextEpochStake: Long, val nextEpochGasPrice: Long, val nextEpochCommissionRate: Long, val stakingPoolId: String, val stakingPoolActivationEpoch: Long, val stakingPoolDeactivationEpoch: Long? = null, val stakingPoolSuiBalance: Long, val rewardsPool: Long, val poolTokenBalance: Long, val pendingStake: Long, val pendingTotalSuiWithdraw: Long, val pendingPoolTokenWithdraw: Long, val exchangeRatesId: String, val exchangeRatesSize: Long)

A summary of a validator's information.

Link copied to clipboard
@Serializable
data class Supply(val value: Long)
Link copied to clipboard
@Serializable
data class Tag(val name: String)
Link copied to clipboard
@Serializable
data class TotalBalance(val type: String, val format: String, val minimum: Int)
Link copied to clipboard
@Serializable
data class Transaction(val data: Data, val txSignatures: List<String>)
Link copied to clipboard
@Serializable
data class Transaction1(val kind: String, val inputs: List<Input>)
Link copied to clipboard
@Serializable
data class TransactionBlock(val digest: String)
Link copied to clipboard
@Serializable
data class TransactionBlockBytes(val txBytes: String, val gas: List<Gas>)
Link copied to clipboard
@Serializable
data class TransactionBlockData(val messageVersion: String, val transaction: Transaction1, val sender: String, val gasData: GasData)
Link copied to clipboard
@Serializable
data class TransactionBlockEffects(val messageVersion: String, val status: Status, val executedEpoch: String, val gasUsed: GasUsed, val modifiedAtVersions: List<AtVersion>, val transactionDigest: String, val mutated: List<Object> = emptyList(), val gasObject: GasObject, val dependencies: List<String>)
Link copied to clipboard
@Serializable
data class TransactionBlockResponse(val digest: String, val transaction: Transaction? = null, val rawTransaction: String = "", val effects: Effects? = null, val events: List<Event> = emptyList(), val objectChanges: List<ObjectChange> = emptyList(), val balanceChanges: List<BalanceChange> = emptyList(), val timestampMs: Long, val checkpoint: Long, val errors: List<String> = emptyList())
Link copied to clipboard
@Serializable
data class TransactionBlockResponseOptions(val showInput: Boolean, val showRawInput: Boolean, val showEffects: Boolean, val showEvents: Boolean, val showObjectChanges: Boolean, val showBalanceChanges: Boolean)

The options for the transaction response.

Link copied to clipboard
@Serializable
data class TransactionBlockResponseQuery(val filter: TransactionBlockResponseQueryFilter? = null, val options: TransactionBlockResponseOptions? = null)

The transaction query criteria.

Link copied to clipboard
@Serializable
data class TransactionBlockResponseQueryFilter(val inputObject: String? = null)
Link copied to clipboard
@Serializable
data class TransactionBlocksPage(val data: List<TransactionBlock>, val nextCursor: String? = null, val hasNextPage: Boolean)
Link copied to clipboard
@Serializable
sealed class TransactionData
Link copied to clipboard
Link copied to clipboard
@Serializable
data class TransactionDataV1(val kind: TransactionKind, val sender: SuiAddress, 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
@Serializable
data class TransactionDigests(val vec: List<String>)
Link copied to clipboard
@Serializable
data class TransactionEffect(val value: String)
Link copied to clipboard
@Serializable
sealed class TransactionExpiration
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
sealed class TransactionKind
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class TransferredGasObject(val amount: String, val id: String, val transferTxDigest: String)
Link copied to clipboard
@Serializable
sealed class TypeTag
Link copied to clipboard
object U128 : TypeTag
Link copied to clipboard
object U16 : TypeTag
Link copied to clipboard
object U256 : TypeTag
Link copied to clipboard
object U32 : TypeTag
Link copied to clipboard
object U64 : TypeTag
Link copied to clipboard
object U8 : TypeTag
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Validator(val publicKey: String, val weight: Int)
Link copied to clipboard
@Serializable
data class ValidatorApy(val address: String, val apy: Double)
Link copied to clipboard
@Serializable
data class ValidatorApys(val apys: List<ValidatorApy>, val epoch: String)
Link copied to clipboard
@Serializable
data class ValidatorMetadata(val suiAddress: String, val pubkeyBytes: List<Int>, val networkPubkeyBytes: List<Int>, val workerPubkeyBytes: List<Int>, val proofOfPossessionBytes: List<Int>, val name: String, val description: String, val imageUrl: String, val projectUrl: String, val netAddress: List<Int>, val consensusAddress: List<Int>, val workerAddress: List<Int>, val nextEpochStake: Int, val nextEpochDelegation: Long, val nextEpochGasPrice: Int, val nextEpochCommissionRate: Int)
Link copied to clipboard
@Serializable
data class ValidatorReportRecord(val hash: String, val addresses: List<String>)
Link copied to clipboard
@Serializable
data class Validators(val list: List<ValidatorMetadata>)
Link copied to clipboard
class Vector : TypeTag
Link copied to clipboard
@Serializable
class VersionSpecificData(val version: Int, val data: ByteArray, val versionSpecificData: ByteArray = byteArrayOf())

Functions

Link copied to clipboard
inline fun <T : EventFilterMutable> eventFilterFor(block: T.() -> Unit): EventFilter

Creates an EventFilter instance of type T and applies the specified block on it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun vectorOf(typeTag: TypeTag): Vector