types

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

	CodeInvalidInput        btypes.CodeType = 301 // 信息有误
	CodeInvalidQSCCA        btypes.CodeType = 302 // 无效证书
	CodeWrongQSCCA          btypes.CodeType = 303 // 证书有误
	CodeInvalidInitAccounts btypes.CodeType = 304 // 散币账户币种币值有误
	CodeCreatorNotExists    btypes.CodeType = 305 // 创建账户不存在
	CodeQSCExists           btypes.CodeType = 306 // QSC已存在
	CodeQSCNotExists        btypes.CodeType = 307 // QSC不存在
	CodeBankerNotExists     btypes.CodeType = 308 // Banker账户不存在
)

QSC errors reserve 300 ~ 399.

Variables

View Source
var (
	EventTypeCreateQsc = "create-qsc"
	EventTypeIssueQsc  = "issue-qsc"

	AttributeKeyModule  = "qsc"
	AttributeKeyQsc     = "name"
	AttributeKeyCreator = "creator"
	AttributeKeyBanker  = "banker"
	AttributeKeyTokens  = "tokens"
)

Functions

func ErrBankerNotExists added in v0.0.6

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

func ErrCreatorNotExists added in v0.0.6

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

func ErrInvalidInitAccounts added in v0.0.6

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

func ErrInvalidInput added in v0.0.6

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

func ErrInvalidQSCCA added in v0.0.6

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

func ErrQSCExists added in v0.0.6

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

func ErrQSCNotExists added in v0.0.6

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

func ErrWrongQSCCA added in v0.0.6

func ErrWrongQSCCA(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"`
	QSCs       []Info        `json:"qscs"`
}

func DefaultGenesisState added in v0.0.6

func DefaultGenesisState() GenesisState

func NewGenesisState added in v0.0.6

func NewGenesisState(pubKey crypto.PubKey, qscs []Info) GenesisState

type Info added in v0.0.6

type Info struct {
	Name        string         `json:"name"`         //币名
	ChainId     string         `json:"chain_id"`     //证书可用链
	Extrate     string         `json:"extrate"`      //qcs:qos汇率(amino不支持binary形式的浮点数序列化,精度同qos erc20 [.0000])
	Description string         `json:"description"`  //描述信息
	Banker      btypes.Address `json:"banker"`       //Banker PubKey
	TotalAmount btypes.BigInt  `json:"total_amount"` //发行总量
}

func NewInfoWithQSCCA added in v0.0.6

func NewInfoWithQSCCA(cer *cert.Certificate) Info

Jump to

Keyboard shortcuts

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