@riocrypto/common 1.0.1471 → 1.0.1474

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.
@@ -50,6 +50,7 @@ import { SwapOrigin } from "../types/swap-origin";
50
50
  import { AddressVerification } from "../types/address-verification";
51
51
  import { BankAccountVerification } from "../types/bank-account-verification";
52
52
  import { MultipartLiquidityOrder } from "../types/multipart-liquidity-order";
53
+ import { LiquidityOrderRecipe } from "../types/liquidity-order-recipe";
53
54
  export declare class RioAdminClient {
54
55
  private axios;
55
56
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -172,7 +173,8 @@ export declare class RioAdminClient {
172
173
  createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number, origin: SwapOrigin, destination: SwapOrigin, provider: SwapProvider): Promise<void>;
173
174
  expediteInternalSwap(id: string): Promise<void>;
174
175
  getInternalSwaps(page: number, limit?: number): Promise<InternalSwap[]>;
175
- createMultipartOrder(amount: number): Promise<MultipartLiquidityOrder>;
176
+ createMultipartOrder(amount: number, recipe: LiquidityOrderRecipe, amountUSDToLeaveAtCoinbase?: number): Promise<MultipartLiquidityOrder>;
177
+ updateMultipartOrder(amount?: number, recipe?: LiquidityOrderRecipe, amountUSDToLeaveAtCoinbase?: number): Promise<MultipartLiquidityOrder>;
176
178
  getMultipartOrders(page: number, limit?: number): Promise<MultipartLiquidityOrder[]>;
177
179
  getAddressVerification(cryptoAddressId: string): Promise<AddressVerification>;
178
180
  getBankAccountVerification(bankAccountId: string): Promise<BankAccountVerification>;
@@ -10,8 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RioAdminClient = void 0;
13
- const fiat_1 = require("../types/fiat");
14
- const crypto_1 = require("../types/crypto");
15
13
  const IdentityVerificationType_1 = require("../types/IdentityVerificationType");
16
14
  class RioAdminClient {
17
15
  constructor(axios) {
@@ -598,12 +596,22 @@ class RioAdminClient {
598
596
  return data;
599
597
  });
600
598
  }
601
- createMultipartOrder(amount) {
599
+ createMultipartOrder(amount, recipe, amountUSDToLeaveAtCoinbase) {
602
600
  return __awaiter(this, void 0, void 0, function* () {
603
601
  const { data } = yield this.axios.post(`/api/liquidity/multipart-orders`, {
604
602
  amount,
605
- originFiat: fiat_1.Fiat.USD,
606
- destinationCrypto: crypto_1.Crypto.USDTEthereum,
603
+ recipe,
604
+ amountUSDToLeaveAtCoinbase,
605
+ });
606
+ return data;
607
+ });
608
+ }
609
+ updateMultipartOrder(amount, recipe, amountUSDToLeaveAtCoinbase) {
610
+ return __awaiter(this, void 0, void 0, function* () {
611
+ const { data } = yield this.axios.patch(`/api/liquidity/multipart-orders`, {
612
+ amount,
613
+ recipe,
614
+ amountUSDToLeaveAtCoinbase,
607
615
  });
608
616
  return data;
609
617
  });
@@ -12,4 +12,5 @@ export interface MultipartLiquidityOrder {
12
12
  status: "bbvaWithdrawn" | "brexDeposited" | "brexWithdrawing" | "brexWithdrawn" | "coinbaseDeposited" | "coinbaseTrading" | "coinbaseTraded" | "coinbaseWithdrawing" | "coinbaseWithdrawn" | "done";
13
13
  coinbaseOrderId?: string;
14
14
  brexTransferId?: string;
15
+ amountUSDToLeaveAtCoinbase?: number;
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1471",
3
+ "version": "1.0.1474",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",