Commit Graph

80 Commits

Author SHA1 Message Date
Tyera Eulberg 4ddbf8d509
CLI: dynamic signing reboot (#8384)
* Add keypair_util_from_path helper

* Cli: impl config.keypair as a trait object

* SDK: Add Debug and PartialEq for dyn Signer

* ClapUtils: Arg parsing from pubkey+signers to Presigner

* Impl Signers for &dyn Signer collections

* CLI: Add helper for getting signers from args

* CLI: Replace SigningAuthority with Signer trait-objs

* CLI: Drop disused signers command field

* CLI: Drop redundant tests

* Add clap validator that handles all current signer types

* clap_utils: Factor Presigner resolution to helper

* SDK: `From` for boxing Signer implementors to trait objects

* SDK: Derive `Clone` for `Presigner`

* Remove panic

* Cli: dedup signers in transfer for remote-wallet ergonomics

* Update docs vis-a-vis ASK changes

* Cli: update transaction types to use new dynamic-signer methods

* CLI: Fix tests No. 1

what to do about write_keypair outstanding

* Work around `CliConfig`'s signer not necessarily being a `Keypair`

* CLI: Fix tests No. 2

* Remove unused arg

* Remove unused methods

* Move offline arg constants upstream

* Make cli signing fallible

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2020-02-21 14:55:53 -07:00
Tyera Eulberg ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Tyera Eulberg c350543b46
Make generate_remote_keypair more generic for potential other remote-wallets (#8274) 2020-02-14 09:38:35 -07:00
Tyera Eulberg 2374cf09e2
Enable remote-wallet signing in solana-keygen (#8267)
* Add fallible methods to KeypairUtil

* Add RemoteKeypair struct and impl KeypairUtil

* Implement RemoteKeypair in keygen; also add parse_keypair_path for cleanup
2020-02-13 14:08:34 -07:00
Greg Fitzgerald 127553ce4b
Wrap ed25519_dalek::Keypair (#8247) 2020-02-12 14:15:12 -07:00
Tyera Eulberg 25d1f841ee
Fixup sign_transaction; pass derivation_path by reference (#8194)
* Fixup sign_transaction; pass derivation_path by reference

* Pass total message length as BE u16

* Remove live integration tests (to ledger-app-solana)
2020-02-11 11:45:00 -07:00
Tyera Eulberg ed0c1d3b52
Ledger hardware wallet integration (#8068)
* Initial remote wallet module

* Add clap derivation tooling

* Add remote-wallet path apis

* Implement remote-wallet in solana-keygen

* Implement remote-wallet in cli for read-only pubkey usage

* Linux: Use udev backend; add udev rules tool

* Ignore Ledger live test

* Cli api adjustments
2020-02-07 11:26:56 -07:00
Tyera Eulberg fab8ef379f
Use solana-cli config keypair in solana-keygen (#8074)
* Use solana-cli config keypair in solana-keygen

* s/infile/keypair for consistency across modules and more generality across access methods

* Move config into separate crate
2020-01-31 19:27:37 -07:00
Michael Vines 015e696077
Solana keygen grind improvements (#8008)
automerge
2020-01-28 20:19:19 -08:00
Justin Starry 186709ed75
cli: Confirm recovered pubkeys (#7316)
* cli: Confirm recovered pubkeys

* cargo clippy
2019-12-06 09:55:00 -05:00
sakridge 95e1404a2b
Add verify of keypair (#7301) 2019-12-05 14:32:42 -08:00
Justin Starry e1b7f40c2b
Allow generation of longer seed phrases with keygen (#7210) 2019-12-03 23:39:45 -05:00
Justin Starry b874441a47
Prevent passphrase mistakes with confirmation prompt (#7207) 2019-12-02 22:42:42 -05:00
Justin Starry 4fe1716c7a
solana-keygen: Support pubkey recovery directly from seed phrase (#7149) 2019-11-26 15:30:07 -05:00
Trent Nelson 506ff5809e
keygen: Support not writing keypairs to disk (#7136)
* keygen: Add flag to prevent new from writing keypair to disk

* check_for_overwrite bails, do it before prompts
2019-11-25 22:43:03 -07:00
Justin Starry eaa3e87eb0 Support passphrases in keygen (#7134)
* Support passphrases in keygen

* remove short

* Update solana_keygen calls
2019-11-25 21:33:15 -07:00
Ryo Onodera 4fc767b3f6
Move version! from core:: to clap_utils:: (#6944)
* Move version! from core to clap-utils

* Completely move version! from core:: to clap_utils::

* rustfmt

* Do remaining transition after rebase
2019-11-14 13:10:38 +09:00
Trent Nelson 71bf8c5f85 Keygen grind fix and improve --ignore-case (#6901)
* keygen: grind --ignore-case was not honored

* keygen: Improve grind --ignore-case ergonomics

Don't silently require the user to know their search term needs to be lowercase

* fmt
2019-11-12 14:24:37 -07:00
Rob Walker a1fe6265fd
use pubkeys in genesis (#6750) 2019-11-06 11:18:25 -08:00
Michael Vines 3938142535
keygen: add dedicated `solana-keygen grind` command (#6697)
* Remove dead code

* Speed up vanity key grinding
2019-11-03 19:41:26 -08:00
Michael Vines 83d5115a02
Add --starts-with for vanity key grinding (#6647) 2019-10-30 20:47:42 -07:00
Trent Nelson 9cde67086f
solana-keygen - Poor mans keypair encryption (#6259)
* SDK: Refactor (read|write)_keypair

Split file opening and data writing operations
Drop filename == "-" stdio signal. It is an app-level feature

* keygen: Move all non-key printing to stderr

* keygen: Adapt to SDK refactor

* keygen: Factor keypair output out to a helper function
2019-10-10 17:01:03 -06:00
Justin Starry 8f5a1535af
Add mnenomic keypair generation and recovery to cli (#5889)
* Add mnenomic keypair generation and recovery to cli

* Use password input to retrieve mnemonic phrase

* Direct users without keypair file to use solana-keygen
2019-09-12 18:37:29 -07:00
Michael Vines a9f73ea321 solana-keygen no longer blindly overwrites a keypair, or assumes "new" (#4599)
automerge
2019-06-07 17:54:54 -07:00
Rob Walker f7680752e7 make gen_keypair_file take &str (#4232)
automerge
2019-05-08 23:00:48 -07:00
Michael Vines 4efada6d84
Update keygen.rs 2019-04-23 19:24:42 -07:00
Tyera Eulberg 37494c67d0 Add pubkey read/write tools
Co-authored-by: Tyera Eulberg <tyera@solana.com>
Co-authored-by: Tristan Debrunner <tristan@solana.com>
2019-03-28 20:04:32 -06:00
Michael Vines bb420cb995 Use crate_description and crate_name Clap macros 2019-03-14 00:35:34 -05:00
Michael Vines fd562cb9e2 Rust 2018 cleanup 2018-12-14 21:57:15 -08:00
Michael Vines 282d4a3563 Move solana-keygen into keygen/ 2018-12-13 01:06:40 -08:00