@riocrypto/common-server 1.0.2388 → 1.0.2391
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.
- package/build/clients/cluster-client.d.ts +4 -4
- package/build/clients/cluster-client.js +3 -3
- package/build/models/dashboard-settings.d.ts +5 -5
- package/build/models/order.d.ts +5 -5
- package/build/models/order.js +2 -2
- package/build/models/quote.d.ts +5 -5
- package/build/models/quote.js +2 -2
- package/build/models/telegram-session.d.ts +5 -5
- package/build/models/telegram-session.js +2 -2
- package/build/models/user.d.ts +11 -11
- package/package.json +2 -2
|
@@ -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,
|
|
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, FutureSettlementType } 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,
|
|
13
|
+
createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, futureSettlementType, netPrice, price, ignoreLiquidityError, }: {
|
|
14
14
|
userId: string;
|
|
15
15
|
side: Side;
|
|
16
16
|
country: Country;
|
|
@@ -19,8 +19,8 @@ declare class ClusterClient {
|
|
|
19
19
|
amountFiat?: number;
|
|
20
20
|
amountCrypto?: number;
|
|
21
21
|
USBankTransferMethod?: "ach_push" | "wire";
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
23
|
+
futureSettlementType?: FutureSettlementType;
|
|
24
24
|
netPrice?: number;
|
|
25
25
|
price?: number;
|
|
26
26
|
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,
|
|
77
|
+
createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, futureSettlementType, 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,
|
|
@@ -85,8 +85,8 @@ class ClusterClient {
|
|
|
85
85
|
amountCrypto,
|
|
86
86
|
country,
|
|
87
87
|
USBankTransferMethod,
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
deferredPaymentType,
|
|
89
|
+
futureSettlementType,
|
|
90
90
|
netPrice,
|
|
91
91
|
price,
|
|
92
92
|
ignoreLiquidityError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Blockchain,
|
|
1
|
+
import { Blockchain, DeferredPaymentType, FutureSettlementType, Side, TradingMarket } from "@riocrypto/common";
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
interface DashboardSettingsAttrs {
|
|
4
4
|
userId: string;
|
|
@@ -15,8 +15,8 @@ interface DashboardSettingsAttrs {
|
|
|
15
15
|
destinationBankAccountId?: string;
|
|
16
16
|
destinationWalletId?: string;
|
|
17
17
|
originWalletId?: string;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
19
|
+
futureSettlementType?: FutureSettlementType;
|
|
20
20
|
originUSBankTransferMethod?: "ach_push" | "wire";
|
|
21
21
|
destinationUSBankTransferMethod?: "ach_push" | "wire";
|
|
22
22
|
};
|
|
@@ -37,8 +37,8 @@ interface DashboardSettingsDoc extends mongoose.Document {
|
|
|
37
37
|
destinationBankAccountId?: string;
|
|
38
38
|
destinationWalletId?: string;
|
|
39
39
|
originWalletId?: string;
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
41
|
+
futureSettlementType?: FutureSettlementType;
|
|
42
42
|
originUSBankTransferMethod?: "ach_push" | "wire";
|
|
43
43
|
destinationUSBankTransferMethod?: "ach_push" | "wire";
|
|
44
44
|
};
|
package/build/models/order.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute,
|
|
1
|
+
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, FutureSettlementType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface OrderAttrs {
|
|
4
4
|
quoteId: string;
|
|
@@ -56,8 +56,8 @@ interface OrderAttrs {
|
|
|
56
56
|
amount: number;
|
|
57
57
|
};
|
|
58
58
|
attributes?: OrderAttribute[];
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
deferredPaymentType: DeferredPaymentType;
|
|
60
|
+
futureSettlementType: FutureSettlementType;
|
|
61
61
|
destinationOfFunds?: {
|
|
62
62
|
blockchainAddress?: string;
|
|
63
63
|
accountHolderName?: string;
|
|
@@ -182,8 +182,8 @@ interface OrderDoc extends Document {
|
|
|
182
182
|
amount: number;
|
|
183
183
|
};
|
|
184
184
|
attributes?: OrderAttribute[];
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
deferredPaymentType: DeferredPaymentType;
|
|
186
|
+
futureSettlementType: FutureSettlementType;
|
|
187
187
|
destinationOfFunds?: {
|
|
188
188
|
blockchainAddress?: string;
|
|
189
189
|
accountHolderName?: string;
|
package/build/models/order.js
CHANGED
|
@@ -238,10 +238,10 @@ const buildOrder = (mongoose) => {
|
|
|
238
238
|
type: Number,
|
|
239
239
|
},
|
|
240
240
|
},
|
|
241
|
-
|
|
241
|
+
deferredPaymentType: {
|
|
242
242
|
type: String,
|
|
243
243
|
},
|
|
244
|
-
|
|
244
|
+
futureSettlementType: {
|
|
245
245
|
type: String,
|
|
246
246
|
},
|
|
247
247
|
attributes: [
|
package/build/models/quote.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto,
|
|
1
|
+
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto, DeferredPaymentType, FutureSettlementType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface QuoteAttrs {
|
|
4
4
|
userId: string;
|
|
@@ -34,8 +34,8 @@ interface QuoteAttrs {
|
|
|
34
34
|
netPrice: number;
|
|
35
35
|
requestedNetPrice?: number;
|
|
36
36
|
paymentDueDate: Date;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
deferredPaymentType: DeferredPaymentType;
|
|
38
|
+
futureSettlementType: FutureSettlementType;
|
|
39
39
|
}
|
|
40
40
|
interface QuoteDoc extends Document {
|
|
41
41
|
userId: string;
|
|
@@ -71,8 +71,8 @@ interface QuoteDoc extends Document {
|
|
|
71
71
|
netPrice: number;
|
|
72
72
|
requestedNetPrice?: number;
|
|
73
73
|
paymentDueDate: Date;
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
deferredPaymentType: DeferredPaymentType;
|
|
75
|
+
futureSettlementType: FutureSettlementType;
|
|
76
76
|
}
|
|
77
77
|
interface QuoteModel extends Model<QuoteDoc> {
|
|
78
78
|
build(attrs: QuoteAttrs): QuoteDoc;
|
package/build/models/quote.js
CHANGED
|
@@ -135,10 +135,10 @@ const buildQuote = (mongoose) => {
|
|
|
135
135
|
paymentDueDate: {
|
|
136
136
|
type: mongoose.Schema.Types.Date,
|
|
137
137
|
},
|
|
138
|
-
|
|
138
|
+
deferredPaymentType: {
|
|
139
139
|
type: String,
|
|
140
140
|
},
|
|
141
|
-
|
|
141
|
+
futureSettlementType: {
|
|
142
142
|
type: String,
|
|
143
143
|
},
|
|
144
144
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Country, Fiat, Side, Crypto,
|
|
1
|
+
import { Country, Fiat, Side, Crypto, FutureSettlementType, DeferredPaymentType } from "@riocrypto/common";
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
interface TelegramSessionAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -18,8 +18,8 @@ interface TelegramSessionAttrs {
|
|
|
18
18
|
country?: Country;
|
|
19
19
|
quoteMode?: "fiat" | "crypto";
|
|
20
20
|
USBankTransferMethod?: "ach_push" | "wire";
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
22
|
+
futureSettlementType?: FutureSettlementType;
|
|
23
23
|
};
|
|
24
24
|
quoteId?: string;
|
|
25
25
|
orderId?: string;
|
|
@@ -44,8 +44,8 @@ interface TelegramSessionDoc extends mongoose.Document {
|
|
|
44
44
|
country?: Country;
|
|
45
45
|
quoteMode?: "fiat" | "crypto";
|
|
46
46
|
USBankTransferMethod?: "ach_push" | "wire";
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
48
|
+
futureSettlementType?: FutureSettlementType;
|
|
49
49
|
};
|
|
50
50
|
quoteId?: string;
|
|
51
51
|
orderId?: string;
|
package/build/models/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto,
|
|
1
|
+
import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto, FutureSettlementType, DeferredPaymentType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface UserAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -139,50 +139,50 @@ interface UserDoc extends Document {
|
|
|
139
139
|
buy?: PlatformFeeRange[];
|
|
140
140
|
sell?: PlatformFeeRange[];
|
|
141
141
|
deferredPaymentFee?: {
|
|
142
|
-
[
|
|
142
|
+
[deferredPaymentType in DeferredPaymentType]: number;
|
|
143
143
|
};
|
|
144
144
|
futureSettlementFee?: {
|
|
145
|
-
[
|
|
145
|
+
[futureSettlementType in FutureSettlementType]: number;
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
148
|
PE?: {
|
|
149
149
|
buy?: PlatformFeeRange[];
|
|
150
150
|
sell?: PlatformFeeRange[];
|
|
151
151
|
deferredPaymentFee?: {
|
|
152
|
-
[
|
|
152
|
+
[deferredPaymentType in DeferredPaymentType]: number;
|
|
153
153
|
};
|
|
154
154
|
futureSettlementFee?: {
|
|
155
|
-
[
|
|
155
|
+
[futureSettlementType in FutureSettlementType]: number;
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
158
|
CO?: {
|
|
159
159
|
buy?: PlatformFeeRange[];
|
|
160
160
|
sell?: PlatformFeeRange[];
|
|
161
161
|
deferredPaymentFee?: {
|
|
162
|
-
[
|
|
162
|
+
[deferredPaymentType in DeferredPaymentType]: number;
|
|
163
163
|
};
|
|
164
164
|
futureSettlementFee?: {
|
|
165
|
-
[
|
|
165
|
+
[futureSettlementType in FutureSettlementType]: number;
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
168
|
BR?: {
|
|
169
169
|
buy?: PlatformFeeRange[];
|
|
170
170
|
sell?: PlatformFeeRange[];
|
|
171
171
|
deferredPaymentFee?: {
|
|
172
|
-
[
|
|
172
|
+
[deferredPaymentType in DeferredPaymentType]: number;
|
|
173
173
|
};
|
|
174
174
|
futureSettlementFee?: {
|
|
175
|
-
[
|
|
175
|
+
[futureSettlementType in FutureSettlementType]: number;
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
178
|
US?: {
|
|
179
179
|
buy?: PlatformFeeRange[];
|
|
180
180
|
sell?: PlatformFeeRange[];
|
|
181
181
|
deferredPaymentFee?: {
|
|
182
|
-
[
|
|
182
|
+
[deferredPaymentType in DeferredPaymentType]: number;
|
|
183
183
|
};
|
|
184
184
|
futureSettlementFee?: {
|
|
185
|
-
[
|
|
185
|
+
[futureSettlementType in FutureSettlementType]: number;
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2391",
|
|
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.
|
|
31
|
+
"@riocrypto/common": "^1.0.2118",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|