did

package
v1.3.0-internal Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName   = types.ModuleName
	StoreKey     = types.StoreKey
	RouterKey    = types.RouterKey
	QuerierRoute = types.QuerierRoute
)
View Source
const (
	QueryDID = "did"
)

Variables

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

	DIDDocumentKeyPrefix = []byte{0x11} // {Prefix}{DID}
)
View Source
var (
	RegisterCodec = types.RegisterCodec
)

Functions

func DIDDocumentKey

func DIDDocumentKey(did types.DID) []byte

func InitGenesis

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

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

NewHandler returns a handler for "did" type messages

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type GenesisDIDDocumentKey

type GenesisDIDDocumentKey struct {
	DID types.DID `json:"did"`
}

func (GenesisDIDDocumentKey) Marshal

func (k GenesisDIDDocumentKey) Marshal() string

func (*GenesisDIDDocumentKey) Unmarshal

func (k *GenesisDIDDocumentKey) Unmarshal(key string) error

type GenesisState

type GenesisState struct {
	Documents map[string]types.DIDDocumentWithSeq
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func ExportGenesis

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

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

type MsgCreateDID

type MsgCreateDID = types.MsgCreateDID

type MsgDeactivateDID

type MsgDeactivateDID = types.MsgDeactivateDID

type MsgUpdateDID

type MsgUpdateDID = types.MsgUpdateDID

type QueryDIDParams

type QueryDIDParams struct {
	DID types.DID
}

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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