-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add key child --path
command for CLI key derivation
#1353
Comments
We must, on relevant paths. |
How will we know whether to use DerivationScheme1 or DerivationScheme2? It seems Byron / Random keys are using derivation scheme 1, but Icarus (and Shelley) is using scheme 2. Do we have to take a |
Yes.
No, rather a |
1370: Add cli `key child` command r=Anviking a=Anviking # Issue Number #1353 # Overview - [x] Preparatory addition of CLI `DerivationIndex` and `DerivationPath` types - [x] Make `mapKey` xprv to hex transformation bidirectional - [x] Add `key child --path` command to cli - [x] Confirming that we can derive an actual wallet address key using `key child` as a manual golden test. # Comments - [ ] Not here: Parsing hexadecimal indexes e.g `0x8000073c` (could be neat 🤷♂ ) Manual example. Note that `to-pub` is not functionality of `cardano-wallet` — yet. ```bash $ cardano-wallet-jormungandr key child --path "2147485500/2147485463/0'/0/0" 588102383ed9ecc5c44e1bfa18d1cf8ef19a7cf806a20bb4cbbe4e511666cf48d6fd7bec908e4c6ced5f0c4f0798b1b619d6b61e6110492b5ebb430f570488f074a9fc9a22f0a61b2ab9b1f1a990e3f8dd6fbed4ad474371095c74db3d9c743a | to-pub eb806fca3bfda11ae14dee52c5ad6564e68e7531c1a1d498a76172898d2841cb3d9078e802011f1580465c80e7040f1e4d8e24f978d23f01c1d2cf18fcf741a7 # Address comes from an actual empty wallet: $ jcli address info addr1sn4cqm728076zxhpfhh993ddv4jwdrn4x8q6r4yc5ash9zvd9pqukyh6fnkrsrsz4w9jvu8hyre20xm7m78jf4kww4h2n5maytuhtflrax9duz discrimination: testing public key: ed25519_pk1awqxlj3mlks34c2daefvttt9vnnguaf3cxsafx98v9egnrfgg89s4y7wfm group key: ed25519_pk1ztayempcpcp2hzexwrmjpu48ndldlrey6m882m4f6d7j97t45l3s5h5gl4 ``` <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
1370: Add cli `key child` command r=Anviking a=Anviking # Issue Number #1353 # Overview - [x] Preparatory addition of CLI `DerivationIndex` and `DerivationPath` types - [x] Make `mapKey` xprv to hex transformation bidirectional - [x] Add `key child --path` command to cli - [x] Confirming that we can derive an actual wallet address key using `key child` as a manual golden test. # Comments - [ ] Not here: Parsing hexadecimal indexes e.g `0x8000073c` (could be neat 🤷♂ ) Manual example. Note that `to-pub` is not functionality of `cardano-wallet` — yet. ```bash $ cardano-wallet-jormungandr key child --path "2147485500/2147485463/0'/0/0" 588102383ed9ecc5c44e1bfa18d1cf8ef19a7cf806a20bb4cbbe4e511666cf48d6fd7bec908e4c6ced5f0c4f0798b1b619d6b61e6110492b5ebb430f570488f074a9fc9a22f0a61b2ab9b1f1a990e3f8dd6fbed4ad474371095c74db3d9c743a | to-pub eb806fca3bfda11ae14dee52c5ad6564e68e7531c1a1d498a76172898d2841cb3d9078e802011f1580465c80e7040f1e4d8e24f978d23f01c1d2cf18fcf741a7 # Address comes from an actual empty wallet: $ jcli address info addr1sn4cqm728076zxhpfhh993ddv4jwdrn4x8q6r4yc5ash9zvd9pqukyh6fnkrsrsz4w9jvu8hyre20xm7m78jf4kww4h2n5maytuhtflrax9duz discrimination: testing public key: ed25519_pk1awqxlj3mlks34c2daefvttt9vnnguaf3cxsafx98v9egnrfgg89s4y7wfm group key: ed25519_pk1ztayempcpcp2hzexwrmjpu48ndldlrey6m882m4f6d7j97t45l3s5h5gl4 ``` <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
1370: Add cli `key child` command r=Anviking a=Anviking # Issue Number #1353 # Overview - [x] Preparatory addition of CLI `DerivationIndex` and `DerivationPath` types - [x] Make `mapKey` xprv to hex transformation bidirectional - [x] Add `key child --path` command to cli - [x] Confirming that we can derive an actual wallet address key using `key child` as a manual golden test. # Comments - [ ] Not here: Parsing hexadecimal indexes e.g `0x8000073c` (could be neat 🤷♂ ) Manual example. Note that `to-pub` is not functionality of `cardano-wallet` — yet. ```bash $ cardano-wallet-jormungandr key child --path "2147485500/2147485463/0'/0/0" 588102383ed9ecc5c44e1bfa18d1cf8ef19a7cf806a20bb4cbbe4e511666cf48d6fd7bec908e4c6ced5f0c4f0798b1b619d6b61e6110492b5ebb430f570488f074a9fc9a22f0a61b2ab9b1f1a990e3f8dd6fbed4ad474371095c74db3d9c743a | to-pub eb806fca3bfda11ae14dee52c5ad6564e68e7531c1a1d498a76172898d2841cb3d9078e802011f1580465c80e7040f1e4d8e24f978d23f01c1d2cf18fcf741a7 # Address comes from an actual empty wallet: $ jcli address info addr1sn4cqm728076zxhpfhh993ddv4jwdrn4x8q6r4yc5ash9zvd9pqukyh6fnkrsrsz4w9jvu8hyre20xm7m78jf4kww4h2n5maytuhtflrax9duz discrimination: testing public key: ed25519_pk1awqxlj3mlks34c2daefvttt9vnnguaf3cxsafx98v9egnrfgg89s4y7wfm group key: ed25519_pk1ztayempcpcp2hzexwrmjpu48ndldlrey6m882m4f6d7j97t45l3s5h5gl4 ``` <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
lgtm. |
Context
ADP-81
The groundwork for CLI key derivation is being established in #1316.
Decision
Implement command for deriving child keys, according to the example:
Acceptance Criteria
Development
key child
command Add CLI command for extracting root xprvs #1321QA
ToText
/FromText
roundtrips, and goldens for many special cases forDerivationPath
andDerivationIndex
inCLISpec
"scheme == mapKey (fromHex . toHex) scheme"
has been extended to confirm that schemes derive the same child keys when round-tripped.The text was updated successfully, but these errors were encountered: