-
Notifications
You must be signed in to change notification settings - Fork 3.7k
/
crypto.proto
49 lines (41 loc) · 1.77 KB
/
crypto.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
syntax = "proto3";
package cosmos.base.crypto.v1beta1;
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
option go_package = "github.com/cosmos/cosmos-sdk/crypto/types";
// PublicKey specifies a public key
message PublicKey {
// sum specifies which type of public key is wrapped
oneof sum {
bytes secp256k1 = 1;
bytes ed25519 = 2;
bytes sr25519 = 3;
PubKeyMultisigThreshold multisig = 4;
bytes secp256r1 = 5;
// any_pubkey can be used for any pubkey that an app may use which is
// not explicitly defined in the oneof
google.protobuf.Any any_pubkey = 15; // 15 is largest field that occupies one byte
}
}
// PubKeyMultisigThreshold specifies a public key type which nests multiple public
// keys and a threshold
message PubKeyMultisigThreshold {
uint32 threshold = 1 [(gogoproto.customname) = "K", (gogoproto.moretags) = "yaml:\"threshold\""];
repeated PublicKey public_keys = 2 [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""];
}
// MultiSignature wraps the signatures from a PubKeyMultisigThreshold.
// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers signed and
// with which modes.
message MultiSignature {
option (gogoproto.goproto_unrecognized) = true;
repeated bytes signatures = 1;
}
// 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.
message CompactBitArray {
option (gogoproto.goproto_stringer) = false;
uint32 extra_bits_stored = 1;
bytes elems = 2;
}