SolanaRPCProvider
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / SolanaRPCProvider
Interface: SolanaRPCProvider
Section titled “Interface: 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.
Properties
Section titled “Properties”
readonlyname:string
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15345
Provider name for logging/debugging
Methods
Section titled “Methods”getAssetsByOwner()
Section titled “getAssetsByOwner()”getAssetsByOwner(
owner):Promise<TokenAsset[]>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15352
Get all token assets owned by an address
Parameters
Section titled “Parameters”string
Solana address (base58)
Returns
Section titled “Returns”Promise<TokenAsset[]>
Array of token assets with balances
getTokenBalance()
Section titled “getTokenBalance()”getTokenBalance(
owner,mint):Promise<bigint>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15360
Get token balance for a specific mint
Parameters
Section titled “Parameters”string
Solana address (base58)
string
SPL token mint address (base58)
Returns
Section titled “Returns”Promise<bigint>
Token balance in smallest units, 0n if no balance
supportsSubscriptions()
Section titled “supportsSubscriptions()”supportsSubscriptions():
boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15366
Check if provider supports real-time subscriptions
Returns
Section titled “Returns”boolean
true if subscribeToTransfers is available
subscribeToTransfers()?
Section titled “subscribeToTransfers()?”
optionalsubscribeToTransfers(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.
Parameters
Section titled “Parameters”address
Section titled “address”string
Solana address to watch
callback
Section titled “callback”(asset) => void
Called when a transfer is detected
Returns
Section titled “Returns”Promise<() => void>
Unsubscribe function