@riocrypto/common-server 1.0.2728 → 1.0.2730
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 +2 -1
- package/build/clients/cluster-client.js +2 -1
- package/build/helpers/sanitize-order-doc.js +11 -2
- package/build/models/binance-rfq-quote.d.ts +2 -0
- package/build/models/binance-rfq-quote.js +3 -0
- package/build/models/binance-rfq-trade.d.ts +2 -0
- package/build/models/binance-rfq-trade.js +3 -0
- package/build/models/bulk-crypto-payment.d.ts +1 -0
- package/build/models/order.d.ts +4 -0
- package/build/models/order.js +3 -0
- package/package.json +2 -2
|
@@ -33,7 +33,7 @@ declare class ClusterClient {
|
|
|
33
33
|
isBinanceRFQ?: boolean;
|
|
34
34
|
}): Promise<Quote>;
|
|
35
35
|
getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
|
|
36
|
-
createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, }: {
|
|
36
|
+
createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, binanceRFQOrderId, }: {
|
|
37
37
|
quoteId: string;
|
|
38
38
|
userAddressId?: string;
|
|
39
39
|
payoutBankAccountId?: string;
|
|
@@ -45,6 +45,7 @@ declare class ClusterClient {
|
|
|
45
45
|
bulkCryptoPayoutId?: string;
|
|
46
46
|
bulkBankPayoutId?: string;
|
|
47
47
|
TWAPSessionId?: string;
|
|
48
|
+
binanceRFQOrderId?: string;
|
|
48
49
|
}): Promise<Order>;
|
|
49
50
|
takeAxe({ axeId, userId, amount, crypto, userAddressId, payoutBankAccountId, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, }: {
|
|
50
51
|
axeId: string;
|
|
@@ -114,7 +114,7 @@ class ClusterClient {
|
|
|
114
114
|
return response.data;
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, }) {
|
|
117
|
+
createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, binanceRFQOrderId, }) {
|
|
118
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
119
|
const response = yield this.axios.post(`${this.baseUrl}/api/orders`, {
|
|
120
120
|
quoteId,
|
|
@@ -132,6 +132,7 @@ class ClusterClient {
|
|
|
132
132
|
: undefined,
|
|
133
133
|
bulkBankPaymentId: bulkBankPaymentId ? bulkBankPaymentId : undefined,
|
|
134
134
|
TWAPSessionId: TWAPSessionId ? TWAPSessionId : undefined,
|
|
135
|
+
binanceRFQOrderId: binanceRFQOrderId ? binanceRFQOrderId : undefined,
|
|
135
136
|
}, {
|
|
136
137
|
headers: {
|
|
137
138
|
"x-cluster-api-key": this.clusterApiKey,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sanitizeOrderDoc = void 0;
|
|
4
4
|
const sanitizeOrderDoc = (doc) => {
|
|
5
|
-
var _a;
|
|
5
|
+
var _a, _b;
|
|
6
6
|
const obj = doc.toJSON();
|
|
7
7
|
delete obj.substatus;
|
|
8
8
|
delete obj.liquidityProvider;
|
|
@@ -21,7 +21,16 @@ const sanitizeOrderDoc = (doc) => {
|
|
|
21
21
|
delete obj.assetPriceInUSD;
|
|
22
22
|
delete obj.actualAssetPriceInUSD;
|
|
23
23
|
delete obj.previousActiveStatus;
|
|
24
|
-
|
|
24
|
+
delete obj.binanceRFQOrderId;
|
|
25
|
+
if (((_a = obj.paymentsReceived) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
26
|
+
obj.paymentsReceived = obj.paymentsReceived.map((payment) => {
|
|
27
|
+
if (payment.fireblocksTransferId) {
|
|
28
|
+
delete payment.fireblocksTransferId;
|
|
29
|
+
}
|
|
30
|
+
return payment;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (((_b = obj.payoutsSent) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
25
34
|
obj.payoutsSent = obj.payoutsSent.map((payout) => {
|
|
26
35
|
if (payout.fireblocksTransferId) {
|
|
27
36
|
delete payout.fireblocksTransferId;
|
|
@@ -4,6 +4,7 @@ interface BinanceRFQQuoteAttrs {
|
|
|
4
4
|
rfqId: string;
|
|
5
5
|
quoteId: string;
|
|
6
6
|
clientQuoteId: string;
|
|
7
|
+
binanceRFQOrderId: string;
|
|
7
8
|
baseAsset: string;
|
|
8
9
|
quoteAsset: string;
|
|
9
10
|
side: BinanceRFQSide;
|
|
@@ -16,6 +17,7 @@ interface BinanceRFQQuoteDoc extends Document {
|
|
|
16
17
|
rfqId: string;
|
|
17
18
|
quoteId: string;
|
|
18
19
|
clientQuoteId: string;
|
|
20
|
+
binanceRFQOrderId: string;
|
|
19
21
|
baseAsset: string;
|
|
20
22
|
quoteAsset: string;
|
|
21
23
|
side: BinanceRFQSide;
|
|
@@ -4,6 +4,7 @@ interface BinanceRFQTradeAttrs {
|
|
|
4
4
|
rfqId: string;
|
|
5
5
|
quoteId: string;
|
|
6
6
|
tradeId: string;
|
|
7
|
+
binanceRFQOrderId: string;
|
|
7
8
|
executedPrice: number;
|
|
8
9
|
executedQty: number;
|
|
9
10
|
tradeStatus: BinanceRFQTradeStatus;
|
|
@@ -14,6 +15,7 @@ interface BinanceRFQTradeDoc extends Document {
|
|
|
14
15
|
rfqId: string;
|
|
15
16
|
quoteId: string;
|
|
16
17
|
tradeId: string;
|
|
18
|
+
binanceRFQOrderId: string;
|
|
17
19
|
executedPrice: number;
|
|
18
20
|
executedQty: number;
|
|
19
21
|
tradeStatus: BinanceRFQTradeStatus;
|
package/build/models/order.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ interface OrderAttrs {
|
|
|
105
105
|
paymentsReceived?: {
|
|
106
106
|
amount: number;
|
|
107
107
|
blockchainTxId?: string;
|
|
108
|
+
fireblocksTransferId?: string;
|
|
108
109
|
SPEITrackingNumber?: string;
|
|
109
110
|
SPIDTrackingNumber?: string;
|
|
110
111
|
CEPLink?: string;
|
|
@@ -140,6 +141,7 @@ interface OrderAttrs {
|
|
|
140
141
|
sessionId: string;
|
|
141
142
|
settlementId: string;
|
|
142
143
|
};
|
|
144
|
+
binanceRFQOrderId?: string;
|
|
143
145
|
}
|
|
144
146
|
interface OrderDoc extends Document {
|
|
145
147
|
quoteId: string;
|
|
@@ -242,6 +244,7 @@ interface OrderDoc extends Document {
|
|
|
242
244
|
paymentsReceived?: {
|
|
243
245
|
amount: number;
|
|
244
246
|
blockchainTxId?: string;
|
|
247
|
+
fireblocksTransferId?: string;
|
|
245
248
|
SPEITrackingNumber?: string;
|
|
246
249
|
SPIDTrackingNumber?: string;
|
|
247
250
|
CEPLink?: string;
|
|
@@ -280,6 +283,7 @@ interface OrderDoc extends Document {
|
|
|
280
283
|
sessionId: string;
|
|
281
284
|
settlementId: string;
|
|
282
285
|
};
|
|
286
|
+
binanceRFQOrderId?: string;
|
|
283
287
|
}
|
|
284
288
|
interface OrderModel extends Model<OrderDoc> {
|
|
285
289
|
build(attrs: OrderAttrs): OrderDoc;
|
package/build/models/order.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2730",
|
|
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.2526",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|