types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 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账户不存在
	CodeAmountLTZero        btypes.CodeType = 309 // 币量小于等于0
	CodeInvalidBanker       btypes.CodeType = 310 // banker有误
	CodeEmptyCreator        btypes.CodeType = 311 // 创建地址为空
	CodeDescriptionTooLong  btypes.CodeType = 312 // 描述信息太长
	CodeInvalidExchangeRate btypes.CodeType = 313 // 汇率值有误
	CodeRootCANotConfigure  btypes.CodeType = 314 // 没有配置qsc root ca public key
)

QSC errors reserve 300 ~ 399.

Variables

View Source
var (
	// 事件类型
	EventTypeCreateQsc = "create-qsc" // 创建QSC
	EventTypeIssueQsc  = "issue-qsc"  // 发行QSC

	// 事件参数
	AttributeKeyModule  = "qsc"     // 模块名
	AttributeKeyQsc     = "name"    // QSC名称
	AttributeKeyCreator = "creator" // QSC创建账户
	AttributeKeyBanker  = "banker"  // QSC发行接收账户
	AttributeKeyTokens  = "tokens"  // QSC发行量
)

Functions

func ErrAmountLTZero added in v0.0.8

func ErrAmountLTZero() btypes.Error

func ErrBankerNotExists added in v0.0.6

func ErrBankerNotExists() btypes.Error

func ErrCreatorNotExists added in v0.0.6

func ErrCreatorNotExists() btypes.Error

func ErrDescriptionTooLong added in v0.0.8

func ErrDescriptionTooLong() btypes.Error

func ErrEmptyCreator added in v0.0.8

func ErrEmptyCreator() btypes.Error

func ErrInvalidBanker added in v0.0.8

func ErrInvalidBanker() btypes.Error

func ErrInvalidExchangeRate added in v0.0.8

func ErrInvalidExchangeRate() btypes.Error

func ErrInvalidInitAccounts added in v0.0.6

func ErrInvalidInitAccounts() btypes.Error

func ErrInvalidInput added in v0.0.6

func ErrInvalidInput(msg string) btypes.Error

func ErrInvalidQSCCA added in v0.0.6

func ErrInvalidQSCCA() btypes.Error

func ErrQSCExists added in v0.0.6

func ErrQSCExists() btypes.Error

func ErrQSCNotExists added in v0.0.6

func ErrQSCNotExists() btypes.Error

func ErrRootCANotConfigure added in v0.0.8

func ErrRootCANotConfigure() btypes.Error

func ErrWrongQSCCA added in v0.0.6

func ErrWrongQSCCA() 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"` // kepler根证书公钥
	QSCs       []QSCInfo     `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 []QSCInfo) GenesisState

type QSCInfo

type QSCInfo struct {
	Name         string            `json:"name"`          //币名
	ChainId      string            `json:"chain_id"`      //证书可用链
	ExchangeRate string            `json:"exchange_rate"` //qcs:qos汇率
	Description  string            `json:"description"`   //描述信息
	Banker       btypes.AccAddress `json:"banker"`        //Banker PubKey
	TotalAmount  btypes.BigInt     `json:"total_amount"`  //发行总量
}

代币信息

func NewInfoWithQSCCA added in v0.0.6

func NewInfoWithQSCCA(cer *cert.Certificate) QSCInfo

Jump to

Keyboard shortcuts

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