@riocrypto/common 1.0.481 → 1.0.483

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
+ import { Crypto } from "../types/crypto";
1
2
  import { CCXTLiquidityProvider } from "../types/ccxt-liquidity-provider";
2
3
  import { Fiat } from "../types/fiat";
3
4
  import { Side } from "../types/side";
4
- export declare class CCXTClient {
5
+ declare class CCXTClient {
5
6
  private env;
6
7
  constructor(env: "production" | "development");
7
8
  createBuyOrder(amount: number, crypto: Crypto, fiat: Fiat, ccxtLiquidityProvider: CCXTLiquidityProvider): Promise<{
@@ -42,3 +43,5 @@ export declare class CCXTClient {
42
43
  fiat: Fiat;
43
44
  }>;
44
45
  }
46
+ export declare const ccxtWrapper: CCXTClient;
47
+ export {};
@@ -12,9 +12,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.CCXTClient = void 0;
15
+ exports.ccxtWrapper = void 0;
16
16
  const ccxt_1 = __importDefault(require("ccxt"));
17
17
  const ccxt_liquidity_provider_1 = require("../types/ccxt-liquidity-provider");
18
+ const rio_env_1 = require("../types/rio-env");
18
19
  const side_1 = require("../types/side");
19
20
  class CCXTClient {
20
21
  constructor(env) {
@@ -184,4 +185,6 @@ class CCXTClient {
184
185
  });
185
186
  }
186
187
  }
187
- exports.CCXTClient = CCXTClient;
188
+ exports.ccxtWrapper = new CCXTClient([rio_env_1.RioEnv.Production, rio_env_1.RioEnv.Staging].includes(process.env.RIO_ENV)
189
+ ? "production"
190
+ : "development");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.481",
3
+ "version": "1.0.483",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",