Versions in this module Expand all Collapse all v1 v1.3.1 Feb 6, 2021 v1.3.0 Jan 15, 2021 Changes in this version + const Add + const EventTypeCertify + const EventTypeCertifyCompilation + const EventTypeRevokeCertificate + const ModuleName + const ProposalTypeCertifierUpdate + const QuerierRoute + const QueryCertificate + const QueryCertificateType + const QueryCertificates + const QueryCertifiedValidator + const QueryCertifiedValidators + const QueryCertifier + const QueryCertifierByAlias + const QueryCertifiers + const QueryPlatform + const Remove + const RouterKey + const StoreKey + const StringAdd + const StringRemove + var CertificateTypes = [...]CertificateType + var ErrAddOrRemove = sdkerrors.Register(ModuleName, 107, "must be `add` or `remove`") + var ErrBytecodeHash = sdkerrors.Register(ModuleName, 306, "invalid bytecode hash") + var ErrCertificateGenesis = sdkerrors.Register(ModuleName, 302, "invalid certificate genesis") + var ErrCertificateNotExists = sdkerrors.Register(ModuleName, 301, "certificate id does not exist") + var ErrCertifierAlreadyExists = sdkerrors.Register(ModuleName, 102, "certifier already added") + var ErrCertifierNotExists = sdkerrors.Register(ModuleName, 103, "certifier does not exist") + var ErrCompiler = sdkerrors.Register(ModuleName, 305, "invalid compiler") + var ErrEmptyCertifier = sdkerrors.Register(ModuleName, 106, "certifier address empty") + var ErrInvalidCertificateType = sdkerrors.Register(ModuleName, 303, "invalid certificate type") + var ErrInvalidCertifierAlias = sdkerrors.Register(ModuleName, 108, "invalid certifier alias`") + var ErrInvalidRequestContentType = sdkerrors.Register(ModuleName, 307, "invalid request content type") + var ErrLibraryAlreadyExists = sdkerrors.Register(ModuleName, 402, "library already exists") + var ErrLibraryNotExists = sdkerrors.Register(ModuleName, 401, "library does not exist") + var ErrMissingValidator = sdkerrors.Register(ModuleName, 205, "validator missing from staking store") + var ErrOnlyOneCertifier = sdkerrors.Register(ModuleName, 109, "cannot remove only certifier") + var ErrRejectedValidator = sdkerrors.Register(ModuleName, 201, "only certifiers can certify or de-certify validators") + var ErrRepeatedAlias = sdkerrors.Register(ModuleName, 104, "the alias has been used by other certifiers") + var ErrSourceCodeHash = sdkerrors.Register(ModuleName, 304, "invalid source code hash") + var ErrTombstonedValidator = sdkerrors.Register(ModuleName, 204, "validator has already been tombstoned") + var ErrUnqualifiedCertifier = sdkerrors.Register(ModuleName, 101, "certifier not qualified") + var ErrUnqualifiedProposer = sdkerrors.Register(ModuleName, 105, "proposer not qualified") + var ErrUnqualifiedRevoker = sdkerrors.Register(ModuleName, 308, "only certifiers can revoke this certificate") + var ErrValidatorCertified = sdkerrors.Register(ModuleName, 202, "validator has already been certified") + var ErrValidatorUncertified = sdkerrors.Register(ModuleName, 203, "validator has not been certified") + var ModuleCdc *codec.Codec + var RequestContentTypes = [...]RequestContentType + func CertificateStoreContentKey(certType CertificateType, reqContentType RequestContentType, reqContent string) []byte + func CertificateStoreKey(bz []byte) []byte + func CertificatesStoreKey() []byte + func CertifierAliasStoreKey(alias string) []byte + func CertifierAliasesStoreKey() []byte + func CertifierStoreKey(certifier sdk.AccAddress) []byte + func CertifiersStoreKey() []byte + func LibrariesStoreKey() []byte + func LibraryStoreKey(library sdk.AccAddress) []byte + func PlatformStoreKey(validator crypto.PubKey) []byte + func PlatformsStoreKey() []byte + func RegisterCodec(cdc *codec.Codec) + func ValidateGenesis(bz json.RawMessage) error + func ValidatorStoreKey(validator crypto.PubKey) []byte + func ValidatorsStoreKey() []byte + type AccountKeeper interface + GetAccount func(ctx sdk.Context, addr sdk.AccAddress) authexported.Account + type AddOrRemove bool + func AddOrRemoveFromString(str string) (AddOrRemove, error) + func (aor *AddOrRemove) UnmarshalJSON(data []byte) error + func (aor AddOrRemove) MarshalJSON() ([]byte, error) + func (aor AddOrRemove) String() string + type Certificate interface + Bytes func(*codec.Codec) []byte + CertificateContent func() string + Certifier func() sdk.AccAddress + Description func() string + FormattedCertificateContent func() []KVPair + ID func() CertificateID + RequestContent func() RequestContent + SetCertificateID func(CertificateID) + SetTxHash func(string) + String func() string + TxHash func() string + Type func() CertificateType + type CertificateID string + func GetCertificateID(certType CertificateType, reqContent RequestContent, i uint8) CertificateID + func (id CertificateID) Bytes() []byte + func (id CertificateID) String() string + type CertificateType byte + const CertificateTypeAuditing + const CertificateTypeCompilation + const CertificateTypeGeneral + const CertificateTypeIdentity + const CertificateTypeNil + const CertificateTypeOracleOperator + const CertificateTypeProof + const CertificateTypeShieldPoolCreator + func CertificateTypeFromString(s string) CertificateType + func (c CertificateType) Bytes() []byte + func (c CertificateType) String() string + type Certifier struct + Address sdk.AccAddress + Alias string + Description string + Proposer sdk.AccAddress + func NewCertifier(address sdk.AccAddress, alias string, proposer sdk.AccAddress, ...) Certifier + func (c Certifier) String() string + type CertifierUpdateProposal struct + AddOrRemove AddOrRemove + Alias string + Certifier sdk.AccAddress + Description string + Proposer sdk.AccAddress + Title string + func NewCertifierUpdateProposal(title, description string, certifier sdk.AccAddress, alias string, ...) CertifierUpdateProposal + func (cup CertifierUpdateProposal) GetDescription() string + func (cup CertifierUpdateProposal) GetTitle() string + func (cup CertifierUpdateProposal) ProposalRoute() string + func (cup CertifierUpdateProposal) ProposalType() string + func (cup CertifierUpdateProposal) String() string + func (cup CertifierUpdateProposal) ValidateBasic() error + type Certifiers []Certifier + func (c Certifiers) String() (out string) + type CompilationCertificate struct + CertCertifier sdk.AccAddress + CertContent CompilationCertificateContent + CertDescription string + CertID CertificateID + CertTxHash string + CertType CertificateType + IssueBlockHeight int64 + ReqContent RequestContent + func NewCompilationCertificate(certificateType CertificateType, sourceCodeHash string, compiler string, ...) *CompilationCertificate + func (c *CompilationCertificate) Bytes(cdc *codec.Codec) []byte + func (c *CompilationCertificate) CertificateContent() string + func (c *CompilationCertificate) Certifier() sdk.AccAddress + func (c *CompilationCertificate) Description() string + func (c *CompilationCertificate) FormattedCertificateContent() []KVPair + func (c *CompilationCertificate) ID() CertificateID + func (c *CompilationCertificate) RequestContent() RequestContent + func (c *CompilationCertificate) SetCertificateID(id CertificateID) + func (c *CompilationCertificate) SetTxHash(txhash string) + func (c *CompilationCertificate) String() string + func (c *CompilationCertificate) TxHash() string + func (c *CompilationCertificate) Type() CertificateType + type CompilationCertificateContent struct + BytecodeHash string + Compiler string + func NewCompilationCertificateContent(compiler, bytecodeHash string) CompilationCertificateContent + func (c CompilationCertificateContent) String() string + type GeneralCertificate struct + CertCertifier sdk.AccAddress + CertDescription string + CertID CertificateID + CertTxHash string + CertType CertificateType + ReqContent RequestContent + func NewGeneralCertificate(certTypeStr, reqContTypeStr, reqContStr, description string, ...) (*GeneralCertificate, error) + func (c *GeneralCertificate) Bytes(cdc *codec.Codec) []byte + func (c *GeneralCertificate) CertificateContent() string + func (c *GeneralCertificate) Certifier() sdk.AccAddress + func (c *GeneralCertificate) Description() string + func (c *GeneralCertificate) FormattedCertificateContent() []KVPair + func (c *GeneralCertificate) ID() CertificateID + func (c *GeneralCertificate) RequestContent() RequestContent + func (c *GeneralCertificate) SetCertificateID(id CertificateID) + func (c *GeneralCertificate) SetTxHash(txhash string) + func (c *GeneralCertificate) String() string + func (c *GeneralCertificate) TxHash() string + func (c *GeneralCertificate) Type() CertificateType + type GenesisState struct + Certificates []Certificate + Certifiers []Certifier + Libraries []Library + Platforms []Platform + Validators []Validator + func DefaultGenesisState() GenesisState + func GetGenesisStateFromAppState(cdc *codec.Codec, appState map[string]json.RawMessage) GenesisState + func NewGenesisState(constantFee sdk.Coin, startingCertificateID CertificateID) GenesisState + type KVPair struct + Key string + Value string + func NewKVPair(key string, value string) KVPair + type Libraries []Library + type Library struct + Address sdk.AccAddress + Publisher sdk.AccAddress + type MsgCertifyCompilation struct + BytecodeHash string + Certifier sdk.AccAddress + Compiler string + Description string + SourceCodeHash string + func NewMsgCertifyCompilation(sourceCodeHash, compiler, bytecodeHash, description string, ...) MsgCertifyCompilation + func (m MsgCertifyCompilation) GetSignBytes() []byte + func (m MsgCertifyCompilation) GetSigners() []sdk.AccAddress + func (m MsgCertifyCompilation) Route() string + func (m MsgCertifyCompilation) Type() string + func (m MsgCertifyCompilation) ValidateBasic() error + type MsgCertifyGeneral struct + CertificateType string + Certifier sdk.AccAddress + Description string + RequestContent string + RequestContentType string + func NewMsgCertifyGeneral(certificateType, requestContentType, requestContent, description string, ...) MsgCertifyGeneral + func (m MsgCertifyGeneral) GetSignBytes() []byte + func (m MsgCertifyGeneral) GetSigners() []sdk.AccAddress + func (m MsgCertifyGeneral) Route() string + func (m MsgCertifyGeneral) Type() string + func (m MsgCertifyGeneral) ValidateBasic() error + type MsgCertifyPlatform struct + Certifier sdk.AccAddress + Platform string + Validator crypto.PubKey + func NewMsgCertifyPlatform(certifier sdk.AccAddress, validator crypto.PubKey, platform string) MsgCertifyPlatform + func (m *MsgCertifyPlatform) UnmarshalJSON(bz []byte) error + func (m MsgCertifyPlatform) GetSignBytes() []byte + func (m MsgCertifyPlatform) GetSigners() []sdk.AccAddress + func (m MsgCertifyPlatform) MarshalJSON() ([]byte, error) + func (m MsgCertifyPlatform) MarshalYAML() (interface{}, error) + func (m MsgCertifyPlatform) Route() string + func (m MsgCertifyPlatform) Type() string + func (m MsgCertifyPlatform) ValidateBasic() error + type MsgCertifyValidator struct + Certifier sdk.AccAddress + Validator crypto.PubKey + func NewMsgCertifyValidator(certifier sdk.AccAddress, validator crypto.PubKey) MsgCertifyValidator + func (m *MsgCertifyValidator) UnmarshalJSON(bz []byte) error + func (m MsgCertifyValidator) GetSignBytes() []byte + func (m MsgCertifyValidator) GetSigners() []sdk.AccAddress + func (m MsgCertifyValidator) MarshalJSON() ([]byte, error) + func (m MsgCertifyValidator) MarshalYAML() (interface{}, error) + func (m MsgCertifyValidator) Route() string + func (m MsgCertifyValidator) Type() string + func (m MsgCertifyValidator) ValidateBasic() error + type MsgDecertifyValidator struct + Decertifier sdk.AccAddress + Validator crypto.PubKey + func NewMsgDecertifyValidator(decertifier sdk.AccAddress, validator crypto.PubKey) MsgDecertifyValidator + func (m *MsgDecertifyValidator) UnmarshalJSON(bz []byte) error + func (m MsgDecertifyValidator) GetSignBytes() []byte + func (m MsgDecertifyValidator) GetSigners() []sdk.AccAddress + func (m MsgDecertifyValidator) MarshalJSON() ([]byte, error) + func (m MsgDecertifyValidator) MarshalYAML() (interface{}, error) + func (m MsgDecertifyValidator) Route() string + func (m MsgDecertifyValidator) Type() string + func (m MsgDecertifyValidator) ValidateBasic() error + type MsgProposeCertifier struct + Alias string + Certifier sdk.AccAddress + Description string + Proposer sdk.AccAddress + func NewMsgProposeCertifier(proposer, certifier sdk.AccAddress, alias string, description string) MsgProposeCertifier + func (m MsgProposeCertifier) GetSignBytes() []byte + func (m MsgProposeCertifier) GetSigners() []sdk.AccAddress + func (m MsgProposeCertifier) Route() string + func (m MsgProposeCertifier) Type() string + func (m MsgProposeCertifier) ValidateBasic() error + type MsgRevokeCertificate struct + Description string + ID CertificateID + Revoker sdk.AccAddress + func NewMsgRevokeCertificate(revoker sdk.AccAddress, id CertificateID, description string) MsgRevokeCertificate + func (m MsgRevokeCertificate) GetSignBytes() []byte + func (m MsgRevokeCertificate) GetSigners() []sdk.AccAddress + func (m MsgRevokeCertificate) Route() string + func (m MsgRevokeCertificate) Type() string + func (m MsgRevokeCertificate) ValidateBasic() error + type Platform struct + Description string + Validator crypto.PubKey + type QueryCertificatesParams struct + Certifier sdk.AccAddress + Content string + ContentType string + Limit int + Page int + func NewQueryCertificatesParams(page, limit int, certifier sdk.AccAddress, contentType, content string) QueryCertificatesParams + type QueryResCertifiers struct + Certifiers Certifiers + func (q QueryResCertifiers) String() string + type QueryResPlatform struct + Platform string + func (q QueryResPlatform) String() string + type QueryResValidator struct + Certifier sdk.AccAddress + func (q QueryResValidator) String() string + type QueryResValidators struct + Validators []string + func (q QueryResValidators) String() string + type RequestContent struct + RequestContent string + RequestContentType RequestContentType + func NewRequestContent(requestContentTypeString string, requestContent string) (RequestContent, error) + type RequestContentType byte + const RequestContentTypeAddress + const RequestContentTypeBytecodeHash + const RequestContentTypeGeneral + const RequestContentTypeNil + const RequestContentTypeSourceCodeHash + func RequestContentTypeFromString(s string) RequestContentType + func (c RequestContentType) Bytes() []byte + func (c RequestContentType) String() string + type SlashingKeeper interface + IsTombstoned func(sdk.Context, sdk.ConsAddress) bool + Jail func(sdk.Context, sdk.ConsAddress) + JailUntil func(sdk.Context, sdk.ConsAddress, time.Time) + Tombstone func(sdk.Context, sdk.ConsAddress) + type StakingKeeper interface + GetAllValidators func(ctx sdk.Context) []staking.Validator + GetValidatorDelegations func(ctx sdk.Context, valAddr sdk.ValAddress) []staking.Delegation + ValidatorByConsAddr func(sdk.Context, sdk.ConsAddress) stakingexported.ValidatorI + type Validator struct + Certifier sdk.AccAddress + PubKey crypto.PubKey + type Validators []Validator Other modules containing this package github.com/certikfoundation/shentu/v2