@riocrypto/common 1.0.2246 → 1.0.2248

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.
@@ -36,6 +36,5 @@ export interface OrderCreatedEvent {
36
36
  brokerId?: string;
37
37
  discount?: number;
38
38
  markup?: number;
39
- managedWallet?: boolean;
40
39
  };
41
40
  }
@@ -85,7 +85,6 @@ export declare enum Subjects {
85
85
  AsyncBankPaymentMismatch = "asyncBankPayment:mismatch",
86
86
  BankPaymentFailed = "bankPayment:failed",
87
87
  FeesUpdated = "fees:updated",
88
- ChainedQuoteReissued = "chainedQuote:reissued",
89
88
  QuoteCreated = "quote:created",
90
89
  QuoteReissued = "quote:reissued",
91
90
  QuoteFailed = "quote:failed",
@@ -89,7 +89,6 @@ var Subjects;
89
89
  Subjects["AsyncBankPaymentMismatch"] = "asyncBankPayment:mismatch";
90
90
  Subjects["BankPaymentFailed"] = "bankPayment:failed";
91
91
  Subjects["FeesUpdated"] = "fees:updated";
92
- Subjects["ChainedQuoteReissued"] = "chainedQuote:reissued";
93
92
  Subjects["QuoteCreated"] = "quote:created";
94
93
  Subjects["QuoteReissued"] = "quote:reissued";
95
94
  Subjects["QuoteFailed"] = "quote:failed";
@@ -78,8 +78,6 @@ const humanizeOrderStatus = (status) => {
78
78
  return "US order failed";
79
79
  case order_status_1.OrderStatus.BridgeTransferFailed:
80
80
  return "US order failed";
81
- case order_status_1.OrderStatus.AwaitingTransferReissue:
82
- return "Processing";
83
81
  case order_status_1.OrderStatus.incorrectAmountPaid:
84
82
  return "Incorrect amount paid";
85
83
  case order_status_1.OrderStatus.refundFailed:
package/build/index.d.ts CHANGED
@@ -135,7 +135,6 @@ export * from "./events/bitso-withdrawal-failed-event";
135
135
  export * from "./events/bitso-withdrawal-completed-event";
136
136
  export * from "./events/circle-address-ready-event";
137
137
  export * from "./events/circle-address-failed-event";
138
- export * from "./events/chained-quote-reissued-event";
139
138
  export * from "./events/bitso-consumer-contact-created-event";
140
139
  export * from "./events/ubo-created-event";
141
140
  export * from "./events/CEP-link-created-event";
@@ -266,10 +265,8 @@ export * from "./types/master-order-record";
266
265
  export * from "./types/invoice";
267
266
  export * from "./types/bank-transfer";
268
267
  export * from "./types/webhook-registration";
269
- export * from "./types/chained-quote";
270
268
  export * from "./types/bitso-bank-account";
271
269
  export * from "./types/bitso-receiving-account";
272
- export * from "./types/chained-order-query";
273
270
  export * from "./types/internal-swap";
274
271
  export * from "./types/webhook-type";
275
272
  export * from "./types/bitso-mxn-withdrawal";
@@ -393,7 +390,6 @@ export * from "./classes/LiquidityProviderClass";
393
390
  export * from "./classes/ImmigrationStatusClass";
394
391
  export * from "./helpers/validate-address";
395
392
  export * from "./helpers/humanize-order-status";
396
- export * from "./helpers/humanize-chained-order-status";
397
393
  export * from "./helpers/format-transaction-hash";
398
394
  export * from "./helpers/round-to-decimals";
399
395
  export * from "./helpers/number-with-commas";
package/build/index.js CHANGED
@@ -151,7 +151,6 @@ __exportStar(require("./events/bitso-withdrawal-failed-event"), exports);
151
151
  __exportStar(require("./events/bitso-withdrawal-completed-event"), exports);
152
152
  __exportStar(require("./events/circle-address-ready-event"), exports);
153
153
  __exportStar(require("./events/circle-address-failed-event"), exports);
154
- __exportStar(require("./events/chained-quote-reissued-event"), exports);
155
154
  __exportStar(require("./events/bitso-consumer-contact-created-event"), exports);
156
155
  __exportStar(require("./events/ubo-created-event"), exports);
157
156
  __exportStar(require("./events/CEP-link-created-event"), exports);
@@ -282,10 +281,8 @@ __exportStar(require("./types/master-order-record"), exports);
282
281
  __exportStar(require("./types/invoice"), exports);
283
282
  __exportStar(require("./types/bank-transfer"), exports);
284
283
  __exportStar(require("./types/webhook-registration"), exports);
285
- __exportStar(require("./types/chained-quote"), exports);
286
284
  __exportStar(require("./types/bitso-bank-account"), exports);
287
285
  __exportStar(require("./types/bitso-receiving-account"), exports);
288
- __exportStar(require("./types/chained-order-query"), exports);
289
286
  __exportStar(require("./types/internal-swap"), exports);
290
287
  __exportStar(require("./types/webhook-type"), exports);
291
288
  __exportStar(require("./types/bitso-mxn-withdrawal"), exports);
@@ -409,7 +406,6 @@ __exportStar(require("./classes/LiquidityProviderClass"), exports);
409
406
  __exportStar(require("./classes/ImmigrationStatusClass"), exports);
410
407
  __exportStar(require("./helpers/validate-address"), exports);
411
408
  __exportStar(require("./helpers/humanize-order-status"), exports);
412
- __exportStar(require("./helpers/humanize-chained-order-status"), exports);
413
409
  __exportStar(require("./helpers/format-transaction-hash"), exports);
414
410
  __exportStar(require("./helpers/round-to-decimals"), exports);
415
411
  __exportStar(require("./helpers/number-with-commas"), exports);
@@ -1,6 +1,6 @@
1
1
  export interface FireblocksVault {
2
2
  id: string;
3
- type: "transactional" | "managed";
3
+ type: "transactional";
4
4
  userId: string;
5
5
  fireblocksVaultId: string;
6
6
  depositAddresses?: {
@@ -3,7 +3,6 @@ export interface OrderInput {
3
3
  userAddressId?: string;
4
4
  notes?: string;
5
5
  externalAccountId?: string;
6
- managedWallet?: boolean;
7
6
  wireMessage?: string;
8
7
  payoutBankAccountId?: string;
9
8
  }
@@ -23,7 +23,6 @@ export declare enum OrderStatus {
23
23
  BankPayoutDetailsAdded = "bankPayoutDetailsAdded",
24
24
  AwaitingPayment = "awaitingPayment",
25
25
  AwaitingOriginOrderCompletion = "awaitingOriginOrderCompletion",
26
- AwaitingTransferReissue = "awaitingTransferReissue",
27
26
  AwaitingPayout = "awaitingPayout",
28
27
  AwaitingAsyncPayout = "awaitingAsyncPayout",
29
28
  AwaitingAsyncPayment = "awaitingAsyncPayment",
@@ -45,8 +45,6 @@ var OrderStatus;
45
45
  OrderStatus["AwaitingPayment"] = "awaitingPayment";
46
46
  // When waiting for asynchronous payment
47
47
  OrderStatus["AwaitingOriginOrderCompletion"] = "awaitingOriginOrderCompletion";
48
- // During chained order, when waiting for the transfer to be reissued by the Bridge in case of requote
49
- OrderStatus["AwaitingTransferReissue"] = "awaitingTransferReissue";
50
48
  // When waiting for asynchronous payout
51
49
  OrderStatus["AwaitingPayout"] = "awaitingPayout";
52
50
  OrderStatus["AwaitingAsyncPayout"] = "awaitingAsyncPayout";
@@ -55,11 +55,9 @@ export interface Order {
55
55
  expiredQuotes?: string[];
56
56
  externalAccountId?: string;
57
57
  imported?: boolean;
58
- managedWallet?: boolean;
59
58
  USBankTransferMethod?: "wire" | "ach_push";
60
59
  isAfterHours?: boolean;
61
60
  isSurgePricing?: boolean;
62
- chainedOrderId?: string;
63
61
  netPrice: number;
64
62
  requestedNetPrice?: number;
65
63
  paymentAddressId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2246",
3
+ "version": "1.0.2248",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,9 +0,0 @@
1
- import { Subjects } from "./subjects";
2
- import { ChainedQuote } from "../types/chained-quote";
3
- export interface ChainedQuoteReissuedEvent {
4
- subject: Subjects.ChainedQuoteReissued;
5
- data: {
6
- chainedOrderId: string;
7
- chainedQuote: ChainedQuote;
8
- };
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- import { OrderStatus } from "../types/order-status";
2
- export declare const humanizeChainedOrderStatus: (originOrderStatus: OrderStatus, destinationOrderStatus: OrderStatus) => string;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.humanizeChainedOrderStatus = void 0;
4
- const order_status_1 = require("../types/order-status");
5
- const humanizeChainedOrderStatus = (originOrderStatus, destinationOrderStatus) => {
6
- if (originOrderStatus.toLowerCase().includes("failed")) {
7
- return "Send failed";
8
- }
9
- else if (destinationOrderStatus.toLowerCase().includes("failed")) {
10
- return "Failed";
11
- }
12
- else if (originOrderStatus === order_status_1.OrderStatus.Cancelled ||
13
- destinationOrderStatus === order_status_1.OrderStatus.Cancelled) {
14
- return "Cancelled";
15
- }
16
- else if (originOrderStatus === order_status_1.OrderStatus.Expired ||
17
- destinationOrderStatus === order_status_1.OrderStatus.Expired) {
18
- return "Expired";
19
- }
20
- else if (originOrderStatus === order_status_1.OrderStatus.AwaitingPayment) {
21
- return "Awaiting payment";
22
- }
23
- else if (originOrderStatus === order_status_1.OrderStatus.Complete &&
24
- destinationOrderStatus !== order_status_1.OrderStatus.Complete) {
25
- return "Processing";
26
- }
27
- else if (originOrderStatus === order_status_1.OrderStatus.Complete &&
28
- destinationOrderStatus === order_status_1.OrderStatus.Complete) {
29
- return "Completed";
30
- }
31
- else {
32
- return "Processing";
33
- }
34
- };
35
- exports.humanizeChainedOrderStatus = humanizeChainedOrderStatus;
@@ -1,7 +0,0 @@
1
- export interface ChainedOrderInput {
2
- chainedQuoteId: string;
3
- originExternalAccountId: string;
4
- destinationExternalAccountId: string;
5
- notes?: string;
6
- destinationWireMessage?: string;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export interface ChainedOrderQuery {
2
- brokerId?: string;
3
- originOrderId?: string;
4
- destinationOrderId?: string;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,40 +0,0 @@
1
- import { Country } from "./country";
2
- import { Fees } from "./fees";
3
- import { Fiat } from "./fiat";
4
- import { OrderStatus } from "./order-status";
5
- import { Processor } from "./processor";
6
- import { Crypto } from "./crypto";
7
- export interface ChainedOrder {
8
- id: string;
9
- chainedQuoteId: string;
10
- originUserId: string;
11
- destinationUserId: string;
12
- crypto: Crypto;
13
- originFiat: Fiat;
14
- destinationFiat: Fiat;
15
- originCountry: Country;
16
- destinationCountry: Country;
17
- originAmountFiat: number;
18
- destinationAmountFiat: number;
19
- originOrderId: string;
20
- destinationOrderId: string;
21
- originOrderStatus: OrderStatus;
22
- destinationOrderStatus: OrderStatus;
23
- originOrderProcessor: Processor;
24
- destinationOrderProcessor: Processor;
25
- destinationBankAccountId?: string;
26
- fees: Fees;
27
- price: number;
28
- createdAt: Date;
29
- brokerId?: string;
30
- notes?: string;
31
- netPrice: number;
32
- requestedNetPrice?: number;
33
- markup?: number;
34
- discount?: number;
35
- expiredQuotes?: string[];
36
- informationalFees?: {
37
- serviceFeeFiat?: number;
38
- serviceFeeFiatTax?: number;
39
- };
40
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,26 +0,0 @@
1
- import { Crypto } from "./crypto";
2
- import { Fiat } from "./fiat";
3
- import { Country } from "./country";
4
- export interface ChainedQuoteInput {
5
- chainedOrderId?: string;
6
- originUserId: string;
7
- destinationUserId: string;
8
- crypto?: Crypto;
9
- originFiat: Fiat;
10
- destinationFiat: Fiat;
11
- originAmountFiat?: number;
12
- destinationAmountFiat?: number;
13
- originCountry: Country;
14
- destinationCountry: Country;
15
- notes?: string;
16
- reissueAfterExpiration?: boolean;
17
- discount?: number;
18
- markup?: number;
19
- brokerFeeRate?: number;
20
- netPrice?: number;
21
- price?: number;
22
- orderId?: string;
23
- noMarkups?: boolean;
24
- originUSBankTransferMethod?: "wire" | "ach_push";
25
- destinationUSBankTransferMethod?: "wire" | "ach_push";
26
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,31 +0,0 @@
1
- import { Country } from "./country";
2
- import { Fees } from "./fees";
3
- import { Fiat } from "./fiat";
4
- import { Crypto } from "./crypto";
5
- export interface ChainedQuote {
6
- id: string;
7
- originUserId: string;
8
- destinationUserId: string;
9
- crypto: Crypto;
10
- originFiat: Fiat;
11
- destinationFiat: Fiat;
12
- expiresAt?: Date;
13
- originCountry: Country;
14
- destinationCountry: Country;
15
- originAmountFiat: number;
16
- destinationAmountFiat: number;
17
- originQuoteId: string;
18
- destinationQuoteId: string;
19
- fees: Fees;
20
- netPrice: number;
21
- requestedNetPrice?: number;
22
- price: number;
23
- discount?: number;
24
- markup?: number;
25
- noMarkups: boolean;
26
- isRequote: boolean;
27
- reissueAfterExpiration: boolean;
28
- createdAt: Date;
29
- brokerId?: string;
30
- staticAmountField: "origin" | "destination";
31
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });