keeper

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateKey

func CertificateKey(id types.CertID) []byte

CertificateKey creates a store key of the format: prefix_bytes | owner_address_len (1 byte) | owner_address_bytes | serial_bytes

func CertificatePrefix

func CertificatePrefix(id sdk.Address) []byte

func ParseCertID

func ParseCertID(prefix []byte, from []byte) (types.CertID, error)

Types

type Keeper

type Keeper interface {
	Querier() types.QueryServer
	Codec() codec.BinaryCodec
	StoreKey() storetypes.StoreKey
	CreateCertificate(sdk.Context, sdk.Address, []byte, []byte) error
	RevokeCertificate(sdk.Context, types.CertID) error
	GetCertificateByID(ctx sdk.Context, id types.CertID) (types.CertificateResponse, bool)
	WithCertificates(ctx sdk.Context, fn func(id types.CertID, certificate types.CertificateResponse) bool)
	WithCertificatesState(ctx sdk.Context, state types.State, fn func(certificate types.CertificateResponse) bool)
	WithOwner(ctx sdk.Context, id sdk.Address, fn func(types.CertificateResponse) bool)
	WithOwnerState(ctx sdk.Context, id sdk.Address, state types.State, fn func(types.CertificateResponse) bool)
}

Keeper of the provider store

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, skey storetypes.StoreKey) Keeper

NewKeeper creates and returns an instance for Market keeper

Jump to

Keyboard shortcuts

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