Skip to content

GenericProvider

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / GenericProvider

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

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-DXh2IGkz.d.ts:15829

GenericProviderConfig

GenericProvider

readonly name: "generic" = "generic"

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

Provider name for logging/debugging

SolanaRPCProvider.name

getAssetsByOwner(owner): Promise<TokenAsset[]>

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

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-DXh2IGkz.d.ts:15848

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-DXh2IGkz.d.ts:15855

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-DXh2IGkz.d.ts:15861

Get the underlying Connection object

Useful for advanced operations that need direct RPC access.

Connection