-
Build or Release Platform: MacOS 10.12 or higher
-
Node Version: Check
.nvmrc
for current version. -
Docker - https://docs.docker.com/get-docker/
git clone [email protected]:BitGo/wallet-recovery-wizard.git
cd wallet-recovery-wizard
npm i
npm run dev
The WRW depends on the BitGo SDK (https://github.com/BitGo/BitGoJS) for its underlying recovery logic. In order to add support for a new coin, you need to make sure the recover
function has been properly implemented in the SDK.
- For UTXO coins, you could reuse or extend the current implementation in
BitGoJS/modules/core/src/v2/coins/abstractUtxoCoin.ts
- For account-based coins, you can reference
BitGoJS/modules/core/src/v2/coins/eth.ts
as an example
Besides the BitGo SDK, the WRW also depends on third-party nodes or block explorers.
- Since recovery transactions need to be constructed without BitGo, we rely on using 3rd-party nodes to query address or account balances.
- For UTXO coins, an API endpoint is needed to implement the
getAddressInfoFromExplorer
andgetUnspentInfoFromExplorer
functions, which are used inrecover
. Blockchair provide universal API interface for multiple coins, such as BTC and LTC. You may also find your own explorer. Note that UTXO-coin recovery tends to generate many calls to the full node, since it need to rederive addresses based on key information and check for remaining funds in each derived address. Be aware that rate limit might be reached. - For account-based coins, there are no shared functions defined in the parent class. Each coin class may have its own functions that communicate with a third-party node. For example, the ETH recovery has
recoveryBlockchainExplorerQuery
whereas EOS recovery hasgetDataFromNode
.
npm run bump-bitgo-versions
- Once the changes are merged in the SDK and a new SDK is released, you now can update the SDK version in the WRW, and start to build out the WRW’s front end features.
You can test out a release by running npm run build
. This will give you a packaged target in /release
.
- Note that in order to run the build script, you'll either need python available at
/usr/bin/python
, or you can set an environment variablePYTHON_PATH
. You can set the variable by runningexport PYTHON_PATH=$(which python)
. - If you encounter the error
libtool is required, but wasn't found on this system
, you'll need to installsodium
using these instructions.
- Navigate to the GHA release workflow page, and click on
Run workflow
- Enter the version number for the next release. This should be a semantic version.
- Click on
Run workflow
. - The workflow will create a draft release in the releases page.
- Validate that the release notes are accurate, and that the artifacts are working correctly.
- Publish the release in GitHub. This will also create a git tag in the repository.
- Go to Slack on
#eng-wrw
and announce the release with the link to GitHub release page.