keeper

package
v0.0.0-...-5724848 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCredentialIDBytes

func GetCredentialIDBytes(id uint64) []byte

GetCredentialIDBytes returns the byte representation of the ID

func GetCredentialIDFromBytes

func GetCredentialIDFromBytes(bz []byte) uint64

GetCredentialIDFromBytes returns ID in uint64 format from a byte array

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler,
	storeKey,
	memKey sdk.StoreKey,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
	scopedKeeper types.ScopedKeeper,
) *Keeper

func (Keeper) AppendCredential

func (k Keeper) AppendCredential(
	ctx sdk.Context,
	credential types.Credential,
) uint64

AppendCredential appends a credential in the store with a new id and update the count

func (Keeper) AuthenticateCapability

func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool

AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function

func (Keeper) BindPort

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the ort Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) ChanCloseInit

func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error

ChanCloseInit defines a wrapper function for the channel Keeper's function

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability allows the module that can claim a capability that IBC module passes to it

func (Keeper) GetAllCredential

func (k Keeper) GetAllCredential(ctx sdk.Context) (list []types.Credential)

GetAllCredential returns all credential

func (Keeper) GetCredential

func (k Keeper) GetCredential(ctx sdk.Context, id uint64) types.Credential

GetCredential returns a credential from its id

func (Keeper) GetCredentialCount

func (k Keeper) GetCredentialCount(ctx sdk.Context) uint64

GetCredentialCount get the total number of credential

func (Keeper) GetCredentialOwner

func (k Keeper) GetCredentialOwner(ctx sdk.Context, id uint64) string

GetCredentialOwner returns the creator of the credential

func (Keeper) GetPort

func (k Keeper) GetPort(ctx sdk.Context) string

GetPort returns the portID for the module. Used in ExportGenesis

func (Keeper) HasCredential

func (k Keeper) HasCredential(ctx sdk.Context, id uint64) bool

HasCredential checks if the credential exists in the store

func (Keeper) IsBound

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

IsBound checks if the module is already bound to the desired port

func (Keeper) Logger

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

func (Keeper) OnAcknowledgementVerifiableCredentialPacket

func (k Keeper) OnAcknowledgementVerifiableCredentialPacket(ctx sdk.Context, packet channeltypes.Packet, data types.VerifiableCredentialPacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementVerifiableCredentialPacket responds to the the success or failure of a packet acknowledgement written on the receiving chain.

func (Keeper) OnRecvVerifiableCredentialPacket

func (k Keeper) OnRecvVerifiableCredentialPacket(ctx sdk.Context, packet channeltypes.Packet, data types.VerifiableCredentialPacketData) (packetAck types.VerifiableCredentialPacketAck, err error)

OnRecvVerifiableCredentialPacket processes packet reception

func (Keeper) OnTimeoutVerifiableCredentialPacket

func (k Keeper) OnTimeoutVerifiableCredentialPacket(ctx sdk.Context, packet channeltypes.Packet, data types.VerifiableCredentialPacketData) error

OnTimeoutVerifiableCredentialPacket responds to the case where a packet has not been transmitted because of a timeout

func (Keeper) RemoveCredential

func (k Keeper) RemoveCredential(ctx sdk.Context, id uint64)

RemoveCredential removes a credential from the store

func (Keeper) SetCredential

func (k Keeper) SetCredential(ctx sdk.Context, credential types.Credential)

SetCredential set a specific credential in the store

func (Keeper) SetCredentialCount

func (k Keeper) SetCredentialCount(ctx sdk.Context, count uint64)

SetCredentialCount set the total number of credential

func (Keeper) SetPort

func (k Keeper) SetPort(ctx sdk.Context, portID string)

SetPort sets the portID for the module. Used in InitGenesis

func (Keeper) TransmitVerifiableCredentialPacket

func (k Keeper) TransmitVerifiableCredentialPacket(
	ctx sdk.Context,
	packetData types.VerifiableCredentialPacketData,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) error

TransmitVerifiableCredentialPacket transmits the packet over IBC with the specified source port and source channel

Jump to

Keyboard shortcuts

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