mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.45",
|
||||
"version": "0.20.52",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.45",
|
||||
"version": "0.20.52",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.49",
|
||||
"version": "0.20.52",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class Orion {
|
||||
api: networkConfig.api + networkConfig.services.priceFeed.all,
|
||||
},
|
||||
indexer: {
|
||||
api: networkConfig.api + networkConfig.services.indexer.http,
|
||||
api: networkConfig.api + networkConfig.services.indexer?.http,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { JsonRpcProvider } from 'ethers';
|
||||
import { Aggregator } from '../services/Aggregator/index.js';
|
||||
import { BlockchainService } from '../services/BlockchainService/index.js';
|
||||
import { PriceFeed } from '../services/PriceFeed/index.js';
|
||||
import { Aggregator } from '../services/Aggregator';
|
||||
import { BlockchainService } from '../services/BlockchainService';
|
||||
import { PriceFeed } from '../services/PriceFeed';
|
||||
import type {
|
||||
KnownEnv,
|
||||
SupportedChainId,
|
||||
VerboseUnitConfig,
|
||||
} from '../types.js';
|
||||
import Exchange from './Exchange/index.js';
|
||||
import { chains, envs } from '../config/index.js';
|
||||
import { chains, envs } from '../config';
|
||||
import type { networkCodes } from '../constants/index.js';
|
||||
import { IndexerService } from '../services/Indexer/index.js';
|
||||
import { IndexerService } from '../services/Indexer';
|
||||
|
||||
type KnownConfig = {
|
||||
env: KnownEnv
|
||||
@@ -26,7 +26,7 @@ export default class Unit {
|
||||
|
||||
public readonly blockchainService: BlockchainService;
|
||||
|
||||
public readonly indexer: IndexerService;
|
||||
public readonly indexer: IndexerService | undefined;
|
||||
|
||||
public readonly aggregator: Aggregator;
|
||||
|
||||
@@ -83,7 +83,7 @@ export default class Unit {
|
||||
api: networkConfig.api + networkConfig.services.priceFeed.all,
|
||||
},
|
||||
indexer: {
|
||||
api: networkConfig.api + networkConfig.services.indexer.http,
|
||||
api: networkConfig.api + networkConfig.services.indexer?.http,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -106,10 +106,12 @@ export default class Unit {
|
||||
this.config.services.blockchainService.http,
|
||||
this.config.basicAuth
|
||||
);
|
||||
this.indexer = new IndexerService(
|
||||
this.config.services.indexer.api,
|
||||
intNetwork
|
||||
);
|
||||
this.indexer = this.config.services.indexer
|
||||
? new IndexerService(
|
||||
this.config.services.indexer.api,
|
||||
intNetwork
|
||||
)
|
||||
: undefined;
|
||||
this.aggregator = new Aggregator(
|
||||
this.config.services.aggregator.http,
|
||||
this.config.services.aggregator.ws,
|
||||
|
||||
@@ -16,7 +16,7 @@ export const pureEnvNetworksSchema = z.object({
|
||||
}),
|
||||
indexer: z.object({
|
||||
http: z.string(),
|
||||
}),
|
||||
}).optional(),
|
||||
}),
|
||||
rpc: z.string().optional(),
|
||||
liquidityMigratorAddress: z.string().optional(),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const linkSchema = z.object({
|
||||
status: z.string(),
|
||||
referer: z.string(),
|
||||
ref_link: z.string(),
|
||||
});
|
||||
|
||||
export default linkSchema;
|
||||
|
||||
@@ -262,12 +262,12 @@ export type VerboseUnitConfig = {
|
||||
// http://10.23.5.11:3003/,
|
||||
// https://price-feed:3003/
|
||||
}
|
||||
indexer: {
|
||||
indexer?: {
|
||||
api: string
|
||||
// For example:
|
||||
// http://localhost:3004/,
|
||||
// http://
|
||||
}
|
||||
} | undefined
|
||||
}
|
||||
basicAuth?: BasicAuthCredentials
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user