@riocrypto/common 1.0.1059 → 1.0.1061

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.
@@ -33,6 +33,7 @@ import { ChainedOrder } from "../types/chained-order";
33
33
  import { ChainedQuoteInput } from "../types/chained-quote-input";
34
34
  import { ChainedQuote } from "../types/chained-quote";
35
35
  import { ChainedOrderInput } from "../types/chained-order-input";
36
+ import { InternalSwap } from "../types/internal-swap";
36
37
  export declare class RioAdminClient {
37
38
  private axios;
38
39
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -112,6 +113,8 @@ export declare class RioAdminClient {
112
113
  cancelChainedOrder(id?: string): Promise<void>;
113
114
  getOrder(id: string): Promise<Order>;
114
115
  createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
116
+ createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number): Promise<void>;
117
+ getInternalSwaps(): Promise<InternalSwap[]>;
115
118
  getBankPayout(orderId: string): Promise<BankPayout>;
116
119
  getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
117
120
  createChainedOrder(order: ChainedOrderInput): Promise<ChainedOrder>;
@@ -398,6 +398,21 @@ class RioAdminClient {
398
398
  return response.data;
399
399
  });
400
400
  }
401
+ createInternalSwap(originCrypto, destinationCrypto, amount) {
402
+ return __awaiter(this, void 0, void 0, function* () {
403
+ const response = yield this.axios.post(`/api/liquidity/swaps`, {
404
+ originCrypto,
405
+ destinationCrypto,
406
+ amount,
407
+ });
408
+ });
409
+ }
410
+ getInternalSwaps() {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ const response = yield this.axios.get(`/api/liquidity/swaps`);
413
+ return response.data;
414
+ });
415
+ }
401
416
  getBankPayout(orderId) {
402
417
  return __awaiter(this, void 0, void 0, function* () {
403
418
  const response = yield this.axios.get(`/api/payouts/bank?orderId=${orderId}`);
@@ -4,6 +4,6 @@ export interface InternalSwap {
4
4
  originCrypto: Crypto;
5
5
  destinationCrypto: Crypto;
6
6
  amount: number;
7
- exchange: "coinbase";
8
- status: "processing" | "complete" | "failed";
7
+ exchange?: "coinbase";
8
+ status: "created" | "processing" | "complete" | "failed";
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1059",
3
+ "version": "1.0.1061",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",