@riocrypto/common-server 1.0.1775 → 1.0.1777
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/fireblocks-client.d.ts +1 -1
- package/build/clients/fireblocks-client.js +2 -1
- package/build/models/ccxt-order.js +3 -3
- package/build/models/order.d.ts +2 -0
- package/build/models/order.js +3 -0
- package/build/models/quote.d.ts +2 -0
- package/build/models/quote.js +3 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ declare class FireblocksClient {
|
|
|
5
5
|
constructor(privateKey: string, apiKey: string);
|
|
6
6
|
estimateWithdrawFee(crypto: Crypto, address: string, amountCrypto: number): Promise<string | number | undefined>;
|
|
7
7
|
withdrawFromExchange(rioId: string, crypto: Crypto, address: string, amountCrypto: number): Promise<void>;
|
|
8
|
-
withdrawFromVault(rioId: string, crypto: Crypto, address: string, amountCrypto: number, vaultId?: string): Promise<string>;
|
|
8
|
+
withdrawFromVault(rioId: string, crypto: Crypto, address: string, amountCrypto: number, vaultId?: string, notes?: string): Promise<string>;
|
|
9
9
|
getVaultCryptoBalance(vaultId: string, crypto: Crypto): Promise<number>;
|
|
10
10
|
getVaultCryptoAddress(vaultId: string, crypto: Crypto): Promise<string>;
|
|
11
11
|
getTotalVaultUSDBalance(vaultId: string): Promise<number>;
|
|
@@ -75,7 +75,7 @@ class FireblocksClient {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
withdrawFromVault(rioId, crypto, address, amountCrypto, vaultId) {
|
|
78
|
+
withdrawFromVault(rioId, crypto, address, amountCrypto, vaultId, notes) {
|
|
79
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
80
|
if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local].includes(process.env.RIO_ENV)) {
|
|
81
81
|
throw new Error("Withdrawals are disabled in sandbox mode.");
|
|
@@ -95,6 +95,7 @@ class FireblocksClient {
|
|
|
95
95
|
},
|
|
96
96
|
amount: amountCrypto,
|
|
97
97
|
operation: fireblocks_sdk_1.TransactionOperation.TRANSFER,
|
|
98
|
+
note: notes,
|
|
98
99
|
});
|
|
99
100
|
return response.id;
|
|
100
101
|
});
|
|
@@ -6,7 +6,7 @@ const buildCCXTOrder = (mongoose) => {
|
|
|
6
6
|
if (mongoose.models.CCXTOrder) {
|
|
7
7
|
return mongoose.model("CCXTOrder");
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const CCXTGenericOrderSchema = new mongoose.Schema({
|
|
10
10
|
orderId: {
|
|
11
11
|
type: String,
|
|
12
12
|
required: true,
|
|
@@ -28,10 +28,10 @@ const buildCCXTOrder = (mongoose) => {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
CCXTGenericOrderSchema.statics.build = (attrs) => {
|
|
32
32
|
return new CCXTOrder(attrs);
|
|
33
33
|
};
|
|
34
|
-
const CCXTOrder = mongoose.model("CCXTOrder",
|
|
34
|
+
const CCXTOrder = mongoose.model("CCXTOrder", CCXTGenericOrderSchema);
|
|
35
35
|
return CCXTOrder;
|
|
36
36
|
};
|
|
37
37
|
exports.buildCCXTOrder = buildCCXTOrder;
|
package/build/models/order.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ interface OrderAttrs {
|
|
|
42
42
|
exchangeRateOrders?: ExchangeRateOrder[];
|
|
43
43
|
autoFXDisabled?: boolean;
|
|
44
44
|
USBankTransferMethod?: "wire" | "ach_push";
|
|
45
|
+
isAfterHours?: boolean;
|
|
45
46
|
}
|
|
46
47
|
interface OrderDoc extends Document {
|
|
47
48
|
quoteId: string;
|
|
@@ -85,6 +86,7 @@ interface OrderDoc extends Document {
|
|
|
85
86
|
exchangeRateOrders?: ExchangeRateOrder[];
|
|
86
87
|
autoFXDisabled?: boolean;
|
|
87
88
|
USBankTransferMethod?: "wire" | "ach_push";
|
|
89
|
+
isAfterHours?: boolean;
|
|
88
90
|
}
|
|
89
91
|
interface OrderModel extends Model<OrderDoc> {
|
|
90
92
|
build(attrs: OrderAttrs): OrderDoc;
|
package/build/models/order.js
CHANGED
package/build/models/quote.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ interface QuoteAttrs {
|
|
|
29
29
|
markup?: number;
|
|
30
30
|
USBankTransferMethod?: "wire" | "ach_push";
|
|
31
31
|
isBid?: boolean;
|
|
32
|
+
isAfterHours?: boolean;
|
|
32
33
|
}
|
|
33
34
|
interface QuoteDoc extends Document {
|
|
34
35
|
userId: string;
|
|
@@ -59,6 +60,7 @@ interface QuoteDoc extends Document {
|
|
|
59
60
|
markup?: number;
|
|
60
61
|
USBankTransferMethod?: "wire" | "ach_push";
|
|
61
62
|
isBid?: boolean;
|
|
63
|
+
isAfterHours?: boolean;
|
|
62
64
|
}
|
|
63
65
|
interface QuoteModel extends Model<QuoteDoc> {
|
|
64
66
|
build(attrs: QuoteAttrs): QuoteDoc;
|
package/build/models/quote.js
CHANGED