@riocrypto/common-server 1.0.2401 → 1.0.2402

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,4 +1,4 @@
1
- import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, FutureTwoWaySettlementType } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -10,7 +10,7 @@ declare class ClusterClient {
10
10
  newAmountCrypto?: number;
11
11
  useSamePrice?: boolean;
12
12
  }): Promise<Quote>;
13
- createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, futureTwoWaySettlementType, netPrice, price, ignoreLiquidityError, }: {
13
+ createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, price, ignoreLiquidityError, }: {
14
14
  userId: string;
15
15
  side: Side;
16
16
  country: Country;
@@ -20,7 +20,8 @@ declare class ClusterClient {
20
20
  amountCrypto?: number;
21
21
  USBankTransferMethod?: "ach_push" | "wire";
22
22
  deferredPaymentType?: DeferredPaymentType;
23
- futureTwoWaySettlementType?: FutureTwoWaySettlementType;
23
+ twoWaySettlementType?: TwoWaySettlementType;
24
+ twoWaySettlementDateOffset?: number;
24
25
  netPrice?: number;
25
26
  price?: number;
26
27
  ignoreLiquidityError?: boolean;
@@ -74,7 +74,7 @@ class ClusterClient {
74
74
  return response.data.quote;
75
75
  });
76
76
  }
