Commit Graph

18 Commits

Author SHA1 Message Date
Tyera Eulberg ed53a70b5c
Cli: transfer ALL; check spend+fee in client (#10012)
* lamports->SOL in user-facing error msg

* Check for sufficient balance for spend and fee

* Add ALL option to solana transfer

* Rework TransferAmount to check for sign_only in parse

* Refactor TransferAmount & fee-check handling to be more general

* Add addl checks mechanism

* Move checks out of cli.rs

* Rename to SpendAmount to be more general & move

* Impl ALL/spend helpers for create-nonce-account

* Impl spend helpers for create-vote-account

* Impl ALL/spend helpers for create-stake-account

* Impl spend helpers for ping

* Impl ALL/spend helpers for pay

* Impl spend helpers for validator-info

* Remove unused fns

* Remove retry_get_balance

* Add a couple unit tests

* Rework send_util fn signatures
2020-05-14 12:24:14 -06:00
Tyera Eulberg 6077458ad8
Cli: enable flexible flexible signer paths for pubkey args (#8892)
automerge
2020-03-16 15:17:13 -07:00
Trent Nelson fbf2dd1672
CLI: Error message cleanup (#8804)
automerge
2020-03-12 23:20:49 -07:00
Michael Vines 13551885c2 --wait-for-supermajority now requires a SLOT 2020-03-02 12:59:35 -07:00
Tyera Eulberg 6b99ab3a57
Ledger key path rework (#8453)
automerge
2020-02-25 16:41:21 -08:00
Tyera Eulberg 12a9b5f35e
CLI: collect and deduplicate signers (#8398)
* Rename (keypair util is not a thing)

* Add method to generate_unique_signers

* Cli: refactor signer handling and remote-wallet init

* Fixup unit tests

* Fixup intergation tests

* Update keypair path print statement

* Remove &None

* Use deterministic key in test

* Retain storage-account as index

* Make signer index-handling less brittle

* Cache pubkey on RemoteKeypair::new

* Make signer_of consistent + return pubkey

* Remove &matches double references

* Nonce authorities need special handling
2020-02-24 17:03:30 -07:00
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
Michael Vines 335675c51c
install: support vX.Y.Z in addition to X.Y.Z (#8297)
automerge
2020-02-14 19:35:40 -08: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
Trent Nelson d854e90c23
CLI: Support offline authorities (#7905) 2020-01-22 10:10:22 -07:00
Michael Vines 4b3bc587ab Add input validation for --creation-time/--lockup-date args (#7646)
automerge
2019-12-30 21:57:47 -08:00
Tyera Eulberg 11521dca08
Use is_amount clap validator (#7400)
* Fix up is_amount to handle floats for SOL; expand amount_of test

* Use required_lamports_from and is_amount across CLI

* Remove obsolete test (now handled by clap)
2019-12-10 11:29:17 -07:00
Jack May a03062af4f Add CLI commands for nonces (#7329)
automerge
2019-12-10 00:24:44 -08:00
Parth ba688cf629
enforce proper range for rent burn_percent (#7217)
* enforce proper range for burn_percent
2019-12-04 00:54:01 +05:30
Jack May 88cb0c6ae3
Add offline signing support to CLI (#7104) 2019-11-25 21:09:57 -08:00
Justin Starry b8cd0a1bc0
Allow secure keypair input for `solana-archiver` and `solana` cli tools (#7106)
* Add seed phrase keypair recover to archiver

* Add seed phrase keypair to cli with ASK keyword

* cli main tweaks
2019-11-23 11:55:43 -05:00
Michael Vines b0271394cd
Clean up --gossip-port argument (#7067)
--gossip-port now specifies exactly that, the gossip port to use.  The
new --gossip-host argument can be used to specify the DNS name/IP
address for gossip if --entrypoint is not supplied (when --entrypoint is
supplied, the gossip address is automatically set to the node's ip
address as observed by the entrypoint)
2019-11-20 15:21:34 -07:00
Ryo Onodera d84f367317
Extract duplicate clap helpers into clap-utils (#6812) 2019-11-12 09:42:08 +09:00