createProvider()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / createProvider
Function: createProvider()
Section titled “Function: createProvider()”Call Signature
Section titled “Call Signature”createProvider(
type,config):SolanaRPCProvider
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15418
Create an RPC provider instance
Parameters
Section titled “Parameters”"helius"
Provider type (‘helius’, ‘quicknode’, ‘triton’, ‘generic’)
config
Section titled “config”ProviderConfig & object
Provider configuration
Returns
Section titled “Returns”Configured provider instance
Example
Section titled “Example”// Helius with DAS API (recommended for production)const helius = createProvider('helius', { apiKey: process.env.HELIUS_API_KEY, cluster: 'devnet'})
// QuickNode with Yellowstone gRPC (real-time subscriptions)const quicknode = createProvider('quicknode', { endpoint: process.env.QUICKNODE_ENDPOINT})
// Triton with Dragon's Mouth gRPC (ultra-low latency)const triton = createProvider('triton', { xToken: process.env.TRITON_TOKEN})
// Generic with existing connectionconst generic = createProvider('generic', { connection })Call Signature
Section titled “Call Signature”createProvider(
type,config):SolanaRPCProvider
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15421
Create an RPC provider instance
Parameters
Section titled “Parameters”"quicknode"
Provider type (‘helius’, ‘quicknode’, ‘triton’, ‘generic’)
config
Section titled “config”QuickNodeProviderConfig
Provider configuration
Returns
Section titled “Returns”Configured provider instance
Example
Section titled “Example”// Helius with DAS API (recommended for production)const helius = createProvider('helius', { apiKey: process.env.HELIUS_API_KEY, cluster: 'devnet'})
// QuickNode with Yellowstone gRPC (real-time subscriptions)const quicknode = createProvider('quicknode', { endpoint: process.env.QUICKNODE_ENDPOINT})
// Triton with Dragon's Mouth gRPC (ultra-low latency)const triton = createProvider('triton', { xToken: process.env.TRITON_TOKEN})
// Generic with existing connectionconst generic = createProvider('generic', { connection })Call Signature
Section titled “Call Signature”createProvider(
type,config):SolanaRPCProvider
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15422
Create an RPC provider instance
Parameters
Section titled “Parameters”"triton"
Provider type (‘helius’, ‘quicknode’, ‘triton’, ‘generic’)
config
Section titled “config”TritonProviderConfig
Provider configuration
Returns
Section titled “Returns”Configured provider instance
Example
Section titled “Example”// Helius with DAS API (recommended for production)const helius = createProvider('helius', { apiKey: process.env.HELIUS_API_KEY, cluster: 'devnet'})
// QuickNode with Yellowstone gRPC (real-time subscriptions)const quicknode = createProvider('quicknode', { endpoint: process.env.QUICKNODE_ENDPOINT})
// Triton with Dragon's Mouth gRPC (ultra-low latency)const triton = createProvider('triton', { xToken: process.env.TRITON_TOKEN})
// Generic with existing connectionconst generic = createProvider('generic', { connection })Call Signature
Section titled “Call Signature”createProvider(
type,config):SolanaRPCProvider
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15423
Create an RPC provider instance
Parameters
Section titled “Parameters”"generic"
Provider type (‘helius’, ‘quicknode’, ‘triton’, ‘generic’)
config
Section titled “config”Provider configuration
Returns
Section titled “Returns”Configured provider instance
Example
Section titled “Example”// Helius with DAS API (recommended for production)const helius = createProvider('helius', { apiKey: process.env.HELIUS_API_KEY, cluster: 'devnet'})
// QuickNode with Yellowstone gRPC (real-time subscriptions)const quicknode = createProvider('quicknode', { endpoint: process.env.QUICKNODE_ENDPOINT})
// Triton with Dragon's Mouth gRPC (ultra-low latency)const triton = createProvider('triton', { xToken: process.env.TRITON_TOKEN})
// Generic with existing connectionconst generic = createProvider('generic', { connection })Call Signature
Section titled “Call Signature”createProvider(
type,config):SolanaRPCProvider
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:15424
Create an RPC provider instance
Parameters
Section titled “Parameters”Provider type (‘helius’, ‘quicknode’, ‘triton’, ‘generic’)
config
Section titled “config”Provider configuration
GenericProviderConfig | ProviderConfig | QuickNodeProviderConfig | TritonProviderConfig
Returns
Section titled “Returns”Configured provider instance
Example
Section titled “Example”// Helius with DAS API (recommended for production)const helius = createProvider('helius', { apiKey: process.env.HELIUS_API_KEY, cluster: 'devnet'})
// QuickNode with Yellowstone gRPC (real-time subscriptions)const quicknode = createProvider('quicknode', { endpoint: process.env.QUICKNODE_ENDPOINT})
// Triton with Dragon's Mouth gRPC (ultra-low latency)const triton = createProvider('triton', { xToken: process.env.TRITON_TOKEN})
// Generic with existing connectionconst generic = createProvider('generic', { connection })