createProvider()
SIP Protocol API Reference v0.15.1
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-GLbkPPho.d.ts:15501
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-GLbkPPho.d.ts:15504
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-GLbkPPho.d.ts:15505
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-GLbkPPho.d.ts:15506
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-GLbkPPho.d.ts:15507
Create an RPC provider instance
Parameters
Section titled “Parameters”Provider type (‘helius’, ‘quicknode’, ‘triton’, ‘generic’)
config
Section titled “config”GenericProviderConfig | ProviderConfig | QuickNodeProviderConfig | 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 })