@riocrypto/common-server 1.0.953 → 1.0.956
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.
|
@@ -122,6 +122,13 @@ declare class BridgeClient {
|
|
|
122
122
|
external_account_id: string;
|
|
123
123
|
address: string;
|
|
124
124
|
}>;
|
|
125
|
+
getLiquidationAddressDrains(bridgeCustomerId: string, liquidationAddressId: string): Promise<{
|
|
126
|
+
id: string;
|
|
127
|
+
amount: string;
|
|
128
|
+
currency: string;
|
|
129
|
+
state: "pending" | "complete";
|
|
130
|
+
created_at: string;
|
|
131
|
+
}[]>;
|
|
125
132
|
createPlaidLinkToken(bridgeCustomerId: string): Promise<{
|
|
126
133
|
link_token: string;
|
|
127
134
|
link_token_expires_at: string;
|
|
@@ -116,6 +116,17 @@ class BridgeClient {
|
|
|
116
116
|
return data;
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
+
getLiquidationAddressDrains(bridgeCustomerId, liquidationAddressId) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
const response = yield axios_1.default.get(`${this.baseUrl}/v0/customers/${bridgeCustomerId}/liquidation_addresses/${liquidationAddressId}/drains`, {
|
|
122
|
+
headers: {
|
|
123
|
+
"Api-Key": this.apiKey,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
console.log("response", response.data);
|
|
127
|
+
return response.data || [];
|
|
128
|
+
});
|
|
129
|
+
}
|
|
119
130
|
createPlaidLinkToken(bridgeCustomerId) {
|
|
120
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
132
|
const { data } = yield axios_1.default.post(`${this.baseUrl}/v0/customers/${bridgeCustomerId}/plaid_link_requests`, undefined, {
|
|
@@ -3,6 +3,7 @@ import { Crypto } from "@riocrypto/common";
|
|
|
3
3
|
interface BridgeLiquidationAddressAttrs {
|
|
4
4
|
userId: string;
|
|
5
5
|
crypto: Crypto;
|
|
6
|
+
bridgeCustomerId: string;
|
|
6
7
|
bridgeLiquidationAddressId: string;
|
|
7
8
|
bridgeExternalAccountId: string;
|
|
8
9
|
}
|
|
@@ -13,6 +14,7 @@ interface BridgeLiquidationAddressDoc extends Document {
|
|
|
13
14
|
_id: string;
|
|
14
15
|
userId: string;
|
|
15
16
|
crypto: Crypto;
|
|
17
|
+
bridgeCustomerId: string;
|
|
16
18
|
bridgeLiquidationAddressId: string;
|
|
17
19
|
bridgeExternalAccountId: string;
|
|
18
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.956",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.819",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|