From 7ac08999769f860be1a2762cb1750fde9c3abf42 Mon Sep 17 00:00:00 2001 From: Darius Parvin Date: Mon, 7 Mar 2022 15:51:06 -0800 Subject: [PATCH] docs: add documentation for fetchEncryptedPrivKeys.ts add a description of how to run fetchEncryptedPrivKeys.ts Ticket: BG-43925 --- modules/express/EXTERNAL_SIGNER.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/express/EXTERNAL_SIGNER.md b/modules/express/EXTERNAL_SIGNER.md index e4186efe2a..71dc930855 100644 --- a/modules/express/EXTERNAL_SIGNER.md +++ b/modules/express/EXTERNAL_SIGNER.md @@ -23,6 +23,13 @@ Here is an example json file containing two wallet IDs and their corresponding e } ``` +To help with the creation of this JSON file, we have created a file that will fetch the encrypted private keys from BitGo and produce a JSON file with the correct format (including the addition of escape characters). +The file is located at `src/fetchEncryptedPrivKeys.ts`. Before using this tool, you'll need to fill in the `TODOs` by providing a valid `accessToken` as well as the list of `walletIds`, grouped by the cryptocurrency. +An example is provided in the file. To run the file, use the command: +``` +yarn ts-node +``` + ### Wallet passphrase environment variable In order for the external signer instance of BitGo Express to decrypt the private key, the wallet passphrase must be set as an environment variable in the format `WALLET__PASSPHRASE`. Note that the wallet passphrase must be set for each wallet. The environment variable can be set using `export`. For example, the wallet passphrases for the private keys above can be set with the following: