Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) AccountIsMarker(ctx sdk.Context, address string) bool
- func (k Keeper) ContractSpecification(c context.Context, req *types.ContractSpecificationRequest) (*types.ContractSpecificationResponse, error)
- func (k Keeper) CreateAccountForKey(ctx sdk.Context, addr sdk.AccAddress, pubKey cryptotypes.PubKey) error
- func (k Keeper) CreateRawSignature(txf clienttx.Factory, name string, txBuilder client.TxBuilder, message []byte, ...) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
- func (k Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
- func (k Keeper) GetContractSpecification(ctx sdk.Context, contractSpecID types.MetadataAddress) (spec types.ContractSpecification, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRecord(ctx sdk.Context, id types.MetadataAddress) (record types.Record, found bool)
- func (k Keeper) GetRecordGroup(ctx sdk.Context, id types.MetadataAddress) (group types.RecordGroup, found bool)
- func (k Keeper) GetRecords(ctx sdk.Context, scopeAddress types.MetadataAddress, name string) ([]*types.Record, error)
- func (k Keeper) GetScope(ctx sdk.Context, id types.MetadataAddress) (scope types.Scope, found bool)
- func (k Keeper) GetScopeSpecification(ctx sdk.Context, scopeSpecID types.MetadataAddress) (spec types.ScopeSpecification, found bool)
- func (k Keeper) GroupContext(c context.Context, req *types.GroupContextRequest) (*types.GroupContextResponse, error)
- func (k Keeper) HasSignerWithMarkerValueAuthority(ctx sdk.Context, valueOwner string, signers []string, role markertypes.Access) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) IterateContractSpecs(ctx sdk.Context, ...) error
- func (k Keeper) IterateContractSpecsForOwner(ctx sdk.Context, ownerAddress sdk.AccAddress, ...) error
- func (k Keeper) IterateGroups(ctx sdk.Context, scopeID types.MetadataAddress, ...) error
- func (k Keeper) IterateRecords(ctx sdk.Context, scopeID types.MetadataAddress, ...) error
- func (k Keeper) IterateScopeSpecs(ctx sdk.Context, ...) error
- func (k Keeper) IterateScopeSpecsForContractSpec(ctx sdk.Context, contractSpecID types.MetadataAddress, ...) error
- func (k Keeper) IterateScopeSpecsForOwner(ctx sdk.Context, ownerAddress sdk.AccAddress, ...) error
- func (k Keeper) IterateScopes(ctx sdk.Context, handler func(types.Scope) (stop bool)) error
- func (k Keeper) IterateScopesForAddress(ctx sdk.Context, address sdk.AccAddress, ...) error
- func (k Keeper) IterateScopesForScopeSpec(ctx sdk.Context, scopeSpecID types.MetadataAddress, ...) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Ownership(c context.Context, req *types.OwnershipRequest) (*types.OwnershipResponse, error)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RecordsByScopeID(c context.Context, req *types.RecordsByScopeIDRequest) (*types.RecordsByScopeIDResponse, error)
- func (k Keeper) RecordsByScopeUUID(c context.Context, req *types.RecordsByScopeUUIDRequest) (*types.RecordsByScopeUUIDResponse, error)
- func (k Keeper) RemoveContractSpecification(ctx sdk.Context, contractSpecID types.MetadataAddress)
- func (k Keeper) RemoveRecord(ctx sdk.Context, id types.MetadataAddress)
- func (k Keeper) RemoveRecordGroup(ctx sdk.Context, id types.MetadataAddress)
- func (k Keeper) RemoveScope(ctx sdk.Context, id types.MetadataAddress)
- func (k Keeper) RemoveScopeSpecification(ctx sdk.Context, scopeSpecID types.MetadataAddress)
- func (k Keeper) Scope(c context.Context, req *types.ScopeRequest) (*types.ScopeResponse, error)
- func (k Keeper) ScopeSpecification(c context.Context, req *types.ScopeSpecificationRequest) (*types.ScopeSpecificationResponse, error)
- func (k Keeper) SetContractSpecification(ctx sdk.Context, spec types.ContractSpecification)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetRecord(ctx sdk.Context, record types.Record)
- func (k Keeper) SetRecordGroup(ctx sdk.Context, group types.RecordGroup)
- func (k Keeper) SetScope(ctx sdk.Context, scope types.Scope)
- func (k Keeper) SetScopeSpecification(ctx sdk.Context, spec types.ScopeSpecification)
- func (k Keeper) ValidateAllOwnersAreSigners(existingOwners []string, signers []string) error
- func (k Keeper) ValidateContractSpecUpdate(ctx sdk.Context, existing *types.ContractSpecification, ...) error
- func (k Keeper) ValidateRawSignature(signature signing.SignatureDescriptor, message []byte) (addr sdk.AccAddress, err error)
- func (k Keeper) ValidateRecordUpdate(ctx sdk.Context, existing, proposed types.Record, signers []string) error
- func (k Keeper) ValidateScopeRemove(ctx sdk.Context, existing, proposed types.Scope, signers []string) error
- func (k Keeper) ValidateScopeSpecUpdate(ctx sdk.Context, existing *types.ScopeSpecification, ...) error
- func (k Keeper) ValidateScopeUpdate(ctx sdk.Context, existing, proposed types.Scope, signers []string) error
- func (k Keeper) ValueOwnership(c context.Context, req *types.ValueOwnershipRequest) (*types.ValueOwnershipResponse, error)
- type MetadataKeeperI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the distribution MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a querier for auth REST endpoints
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is the concrete state-based API for the metadata module.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryMarshaler, key sdk.StoreKey, paramSpace paramtypes.Subspace, authKeeper authkeeper.AccountKeeper, ) Keeper
NewKeeper creates new instances of the metadata Keeper.
func (Keeper) AccountIsMarker ¶
AccountIsMarker determines if account is marker
func (Keeper) ContractSpecification ¶ added in v0.1.5
func (k Keeper) ContractSpecification(c context.Context, req *types.ContractSpecificationRequest) (*types.ContractSpecificationResponse, error)
ContractSpecification returns a specific scope specification by id
func (Keeper) CreateAccountForKey ¶
func (k Keeper) CreateAccountForKey(ctx sdk.Context, addr sdk.AccAddress, pubKey cryptotypes.PubKey) error
CreateAccountForKey creates a new account for the given address with a public key set if given.
func (Keeper) CreateRawSignature ¶
func (k Keeper) CreateRawSignature(txf clienttx.Factory, name string, txBuilder client.TxBuilder, message []byte, appendSignature bool) error
CreateRawSignature creates a standard TX signature but uses the message bytes as provided instead of the typical approach of building a signing structure with sequence, chain-id, and account number. This approach is required for independent signatures like those used in the contract memorialize process which are independent of blockchain tx and their replay protection.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
ExportGenesis exports the current keeper state of the metadata module.ExportGenesis
func (Keeper) GetAccount ¶
GetAccount looks up an account by address
func (Keeper) GetContractSpecification ¶ added in v0.1.5
func (k Keeper) GetContractSpecification(ctx sdk.Context, contractSpecID types.MetadataAddress) (spec types.ContractSpecification, found bool)
GetContractSpecification returns the contract spec with the given id.
func (Keeper) GetRecord ¶
func (k Keeper) GetRecord(ctx sdk.Context, id types.MetadataAddress) (record types.Record, found bool)
GetRecord returns the record with the given id.
func (Keeper) GetRecordGroup ¶
func (k Keeper) GetRecordGroup(ctx sdk.Context, id types.MetadataAddress) (group types.RecordGroup, found bool)
GetRecordGroup returns the scope with the given id.
func (Keeper) GetRecords ¶ added in v0.1.5
func (k Keeper) GetRecords(ctx sdk.Context, scopeAddress types.MetadataAddress, name string) ([]*types.Record, error)
GetRecords returns records with scopeAddress and name
func (Keeper) GetScopeSpecification ¶
func (k Keeper) GetScopeSpecification(ctx sdk.Context, scopeSpecID types.MetadataAddress) (spec types.ScopeSpecification, found bool)
GetScopeSpecification returns the record with the given id.
func (Keeper) GroupContext ¶
func (k Keeper) GroupContext(c context.Context, req *types.GroupContextRequest) (*types.GroupContextResponse, error)
GroupContext returns a specific group context within a scope (or all groups)
func (Keeper) HasSignerWithMarkerValueAuthority ¶
func (k Keeper) HasSignerWithMarkerValueAuthority(ctx sdk.Context, valueOwner string, signers []string, role markertypes.Access) bool
HasSignerWithMarkerValueAuthority checks the list of signers for any that have the requested role.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis creates the initial genesis state for the metadata module.
func (Keeper) IterateContractSpecs ¶ added in v0.1.5
func (k Keeper) IterateContractSpecs(ctx sdk.Context, handler func(specification types.ContractSpecification) (stop bool)) error
IterateContractSpecs processes all contract specs using a given handler.
func (Keeper) IterateContractSpecsForOwner ¶ added in v0.1.5
func (k Keeper) IterateContractSpecsForOwner(ctx sdk.Context, ownerAddress sdk.AccAddress, handler func(contractSpecID types.MetadataAddress) (stop bool)) error
IterateContractSpecsForOwner processes all contract specs owned by an address using a given handler.
func (Keeper) IterateGroups ¶
func (k Keeper) IterateGroups(ctx sdk.Context, scopeID types.MetadataAddress, handler func(types.RecordGroup) (stop bool)) error
IterateGroups processes all stored scopes with the given handler.
func (Keeper) IterateRecords ¶
func (k Keeper) IterateRecords(ctx sdk.Context, scopeID types.MetadataAddress, handler func(types.Record) (stop bool)) error
IterateRecords processes all records in a scope with the given handler.
func (Keeper) IterateScopeSpecs ¶ added in v0.1.5
func (k Keeper) IterateScopeSpecs(ctx sdk.Context, handler func(specification types.ScopeSpecification) (stop bool)) error
IterateScopeSpecs processes all scope specs using a given handler.
func (Keeper) IterateScopeSpecsForContractSpec ¶ added in v0.1.5
func (k Keeper) IterateScopeSpecsForContractSpec(ctx sdk.Context, contractSpecID types.MetadataAddress, handler func(scopeSpecID types.MetadataAddress) (stop bool)) error
IterateScopeSpecsForContractSpec processes all scope specs associated with a contract spec id using a given handler.
func (Keeper) IterateScopeSpecsForOwner ¶ added in v0.1.5
func (k Keeper) IterateScopeSpecsForOwner(ctx sdk.Context, ownerAddress sdk.AccAddress, handler func(scopeSpecID types.MetadataAddress) (stop bool)) error
IterateScopeSpecsForOwner processes all scope specs owned by an address using a given handler.
func (Keeper) IterateScopes ¶
IterateScopes processes all stored scopes with the given handler.
func (Keeper) IterateScopesForAddress ¶
func (k Keeper) IterateScopesForAddress(ctx sdk.Context, address sdk.AccAddress, handler func(scopeID types.MetadataAddress) (stop bool)) error
IterateScopesForAddress processes scopes associated with the provided address with the given handler.
func (Keeper) IterateScopesForScopeSpec ¶
func (k Keeper) IterateScopesForScopeSpec(ctx sdk.Context, scopeSpecID types.MetadataAddress, handler func(scopeID types.MetadataAddress) (stop bool), ) error
IterateScopesForScopeSpec processes scopes associated with the provided scope specification id with the given handler.
func (Keeper) Ownership ¶
func (k Keeper) Ownership(c context.Context, req *types.OwnershipRequest) (*types.OwnershipResponse, error)
Ownership returns a list of scope identifiers that list the given address as a data or value owner
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of metadata module
func (Keeper) RecordsByScopeID ¶ added in v0.1.5
func (k Keeper) RecordsByScopeID(c context.Context, req *types.RecordsByScopeIDRequest) (*types.RecordsByScopeIDResponse, error)
RecordsByScopeID returns a collection of the records in a scope or a specific one by name
func (Keeper) RecordsByScopeUUID ¶ added in v0.1.5
func (k Keeper) RecordsByScopeUUID(c context.Context, req *types.RecordsByScopeUUIDRequest) (*types.RecordsByScopeUUIDResponse, error)
RecordsByScopeUUID returns a collection of the records in a scope or a specific one by name
func (Keeper) RemoveContractSpecification ¶ added in v0.1.5
func (k Keeper) RemoveContractSpecification(ctx sdk.Context, contractSpecID types.MetadataAddress)
RemoveContractSpecification removes a contract specification from the module kv store.
func (Keeper) RemoveRecord ¶
func (k Keeper) RemoveRecord(ctx sdk.Context, id types.MetadataAddress)
RemoveRecord removes a scope from the module kv store.
func (Keeper) RemoveRecordGroup ¶
func (k Keeper) RemoveRecordGroup(ctx sdk.Context, id types.MetadataAddress)
RemoveRecordGroup removes a scope from the module kv store.
func (Keeper) RemoveScope ¶ added in v0.1.5
func (k Keeper) RemoveScope(ctx sdk.Context, id types.MetadataAddress)
RemoveScope removes a scope from the module kv store.
func (Keeper) RemoveScopeSpecification ¶ added in v0.1.5
func (k Keeper) RemoveScopeSpecification(ctx sdk.Context, scopeSpecID types.MetadataAddress)
RemoveScopeSpecification removes a scope specification from the module kv store.
func (Keeper) Scope ¶
func (k Keeper) Scope(c context.Context, req *types.ScopeRequest) (*types.ScopeResponse, error)
Scope returns a specific scope by id
func (Keeper) ScopeSpecification ¶ added in v0.1.5
func (k Keeper) ScopeSpecification(c context.Context, req *types.ScopeSpecificationRequest) (*types.ScopeSpecificationResponse, error)
ScopeSpecification returns a specific scope specification by id
func (Keeper) SetContractSpecification ¶ added in v0.1.5
func (k Keeper) SetContractSpecification(ctx sdk.Context, spec types.ContractSpecification)
SetContractSpecification stores a contract specification in the module kv store.
func (Keeper) SetRecordGroup ¶
func (k Keeper) SetRecordGroup(ctx sdk.Context, group types.RecordGroup)
SetRecordGroup stores a group in the module kv store.
func (Keeper) SetScopeSpecification ¶
func (k Keeper) SetScopeSpecification(ctx sdk.Context, spec types.ScopeSpecification)
SetScopeSpecification stores a scope specification in the module kv store.
func (Keeper) ValidateAllOwnersAreSigners ¶ added in v0.1.5
ValidateAllOwnersAreSigners makes sure that all entries in the existingOwners list are contained in the signers list.
func (Keeper) ValidateContractSpecUpdate ¶ added in v0.1.5
func (k Keeper) ValidateContractSpecUpdate(ctx sdk.Context, existing *types.ContractSpecification, proposed types.ContractSpecification, signers []string) error
ValidateContractSpecUpdate full validation of a proposed contract spec possibly against an existing one.
func (Keeper) ValidateRawSignature ¶
func (k Keeper) ValidateRawSignature(signature signing.SignatureDescriptor, message []byte) (addr sdk.AccAddress, err error)
ValidateRawSignature takes a given message and verifies the signature instance is valid for it directly without calculating a signing structure to wrap it. ValidateRawSignature returns the address of the user who created the signature and any encountered errors.
func (Keeper) ValidateRecordUpdate ¶ added in v0.1.5
func (k Keeper) ValidateRecordUpdate(ctx sdk.Context, existing, proposed types.Record, signers []string) error
ValidateRecordUpdate checks the current record and the proposed record to determine if the the proposed changes are valid based on the existing state
func (Keeper) ValidateScopeRemove ¶
func (k Keeper) ValidateScopeRemove(ctx sdk.Context, existing, proposed types.Scope, signers []string) error
ValidateScopeRemove checks the current scope and the proposed removal scope to determine if the the proposed remove is valid based on the existing state
func (Keeper) ValidateScopeSpecUpdate ¶ added in v0.1.5
func (k Keeper) ValidateScopeSpecUpdate(ctx sdk.Context, existing *types.ScopeSpecification, proposed types.ScopeSpecification, signers []string) error
ValidateScopeSpecUpdate - full validation of a scope specification.
func (Keeper) ValidateScopeUpdate ¶
func (k Keeper) ValidateScopeUpdate(ctx sdk.Context, existing, proposed types.Scope, signers []string) error
ValidateScopeUpdate checks the current scope and the proposed scope to determine if the the proposed changes are valid based on the existing state
func (Keeper) ValueOwnership ¶
func (k Keeper) ValueOwnership(c context.Context, req *types.ValueOwnershipRequest) (*types.ValueOwnershipResponse, error)
ValueOwnership returns a list of scope identifiers that list the given address as a value owner
type MetadataKeeperI ¶
type MetadataKeeperI interface { // GetScope returns the scope with the given address. GetScope(sdk.Context, types.MetadataAddress) (types.Scope, bool) // SetScope persists the provided scope SetScope(sdk.Context, types.Scope) // RemoveScope removes the provided scope RemoveScope(sdk.Context, types.MetadataAddress) // IterateScopes processes all stored scopes with the given handler. IterateScopes(sdk.Context, func(types.Scope) bool) error // GetRecordGroup returns the scope with the given address. GetRecordGroup(sdk.Context, types.MetadataAddress) (types.RecordGroup, bool) // SetRecordGroup persists the provided scope SetRecordGroup(sdk.Context, types.RecordGroup) // RemoveRecordGroup persists the provided scope RemoveRecordGroup(sdk.Context, types.MetadataAddress) // GetRecord returns the record with the given address. GetRecord(sdk.Context, types.MetadataAddress) (types.Record, bool) // GetRecords returns records with giving scope and/or name GetRecords(sdk.Context, types.MetadataAddress, string) ([]*types.Record, error) // SetRecord persists the provided record SetRecord(sdk.Context, types.Record) // RemoveRecord persists the provided scope RemoveRecord(sdk.Context, types.MetadataAddress) // IterateRecords processes all stored record for a scope with the given handler. IterateRecords(sdk.Context, types.MetadataAddress, func(types.Record) bool) error // GetScopeSpecification returns the record with the given address. GetScopeSpecification(sdk.Context, types.MetadataAddress) (types.ScopeSpecification, bool) // SetScopeSpecification persists the provided scope specification SetScopeSpecification(sdk.Context, types.ScopeSpecification) // RemoveScopeSpecification removes a scope specification from the module kv store. RemoveScopeSpecification(sdk.Context, types.MetadataAddress) // IterateScopeSpecs processes all scope specs using a given handler. IterateScopeSpecs(ctx sdk.Context, handler func(specification types.ScopeSpecification) (stop bool)) error // IterateScopeSpecsForOwner processes all scope specs owned by an address using a given handler. IterateScopeSpecsForOwner(ctx sdk.Context, ownerAddress sdk.AccAddress, handler func(scopeSpecID types.MetadataAddress) (stop bool)) error // IterateScopeSpecsForContractSpec processes all scope specs associated with a contract spec id using a given handler. IterateScopeSpecsForContractSpec(ctx sdk.Context, contractSpecID types.MetadataAddress, handler func(scopeSpecID types.MetadataAddress) (stop bool)) error // GetContractSpecification returns the contract specification with the given address. GetContractSpecification(sdk.Context, types.MetadataAddress) (types.ContractSpecification, bool) // SetContractSpecification persists the provided contract specification SetContractSpecification(sdk.Context, types.ContractSpecification) // RemoveContractSpecification removes a contract specification from the module kv store. RemoveContractSpecification(sdk.Context, types.MetadataAddress) // IterateContractSpecs processes all contract specs using the given handler. IterateContractSpecs(ctx sdk.Context, handler func(specification types.ContractSpecification) (stop bool)) error // IterateContractSpecsForOwner processes all contract specs owned by an address using a given handler. IterateContractSpecsForOwner(ctx sdk.Context, ownerAddress sdk.AccAddress, handler func(contractSpecID types.MetadataAddress) (stop bool)) error }
MetadataKeeperI is the internal state api for the metadata module.