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>
Keyrings store keys by name and hexbytes representation
of address. This turns keyring internal storage more
chain-agnostic and types.Config independent.
Obsolete Keybase internal state representation is not affected.
crypto.LedgerShowAddress() is a ledger specific function
and should takes acc address prefix instead of depending
on a sdk.Config singleton.
crypto/keys/mintkey:
- decryptPrivKey() return error instead of os.Exit()ing.
- encryptPrivKey() should panic instead of os.Exit() when
bcrypt.GenerateFromPassword() call fails so that the
caller is given a chance to recover().
crypto/keys:
- SignWithLedger() does not need to be method of
baseKeybase. Method receiver is unused.
- ledgerInfo objecta may be pointers, type switch
should handle both to avoid panics.
- keyringKeybase should not provide Update() at all.
More test cases are added to increase package crypto
and subpackages overall coverage.
* Switch keys commands to keyring
* Replace NewKeybase with NewKeyring
* Fix delete test
* Purge dead code
* Override COSMOS_SDK_TEST_KEYRING envvar to switch to a test keyring
* s/unningOnServer/unningUnattended/
C'ing @tnachen
* Add deprecated warning, output looks like the following:
```
$ gaiacli keys update --help
Command "update" is deprecated, it takes no effect with the new keyring
based backend and is provided only for backward compatibility with the
legacy LevelDB based backend.
Refer to your operating system's manual to learn how to change your
keyring's password.
Change the password used to protect private key
Usage:
gaiacli keys update <name> [flags]
Flags:
-h, --help help for update
Global Flags:
--chain-id string Chain ID of tendermint node
-e, --encoding string Binary encoding (hex|b64|btc) (default "hex")
--home string directory for config and data (default "/home/alessio/.gaiacli")
-o, --output string Output format (text|json) (default "text")
--trace print out full stack trace on errors
```
* Update multisign command
* Modify server.GenerateSaveCoinKey()
* GenerateSaveCoinKey more modifications
* Update docs
* Update upgrade module
* Add shorthand flag to address output on gaiacli keys show
* Update docs and add PENDING
* Update client/keys/show.go
Co-Authored-By: jackzampolin <jack.zampolin@gmail.com>
* pk -> p
* Add new account bech32 prefixes with godocs
* Restructure spacing of existing account code
* Update account godocs
* More account godoc updates + new tm pub/addr helpers
* Update validator type to use new account types/bech32 prefixes
* Fix account documentation errors
* Update Bech32 prefix for consensus nodes
* Update Bech32 spec doc
* Fix account type tests
* Add missing account consensus functions, clear up godocs, and fix tests
* Add to TestRandBech32PubkeyConsistency check
* Update initialization of validator public keys
* Update query signing info command
* Implement new ConsAddress type with associated unit tests
* [WIP] Update stake and slashing parameters
* Update all calls to MustBech32ifyValPub
* [WIP] Validator operator API updates
* [WIP] Fix and update unit tests
* Fix gov logs (helping to debug failing tests)
* Fix gov tally
* Fix all broken x/ unit tests
* Update gaia app genesis address logic
* Fix linting errors
* Fix broken LCD tests
* Fix broken CLI tests
* Implement command to get validator address and pubkey from key name
* Add support for getting validator key information via REST endpoint
* Update PENDING log
* Update docs
* Revert GaiaGenTx.PubKey bech32 prefix
* Fix broken docs and cli tests
* Update genesis to use correct Bech32 (cons) prefix for pubkeys
* Update docs and unit tests to reflect new cosmos account bech32 prefix
* minor formatting
Merges the keybase and Ledger code from go-crypto (which is no more) into the SDK
Adds support for Ledger into gaiacli
Cherry-picks updated error handling from #1158
added rest server and status endpoint
added get block endpoint
added latest block endpoint
add 404 if height is out of bounds
add version endpoint
add validators endpoint
export GetBlockHeight
add keys endpoints
add txs endpoints
added verb limiters to ednpoints
only output node info + json structure improvement
fixed wrong body parsing
github PR template
crypto.Address -> sdk.Address
revert to old go-wire
update glide
remove print statement and update glide
fix#554
add .DS_Store to .gitignore
Massive consolidation: queue, data storage struct, store, logic, ...
Small fixes