Skip to content

Documentation / js-sdk-core / SolanaClient

Class: SolanaClient

Constructors

new SolanaClient(cluster)

new SolanaClient(cluster): SolanaClient

Parameters

cluster: SolanaCluster & Object

Returns

SolanaClient

Properties

cluster

cluster: SolanaCluster & Object

Type declaration

rpcUrl

rpcUrl: string

Methods

getAccountInfo()

getAccountInfo(address): Promise<null | Object>

Parameters

address: string

Returns

Promise<null | Object>


getBalance()

getBalance(address): Promise<null | bigint>

Parameters

address: string

Returns

Promise<null | bigint>


getTokenAccountsByOwner()

getTokenAccountsByOwner(address, mintAddress): Promise<null | Object>

Parameters

address: string

mintAddress: string

Returns

Promise<null | Object>


invokeRpc()

private invokeRpc<T>(__namedParameters): Promise<RpcResponse<T>>

Type parameters

T

Parameters

__namedParameters: RpcParams

Returns

Promise<RpcResponse<T>>