Sui

class Sui(config: SuiConfig = SuiConfig()) : Coin, Extended, Governance, General, Transaction, Object, Sns, Move, Faucet

Sui is a class that implements all the interfaces of the Sui API.

It is the entry point for all the API calls and related operations.

Constructors

Link copied to clipboard
constructor(config: SuiConfig = SuiConfig())

Properties

Link copied to clipboard
open override val config: SuiConfig

Functions

Link copied to clipboard
open suspend override fun dryRunTransactionBlock(txnBytes: String, option: ExecuteTransactionBlockResponseOptions): Option.Some<DryRunTransactionBlock.Result?>

Dry run a transaction block

Link copied to clipboard
open suspend override fun executeTransactionBlock(txnBytes: String, signatures: List<String>, option: ExecuteTransactionBlockResponseOptions): Option.Some<ExecuteTransactionBlock.Result?>

Execute a transaction block

Link copied to clipboard
open suspend override fun getAllBalances(address: AccountAddress): Option<Balances>

Get all balances for an address

Link copied to clipboard
open suspend override fun getBalance(address: AccountAddress, type: String?): Option<Balance>

Get the balance of an address for a specific coin type

Link copied to clipboard
open suspend override fun getChainIdentifier(): Option<String>

Get the first 4 bytes of the chain's genesis checkpoint digest.

Link copied to clipboard
open suspend override fun getCheckpoint(checkpointId: CheckpointId?): Option<Checkpoint?>

Get a checkpoint

Link copied to clipboard
open suspend override fun getCoinMetadata(type: String): Option<CoinMetadata>

Get the metadata for a coin

Link copied to clipboard
open suspend override fun getCoins(address: AccountAddress, first: Int?, cursor: String?, type: String?): Option<Coins>

Get coins for an address

Link copied to clipboard
open suspend override fun getCommitteeInfo(epochId: Long?, after: String?): Option<CommitteeInfo>

Get the committee info

Link copied to clipboard
open suspend override fun getDynamicFieldObject(parentId: String, name: DynamicFieldName): Option<DynamicFieldObject>

Get a dynamic field object

Link copied to clipboard
open suspend override fun getDynamicFields(parentId: String, limit: UInt?, cursor: String?): Option<DynamicFields>

Get dynamic fields

Link copied to clipboard

Get the latest Sui system state

Link copied to clipboard

Get the Move function argument types

Link copied to clipboard
open suspend override fun getObject(id: String, option: ObjectDataOptions): Option<Object>

Get an object by ID

Link copied to clipboard
open suspend override fun getOwnedObjects(owner: AccountAddress, limit: Int?, cursor: String?, option: ObjectDataOptions): Option<OwnedObjects>

Get owned objects

Link copied to clipboard
open suspend override fun getProtocolConfig(protocolVersion: Int?): Option<ProtocolConfig>

Get the protocol config

Link copied to clipboard
open suspend override fun getReferenceGasPrice(): Option<String?>

Get the reference gas price

Link copied to clipboard
open suspend override fun getStakes(owner: AccountAddress, limit: Int?, cursor: String?): Option<Stake>

Get the stakes

Link copied to clipboard
open suspend override fun getStakesByIds(ids: List<String>, limit: Int?, cursor: String?): Option<Stakes>

Get the stakes by IDs

Link copied to clipboard
open suspend override fun getTotalSupply(type: String): Option<String>

Get the total supply of a coin

Link copied to clipboard
open suspend override fun getTotalTransactionBlocks(): Option<Long?>

Get the total transaction blocks

Link copied to clipboard
open suspend override fun getValidatorApy(): Option<ValidatorsApy>

Get the validator APY

Link copied to clipboard
open override fun moveCall(target: String, typeArguments: List<TypeTag>, args: List<Argument>): ProgrammableTransaction
Link copied to clipboard
inline suspend fun <T> General.query(query: GraphqlQuery): T
Link copied to clipboard

Query transaction blocks for the specified criteria

Link copied to clipboard
open suspend override fun requestTestTokens(accountAddress: AccountAddress): Option<List<TransferredGasObject>>
Link copied to clipboard
open suspend override fun resolveNameServiceAddress(domain: String): Option<AccountAddress?>

Resolve name service address

Link copied to clipboard
open suspend override fun resolveNameServiceNames(address: AccountAddress, limit: UInt?, cursor: String?): Option<Page>

Resolve name service names

Link copied to clipboard
open suspend override fun signAndExecuteTransactionBlock(signer: Account, ptb: ProgrammableTransaction, gasBudget: ULong): Option.Some<ExecuteTransactionBlock.Result?>

Sign and execute a transaction block

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

Sign a transaction

Link copied to clipboard
open override fun splitCoin(coin: Argument, amounts: List<Long>): ProgrammableTransaction
Link copied to clipboard
Link copied to clipboard
open suspend override fun tryGetPastObject(id: String, version: Int?): Option<PastObject>

Try to get a past object