mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Custom JSON-RPC support
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.8.1",
|
||||
"version": "0.8.2",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -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