cosmos-sdk/client/keys
Gianguido Sora deaee53111
CLI/keys: define default supported keyring algorithms (#8825)
* define package-level supported Keyring algorithms

This commit lets developer define what algorithms Keyring supports instead of relying on just keyring.New options.

This change is needed since it allows us to support those algorithms in CLI commands too without subverting their current execution flow.

* read dry run cli flag as persistent command flag

* add dry run field to CLI command handling context

* use CLI context keyring instead of creating a new one

* keyring supported algorithms are used as if they were defaults, name them as such

* --dry-run value is now associated to client.context.Simulate

Since Simulate is now used in both tx and query commands, move its reading routine into ReadPersistentCommandFlags.

Removed DryRun from Context, since it's not needed anymore.

* rename supported algorithms variable

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* remove keyring algorithms global, let user set them via client.Context methods

* remove old keyring globals test

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-03-18 08:27:03 +00:00
..
testdata/keys/keys.db crypto/keyring: fix offline keys migration (#8639) 2021-03-01 12:41:49 +00:00
add_ledger_test.go Deprecate SetFullFundraiserPath in favor of SetPurpose and SetCoinType (#8629) 2021-02-22 15:14:09 +00:00
add_test.go Merge PR #7485: keyring-dir flag 2020-10-08 13:41:35 -04:00
add.go CLI/keys: define default supported keyring algorithms (#8825) 2021-03-18 08:27:03 +00:00
codec_test.go Enter the new keyring interface (#5904) 2020-04-08 11:38:28 +02:00
codec.go rename RegisterCodec to RegisterLegacyAminoCodec (#7243) 2020-09-07 14:47:12 +00:00
delete_test.go keyring: remove hardcoded default passphrase on NewMnemonic (#8662) 2021-02-23 16:49:09 +00:00
delete.go Combine client.ReadTxCommandFlags with GetClientContextFromCmd (#8155) 2020-12-14 22:09:51 +00:00
export_test.go Deprecate SetFullFundraiserPath in favor of SetPurpose and SetCoinType (#8629) 2021-02-22 15:14:09 +00:00
export.go Combine client.ReadTxCommandFlags with GetClientContextFromCmd (#8155) 2020-12-14 22:09:51 +00:00
import_test.go Merge PR #7485: keyring-dir flag 2020-10-08 13:41:35 -04:00
import.go Combine client.ReadTxCommandFlags with GetClientContextFromCmd (#8155) 2020-12-14 22:09:51 +00:00
list_test.go Deprecate SetFullFundraiserPath in favor of SetPurpose and SetCoinType (#8629) 2021-02-22 15:14:09 +00:00
list.go Combine client.ReadTxCommandFlags with GetClientContextFromCmd (#8155) 2020-12-14 22:09:51 +00:00
migrate_test.go crypto/keyring: fix offline keys migration (#8639) 2021-03-01 12:41:49 +00:00
migrate.go Rename InfoImporter -> LegacyInfoImporter (#8739) 2021-03-01 20:09:01 +00:00
mnemonic_test.go testutil: add ApplyMockIODiscardOutErr, simplify existing functions (#6665) 2020-07-10 08:55:48 +02:00
mnemonic.go keys: CLI Remove Viper (#6613) 2020-07-06 19:50:09 +00:00
parse_test.go build(deps): bump github.com/spf13/viper from 1.6.3 to 1.7.0 (#6183) 2020-05-11 10:22:36 +02:00
parse.go Limit context background (#8093) 2021-02-03 09:47:25 +00:00
root_test.go Add home default to other commands. (#6789) 2020-07-20 15:12:33 +00:00
root.go Merge PR #7485: keyring-dir flag 2020-10-08 13:41:35 -04:00
show_test.go Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419) 2020-11-09 16:01:43 +00:00
show.go Combine client.ReadTxCommandFlags with GetClientContextFromCmd (#8155) 2020-12-14 22:09:51 +00:00
types_test.go Replace defer with testing.T.Cleanup() (#5732) 2020-03-02 00:16:23 +00:00
types.go crypto/keys: move keybase and keyring to crypto/keyring/ dir (#5866) 2020-03-25 15:20:36 +00:00
utils.go Minor Code Cleanup - gRPC queries (#6862) 2020-07-28 12:53:35 +00:00