Commit Graph

12 Commits

Author SHA1 Message Date
Alexander Bezobchuk de7885a594
keys: CLI Remove Viper (#6613)
* init commit

* Update ListKeysCmd

* updates

* updates

* test updates

* fix tests

* keys: Fix Test_runAddCmdLedgerWithCustomCoinType

* keys: Fix Test_runAddCmdLedger

* keys: Fix Test_runAddCmdBasic

* keys: Fix root tests

* keys: Fix Test_runMigrateCmd

* keys: Fix Test_runListCmd

* keys: Fix remaining tests
2020-07-06 19:50:09 +00:00
Alessio Treglia a1feca39c2
Enter the new keyring interface (#5904)
crypto/keyring:

`Keybase` interface gives way to its successor: `Keyring`. `LegacyKeybase`
interface is added in order to guarantee limited backward compatibility with
the old `Keybase` interface for the sole purpose of migrating keys across
the new keyring backends.

The package no longer depends on the `github.com/types.Config`
singleton.

`SupportedAlgos` and `SupportedLedgerAlgos` methods have been removed.
The keyring just fails when trying to perform an action with an unsupported
algorithm.

crypto/ subdirs reorganization:

`crypto/keys/hd` was moved to `crypto/hd`, which now groups together
all HD wallets related types and utilities.

client/input:

* Removal of unnecessary `GetCheckPassword`, `PrintPrefixed` functions.
* `GetConfirmation`'s signature changed to take in a io.Writer for better integration
  with `cobra.Command` types.

client/context:

* In-memory keyring is allocated in the context when `--gen-only` flag is passed
  in. `GetFromFields` does no longer silently allocate a keyring, it takes one as
  argument.

Co-authored with @jgimeno

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2020-04-08 11:38:28 +02:00
Alessio Treglia 206a511fa9
Use cosmos' fork of github.com/bartekn/go-bip39 (#5867)
Thanks @fedekunze for pointing this out.
2020-03-25 00:46:10 +01:00
Austin Abell 0e28da23e7 Interchangable PrivKey implementations in keybase (#5278)
Allow for the keybase to be configured to override the implementation
of the key that is saved to the keybase.

Closes: #4941
2019-12-12 21:52:24 +00:00
Marko 3a4f1fc4d4 Merge PR #4881: Linting Galore 2019-08-19 12:06:27 -04:00
Alessio Treglia 7b5e6cee07
Remove client/input.{Buffer,Override}Stdin() functions (#4602)
Cobra's new release made them redundant.

Thanks: Juan Leni <juan.leni@zondax.ch> for the original patch.
2019-06-22 11:24:59 +02:00
frog power 4000 73e5ef7c13 reduce module interdependancy, /client refactor (#4415)
* abstract staking BuildCreateValidatorMsg, genutil defines its own flags

* client/ refactor

* staking move keys from keeper to types
2019-05-28 09:44:04 +01:00
Alessio Treglia e7e3c32204 Merge PR #3553: Code cleanup, take #1
* add a bunch of tests, add DONTCOVER text tag

- Also fix flaky test (closes: #3559). Don't test values
  returned by queries since there's no way to query a
  specific height via REST.

* GetTempDir -> NewTestCaseDir
2019-02-08 22:45:41 +01:00
Juan Leni b5fdb83830 Merge PR #3517: Increasing test coverage in keys/client package 2019-02-08 12:45:23 -08:00
Juan Leni f5ada58780 Merge PR #3461: GaiaCLI - refactor/fix --account and --index 2019-02-05 08:22:56 -08:00
Alessio Treglia 24a1670cf0 Run make format 2018-12-10 14:27:25 +00:00
Ethan Buchman 1ee8deed2b Merge PR #2090: Improve crypto/keys and add `keys mnemonic` and `keys new` commands
* crypto/keys/hd: use btcec to remove dep on tendermint

* crypto/keys/bcrypt: improve comment about fork

* crypto/keys/bip39 -> crypto/keys/bip39/fundraiser

* crypto/keys/bip39: bring in fork of tyler-smith

* crypto/keys/hd: update dep

* crypto/keys: update deps

* crypto/keys: move mintkey.go into new crypto/keys/mintkey

* crypto/keys/hd: NewParamsFromPath

* crypto/keys: keybase.Derive takes a bip39 passphrase too

* crypto/keys/hd: BIP44Params.DerivationPath

* gaiacli keys: add commands new and mnemonic

* fix lints

* minor fixes from review

* update Gopkg.toml

* add tendermint fork of golang.org/x/crypto
* pin some transitive deps

* crypto/keys/bcrypt: remove

* remove in favour of fork of golang.org/x/crypto/bcrypt at github.com/tendermint/crypto/bcrypt

* crypto/keys/bip39: remove completely

* use fork cosmos/go-bip39 instead

* Gopkg.toml: dont use master

* Pull in changes from my PR

* fixes from review

* enforce min len for --unsafe-entropy

* lint fix

* feedback from review

* fix dep
2018-10-17 13:37:58 -04:00