Documentation ¶
Index ¶
- Constants
- Variables
- func ErrAmountLTZero() btypes.Error
- func ErrBankerNotExists() btypes.Error
- func ErrCreatorNotExists() btypes.Error
- func ErrDescriptionTooLong() btypes.Error
- func ErrEmptyCreator() btypes.Error
- func ErrInvalidBanker() btypes.Error
- func ErrInvalidExchangeRate() btypes.Error
- func ErrInvalidInitAccounts() btypes.Error
- func ErrInvalidInput(msg string) btypes.Error
- func ErrInvalidQSCCA() btypes.Error
- func ErrQSCExists() btypes.Error
- func ErrQSCNotExists() btypes.Error
- func ErrRootCANotConfigure() btypes.Error
- func ErrWrongQSCCA() btypes.Error
- func ValidateGenesis(gs GenesisState) error
- type GenesisState
- type QSCInfo
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 ErrBankerNotExists ¶ added in v0.0.6
func ErrCreatorNotExists ¶ added in v0.0.6
func ErrDescriptionTooLong ¶ added in v0.0.8
func ErrEmptyCreator ¶ added in v0.0.8
func ErrInvalidBanker ¶ added in v0.0.8
func ErrInvalidExchangeRate ¶ added in v0.0.8
func ErrInvalidInitAccounts ¶ added in v0.0.6
func ErrInvalidInput ¶ added in v0.0.6
func ErrInvalidQSCCA ¶ added in v0.0.6
func ErrQSCExists ¶ added in v0.0.6
func ErrQSCNotExists ¶ added in v0.0.6
func ErrRootCANotConfigure ¶ added in v0.0.8
func ErrWrongQSCCA ¶ added in v0.0.6
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
Click to show internal directories.
Click to hide internal directories.