Documentation
¶
Index ¶
- Constants
- func ErrCreatorNotExists(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ErrInvalidInput(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ErrInvalidQCPCA(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ErrQCPExists(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ErrWrongQCPCA(codeSpace btypes.CodespaceType, msg string) btypes.Error
- func ExportQCPs(ctx context.Context) []qcptypes.QCPInfo
- func GetQCPMapper(ctx context.Context) *qcp.QcpMapper
- func GetQCPRootCA(ctx context.Context) crypto.PubKey
- func GetQCPTxs(ctx context.Context, chainId string) []txs.TxQcp
- func GetQCPTxsWithLimit(ctx context.Context, chainId string, limit uint64, asc bool) []txs.TxQcp
- func InitGenesis(ctx context.Context, data GenesisState)
- func RegisterCodec(cdc *amino.Codec)
- func SetQCPRootCA(ctx context.Context, pubKey crypto.PubKey)
- type GenesisState
- type TxInitQCP
- func (tx TxInitQCP) CalcGas() btypes.BigInt
- func (tx TxInitQCP) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxInitQCP) GetGasPayer() btypes.Address
- func (tx TxInitQCP) GetSignData() (ret []byte)
- func (tx TxInitQCP) GetSigner() []btypes.Address
- func (tx TxInitQCP) ValidateData(ctx context.Context) error
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.
View Source
const ( QCPRootCAKey = "rootca" QCPTxExportLimit = 100 // QCP TX 导出条数限制 )
Variables ¶
This section is empty.
Functions ¶
func ErrCreatorNotExists ¶
func ErrCreatorNotExists(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ErrInvalidInput ¶
func ErrInvalidInput(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ErrInvalidQCPCA ¶
func ErrInvalidQCPCA(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ErrQCPExists ¶
func ErrQCPExists(codeSpace btypes.CodespaceType, msg string) btypes.Error
func ErrWrongQCPCA ¶
func ErrWrongQCPCA(codeSpace btypes.CodespaceType, msg string) btypes.Error
func GetQCPTxsWithLimit ¶
TODO prefix定义到qbase中
func InitGenesis ¶
func InitGenesis(ctx context.Context, data GenesisState)
func RegisterCodec ¶
Types ¶
type GenesisState ¶
type GenesisState struct {
RootPubKey crypto.PubKey `json:"ca_root_pub_key"`
QCPs []qcptypes.QCPInfo `json:"qcps""`
}
func ExportGenesis ¶
func ExportGenesis(ctx context.Context) GenesisState
func NewGenesisState ¶
func NewGenesisState(pubKey crypto.PubKey, qcps []qcptypes.QCPInfo) GenesisState
type TxInitQCP ¶
type TxInitQCP struct {
Creator btypes.Address `json:"creator"` //创建账户
QCPCA *cert.Certificate `json:"ca_qcp"` //CA信息
}
init QCP
func (TxInitQCP) GetGasPayer ¶
func (TxInitQCP) GetSignData ¶
Click to show internal directories.
Click to hide internal directories.