mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-31 01:58:06 +03:00
Custom JSON-RPC support
This commit is contained in:
@@ -14,6 +14,7 @@ const orionAnalyticsUrl = 'https://trade.orionprotocol.io';
|
||||
|
||||
type Options = {
|
||||
api?: string;
|
||||
nodeJsonRpc?: string;
|
||||
services?: {
|
||||
orionBlockchain?: {
|
||||
api?: string;
|
||||
@@ -115,7 +116,7 @@ export default class OrionUnit {
|
||||
|
||||
this.chainId = chainId;
|
||||
this.networkCode = chainInfo.code;
|
||||
this.provider = new ethers.providers.StaticJsonRpcProvider(customRpc ?? chainInfo.rpc);
|
||||
this.provider = new ethers.providers.StaticJsonRpcProvider(options?.nodeJsonRpc ?? customRpc ?? chainInfo.rpc);
|
||||
this.env = env;
|
||||
this.apiUrl = customApi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user