Skip to content

GenericProvider

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / GenericProvider

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15930

Generic RPC Provider implementation

Uses standard Solana RPC methods. Works with any RPC endpoint. Recommended for development, testing, or self-hosted nodes.

new GenericProvider(config): GenericProvider

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15933

GenericProviderConfig

GenericProvider

readonly name: "generic" = "generic"

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15931

Provider name for logging/debugging

SolanaRPCProvider.name

getAssetsByOwner(owner): Promise<TokenAsset[]>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15940

Get all token assets owned by an address using getParsedTokenAccountsByOwner

Note: This is less efficient than Helius DAS API for large wallets, but works with any RPC endpoint.

string

Promise<TokenAsset[]>

SolanaRPCProvider.getAssetsByOwner


getTokenBalance(owner, mint): Promise<bigint>

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15952

Get token balance for a specific mint

M1 FIX: Properly differentiate between missing accounts (return 0n) and actual RPC errors (throw NetworkError)

string

string

Promise<bigint>

SolanaRPCProvider.getTokenBalance


supportsSubscriptions(): boolean

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15959

Check if provider supports real-time subscriptions

Generic RPC supports WebSocket subscriptions but they’re not efficient for monitoring token transfers. Returns false.

boolean

SolanaRPCProvider.supportsSubscriptions


getConnection(): Connection

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:15965

Get the underlying Connection object

Useful for advanced operations that need direct RPC access.

Connection