types

package
v0.0.0-...-25b3476 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "keygen"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey is the message route for gov
	RouterKey = ModuleName

	// QuerierRoute is the querier route for gov
	QuerierRoute = ModuleName

	// Parameter store default parameter store
	DefaultParamspace = ModuleName

	QueryWaitAssignKeys = "waitAssign"

	EventTypeKeyGen              = "key_gen"
	EventTypeKeyGenWaitSign      = "key_gen_waitsign"
	EventTypeKeyGenFinish        = "key_gen_finish"
	EventTypePreKeyGen           = "pre_key_gen"
	EventTypeOpcuMigrationKeyGen = "opcu_migration_key_gen"
	EventTypeKeyNewOPCU          = "new_opcu"

	// in keygenfinish 'sender' is the validator, which send the keygenfinish tx.
	AttributeKeySender   = "sender"
	AttributeKeyFrom     = "from"
	AttributeKeyTo       = "to"
	AttributeKeySymbol   = "symbol"
	AttributeKeyOrderID  = "order_id"
	AttributeKeyOrderIDs = "order_ids"

	MaxWaitAssignKeyOrders = 32
	MaxPreKeyGenOrders     = 5
	MaxKeyNodeHeartbeat    = 1000
)
View Source
const (
	TypeMsgKeyGen              = "keygen"
	TypeMsgKeyGenWaitSign      = "keygenwaitsign"
	TypeMsgKeyGenFinish        = "keygenfinish"
	TypeMsgPreKeyGen           = "prekeygen"
	TypeMsgOpcuMigrationKeyGen = "opcumigrationkeygen"
)
View Source
const (
	TypeMsgNewOpCU = "new_op_cu"
)

Variables

