keeper

package
v10.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueryServer

func NewQueryServer(k *Keeper) types.QueryServer

NewQueryServer returns a new types.QueryServer implementation.

Types

type Keeper

type Keeper struct {
	ClientKeeper types.ClientKeeper

	// Router is used to route messages to the appropriate module callbacks
	// NOTE: it must be explicitly set before usage.
	Router *api.Router
	// contains filtered or unexported fields
}

Keeper defines the channel keeper v2.

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService corestore.KVStoreService,
	clientKeeper types.ClientKeeper,
	clientV2Keeper *clientv2keeper.Keeper,
	channelKeeperV1 *channelkeeperv1.Keeper,
	connectionKeeper *connectionkeeper.Keeper,
) *Keeper

NewKeeper creates a new channel v2 keeper

func (*Keeper) Acknowledgement

Acknowledgement defines an rpc handler method for MsgAcknowledgement.

func (*Keeper) DeleteAsyncPacket

func (k *Keeper) DeleteAsyncPacket(ctx sdk.Context, clientID string, sequence uint64)

DeleteAsyncPacket deletes the packet from the async path

func (*Keeper) DeletePacketCommitment

func (k *Keeper) DeletePacketCommitment(ctx sdk.Context, clientID string, sequence uint64)

DeletePacketCommitment deletes the packet commitment hash under the commitment path.

func (*Keeper) GetAllAsyncPacketsForClient

func (k *Keeper) GetAllAsyncPacketsForClient(ctx sdk.Context, clientID string) []types.PacketState

GetAllAsyncPacketsForClient returns all stored AsyncPackets objects for a specified client ID.

func (*Keeper) GetAllPacketAcknowledgementsForClient

func (k *Keeper) GetAllPacketAcknowledgementsForClient(ctx sdk.Context, clientID string) []types.PacketState

GetAllPacketAcknowledgementsForClient returns all stored PacketAcknowledgements objects for a specified client ID.

func (*Keeper) GetAllPacketCommitmentsForClient

func (k *Keeper) GetAllPacketCommitmentsForClient(ctx sdk.Context, clientID string) []types.PacketState

GetAllPacketCommitmentsForClient returns all stored PacketCommitments objects for a specified client ID.

func (*Keeper) GetAllPacketReceiptsForClient

func (k *Keeper) GetAllPacketReceiptsForClient(ctx sdk.Context, clientID string) []types.PacketState

GetAllPacketReceiptsForClient returns all stored PacketReceipts objects for a specified client ID.

func (*Keeper) GetAsyncPacket

func (k *Keeper) GetAsyncPacket(ctx sdk.Context, clientID string, sequence uint64) (types.Packet, bool)

GetAsyncPacket fetches the packet from the async path

func (*Keeper) GetNextSequenceSend

func (k *Keeper) GetNextSequenceSend(ctx sdk.Context, clientID string) (uint64, bool)

GetNextSequenceSend returns the next send sequence from the sequence path

func (*Keeper) GetPacketAcknowledgement

func (k *Keeper) GetPacketAcknowledgement(ctx sdk.Context, clientID string, sequence uint64) []byte

GetPacketAcknowledgement fetches the packet acknowledgement from the store.

func (*Keeper) GetPacketCommitment

func (k *Keeper) GetPacketCommitment(ctx sdk.Context, clientID string, sequence uint64) []byte

GetPacketCommitment returns the packet commitment hash under the commitment path.

func (*Keeper) GetPacketReceipt

func (k *Keeper) GetPacketReceipt(ctx sdk.Context, clientID string, sequence uint64) ([]byte, bool)

GetPacketReceipt returns the packet receipt from the packet receipt path based on the clientID and sequence.

func (*Keeper) HasPacketAcknowledgement

func (k *Keeper) HasPacketAcknowledgement(ctx sdk.Context, clientID string, sequence uint64) bool

HasPacketAcknowledgement checks if the packet ack hash is already on the store.

func (*Keeper) HasPacketReceipt

func (k *Keeper) HasPacketReceipt(ctx sdk.Context, clientID string, sequence uint64) bool

HasPacketReceipt returns true if the packet receipt exists, otherwise false.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (*Keeper) RecvPacket

func (k *Keeper) RecvPacket(goCtx context.Context, msg *types.MsgRecvPacket) (*types.MsgRecvPacketResponse, error)

RecvPacket implements the PacketMsgServer RecvPacket method.

func (*Keeper) SendPacket

func (k *Keeper) SendPacket(goCtx context.Context, msg *types.MsgSendPacket) (*types.MsgSendPacketResponse, error)

SendPacket implements the PacketMsgServer SendPacket method.

func (*Keeper) SetAsyncPacket

func (k *Keeper) SetAsyncPacket(ctx sdk.Context, clientID string, sequence uint64, packet types.Packet)

SetAsyncPacket writes the packet under the async path

func (*Keeper) SetNextSequenceSend

func (k *Keeper) SetNextSequenceSend(ctx sdk.Context, clientID string, sequence uint64)

SetNextSequenceSend writes the next send sequence under the sequence path

func (*Keeper) SetPacketAcknowledgement

func (k *Keeper) SetPacketAcknowledgement(ctx sdk.Context, clientID string, sequence uint64, ackHash []byte)

SetPacketAcknowledgement writes the acknowledgement hash under the acknowledgement path This is a public path that is standardized by the IBC V2 specification.

func (*Keeper) SetPacketCommitment

func (k *Keeper) SetPacketCommitment(ctx sdk.Context, clientID string, sequence uint64, commitment []byte)

SetPacketCommitment writes the commitment hash under the commitment path.

func (*Keeper) SetPacketReceipt

func (k *Keeper) SetPacketReceipt(ctx sdk.Context, clientID string, sequence uint64)

SetPacketReceipt writes the packet receipt under the receipt path This is a public path that is standardized by the IBC V2 specification.

func (*Keeper) Timeout

func (k *Keeper) Timeout(goCtx context.Context, timeout *types.MsgTimeout) (*types.MsgTimeoutResponse, error)

Timeout implements the PacketMsgServer Timeout method.

func (*Keeper) WriteAcknowledgement

func (k *Keeper) WriteAcknowledgement(ctx sdk.Context, clientID string, sequence uint64, ack types.Acknowledgement) error

WriteAcknowledgement writes the acknowledgement and emits events for asynchronous acknowledgements this is the method to be called by external apps when they want to write an acknowledgement asyncrhonously

Jump to

Keyboard shortcuts

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