Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AccountInfo(val executable: Boolean, val owner: String, val lamports: ULong, val data: List<String>, val rentEpoch: ULong)

Account information

Link copied to clipboard
@Serializable
data class LatestBlockHash(val blockhash: String, val lastValidBlockHeight: Long)
Link copied to clipboard
data class NonceAccount(val authorizedPubkey: PublicKey, val nonce: String, val feeCalculator: FeeCalculator)
Link copied to clipboard
@Serializable
data class RecentBlockHash(val blockhash: String, val feeCalculator: FeeCalculator)
Link copied to clipboard
@Serializable
data class SignatureInformation(var err: JsonElement?, val memo: JsonElement?, val signature: String?, val slot: Long?, val blockTime: Long?, val confirmationStatus: String?)
Link copied to clipboard
@Serializable
data class TokenAmountInfo(val amount: String?, val decimals: Int, val uiAmount: Double?, val uiAmountString: String)
Link copied to clipboard
@Serializable
data class TransactionResponse(val meta: TransactionResponse.Meta?, val slot: Long?, val transaction: TransactionResponse.Transaction?, val blockTime: Long?)

Functions

Link copied to clipboard
suspend fun SolanaClient.getAccountInfo(publicKey: PublicKey, commitment: Commitment? = null): Response<Response.RPC<AccountInfo?>>
Link copied to clipboard
suspend fun SolanaClient.getBalance(account: PublicKey, commitment: Commitment? = null): Response<Response.RPC<Long>>
Link copied to clipboard
suspend fun SolanaClient.getFeeForMessage(message: ByteArray, commitment: Commitment? = null): Response<Response.RPC<Long?>>

Get the fee the network will charge for a particular Message

Link copied to clipboard

Returns the latest blockhash

Link copied to clipboard
suspend fun SolanaClient.getMinimumBalanceForRentExemption(dataLength: Long, commitment: Commitment? = null): Response<Long>

Returns minimum balance required to make account rent exempt.

Link copied to clipboard
suspend fun SolanaClient.getNonce(publicKey: PublicKey, commitment: Commitment? = null): NonceAccount?
Link copied to clipboard

Returns the latest blockhash

Link copied to clipboard
suspend fun SolanaClient.getSignaturesForAddress(account: PublicKey, commitment: Commitment? = null): Response<List<SignatureInformation>>

Returns Signatures for confirmed transactions that include the given address in their accountKeys list. Returns signatures backwards in time from the provided signature or most recent confirmed block

Link copied to clipboard
suspend fun SolanaClient.getTokenAccountBalance(tokenAccount: PublicKey, commitment: Commitment? = null): Response<Response.RPC<TokenAmountInfo?>>

Returns the token balance of an SPL Token account.

Link copied to clipboard
suspend fun SolanaClient.getTransaction(signature: String, commitment: Commitment? = null): Response<TransactionResponse?>

Returns transaction details for a confirmed transaction

Link copied to clipboard
suspend fun SolanaClient.isBlockHashValid(blockHash: String, commitment: Commitment? = null, minContextSlot: Long? = null): Response<Response.RPC<Boolean>>

Returns whether a blockhash is still valid or not

Link copied to clipboard
suspend fun SolanaClient.requestAirdrop(publicKey: PublicKey, lamports: Long, commitment: Commitment? = null): Response<String>

Requests an airdrop of lamports to a Pubkey

Link copied to clipboard
suspend fun SolanaClient.sendTransaction(transaction: Transaction, skipPreflight: Boolean = false, preflightCommitment: Commitment = Commitment.Finalized, maxRetries: Int? = null, minContextSlot: Long? = null): Response<String>

Send a signed transaction to the cluster