@riocrypto/common 1.0.1450 → 1.0.1452

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.
@@ -46,6 +46,7 @@ import { AdminAuthInput } from "../types/admin-auth-input";
46
46
  import { BidInput } from "../types/bid-input";
47
47
  import { RioBankAccount } from "../types/rio-bank-account";
48
48
  import { SwapProvider } from "../types/swap-provider";
49
+ import { SwapOrigin } from "../types/swap-origin";
49
50
  export declare class RioAdminClient {
50
51
  private axios;
51
52
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -165,7 +166,8 @@ export declare class RioAdminClient {
165
166
  cancelChainedOrder(id?: string): Promise<void>;
166
167
  getOrder(id: string): Promise<Order>;
167
168
  createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
168
- createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number, provider: SwapProvider): Promise<void>;
169
+ createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number, origin: SwapOrigin, provider: SwapProvider): Promise<void>;
170
+ expediteInternalSwap(id: string): Promise<void>;
169
171
  getInternalSwaps(page: number, limit?: number): Promise<InternalSwap[]>;
170
172
  getBankPayout(orderId: string): Promise<BankPayout>;
171
173
  startAddressVerification(addressId: string): Promise<void>;
@@ -568,16 +568,22 @@ class RioAdminClient {
568
568
  return response.data;
569
569
  });
570
570
  }
571
- createInternalSwap(originCrypto, destinationCrypto, amount, provider) {
571
+ createInternalSwap(originCrypto, destinationCrypto, amount, origin, provider) {
572
572
  return __awaiter(this, void 0, void 0, function* () {
573
573
  yield this.axios.post(`/api/liquidity/swaps`, {
574
574
  originCrypto,
575
575
  destinationCrypto,
576
576
  amount,
577
+ origin,
577
578
  provider,
578
579
  });
579
580
  });
580
581
  }
582
+ expediteInternalSwap(id) {
583
+ return __awaiter(this, void 0, void 0, function* () {
584
+ yield this.axios.post(`/api/liquidity/swaps/${id}/expedite`);
585
+ });
586
+ }
581
587
  getInternalSwaps(page, limit) {
582
588
  return __awaiter(this, void 0, void 0, function* () {
583
589
  const { data } = yield this.axios.get(`/api/liquidity/swaps`, {
package/build/index.d.ts CHANGED
@@ -232,6 +232,7 @@ export * from "./types/address-verification-status";
232
232
  export * from "./types/bank-account-verification-status";
233
233
  export * from "./types/rio-bank-account";
234
234
  export * from "./types/swap-provider";
235
+ export * from "./types/swap-origin";
235
236
  export * from "./classes/Asset";
236
237
  export * from "./classes/KYCFieldClass";
237
238
  export * from "./classes/KYCFileClass";
package/build/index.js CHANGED
@@ -248,6 +248,7 @@ __exportStar(require("./types/address-verification-status"), exports);
248
248
  __exportStar(require("./types/bank-account-verification-status"), exports);
249
249
  __exportStar(require("./types/rio-bank-account"), exports);
250
250
  __exportStar(require("./types/swap-provider"), exports);
251
+ __exportStar(require("./types/swap-origin"), exports);
251
252
  __exportStar(require("./classes/Asset"), exports);
252
253
  __exportStar(require("./classes/KYCFieldClass"), exports);
253
254
  __exportStar(require("./classes/KYCFileClass"), exports);
@@ -1,4 +1,6 @@
1
1
  import { Crypto } from "./crypto";
2
+ import { SwapOrigin } from "./swap-origin";
3
+ import { SwapProvider } from "./swap-provider";
2
4
  export interface InternalSwap {
3
5
  id: string;
4
6
  createdAt: Date;
@@ -6,6 +8,8 @@ export interface InternalSwap {
6
8
  originCrypto: Crypto;
7
9
  destinationCrypto: Crypto;
8
10
  amount: number;
9
- exchange?: "coinbase";
11
+ fee: number;
12
+ provider: SwapProvider;
13
+ origin: SwapOrigin;
10
14
  status: "created" | "processing" | "firstLegComplete" | "complete" | "failed";
11
15
  }
@@ -0,0 +1,6 @@
1
+ export declare enum SwapOrigin {
2
+ Fireblocks = "fireblocks",
3
+ Coinbase = "coinbase",
4
+ Bitso = "bitso",
5
+ Binance = "binance"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwapOrigin = void 0;
4
+ var SwapOrigin;
5
+ (function (SwapOrigin) {
6
+ SwapOrigin["Fireblocks"] = "fireblocks";
7
+ SwapOrigin["Coinbase"] = "coinbase";
8
+ SwapOrigin["Bitso"] = "bitso";
9
+ SwapOrigin["Binance"] = "binance";
10
+ })(SwapOrigin = exports.SwapOrigin || (exports.SwapOrigin = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1450",
3
+ "version": "1.0.1452",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",