Documentation ¶
Index ¶
Constants ¶
const ( KeyIDLengthMin = 4 KeyIDLengthMax = 256 )
key id length range bounds dictated by tofnd
const (
// HashLength is the expected length of the hash
HashLength = 32
)
Variables ¶
var KeyState_name = map[int32]string{
0: "KEY_STATE_UNSPECIFIED",
1: "KEY_STATE_ASSIGNED",
2: "KEY_STATE_ACTIVE",
}
var KeyState_value = map[string]int32{
"KEY_STATE_UNSPECIFIED": 0,
"KEY_STATE_ASSIGNED": 1,
"KEY_STATE_ACTIVE": 2,
}
var MultisigState_name = map[int32]string{
0: "MULTISIG_STATE_UNSPECIFIED",
1: "MULTISIG_STATE_PENDING",
2: "MULTISIG_STATE_COMPLETED",
}
var MultisigState_value = map[string]int32{
"MULTISIG_STATE_UNSPECIFIED": 0,
"MULTISIG_STATE_PENDING": 1,
"MULTISIG_STATE_COMPLETED": 2,
}
Functions ¶
This section is empty.
Types ¶
type Hash ¶
type Hash []byte
Hash is an alias for a 32-byte hash
func (Hash) ValidateBasic ¶
ValidateBasic returns an error if the hash is not a valid
type Key ¶
type Key interface { GetParticipants() []sdk.ValAddress GetPubKey(sdk.ValAddress) (PublicKey, bool) GetWeight(sdk.ValAddress) sdk.Uint GetMinPassingWeight() sdk.Uint GetState() KeyState GetHeight() int64 GetTimestamp() time.Time GetBondedWeight() sdk.Uint GetSnapshot() exported.Snapshot }
Key provides an interface to work with the key
type KeyID ¶
type KeyID string
KeyID ensures a correctly formatted key ID
func (KeyID) ValidateBasic ¶
ValidateBasic returns an error if the given key ID is invalid; nil otherwise
type MultiSig ¶
type MultiSig interface { GetSignature(p sdk.ValAddress) (ec.Signature, bool) GetPayloadHash() Hash GetKeyID() KeyID ValidateBasic() error }
MultiSig provides an interface to work with the multi sig
type MultisigState ¶
type MultisigState int32
const ( NonExistent MultisigState = 0 Pending MultisigState = 1 Completed MultisigState = 2 )
func (MultisigState) EnumDescriptor ¶
func (MultisigState) EnumDescriptor() ([]byte, []int)
func (MultisigState) String ¶
func (x MultisigState) String() string
type PublicKey ¶
type PublicKey []byte
PublicKey is an alias for compressed public key in raw bytes
func (PublicKey) ToECDSAPubKey ¶
ToECDSAPubKey returns the ECDSA public key
func (PublicKey) ValidateBasic ¶
ValidateBasic returns an error if the given public key is invalid; nil otherwise
type SigHandler ¶
type SigHandler interface { HandleCompleted(ctx sdk.Context, sig utils.ValidatedProtoMarshaler, moduleMetadata codec.ProtoMarshaler) error HandleFailed(ctx sdk.Context, moduleMetadata codec.ProtoMarshaler) error }
SigHandler defines the interface for the requesting module to implement in order to handle the different results of signing session