Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coboglobal/cobo-mpc-recovery-kits
https://github.com/coboglobal/cobo-mpc-recovery-kits
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/coboglobal/cobo-mpc-recovery-kits
- Owner: CoboGlobal
- Created: 2022-12-27T11:58:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T00:16:49.000Z (5 months ago)
- Last Synced: 2024-06-26T11:29:39.981Z (5 months ago)
- Language: Go
- Size: 62.5 KB
- Stars: 5
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cobo MPC Recovery Kits
Cobo MPC WaaS provides `Hard Key Recovery` for disaster recovery. The tool named `cobo-mpc-recovery-tool`
in this repository can reconstruct the MPC private key that corresponds to the Cobo MPC wallet.Binary archives are published at https://github.com/CoboCustody/cobo-mpc-recovery-kits/releases
## Building the source
Building binary from the source in local environment, instead of using published binary archives
* Go 1.21 is required. Manually install Go, please [click here](https://go.dev/doc/install)
* Clone the repository:
```
git clone https://github.com/CoboCustody/cobo-mpc-recovery-kits.git
```
* Enter the directory
```
cd cobo-mpc-recovery-kits
```* Build `cobo-mpc-recovery-tool`
```
make tool
```
Binary executable found in the `build` directory## Commands
### Recovery command
Reconstruct all MPC key shares in TSS recovery group files, and derive the child private keys of all wallet addresses under the Cobo MPC wallet
```
cobo-mpc-recovery-tool [flags]
```
| flags | Description |
|:---------------------:|---------------------------------------------------------------------------------------------------------------|
| csv-file | address csv file, contains HD derivation paths |
| csv-output-dir | address csv output dir, derive keys file output in this directory (default "recovery") |
| group-id | recovery group id |
| recovery-group-files | TSS recovery group files, such as recovery/recovery-secrets-node1-time1,recovery/recovery-secrets-node2-time2 |
| paths | key HD derivation paths |
| show-root-private-key | show TSS root private key |### Verify command
Verify all TSS recovery group files are valid
```
cobo-mpc-recovery-tool verify [flags]
```| flags | Description |
|:--------------------:|---------------------------------------------------------------------------------------------------------------|
| group-id | recovery group id |
| recovery-group-files | TSS recovery group files, such as recovery/recovery-secrets-node1-time1,recovery/recovery-secrets-node2-time2 |### Derive command
Derive the child public key and addresses based on the paths and token
```
cobo-mpc-recovery-tool derive [flags]
```| flags | Description |
|:-----:|-------------------------|
| key | extended root key |
| paths | key HD derivation paths |
| token | token |## Running
* Prerequisites
* Acquire TSS recovery group files (JSON format) that contain exported MPC key shares.
* Passphrase of each TSS recovery group file* Create a new recovery folder in the same directory level as `cobo-mpc-recovery-tool`, and paste the TSS recovery group files
under the recovery folder```
├── cobo-mpc-recovery-tool
└── recovery
├── recovery-secrets--
└── recovery-secrets--
```* Execute the verify command
```
./cobo-mpc-recovery-tool verify \
--recovery-group-files recovery/recovery-secrets--,recovery/recovery-secrets-- \
--group-id
```* (Optional) Locate the address.csv file after manually exporting the address information from Cobo Custody Web.
Please paste address.csv under the recovery folder
```
├── cobo-mpc-recovery-tool
└── recovery
├── address.csv
├── recovery-secrets--
└── recovery-secrets--
```* Execute the recovery command
Adding flag `--csv-file recovery/address.csv` or `--paths` are optional and alternative to recovery command
```
./cobo-mpc-recovery-tool \
--recovery-group-files recovery/recovery-secrets--,recovery/recovery-secrets-- \
--group-id \
--show-root-private-key
```
The MPC root private key and the MPC root extended public key will be reconstructed and shown in logs.* Once the execution completed, if flag `--csv-file recovery/address.csv` added, all child private keys will be saved
under the `recovery/address-recovery-