View Source
var ModuleCdc = codec.New()
View Source
var (
	WaitAssignKey = []byte("waitAssign")
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec codec

Types

type MsgKeyGen

type MsgKeyGen struct {
	OrderID string        `json:"order_id"` // client type in
	Symbol  sdk.Symbol    `json:"symbol"`
	From    sdk.CUAddress `json:"from"`
	To      sdk.CUAddress `json:"to"`
}

func NewMsgKeyGen

func NewMsgKeyGen(orderID string, symbol sdk.Symbol, from, to sdk.CUAddress) MsgKeyGen

func (MsgKeyGen) GetSignBytes

func (msg MsgKeyGen) GetSignBytes() []byte

func (MsgKeyGen) GetSigners

func (msg MsgKeyGen) GetSigners() []sdk.CUAddress

func (MsgKeyGen) Route

func (msg MsgKeyGen) Route() string

func (MsgKeyGen) Type

func (msg MsgKeyGen) Type() string

func (MsgKeyGen) ValidateBasic

func (msg MsgKeyGen) ValidateBasic() sdk.Error

type MsgKeyGenFinish

type MsgKeyGenFinish struct {
	OrderID   string        `json:"order_ids"`
	Signature []byte        `json:"signature"`
	Validator sdk.CUAddress `json:"validator"`
}

func NewMsgKeyGenFinish

func NewMsgKeyGenFinish(orderID string, signature []byte, validator sdk.CUAddress) *MsgKeyGenFinish

func (MsgKeyGenFinish) GetSignBytes

func (msg MsgKeyGenFinish) GetSignBytes() []byte

func (MsgKeyGenFinish) GetSigners

func (msg MsgKeyGenFinish) GetSigners() []sdk.CUAddress

func (MsgKeyGenFinish) IsSettleOnlyMsg

func (msg MsgKeyGenFinish) IsSettleOnlyMsg() bool

func (MsgKeyGenFinish) Route

func (msg MsgKeyGenFinish) Route() string

func (MsgKeyGenFinish) Type

func (msg MsgKeyGenFinish) Type() string

func (MsgKeyGenFinish) ValidateBasic

func (msg MsgKeyGenFinish) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgKeyGenWaitSign

type MsgKeyGenWaitSign struct {
	From     sdk.CUAddress         `json:"from"`
	OrderID  string                `json:"order_id"`
	PubKey   []byte                `json:"pubkey"`
	KeyNodes []sdk.CUAddress       `json:"key_nodes"`
	KeySigs  []cTypes.StdSignature `json:"key_sigs"`
	Epoch    uint64                `json:"epoch"`
}

func NewMsgKeyGenWaitSign

func NewMsgKeyGenWaitSign(from sdk.CUAddress, orderId string, pubKey []byte, keyNodes []sdk.CUAddress, keysigs []cTypes.StdSignature, epoch uint64) MsgKeyGenWaitSign

func (MsgKeyGenWaitSign) GetSignBytes

func (msg MsgKeyGenWaitSign) GetSignBytes() []byte

func (MsgKeyGenWaitSign) GetSigners

func (msg MsgKeyGenWaitSign) GetSigners() []sdk.CUAddress

func (MsgKeyGenWaitSign) IsSettleOnlyMsg

func (msg MsgKeyGenWaitSign) IsSettleOnlyMsg() bool

func (MsgKeyGenWaitSign) Route

func (msg MsgKeyGenWaitSign) Route() string

func (MsgKeyGenWaitSign) Type

func (msg MsgKeyGenWaitSign) Type() string

func (MsgKeyGenWaitSign) ValidateBasic

func (msg MsgKeyGenWaitSign) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgNewOpCU

type MsgNewOpCU struct {
	Symbol      string        `json:"symbol"`
	From        sdk.CUAddress `json:"from"`
	OpCUAddress sdk.CUAddress `json:"opcu_address"`
}

========MsgNewOpCU

func NewMsgNewOpCU

func NewMsgNewOpCU(symbol string, opCUAddress, from sdk.CUAddress) MsgNewOpCU

NewMsgKeyGen is a constructor function for MsgNewOpCU

func (MsgNewOpCU) GetSignBytes

func (msg MsgNewOpCU) GetSignBytes() []byte

func (MsgNewOpCU) GetSigners

func (msg MsgNewOpCU) GetSigners() []sdk.CUAddress

func (MsgNewOpCU) Route

func (msg MsgNewOpCU) Route() string

func (MsgNewOpCU) Type

func (msg MsgNewOpCU) Type() string

func (MsgNewOpCU) ValidateBasic

func (msg MsgNewOpCU) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgOpcuMigrationKeyGen

type MsgOpcuMigrationKeyGen struct {
	OrderIDs []string      `json:"order_ids"`
	From     sdk.CUAddress `json:"from"`
}

func NewMsgOpcuMigrationKeyGen

func NewMsgOpcuMigrationKeyGen(orderIDs []string, from sdk.CUAddress) *MsgOpcuMigrationKeyGen

func (MsgOpcuMigrationKeyGen) GetSignBytes

func (msg MsgOpcuMigrationKeyGen) GetSignBytes() []byte

func (MsgOpcuMigrationKeyGen) GetSigners

func (msg MsgOpcuMigrationKeyGen) GetSigners() []sdk.CUAddress

func (MsgOpcuMigrationKeyGen) IsSettleOnlyMsg

func (msg MsgOpcuMigrationKeyGen) IsSettleOnlyMsg() bool

func (MsgOpcuMigrationKeyGen) Route

func (msg MsgOpcuMigrationKeyGen) Route() string

func (MsgOpcuMigrationKeyGen) Type

func (msg MsgOpcuMigrationKeyGen) Type() string

func (MsgOpcuMigrationKeyGen) ValidateBasic

func (msg MsgOpcuMigrationKeyGen) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgPreKeyGen

type MsgPreKeyGen struct {
	OrderIDs []string      `json:"order_ids"`
	From     sdk.CUAddress `json:"from"`
}

func NewMsgPreKeyGen

func NewMsgPreKeyGen(orderIDs []string, from sdk.CUAddress) *MsgPreKeyGen

func (MsgPreKeyGen) GetSignBytes

func (msg MsgPreKeyGen) GetSignBytes() []byte

func (MsgPreKeyGen) GetSigners

func (msg MsgPreKeyGen) GetSigners() []sdk.CUAddress

func (MsgPreKeyGen) IsSettleOnlyMsg

func (msg MsgPreKeyGen) IsSettleOnlyMsg() bool

func (MsgPreKeyGen) Route

func (msg MsgPreKeyGen) Route() string

func (MsgPreKeyGen) Type

func (msg MsgPreKeyGen) Type() string

func (MsgPreKeyGen) ValidateBasic

func (msg MsgPreKeyGen) ValidateBasic() sdk.Error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL