@riocrypto/common-server 1.0.558 → 1.0.559

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.
@@ -12,5 +12,5 @@ declare class BitstampClient {
12
12
  }>;
13
13
  getTransactions(): Promise<any>;
14
14
  }
15
- export declare const bitstampClient: Promise<BitstampClient>;
15
+ export declare const bitstampClient: BitstampClient;
16
16
  export {};
@@ -81,7 +81,7 @@ class BitstampClient {
81
81
  });
82
82
  }
83
83
  }
84
- exports.bitstampClient = (() => __awaiter(void 0, void 0, void 0, function* () {
84
+ exports.bitstampClient = await (() => __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");
@@ -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 fireblocksClient: Promise<FireblocksClient>;
16
+ export declare const fireblocksClient: FireblocksClient;
17
17
  export {};
@@ -143,7 +143,7 @@ class FireblocksClient {
143
143
  });
144
144
  }
145
145
  }
146
- exports.fireblocksClient = (() => __awaiter(void 0, void 0, void 0, function* () {
146
+ exports.fireblocksClient = await (() => __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");
@@ -4,5 +4,5 @@ declare class FixerClient {
4
4
  constructor(apiKey: string);
5
5
  convert(from: Fiat, to: Fiat): Promise<number>;
6
6
  }
7
- export declare const fixerClient: Promise<FixerClient>;
7
+ export declare const fixerClient: FixerClient;
8
8
  export {};
@@ -32,7 +32,7 @@ class FixerClient {
32
32
  });
33
33
  }
34
34
  }
35
- exports.fixerClient = (() => __awaiter(void 0, void 0, void 0, function* () {
35
+ exports.fixerClient = await (() => __awaiter(void 0, void 0, void 0, function* () {
36
36
  // Retrieve secret asynchronously
37
37
  const FIXER_API_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("FIXER_API_KEY");
38
38
  if (!FIXER_API_KEY) {
@@ -6,5 +6,5 @@ declare class GuenoClient {
6
6
  getAddressRiskScore(address: string, protocol: Crypto): Promise<any>;
7
7
  getAccessToken(): Promise<any>;
8
8
  }
9
- export declare const guenoClient: Promise<GuenoClient>;
9
+ export declare const guenoClient: GuenoClient;
10
10
  export {};
@@ -42,7 +42,7 @@ class GuenoClient {
42
42
  });
43
43
  }
44
44
  }
45
- exports.guenoClient = (() => __awaiter(void 0, void 0, void 0, function* () {
45
+ exports.guenoClient = await (() => __awaiter(void 0, void 0, void 0, function* () {
46
46
  // Retrieve secrets asynchronously
47
47
  const GUENO_EMAIL = yield secret_manager_client_1.secretManagerClient.getSecretValue("GUENO_EMAIL");
48
48
  if (!GUENO_EMAIL) {
@@ -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 kushkiClient: Promise<KushkiClient>;
11
+ export declare const kushkiClient: KushkiClient;
12
12
  export {};
@@ -156,4 +156,11 @@ 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
- exports.kushkiClient = createKushkiClient();
159
+ exports.kushkiClient = await (() => __awaiter(void 0, void 0, void 0, function* () {
160
+ const KUSHKI_PRIVATE_MERCHANT_ID = yield secret_manager_client_1.secretManagerClient.getSecretValue("KUSHKI_PRIVATE_MERCHANT_ID");
161
+ if (!KUSHKI_PRIVATE_MERCHANT_ID) {
162
+ throw new Error("Unable to get KUSHKI_PRIVATE_MERCHANT_ID");
163
+ }
164
+ const kushkiClient = new KushkiClient(KUSHKI_PRIVATE_MERCHANT_ID, process.env.KUSHKI_ENV);
165
+ return kushkiClient;
166
+ }))();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.558",
3
+ "version": "1.0.559",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",