Skip to content

SolanaRPCProvider

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / SolanaRPCProvider

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15343

Unified interface for Solana RPC providers

All provider adapters must implement this interface to ensure consistent behavior across different RPC backends.

readonly name: string

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15345

Provider name for logging/debugging

getAssetsByOwner(owner): Promise<TokenAsset[]>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15352

Get all token assets owned by an address

string

Solana address (base58)

Promise<TokenAsset[]>

Array of token assets with balances


getTokenBalance(owner, mint): Promise<bigint>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15360

Get token balance for a specific mint

string

Solana address (base58)

string

SPL token mint address (base58)

Promise<bigint>

Token balance in smallest units, 0n if no balance


supportsSubscriptions(): boolean

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15366

Check if provider supports real-time subscriptions

boolean

true if subscribeToTransfers is available


optional subscribeToTransfers(address, callback): Promise<() => void>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15376

Subscribe to token transfers for an address (optional)

Only available if supportsSubscriptions() returns true.

string

Solana address to watch

(asset) => void

Called when a transfer is detected

Promise<() => void>

Unsubscribe function