VerboseOrionUnitConfig to types

This commit is contained in:
Aleksandr Kraiz
2023-02-08 12:21:53 +04:00
parent afb683ffa7
commit 75e674a5bf
4 changed files with 35 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.17.0-rc.4",
"version": "0.17.0-rc.5",
"description": "Orion Protocol SDK",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",

View File

@@ -1,9 +1,9 @@
import { merge } from 'merge-anything';
import { chains, envs } from '../config';
import OrionUnit, { VerboseOrionUnitConfig } from '../OrionUnit';
import OrionUnit from '../OrionUnit';
import OrionAnalytics from '../services/OrionAnalytics';
import { ReferralSystem } from '../services/ReferralSystem';
import { DeepPartial, SupportedChainId } from '../types';
import { DeepPartial, SupportedChainId, VerboseOrionUnitConfig } from '../types';
import { isValidChainId } from '../utils';
type EnvConfig = {

View File

@@ -2,42 +2,11 @@ import { ethers } from 'ethers';
import { OrionAggregator } from '../services/OrionAggregator';
import { OrionBlockchain } from '../services/OrionBlockchain';
import { PriceFeed } from '../services/PriceFeed';
import type { SupportedChainId } from '../types';
import type { SupportedChainId, VerboseOrionUnitConfig } from '../types';
import Exchange from './Exchange';
import FarmingManager from './FarmingManager';
import { chains } from '../config';
export type VerboseOrionUnitConfig = {
// env?: string;
// api: string;
chainId: SupportedChainId;
nodeJsonRpc: string;
services: {
orionBlockchain: {
http: string;
// For example:
// http://localhost:3001/,
// http://10.123.34.23:3001/,
// https://blockchain.orionprotocol.io/
},
orionAggregator: {
http: string;
ws: string;
// For example:
// http://localhost:3002/,
// http://10.34.23.5:3002/,
// shttps://aggregator.orionprotocol.io/
},
priceFeed: {
api: string;
// For example:
// http://localhost:3003/,
// http://10.23.5.11:3003/,
// https://price-feed.orionprotocol.io/
},
}
};
// type KnownConfig = {
// env: string;
// chainId: SupportedChainId;

View File

@@ -242,3 +242,34 @@ export enum HistoryTransactionStatus {
APPROVING = 'Approving',
CANCELLED = 'Cancelled',
}
export type VerboseOrionUnitConfig = {
// env?: string;
// api: string;
chainId: SupportedChainId;
nodeJsonRpc: string;
services: {
orionBlockchain: {
http: string;
// For example:
// http://localhost:3001/,
// http://10.123.34.23:3001/,
// https://blockchain.orionprotocol.io/
},
orionAggregator: {
http: string;
ws: string;
// For example:
// http://localhost:3002/,
// http://10.34.23.5:3002/,
// shttps://aggregator.orionprotocol.io/
},
priceFeed: {
api: string;
// For example:
// http://localhost:3003/,
// http://10.23.5.11:3003/,
// https://price-feed.orionprotocol.io/
},
}
};