@riocrypto/common-server 1.0.559 → 1.0.560
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/bitstamp-client.d.ts +1 -1
- package/build/clients/bitstamp-client.js +4 -3
- package/build/clients/fireblocks-client.d.ts +1 -1
- package/build/clients/fireblocks-client.js +4 -3
- package/build/clients/fixer-client.d.ts +1 -1
- package/build/clients/fixer-client.js +4 -4
- package/build/clients/gueno-client.d.ts +0 -9
- package/build/clients/gueno-client.js +2 -3
- package/build/clients/kushki-client.d.ts +1 -1
- package/build/clients/kushki-client.js +4 -3
- package/build/clients/s3-client.d.ts +1 -1
- package/build/clients/s3-client.js +4 -3
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.
|
|
38
|
+
exports.buildBitstampClient = void 0;
|
|
39
39
|
const axios_1 = __importDefault(require("axios"));
|
|
40
40
|
const crypto = __importStar(require("crypto"));
|
|
41
41
|
const uuid = __importStar(require("uuid"));
|
|
@@ -81,7 +81,7 @@ class BitstampClient {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
const buildBitstampClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
85
85
|
const BITSTAMP_API_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("BITSTAMP_API_KEY");
|
|
86
86
|
if (!BITSTAMP_API_KEY) {
|
|
87
87
|
throw new Error("Unable to get BITSTAMP_API_KEY");
|
|
@@ -92,4 +92,5 @@ exports.bitstampClient = await (() => __awaiter(void 0, void 0, void 0, function
|
|
|
92
92
|
}
|
|
93
93
|
const bitstampClient = new BitstampClient(BITSTAMP_API_KEY, BITSTAMP_SECRET);
|
|
94
94
|
return bitstampClient;
|
|
95
|
-
})
|
|
95
|
+
});
|
|
96
|
+
exports.buildBitstampClient = buildBitstampClient;
|
|
@@ -13,5 +13,5 @@ declare class FireblocksClient {
|
|
|
13
13
|
getTransactions(crypto: Crypto): Promise<any>;
|
|
14
14
|
getDepositAddress(crypto: Crypto): Promise<string>;
|
|
15
15
|
}
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const buildFireblocksClient: () => Promise<FireblocksClient>;
|
|
17
17
|
export {};
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.buildFireblocksClient = void 0;
|
|
13
13
|
const fireblocks_sdk_1 = require("fireblocks-sdk");
|
|
14
14
|
const secret_manager_client_1 = require("./secret-manager-client");
|
|
15
15
|
class FireblocksClient {
|
|
@@ -143,7 +143,7 @@ class FireblocksClient {
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
const buildFireblocksClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
147
147
|
const FIREBLOCKS_PRIVATE_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("FIREBLOCKS_PRIVATE_KEY");
|
|
148
148
|
if (!FIREBLOCKS_PRIVATE_KEY) {
|
|
149
149
|
throw new Error("Unable to get FIREBLOCKS_PRIVATE_KEY");
|
|
@@ -154,4 +154,5 @@ exports.fireblocksClient = await (() => __awaiter(void 0, void 0, void 0, functi
|
|
|
154
154
|
}
|
|
155
155
|
const fireblocksClient = new FireblocksClient(FIREBLOCKS_PRIVATE_KEY, FIREBLOCKS_API_KEY);
|
|
156
156
|
return fireblocksClient;
|
|
157
|
-
})
|
|
157
|
+
});
|
|
158
|
+
exports.buildFireblocksClient = buildFireblocksClient;
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.buildFixerClient = void 0;
|
|
16
16
|
const axios_1 = __importDefault(require("axios"));
|
|
17
17
|
const secret_manager_client_1 = require("./secret-manager-client");
|
|
18
18
|
class FixerClient {
|
|
@@ -32,12 +32,12 @@ class FixerClient {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
// Retrieve secret asynchronously
|
|
35
|
+
const buildFixerClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
36
|
const FIXER_API_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("FIXER_API_KEY");
|
|
38
37
|
if (!FIXER_API_KEY) {
|
|
39
38
|
throw new Error("Unable to get FIXER_API_KEY");
|
|
40
39
|
}
|
|
41
40
|
// Create FixerClient instance and return
|
|
42
41
|
return new FixerClient(FIXER_API_KEY);
|
|
43
|
-
})
|
|
42
|
+
});
|
|
43
|
+
exports.buildFixerClient = buildFixerClient;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
declare class GuenoClient {
|
|
2
|
-
private email;
|
|
3
|
-
private password;
|
|
4
|
-
private env;
|
|
5
|
-
constructor(email: string, password: string, env: "sandbox" | "production");
|
|
6
|
-
getAddressRiskScore(address: string, protocol: Crypto): Promise<any>;
|
|
7
|
-
getAccessToken(): Promise<any>;
|
|
8
|
-
}
|
|
9
|
-
export declare const guenoClient: GuenoClient;
|
|
10
1
|
export {};
|
|
@@ -12,7 +12,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.guenoClient = void 0;
|
|
16
15
|
const secret_manager_client_1 = require("./secret-manager-client");
|
|
17
16
|
const axios_1 = __importDefault(require("axios"));
|
|
18
17
|
class GuenoClient {
|
|
@@ -42,7 +41,7 @@ class GuenoClient {
|
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
|
|
44
|
+
const buildGuenoClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
45
|
// Retrieve secrets asynchronously
|
|
47
46
|
const GUENO_EMAIL = yield secret_manager_client_1.secretManagerClient.getSecretValue("GUENO_EMAIL");
|
|
48
47
|
if (!GUENO_EMAIL) {
|
|
@@ -54,4 +53,4 @@ exports.guenoClient = await (() => __awaiter(void 0, void 0, void 0, function* (
|
|
|
54
53
|
}
|
|
55
54
|
// Create GuenoClient instance and return
|
|
56
55
|
return new GuenoClient(GUENO_EMAIL, GUENO_PASSWORD, process.env.GUENO_ENV);
|
|
57
|
-
})
|
|
56
|
+
});
|
|
@@ -8,5 +8,5 @@ declare class KushkiClient {
|
|
|
8
8
|
createBankPaymentToken(order: Order, user: User | BusinessUser): Promise<any>;
|
|
9
9
|
createBankPayment(order: Order, user: User | BusinessUser, token: string): Promise<any>;
|
|
10
10
|
}
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const buildKushkiClient: () => Promise<KushkiClient>;
|
|
12
12
|
export {};
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.buildKushkiClient = void 0;
|
|
16
16
|
const common_1 = require("@riocrypto/common");
|
|
17
17
|
const axios_1 = __importDefault(require("axios"));
|
|
18
18
|
const secret_manager_client_1 = require("./secret-manager-client");
|
|
@@ -156,11 +156,12 @@ const createKushkiClient = () => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
156
156
|
const kushkiClient = new KushkiClient(KUSHKI_PRIVATE_MERCHANT_ID, process.env.KUSHKI_ENV);
|
|
157
157
|
return kushkiClient;
|
|
158
158
|
});
|
|
159
|
-
|
|
159
|
+
const buildKushkiClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
160
160
|
const KUSHKI_PRIVATE_MERCHANT_ID = yield secret_manager_client_1.secretManagerClient.getSecretValue("KUSHKI_PRIVATE_MERCHANT_ID");
|
|
161
161
|
if (!KUSHKI_PRIVATE_MERCHANT_ID) {
|
|
162
162
|
throw new Error("Unable to get KUSHKI_PRIVATE_MERCHANT_ID");
|
|
163
163
|
}
|
|
164
164
|
const kushkiClient = new KushkiClient(KUSHKI_PRIVATE_MERCHANT_ID, process.env.KUSHKI_ENV);
|
|
165
165
|
return kushkiClient;
|
|
166
|
-
})
|
|
166
|
+
});
|
|
167
|
+
exports.buildKushkiClient = buildKushkiClient;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.buildS3Client = exports.s3 = void 0;
|
|
13
13
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
14
14
|
const secret_manager_client_1 = require("./secret-manager-client");
|
|
15
15
|
class s3 {
|
|
@@ -29,7 +29,7 @@ class s3 {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.s3 = s3;
|
|
32
|
-
|
|
32
|
+
const buildS3Client = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
33
|
const S3_ENDPOINT = yield secret_manager_client_1.secretManagerClient.getSecretValue("S3_ENDPOINT");
|
|
34
34
|
if (!S3_ENDPOINT) {
|
|
35
35
|
throw new Error("Unable to get S3_ENDPOINT");
|
|
@@ -47,4 +47,5 @@ exports.s3Client = await (() => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
47
47
|
throw new Error("Unable to get S3_REGION");
|
|
48
48
|
}
|
|
49
49
|
return new s3(S3_ENDPOINT, S3_REGION, S3_ACCESS_KEY, S3_SECRET_KEY);
|
|
50
|
-
})
|
|
50
|
+
});
|
|
51
|
+
exports.buildS3Client = buildS3Client;
|