types

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodeSpace btypes.CodespaceType = "qcp"

	CodeInvalidInput     btypes.CodeType = 401 // 信息有误
	CodeInvalidQCPCA     btypes.CodeType = 402 // 无效证书
	CodeWrongQCPCA       btypes.CodeType = 403 // 证书有误
	CodeCreatorNotExists btypes.CodeType = 404 // 创建账户不存在
	CodeQCPExists        btypes.CodeType = 405 // QCP已存在
)

QCP errors reserve 400 ~ 499.

Variables

View Source
var (
	EventTypeInitQcp = "init-qcp"

	AttributeKeyModule  = qcp.EventModule
	AttributeKeyQcp     = "chain-id"
	AttributeKeyCreator = "creator"
)

Functions

func ErrCreatorNotExists added in v0.0.6

func ErrCreatorNotExists(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ErrInvalidInput added in v0.0.6

func ErrInvalidInput(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ErrInvalidQCPCA added in v0.0.6

func ErrInvalidQCPCA(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ErrQCPExists added in v0.0.6

func ErrQCPExists(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ErrWrongQCPCA added in v0.0.6

func ErrWrongQCPCA(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ValidateGenesis added in v0.0.6

func ValidateGenesis(gs GenesisState) error

Types

type GenesisState added in v0.0.6

type GenesisState struct {
	RootPubKey crypto.PubKey `json:"ca_root_pub_key"`
	QCPs       []QCPInfo     `json:"qcps""`
}

func DefaultGenesisState added in v0.0.6

func DefaultGenesisState() GenesisState

func NewGenesisState added in v0.0.6

func NewGenesisState(pubKey crypto.PubKey, qcps []QCPInfo) GenesisState

type QCPInfo

type QCPInfo struct {
	ChainId     string        `json:"chain_id""`
	SequenceOut int64         `json:"sequence_out""`
	SequenceIn  int64         `json:"sequence_in""`
	PubKey      crypto.PubKey `json:"pub_key""`
	OutTxs      []txs.TxQcp   `json:"txs""`
}

func NewQCPInfo

func NewQCPInfo(chainId string, sequenceOut int64, sequenceIn int64, pubKey crypto.PubKey, txs []txs.TxQcp) *QCPInfo

Jump to

Keyboard shortcuts

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