@riocrypto/common-server 1.0.852 → 1.0.853
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,8 +1,10 @@
|
|
|
1
|
+
import { BridgeCustomer } from "@riocrypto/common";
|
|
1
2
|
declare class BridgeClient {
|
|
2
3
|
private apiKey;
|
|
3
4
|
private baseUrl;
|
|
4
5
|
constructor(apiKey: string);
|
|
5
6
|
getTermsOfServiceUrl(): Promise<string>;
|
|
7
|
+
createCustomer(): Promise<BridgeCustomer>;
|
|
6
8
|
}
|
|
7
9
|
export declare const buildBridgeClient: () => Promise<BridgeClient>;
|
|
8
10
|
export {};
|
|
@@ -38,6 +38,17 @@ class BridgeClient {
|
|
|
38
38
|
return data.url;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
createCustomer() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const { data } = yield axios_1.default.post(`${this.baseUrl}/v0/customers`, {
|
|
44
|
+
headers: {
|
|
45
|
+
"Api-Key": this.apiKey,
|
|
46
|
+
"Idempotency-Key": (0, uuid_1.v4)(),
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
return data.url;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
41
52
|
}
|
|
42
53
|
const buildBridgeClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
54
|
// Retrieve secrets asynchronously
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.853",
|
|
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.738",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|