cosmos/crypto
Table of Contents
cosmos/crypto/ed25519/keys.proto
TopPrivKey
PrivKey defines a ed25519 private key.
NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context.
| Field | Type | Label | Description |
| key | bytes |
|
PubKey
PubKey is an ed25519 public key for handling Tendermint keys in SDK.
It's needed for Any serialization and SDK compatibility.
It must not be used in a non Tendermint key context because it doesn't implement
ADR-28. Nevertheless, you will like to use ed25519 in app user level
then you must create a new proto message and follow ADR-28 for Address construction.
| Field | Type | Label | Description |
| key | bytes |
|
cosmos/crypto/hd/v1/hd.proto
TopSince: cosmos-sdk 0.46
BIP44Params
BIP44Params is used as path field in ledger item in Record.
| Field | Type | Label | Description |
| purpose | uint32 | purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation |
|
| coin_type | uint32 | coin_type is a constant that improves privacy |
|
| account | uint32 | account splits the key space into independent user identities |
|
| change | bool | change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal chain. |
|
| address_index | uint32 | address_index is used as child index in BIP32 derivation |
cosmos/crypto/keyring/v1/record.proto
TopSince: cosmos-sdk 0.46
Record
Record is used for representing a key in the keyring.
| Field | Type | Label | Description |
| name | string | name represents a name of Record |
|
| pub_key | google.protobuf.Any | pub_key represents a public key in any format |
|
| local | Record.Local | local stores the private key locally. |
|
| ledger | Record.Ledger | ledger stores the information about a Ledger key. |
|
| multi | Record.Multi | Multi does not store any other information. |
|
| offline | Record.Offline | Offline does not store any other information. |
Record.Ledger
Ledger item
| Field | Type | Label | Description |
| path | cosmos.crypto.hd.v1.BIP44Params |
|
Record.Local
Item is a keyring item stored in a keyring backend.
Local item
| Field | Type | Label | Description |
| priv_key | google.protobuf.Any |
|
Record.Multi
Multi item
Record.Offline
Offline item
cosmos/crypto/multisig/keys.proto
TopLegacyAminoPubKey
LegacyAminoPubKey specifies a public key type
which nests multiple public keys and a threshold,
it uses legacy amino address rules.
| Field | Type | Label | Description |
| threshold | uint32 |
|
|
| public_keys | google.protobuf.Any | repeated |
|
cosmos/crypto/multisig/v1beta1/multisig.proto
TopCompactBitArray
CompactBitArray is an implementation of a space efficient bit array.
This is used to ensure that the encoded data takes up a minimal amount of
space after proto encoding.
This is not thread safe, and is not intended for concurrent usage.
| Field | Type | Label | Description |
| extra_bits_stored | uint32 |
|
|
| elems | bytes |
|
MultiSignature
MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
signed and with which modes.
| Field | Type | Label | Description |
| signatures | bytes | repeated |
|
cosmos/crypto/secp256k1/keys.proto
TopPrivKey
PrivKey defines a secp256k1 private key.
| Field | Type | Label | Description |
| key | bytes |
|
PubKey
PubKey defines a secp256k1 public key
Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
if the y-coordinate is the lexicographically largest of the two associated with
the x-coordinate. Otherwise the first byte is a 0x03.
This prefix is followed with the x-coordinate.
| Field | Type | Label | Description |
| key | bytes |
|
cosmos/crypto/secp256r1/keys.proto
TopSince: cosmos-sdk 0.43
PrivKey
PrivKey defines a secp256r1 ECDSA private key.
| Field | Type | Label | Description |
| secret | bytes | secret number serialized using big-endian encoding |
PubKey
PubKey defines a secp256r1 ECDSA public key.
| Field | Type | Label | Description |
| key | bytes | Point on secp256r1 curve in a compressed representation as specified in section 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 |
Scalar Value Types
| .proto Type | Notes | Python Type |
| double | float | |
| float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int/long |
| uint32 | Uses variable-length encoding. | int/long |
| uint64 | Uses variable-length encoding. | int/long |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int/long |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | int |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | int/long |
| sfixed32 | Always four bytes. | int |
| sfixed64 | Always eight bytes. | int/long |
| bool | boolean | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | str/unicode |
| bytes | May contain any arbitrary sequence of bytes. | str |