Skip to content

Commit

Permalink
Merge pull request #121 from Concordium/recover-id-without-seedphrase
Browse files Browse the repository at this point in the history
Implement recovery from generated secrets
  • Loading branch information
abizjak authored Dec 15, 2023
2 parents 79d8cee + 0bd9573 commit be01fa9
Show file tree
Hide file tree
Showing 2 changed files with 320 additions and 72 deletions.
31 changes: 29 additions & 2 deletions recover-id-object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,32 @@ To build run `cargo build --release`. This produces the binary `target/release/r

## Run

See `--help` for the list of all the options. The tool requires access to the
seed phrase to be used for recovery.
See `--help` for the list of all the options. The tool has two modes: `generate-secrets` and `recover-identity`.

### Generate secrets

`generate-secrets` generates secrets for the recovery requests based on a seed phrase, the identity provider index, and the identity index.
It outputs the secrets to standard output.

E.g.

```bash
recover-id-object generate-secrets --concordium-wallet <PATH_TO_SEED_PHRASE> --ip-index ... --id-index (* other args *)
```

### Recover identity

`recover-identity` recovers the identity objects based on either a seed phrase or the secrets generated by `generate-secrets` and writes the recovered identity object to a JSON file.

To recover with a seed phrase, run:

```bash
recover-id-object recover-identity --concordium-wallet <PATH_TO_SEED_PHRASE> --ip-index ... (* other args *)
```

To recover with the secrets generated by `generate-secrets`, run:

```bash
recover-id-object recover-identity --prf-key <PRF_KEY> --id-cred-sec <ID_CRED_SEC> --id-index <ID_INDEX> --ip-index ... (* other args *)

```
Loading

0 comments on commit be01fa9

Please sign in to comment.