Skip to content
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

export seed to stdout for Solana CLI usage #301

Merged
merged 2 commits into from
Jan 7, 2023
Merged

Conversation

lthiery
Copy link
Contributor

@lthiery lthiery commented Jan 3, 2023

The command helium-wallet export retains its behavior, which displays the encrypted seed in JSON encoded in a QR-code. helium-wallet export --format qr explicitly selects this option.

Meanwhile, helium-wallet export --format seed will output to stdout the seed in a byte array encoded as a string. This allows the user to put the output into id.json, for example, and to use it with the Solana CLI.

@lthiery lthiery requested a review from madninja January 3, 2023 19:59
@lthiery lthiery marked this pull request as ready for review January 3, 2023 19:59
src/keypair.rs Outdated Show resolved Hide resolved
@lthiery lthiery requested a review from madninja January 6, 2023 19:15
lthiery and others added 2 commits January 7, 2023 14:22
use serde_json to create string of array of numbers

fix comment

fix fn doc

Use libaray features

* Use the fact that an ed25519 keypair is a private/public key in sequence
* Use the `json!` macro instead of implementing json conversion ourselves

move json formatting to cli layer

Seperates concerns better and makes testing in keypair concise

fix some comments

remove extraneous error message

remove informational output s.t. export can be piped to file

Fix unused use statement
@madninja madninja merged commit 207974e into master Jan 7, 2023
@madninja madninja deleted the lthiery/solana-export branch January 7, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants