@riocrypto/common-server 1.0.1650 → 1.0.1651
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.
|
@@ -7,5 +7,5 @@ declare class CoinbaseClient {
|
|
|
7
7
|
private getRequestHeaders;
|
|
8
8
|
createMarketOrder(crypto: Crypto, amount: number): Promise<any>;
|
|
9
9
|
}
|
|
10
|
-
export declare const buildCoinbaseClient: () => Promise<CoinbaseClient>;
|
|
10
|
+
export declare const buildCoinbaseClient: (env?: "production" | "sandbox") => Promise<CoinbaseClient>;
|
|
11
11
|
export {};
|
|
@@ -83,13 +83,13 @@ class CoinbaseClient {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
const buildCoinbaseClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
+
const buildCoinbaseClient = (env) => __awaiter(void 0, void 0, void 0, function* () {
|
|
87
87
|
// Retrieve secrets asynchronously
|
|
88
88
|
const COINBASE_API_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("COINBASE_API_KEY");
|
|
89
89
|
if (!COINBASE_API_KEY) {
|
|
90
90
|
throw new common_1.SecretManagerError();
|
|
91
91
|
}
|
|
92
92
|
// Create GuenoClient instance and return
|
|
93
|
-
return new CoinbaseClient(COINBASE_API_KEY);
|
|
93
|
+
return new CoinbaseClient(COINBASE_API_KEY, env);
|
|
94
94
|
});
|
|
95
95
|
exports.buildCoinbaseClient = buildCoinbaseClient;
|