77
- createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, futureTwoWaySettlementType, netPrice, price, ignoreLiquidityError, }) {
77
+ createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, price, ignoreLiquidityError, }) {
78
78
  return __awaiter(this, void 0, void 0, function* () {
79
79
  const response = yield this.axios.post(`${this.baseUrl}/api/quotes`, {
80
80
  userId,
@@ -86,7 +86,8 @@ class ClusterClient {
86
86
  country,
87
87
  USBankTransferMethod,
88
88
  deferredPaymentType,
89
- futureTwoWaySettlementType,
89
+ twoWaySettlementType,
90
+ twoWaySettlementDateOffset,
90
91
  netPrice,
91
92
  price,
92
93
  ignoreLiquidityError,
@@ -1,4 +1,4 @@
1
- import { Blockchain, DeferredPaymentType, FutureTwoWaySettlementType, Side, TradingMarket } from "@riocrypto/common";
1
+ import { Blockchain, DeferredPaymentType, TwoWaySettlementType, Side, TradingMarket } from "@riocrypto/common";
2
2
  import mongoose from "mongoose";
3
3
  interface DashboardSettingsAttrs {
4
4
  userId: string;
@@ -16,7 +16,8 @@ interface DashboardSettingsAttrs {
16
16
  destinationWalletId?: string;
17
17
  originWalletId?: string;
18
18
  deferredPaymentType?: DeferredPaymentType;
19
- futureTwoWaySettlementType?: FutureTwoWaySettlementType;
19
+ twoWaySettlementType?: TwoWaySettlementType;
20
+ twoWaySettlementDateOffset?: number;
20
21
  originUSBankTransferMethod?: "ach_push" | "wire";
21
22
  destinationUSBankTransferMethod?: "ach_push" | "wire";
22
23
  };
@@ -38,7 +39,8 @@ interface DashboardSettingsDoc extends mongoose.Document {
38
39
  destinationWalletId?: string;
39
40
  originWalletId?: string;
40
41
  deferredPaymentType?: DeferredPaymentType;
41
- futureTwoWaySettlementType?: FutureTwoWaySettlementType;
42
+ twoWaySettlementType?: TwoWaySettlementType;
43
+ twoWaySettlementDateOffset?: number;
42
44
  originUSBankTransferMethod?: "ach_push" | "wire";
43
45
  destinationUSBankTransferMethod?: "ach_push" | "wire";
44
46
  };
@@ -1,4 +1,4 @@
1
- import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, FutureTwoWaySettlementType } from "@riocrypto/common";
1
+ import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, TwoWaySettlementType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface OrderAttrs {
4
4
  quoteId: string;
@@ -57,7 +57,8 @@ interface OrderAttrs {
57
57
  };
58
58
  attributes?: OrderAttribute[];
59
59
  deferredPaymentType: DeferredPaymentType;
60
- futureTwoWaySettlementType: FutureTwoWaySettlementType;
60
+ twoWaySettlementType: TwoWaySettlementType;
61
+ twoWaySettlementDateOffset?: number;
61
62
  destinationOfFunds?: {
62
63
  blockchainAddress?: string;
63
64
  accountHolderName?: string;
@@ -183,7 +184,8 @@ interface OrderDoc extends Document {
183
184
  };
184
185
  attributes?: OrderAttribute[];
185
186
  deferredPaymentType: DeferredPaymentType;
186
- futureTwoWaySettlementType: FutureTwoWaySettlementType;
187
+ twoWaySettlementType: TwoWaySettlementType;
188
+ twoWaySettlementDateOffset?: number;
187
189
  destinationOfFunds?: {
188
190
  blockchainAddress?: string;
189
191
  accountHolderName?: string;
@@ -120,7 +120,7 @@ const buildOrder = (mongoose) => {
120
120
  deferredPaymentFeeFiat: {
121
121
  type: Number,
122
122
  },
123
- futureTwoWaySettlementFeeFiat: {
123
+ twoWaySettlementOffsetFeeFiat: {
124
124
  type: Number,
125
125
  },
126
126
  },
@@ -140,7 +140,7 @@ const buildOrder = (mongoose) => {
140
140
  deferredPaymentFeeFiat: {
141
141
  type: Number,
142
142
  },
143
- futureTwoWaySettlementFeeFiat: {
143
+ twoWaySettlementOffsetFeeFiat: {
144
144
  type: Number,
145
145
  },
146
146
  },
@@ -241,9 +241,12 @@ const buildOrder = (mongoose) => {
241
241
  deferredPaymentType: {
242
242
  type: String,
243
243
  },
244
- futureTwoWaySettlementType: {
244
+ twoWaySettlementType: {
245
245
  type: String,
246
246
  },
247
+ twoWaySettlementDateOffset: {
248
+ type: Number,
249
+ },
247
250
  attributes: [
248
251
  {
249
252
  type: String,
@@ -1,4 +1,4 @@
1
- import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto, DeferredPaymentType, FutureTwoWaySettlementType } from "@riocrypto/common";
1
+ import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto, DeferredPaymentType, TwoWaySettlementType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface QuoteAttrs {
4
4
  userId: string;
@@ -35,7 +35,8 @@ interface QuoteAttrs {
35
35
  requestedNetPrice?: number;
36
36
  paymentDueDate: Date;
37
37
  deferredPaymentType: DeferredPaymentType;
38
- futureTwoWaySettlementType: FutureTwoWaySettlementType;
38
+ twoWaySettlementType: TwoWaySettlementType;
39
+ twoWaySettlementDateOffset?: number;
39
40
  }
40
41
  interface QuoteDoc extends Document {
41
42
  userId: string;
@@ -72,7 +73,8 @@ interface QuoteDoc extends Document {
72
73
  requestedNetPrice?: number;
73
74
  paymentDueDate: Date;
74
75
  deferredPaymentType: DeferredPaymentType;
75
- futureTwoWaySettlementType: FutureTwoWaySettlementType;
76
+ twoWaySettlementType: TwoWaySettlementType;
77
+ twoWaySettlementDateOffset?: number;
76
78
  }
77
79
  interface QuoteModel extends Model<QuoteDoc> {
78
80
  build(attrs: QuoteAttrs): QuoteDoc;
@@ -80,7 +80,7 @@ const buildQuote = (mongoose) => {
80
80
  deferredPaymentFeeFiat: {
81
81
  type: Number,
82
82
  },
83
- futureTwoWaySettlementFeeFiat: {
83
+ twoWaySettlementOffsetFeeFiat: {
84
84
  type: Number,
85
85
  },
86
86
  },
@@ -138,9 +138,12 @@ const buildQuote = (mongoose) => {
138
138
  deferredPaymentType: {
139
139
  type: String,
140
140
  },
141
- futureTwoWaySettlementType: {
141
+ twoWaySettlementType: {
142
142
  type: String,
143
143
  },
144
+ twoWaySettlementDateOffset: {
145
+ type: Number,
146
+ },
144
147
  }, {
145
148
  toJSON: {
146
149
  transform(doc, ret) {
@@ -1,4 +1,4 @@
1
- import { Country, Fiat, Side, Crypto, FutureTwoWaySettlementType, DeferredPaymentType } from "@riocrypto/common";
1
+ import { Country, Fiat, Side, Crypto, TwoWaySettlementType, DeferredPaymentType } from "@riocrypto/common";
2
2
  import mongoose from "mongoose";
3
3
  interface TelegramSessionAttrs {
4
4
  createdAt: Date;
@@ -19,7 +19,8 @@ interface TelegramSessionAttrs {
19
19
  quoteMode?: "fiat" | "crypto";
20
20
  USBankTransferMethod?: "ach_push" | "wire";
21
21
  deferredPaymentType?: DeferredPaymentType;
22
- futureTwoWaySettlementType?: FutureTwoWaySettlementType;
22
+ twoWaySettlementType?: TwoWaySettlementType;
23
+ twoWaySettlementDateOffset?: number;
23
24
  };
24
25
  quoteId?: string;
25
26
  orderId?: string;
@@ -45,7 +46,8 @@ interface TelegramSessionDoc extends mongoose.Document {
45
46
  quoteMode?: "fiat" | "crypto";
46
47
  USBankTransferMethod?: "ach_push" | "wire";
47
48
  deferredPaymentType?: DeferredPaymentType;
48
- futureTwoWaySettlementType?: FutureTwoWaySettlementType;
49
+ twoWaySettlementType?: TwoWaySettlementType;
50
+ twoWaySettlementDateOffset?: number;
49
51
  };
50
52
  quoteId?: string;
51
53
  orderId?: string;
@@ -66,9 +66,12 @@ const buildTelegramSession = (mongoose) => {
66
66
  deferredPaymentType: {
67
67
  type: String,
68
68
  },
69
- futureTwoWaySettlementType: {
69
+ twoWaySettlementType: {
70
70
  type: String,
71
71
  },
72
+ twoWaySettlementDateOffset: {
73
+ type: Number,
74
+ },
72
75
  },
73
76
  quoteId: {
74
77
  type: String,
@@ -1,4 +1,4 @@
1
- import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto, FutureTwoWaySettlementType, DeferredPaymentType } from "@riocrypto/common";
1
+ import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto, DeferredPaymentType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface UserAttrs {
4
4
  createdAt: Date;
@@ -141,8 +141,8 @@ interface UserDoc extends Document {
141
141
  deferredPaymentFee?: {
142
142
  [deferredPaymentType in DeferredPaymentType]: number;
143
143
  };
144
- futureTwoWaySettlementFee?: {
145
- [futureTwoWaySettlementType in FutureTwoWaySettlementType]: number;
144
+ twoWaySettlementOffsetFee?: {
145
+ [key: number]: number;
146
146
  };
147
147
  };
148
148
  PE?: {
@@ -151,8 +151,8 @@ interface UserDoc extends Document {
151
151
  deferredPaymentFee?: {
152
152
  [deferredPaymentType in DeferredPaymentType]: number;
153
153
  };
154
- futureTwoWaySettlementFee?: {
155
- [futureTwoWaySettlementType in FutureTwoWaySettlementType]: number;
154
+ twoWaySettlementOffsetFee?: {
155
+ [key: number]: number;
156
156
  };
157
157
  };
158
158
  CO?: {
@@ -161,8 +161,8 @@ interface UserDoc extends Document {
161
161
  deferredPaymentFee?: {
162
162
  [deferredPaymentType in DeferredPaymentType]: number;
163
163
  };
164
- futureTwoWaySettlementFee?: {
165
- [futureTwoWaySettlementType in FutureTwoWaySettlementType]: number;
164
+ twoWaySettlementOffsetFee?: {
165
+ [key: number]: number;
166
166
  };
167
167
  };
168
168
  BR?: {
@@ -171,8 +171,8 @@ interface UserDoc extends Document {
171
171
  deferredPaymentFee?: {
172
172
  [deferredPaymentType in DeferredPaymentType]: number;
173
173
  };
174
- futureTwoWaySettlementFee?: {
175
- [futureTwoWaySettlementType in FutureTwoWaySettlementType]: number;
174
+ twoWaySettlementOffsetFee?: {
175
+ [key: number]: number;
176
176
  };
177
177
  };
178
178
  US?: {
@@ -181,8 +181,8 @@ interface UserDoc extends Document {
181
181
  deferredPaymentFee?: {
182
182
  [deferredPaymentType in DeferredPaymentType]: number;
183
183
  };
184
- futureTwoWaySettlementFee?: {
185
- [futureTwoWaySettlementType in FutureTwoWaySettlementType]: number;
184
+ twoWaySettlementOffsetFee?: {
185
+ [key: number]: number;
186
186
  };
187
187
  };
188
188
  };
@@ -74,7 +74,7 @@ const buildUser = (mongoose) => {
74
74
  deferredPaymentFee: {
75
75
  type: Object,
76
76
  },
77
- futureTwoWaySettlementFee: {
77
+ twoWaySettlementOffsetFee: {
78
78
  type: Object,
79
79
  },
80
80
  },
@@ -96,7 +96,7 @@ const buildUser = (mongoose) => {
96
96
  deferredPaymentFee: {
97
97
  type: Object,
98
98
  },
99
- futureTwoWaySettlementFee: {
99
+ twoWaySettlementOffsetFee: {
100
100
  type: Object,
101
101
  },
102
102
  },
@@ -120,7 +120,7 @@ const buildUser = (mongoose) => {
120
120
  deferredPaymentFee: {
121
121
  type: Object,
122
122
  },
123
- futureTwoWaySettlementFee: {
123
+ twoWaySettlementOffsetFee: {
124
124
  type: Object,
125
125
  },
126
126
  },
@@ -142,7 +142,7 @@ const buildUser = (mongoose) => {
142
142
  deferredPaymentFee: {
143
143
  type: Object,
144
144
  },
145
- futureTwoWaySettlementFee: {
145
+ twoWaySettlementOffsetFee: {
146
146
  type: Object,
147
147
  },
148
148
  },
@@ -166,7 +166,7 @@ const buildUser = (mongoose) => {
166
166
  deferredPaymentFee: {
167
167
  type: Object,
168
168
  },
169
- futureTwoWaySettlementFee: {
169
+ twoWaySettlementOffsetFee: {
170
170
  type: Object,
171
171
  },
172
172
  },
@@ -188,7 +188,7 @@ const buildUser = (mongoose) => {
188
188
  deferredPaymentFee: {
189
189
  type: Object,
190
190
  },
191
- futureTwoWaySettlementFee: {
191
+ twoWaySettlementOffsetFee: {
192
192
  type: Object,
193
193
  },
194
194
  },
@@ -212,7 +212,7 @@ const buildUser = (mongoose) => {
212
212
  deferredPaymentFee: {
213
213
  type: Object,
214
214
  },
215
- futureTwoWaySettlementFee: {
215
+ twoWaySettlementOffsetFee: {
216
216
  type: Object,
217
217
  },
218
218
  },
@@ -234,7 +234,7 @@ const buildUser = (mongoose) => {
234
234
  deferredPaymentFee: {
235
235
  type: Object,
236
236
  },
237
- futureTwoWaySettlementFee: {
237
+ twoWaySettlementOffsetFee: {
238
238
  type: Object,
239
239
  },
240
240
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2401",
3
+ "version": "1.0.2402",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.2129",
31
+ "@riocrypto/common": "^1.0.2132",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",