Documentation ¶
Index ¶
- Constants
- Variables
- func KeyIDsToStrings(keyIDs []KeyID) []string
- type AckType
- type Handler
- type Key
- type KeyID
- type KeyRole
- type KeyShareDistributionPolicy
- type KeyType
- type MultisigKey
- type PubKeyInfo
- func (*PubKeyInfo) Descriptor() ([]byte, []int)
- func (m *PubKeyInfo) GetPubKey() []byte
- func (m *PubKeyInfo) GetSignature() []byte
- func (m *PubKeyInfo) Marshal() (dAtA []byte, err error)
- func (m *PubKeyInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PubKeyInfo) ProtoMessage()
- func (m *PubKeyInfo) Reset()
- func (m *PubKeyInfo) Size() (n int)
- func (m *PubKeyInfo) String() string
- func (m *PubKeyInfo) Unmarshal(dAtA []byte) error
- func (p PubKeyInfo) Validate() error
- func (m *PubKeyInfo) XXX_DiscardUnknown()
- func (m *PubKeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKeyInfo) XXX_Merge(src proto.Message)
- func (m *PubKeyInfo) XXX_Size() int
- func (m *PubKeyInfo) XXX_Unmarshal(b []byte) error
- type SigStatus
- type SignInfo
- func (*SignInfo) Descriptor() ([]byte, []int)
- func (m *SignInfo) GetKeyID() KeyID
- func (m *SignInfo) GetMetadata() string
- func (m *SignInfo) GetMsg() []byte
- func (m *SignInfo) GetRequestModule() string
- func (m *SignInfo) GetSigID() string
- func (m *SignInfo) GetSnapshotCounter() int64
- func (m *SignInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SignInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignInfo) ProtoMessage()
- func (m *SignInfo) Reset()
- func (m *SignInfo) Size() (n int)
- func (m *SignInfo) String() string
- func (m *SignInfo) Unmarshal(dAtA []byte) error
- func (m *SignInfo) XXX_DiscardUnknown()
- func (m *SignInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignInfo) XXX_Merge(src proto.Message)
- func (m *SignInfo) XXX_Size() int
- func (m *SignInfo) XXX_Unmarshal(b []byte) error
- type Signature
Constants ¶
const ( KeyIDLengthMin = 4 KeyIDLengthMax = 256 )
key id length range bounds dictated by tofnd
Variables ¶
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var AckType_name = map[int32]string{
0: "ACK_TYPE_UNSPECIFIED",
1: "ACK_TYPE_KEYGEN",
2: "ACK_TYPE_SIGN",
}
var AckType_value = map[string]int32{
"ACK_TYPE_UNSPECIFIED": 0,
"ACK_TYPE_KEYGEN": 1,
"ACK_TYPE_SIGN": 2,
}
var KeyRole_name = map[int32]string{
0: "KEY_ROLE_UNSPECIFIED",
1: "KEY_ROLE_MASTER_KEY",
2: "KEY_ROLE_SECONDARY_KEY",
3: "KEY_ROLE_EXTERNAL_KEY",
}
var KeyRole_value = map[string]int32{
"KEY_ROLE_UNSPECIFIED": 0,
"KEY_ROLE_MASTER_KEY": 1,
"KEY_ROLE_SECONDARY_KEY": 2,
"KEY_ROLE_EXTERNAL_KEY": 3,
}
0: "KEY_SHARE_DISTRIBUTION_POLICY_UNSPECIFIED",
1: "KEY_SHARE_DISTRIBUTION_POLICY_WEIGHTED_BY_STAKE",
2: "KEY_SHARE_DISTRIBUTION_POLICY_ONE_PER_VALIDATOR",
}
"KEY_SHARE_DISTRIBUTION_POLICY_UNSPECIFIED": 0,
"KEY_SHARE_DISTRIBUTION_POLICY_WEIGHTED_BY_STAKE": 1,
"KEY_SHARE_DISTRIBUTION_POLICY_ONE_PER_VALIDATOR": 2,
}var KeyType_name = map[int32]string{
0: "KEY_TYPE_UNSPECIFIED",
1: "KEY_TYPE_THRESHOLD",
2: "KEY_TYPE_MULTISIG",
}
var KeyType_value = map[string]int32{
"KEY_TYPE_UNSPECIFIED": 0,
"KEY_TYPE_THRESHOLD": 1,
"KEY_TYPE_MULTISIG": 2,
}
var SigStatus_name = map[int32]string{
0: "SIG_STATUS_UNSPECIFIED",
1: "SIG_STATUS_QUEUED",
2: "SIG_STATUS_SIGNING",
3: "SIG_STATUS_SIGNED",
4: "SIG_STATUS_ABORTED",
5: "SIG_STATUS_INVALID",
}
var SigStatus_value = map[string]int32{
"SIG_STATUS_UNSPECIFIED": 0,
"SIG_STATUS_QUEUED": 1,
"SIG_STATUS_SIGNING": 2,
"SIG_STATUS_SIGNED": 3,
"SIG_STATUS_ABORTED": 4,
"SIG_STATUS_INVALID": 5,
}
Functions ¶
func KeyIDsToStrings ¶
KeyIDsToStrings converts a slice of type KeyID to a slice of strings
Types ¶
type Handler ¶
Handler defines a function that handles a signature after it has been generated and voted on
type KeyRole ¶
type KeyRole int32
func GetKeyRoles ¶
func GetKeyRoles() []KeyRole
GetKeyRoles returns an array of all types of key role
func KeyRoleFromSimpleStr ¶
KeyRoleFromSimpleStr creates a KeyRole from string
func (KeyRole) EnumDescriptor ¶
func (KeyRole) SimpleString ¶
SimpleString returns a human-readable string
type KeyShareDistributionPolicy ¶
type KeyShareDistributionPolicy int32
const ( Unspecified KeyShareDistributionPolicy = 0 WeightedByStake KeyShareDistributionPolicy = 1 OnePerValidator KeyShareDistributionPolicy = 2 )
func KeyShareDistributionPolicyFromSimpleStr ¶
func KeyShareDistributionPolicyFromSimpleStr(str string) (KeyShareDistributionPolicy, error)
KeyShareDistributionPolicyFromSimpleStr creates a KeyShareDistributionPolicy from string
func (KeyShareDistributionPolicy) EnumDescriptor ¶
func (KeyShareDistributionPolicy) EnumDescriptor() ([]byte, []int)
func (KeyShareDistributionPolicy) SimpleString ¶
func (r KeyShareDistributionPolicy) SimpleString() string
SimpleString returns a human-readable string
func (KeyShareDistributionPolicy) String ¶
func (x KeyShareDistributionPolicy) String() string
func (KeyShareDistributionPolicy) Validate ¶
func (r KeyShareDistributionPolicy) Validate() error
Validate validates the KeyShareDistributionPolicy
type KeyType ¶
type KeyType int32
func KeyTypeFromSimpleStr ¶
KeyTypeFromSimpleStr creates a KeyType from string
func (KeyType) EnumDescriptor ¶
func (KeyType) SimpleString ¶
SimpleString returns a human-readable string
type MultisigKey ¶
MultisigKey contains the public key value and corresponding ID
type PubKeyInfo ¶
type PubKeyInfo struct { PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
PubKeyInfo holds a pubkey and a signature
func (*PubKeyInfo) Descriptor ¶
func (*PubKeyInfo) Descriptor() ([]byte, []int)
func (*PubKeyInfo) GetPubKey ¶
func (m *PubKeyInfo) GetPubKey() []byte
func (*PubKeyInfo) GetSignature ¶
func (m *PubKeyInfo) GetSignature() []byte
func (*PubKeyInfo) Marshal ¶
func (m *PubKeyInfo) Marshal() (dAtA []byte, err error)
func (*PubKeyInfo) MarshalToSizedBuffer ¶
func (m *PubKeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PubKeyInfo) ProtoMessage ¶
func (*PubKeyInfo) ProtoMessage()
func (*PubKeyInfo) Reset ¶
func (m *PubKeyInfo) Reset()
func (*PubKeyInfo) Size ¶
func (m *PubKeyInfo) Size() (n int)
func (*PubKeyInfo) String ¶
func (m *PubKeyInfo) String() string
func (*PubKeyInfo) Unmarshal ¶
func (m *PubKeyInfo) Unmarshal(dAtA []byte) error
func (*PubKeyInfo) XXX_DiscardUnknown ¶
func (m *PubKeyInfo) XXX_DiscardUnknown()
func (*PubKeyInfo) XXX_Marshal ¶
func (m *PubKeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PubKeyInfo) XXX_Merge ¶
func (m *PubKeyInfo) XXX_Merge(src proto.Message)
func (*PubKeyInfo) XXX_Size ¶
func (m *PubKeyInfo) XXX_Size() int
func (*PubKeyInfo) XXX_Unmarshal ¶
func (m *PubKeyInfo) XXX_Unmarshal(b []byte) error
type SignInfo ¶
type SignInfo struct { KeyID KeyID `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3,casttype=KeyID" json:"key_id,omitempty"` SigID string `protobuf:"bytes,2,opt,name=sig_id,json=sigId,proto3" json:"sig_id,omitempty"` Msg []byte `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` SnapshotCounter int64 `protobuf:"varint,4,opt,name=snapshot_counter,json=snapshotCounter,proto3" json:"snapshot_counter,omitempty"` RequestModule string `protobuf:"bytes,5,opt,name=request_module,json=requestModule,proto3" json:"request_module,omitempty"` Metadata string `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` }
SignInfo holds information about a sign request
func (*SignInfo) Descriptor ¶
func (*SignInfo) GetMetadata ¶
func (*SignInfo) GetRequestModule ¶
func (*SignInfo) GetSnapshotCounter ¶
func (*SignInfo) MarshalToSizedBuffer ¶
func (*SignInfo) ProtoMessage ¶
func (*SignInfo) ProtoMessage()
func (*SignInfo) XXX_DiscardUnknown ¶
func (m *SignInfo) XXX_DiscardUnknown()