keeper

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyDelimiter = []byte{0x00}

	DIDDocumentKeyPrefix = []byte{0x11} // {Prefix}{DID}
)

Functions

func DIDDocumentKey

func DIDDocumentKey(did types.DID) []byte

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState)

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Keeper

type Keeper interface {
	Codec() *codec.Codec
	SetDIDDocument(ctx sdk.Context, did types.DID, doc types.DIDDocumentWithSeq)
	GetDIDDocument(ctx sdk.Context, did types.DID) types.DIDDocumentWithSeq
	ListDIDs(ctx sdk.Context) []types.DID
}

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates a new instance of the did Keeper

Jump to

Keyboard shortcuts

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