Subcommand for generating and printing wallets #17

Closed
opened 2024-11-26 19:18:44 +00:00 by ryan · 1 comment
Owner

Because icepick takes key derivation requests from the previous command, two commands need to be run. Example:

icepick sol generate-wallet --account 0 | icepick sol print-wallet | jq -r .blob

My concern with this is that generate-wallet doesn't actually generate the wallet, it just tells the next invocation of icepick that it should generate the keys to be used for that wallet.

> {"blob": null, "derived-keys": [], "operation": "generate-wallet", "args": {"account": 0}}
< {"blob": null, "derivation-accounts": [0]}
> {"blob": null, "derived-keys": [<the derived key>], "operation": "print-wallet", "args": {}}
< {"blob": "HZ1Jov....BCt3", "derivation-accounts": []}
Because icepick takes key derivation requests from the previous command, two commands need to be run. Example: ```sh icepick sol generate-wallet --account 0 | icepick sol print-wallet | jq -r .blob ``` My concern with this is that `generate-wallet` doesn't _actually_ generate the wallet, it just tells the _next_ invocation of `icepick` that it should generate the keys to be used for that wallet. ``` > {"blob": null, "derived-keys": [], "operation": "generate-wallet", "args": {"account": 0}} < {"blob": null, "derivation-accounts": [0]} > {"blob": null, "derived-keys": [<the derived key>], "operation": "print-wallet", "args": {}} < {"blob": "HZ1Jov....BCt3", "derivation-accounts": []} ```
ryan added this to the Custody Framework project 2024-11-26 19:22:40 +00:00
Author
Owner

Changed operation to get-wallet-address to make it less CLI oriented.

% cargo run -q --bin icepick -- sol generate-wallet --account 0 | cargo run -q --bin icepick -- sol get-wallet-address | jq -r .blob
AC5AMLptyXNTdDkR69h3sGEs65otDoPDaUf9jvvQgqr9
Changed operation to get-wallet-address to make it less CLI oriented. ``` % cargo run -q --bin icepick -- sol generate-wallet --account 0 | cargo run -q --bin icepick -- sol get-wallet-address | jq -r .blob AC5AMLptyXNTdDkR69h3sGEs65otDoPDaUf9jvvQgqr9 ```
ryan closed this issue 2024-12-05 20:47:07 +00:00
ryan added this to the Icepick v0.1.0 milestone 2024-12-12 20:33:52 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: public/icepick#17
No description provided.