keeper

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SamplePubKey  = "b7a3c12dc0c8c748ab07525b701122b88bd78f600c76342d27f25e5f92444cde"
	SamplePubKey2 = "b7a3c12dc0c8c748ab07525b701122b88bd78f600c76342d27f25e5f92444cdf"
)

Variables

This section is empty.

Functions

func MakeTestPubKey

func MakeTestPubKey(pk string) crypto.PubKey

Types

type Keeper

type Keeper struct {
	CoinKeeper   bank.Keeper
	SupplyKeeper supply.Keeper
	// contains filtered or unexported fields
}

Keeper of the issuer store

func MakeTestCtxAndKeeper

func MakeTestCtxAndKeeper(t *testing.T) (sdk.Context, Keeper)

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, supplyKeeper supply.Keeper, cdc *codec.Codec, key sdk.StoreKey) Keeper

NewKeeper creates a issuer keeper

func (Keeper) Get

func (k Keeper) Get(ctx sdk.Context, key []byte, prefix []byte, unmarshal UnmarshalFn) (i interface{}, found bool)

Get gets an item from the store by bytes

func (Keeper) GetAccount

func (k Keeper) GetAccount(ctx sdk.Context, key []byte) (types.Account, bool)

func (Keeper) GetAll

func (k Keeper) GetAll(ctx sdk.Context, prefix []byte, unmarshal UnmarshalFn) (i []interface{})

GetAll values from with a prefix from the store

func (Keeper) GetIssuer

func (k Keeper) GetIssuer(ctx sdk.Context, key []byte) (types.Issuer, bool)

func (Keeper) GetIssuerByToken

func (k Keeper) GetIssuerByToken(ctx sdk.Context, token string) (types.Issuer, bool)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) Set

func (k Keeper) Set(ctx sdk.Context, key []byte, prefix []byte, i interface{})

Set sets a value in the db with a prefixed key

func (Keeper) SetAccount

func (k Keeper) SetAccount(ctx sdk.Context, key []byte, account types.Account)

func (Keeper) SetIssuer

func (k Keeper) SetIssuer(ctx sdk.Context, key []byte, issuer types.Issuer)

func (Keeper) UnmarshalAccount

func (k Keeper) UnmarshalAccount(value []byte) (interface{}, bool)

func (Keeper) UnmarshalIssuer

func (k Keeper) UnmarshalIssuer(value []byte) (interface{}, bool)

type UnmarshalFn

type UnmarshalFn func(value []byte) (interface{}, bool)

UnmarshalFn is a generic function to unmarshal bytes

Jump to

Keyboard shortcuts

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