@riocrypto/common-server 1.0.2012 → 1.0.2014
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 } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -45,6 +45,12 @@ declare class ClusterClient {
|
|
|
45
45
|
deleteRecord(id: string): Promise<void>;
|
|
46
46
|
registerUserWithCoincover(userId: string): Promise<void>;
|
|
47
47
|
importOrder(orderToImport: ImportOrderData): Promise<void>;
|
|
48
|
+
createInternalTransfer({ amount, currency, origin, destination, }: {
|
|
49
|
+
amount: number;
|
|
50
|
+
currency: Fiat | Crypto;
|
|
51
|
+
origin: TreasuryProvider;
|
|
52
|
+
destination: TreasuryProvider;
|
|
53
|
+
}): Promise<void>;
|
|
48
54
|
}
|
|
49
55
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
50
56
|
export {};
|
|
@@ -346,6 +346,15 @@ class ClusterClient {
|
|
|
346
346
|
});
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
+
createInternalTransfer({ amount, currency, origin, destination, }) {
|
|
350
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
351
|
+
yield this.axios.post(`${this.baseUrl}/api/liquidity/transfers`, { amount, currency, origin, destination }, {
|
|
352
|
+
headers: {
|
|
353
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
}
|
|
349
358
|
}
|
|
350
359
|
const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
351
360
|
// Retrieve secrets asynchronously
|
|
@@ -8,6 +8,10 @@ const buildLiquidityAutomation = (mongoose) => {
|
|
|
8
8
|
return mongoose.model("LiquidityAutomation");
|
|
9
9
|
}
|
|
10
10
|
const LiquidityAutomationSchema = new mongoose.Schema({
|
|
11
|
+
createdAt: {
|
|
12
|
+
type: Date,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
11
15
|
adminId: {
|
|
12
16
|
type: mongoose.Schema.Types.ObjectId,
|
|
13
17
|
ref: "Admin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2014",
|
|
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.1767",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|