keeper

package
v1.5.0-beta.10 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: AGPL-3.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryEncryptedSeed     = "seed"
	QueryMasterCertificate = "master-cert"
)

Variables

Functions

func CreateTestSeedConfig

func CreateTestSeedConfig(t *testing.T) []byte

func ExportGenesis

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

ExportGenesis returns a GenesisState for a given context and keeper.

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) types.GenesisState

func InitGenesis

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

InitGenesis sets supply information for genesis.

func InitializeNode

func InitializeNode(homeDir string, enclave EnclaveInterface)

func IsHexString

func IsHexString(s string) bool

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

func MakeTestCodec

func MakeTestCodec() codec.Codec

func NewLegacyQuerier

func NewLegacyQuerier(keeper Keeper) sdk.Querier

NewQuerier creates a new querier

Types

type EnclaveInterface

type EnclaveInterface interface {
	LoadSeed(masterCert []byte, seed []byte) (bool, error)
	GetEncryptedSeed(masterCert []byte) ([]byte, error)
}

type GrpcQuerier

type GrpcQuerier struct {
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier(keeper Keeper) GrpcQuerier

todo: this needs proper tests and doc

func (GrpcQuerier) RegistrationKey

func (q GrpcQuerier) RegistrationKey(c context.Context, _ *empty.Empty) (*types.Key, error)

func (GrpcQuerier) TxKey

func (q GrpcQuerier) TxKey(c context.Context, _ *empty.Empty) (*types.Key, error)

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper will have a reference to Wasmer with it's own data directory.

func CreateTestInput

func CreateTestInput(t *testing.T, isCheckTx bool, tempDir string, bootstrap bool) (sdk.Context, Keeper)

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, router sdk.Router, enclave EnclaveInterface, homeDir string, bootstrap bool) Keeper

NewKeeper creates a new contract Keeper instance

func (Keeper) GetMasterCertificate

func (k Keeper) GetMasterCertificate(ctx sdk.Context, certType string) *types.MasterCertificate

func (Keeper) ListRegistrationInfo

func (k Keeper) ListRegistrationInfo(ctx sdk.Context, cb func([]byte, types.RegistrationNodeInfo) bool)

func (Keeper) RegisterNode

func (k Keeper) RegisterNode(ctx sdk.Context, certificate ra.Certificate) ([]byte, error)

func (Keeper) SetRegistrationInfo

func (k Keeper) SetRegistrationInfo(ctx sdk.Context, certificate types.RegistrationNodeInfo)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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