Documentation ¶
Index ¶
- func EmitConnectionOpenAckEvent(ctx sdk.Context, connectionID string, connectionEnd types.ConnectionEnd)
- func EmitConnectionOpenConfirmEvent(ctx sdk.Context, connectionID string, connectionEnd types.ConnectionEnd)
- func EmitConnectionOpenInitEvent(ctx sdk.Context, connectionID string, clientID string, ...)
- func EmitConnectionOpenTryEvent(ctx sdk.Context, connectionID string, clientID string, ...)
- type Keeper
- func (q Keeper) ClientConnections(c context.Context, req *types.QueryClientConnectionsRequest) (*types.QueryClientConnectionsResponse, error)
- func (k Keeper) ConnOpenAck(ctx sdk.Context, connectionID string, clientState exported.ClientState, ...) error
- func (k Keeper) ConnOpenConfirm(ctx sdk.Context, connectionID string, proofAck []byte, ...) error
- func (k Keeper) ConnOpenInit(ctx sdk.Context, clientID string, counterparty types.Counterparty, ...) (string, error)
- func (k Keeper) ConnOpenTry(ctx sdk.Context, counterparty types.Counterparty, delayPeriod uint64, ...) (string, error)
- func (q Keeper) Connection(c context.Context, req *types.QueryConnectionRequest) (*types.QueryConnectionResponse, error)
- func (q Keeper) ConnectionClientState(c context.Context, req *types.QueryConnectionClientStateRequest) (*types.QueryConnectionClientStateResponse, error)
- func (q Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConnectionConsensusStateRequest) (*types.QueryConnectionConsensusStateResponse, error)
- func (q Keeper) ConnectionParams(c context.Context, req *types.QueryConnectionParamsRequest) (*types.QueryConnectionParamsResponse, error)
- func (q Keeper) Connections(c context.Context, req *types.QueryConnectionsRequest) (*types.QueryConnectionsResponse, error)
- func (k Keeper) GenerateConnectionIdentifier(ctx sdk.Context) string
- func (k Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionPaths
- func (k Keeper) GetAllConnections(ctx sdk.Context) (connections []types.IdentifiedConnection)
- func (k Keeper) GetClientConnectionPaths(ctx sdk.Context, clientID string) ([]string, bool)
- func (k Keeper) GetCommitmentPrefix() exported.Prefix
- func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (types.ConnectionEnd, bool)
- func (k Keeper) GetMaxExpectedTimePerBlock(ctx sdk.Context) uint64
- func (k Keeper) GetNextConnectionSequence(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetTimestampAtHeight(ctx sdk.Context, connection types.ConnectionEnd, height exported.Height) (uint64, error)
- func (k Keeper) IterateConnections(ctx sdk.Context, cb func(types.IdentifiedConnection) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetClientConnectionPaths(ctx sdk.Context, clientID string, paths []string)
- func (k Keeper) SetConnection(ctx sdk.Context, connectionID string, connection types.ConnectionEnd)
- func (k Keeper) SetNextConnectionSequence(ctx sdk.Context, sequence uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) VerifyChannelState(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyClientConsensusState(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyClientState(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyConnectionState(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyNextSequenceRecv(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyPacketAcknowledgement(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyPacketCommitment(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
- func (k Keeper) VerifyPacketReceiptAbsence(ctx sdk.Context, connection exported.ConnectionI, height exported.Height, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmitConnectionOpenAckEvent ¶
func EmitConnectionOpenAckEvent(ctx sdk.Context, connectionID string, connectionEnd types.ConnectionEnd)
EmitConnectionOpenAckEvent emits a connection open acknowledge event
func EmitConnectionOpenConfirmEvent ¶
func EmitConnectionOpenConfirmEvent(ctx sdk.Context, connectionID string, connectionEnd types.ConnectionEnd)
EmitConnectionOpenConfirmEvent emits a connection open confirm event
func EmitConnectionOpenInitEvent ¶
func EmitConnectionOpenInitEvent(ctx sdk.Context, connectionID string, clientID string, counterparty types.Counterparty)
EmitConnectionOpenInitEvent emits a connection open init event
func EmitConnectionOpenTryEvent ¶
func EmitConnectionOpenTryEvent(ctx sdk.Context, connectionID string, clientID string, counterparty types.Counterparty)
EmitConnectionOpenTryEvent emits a connection open try event
Types ¶
type Keeper ¶
type Keeper struct { // implements gRPC QueryServer interface types.QueryServer // contains filtered or unexported fields }
Keeper defines the IBC connection keeper
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ck types.ClientKeeper) Keeper
NewKeeper creates a new IBC connection Keeper instance
func (Keeper) ClientConnections ¶
func (q Keeper) ClientConnections(c context.Context, req *types.QueryClientConnectionsRequest) (*types.QueryClientConnectionsResponse, error)
ClientConnections implements the Query/ClientConnections gRPC method
func (Keeper) ConnOpenAck ¶
func (k Keeper) ConnOpenAck( ctx sdk.Context, connectionID string, clientState exported.ClientState, version *types.Version, counterpartyConnectionID string, proofTry []byte, proofClient []byte, proofConsensus []byte, proofHeight exported.Height, consensusHeight exported.Height, ) error
ConnOpenAck relays acceptance of a connection open attempt from chain B back to chain A (this code is executed on chain A).
NOTE: Identifiers are checked on msg validation.
func (Keeper) ConnOpenConfirm ¶
func (k Keeper) ConnOpenConfirm( ctx sdk.Context, connectionID string, proofAck []byte, proofHeight exported.Height, ) error
ConnOpenConfirm confirms opening of a connection on chain A to chain B, after which the connection is open on both chains (this code is executed on chain B).
NOTE: Identifiers are checked on msg validation.
func (Keeper) ConnOpenInit ¶
func (k Keeper) ConnOpenInit( ctx sdk.Context, clientID string, counterparty types.Counterparty, version *types.Version, delayPeriod uint64, ) (string, error)
ConnOpenInit initialises a connection attempt on chain A. The generated connection identifier is returned.
NOTE: Msg validation verifies the supplied identifiers and ensures that the counterparty connection identifier is empty.
func (Keeper) ConnOpenTry ¶
func (k Keeper) ConnOpenTry( ctx sdk.Context, counterparty types.Counterparty, delayPeriod uint64, clientID string, clientState exported.ClientState, counterpartyVersions []exported.Version, proofInit []byte, proofClient []byte, proofConsensus []byte, proofHeight exported.Height, consensusHeight exported.Height, ) (string, error)
ConnOpenTry relays notice of a connection attempt on chain A to chain B (this code is executed on chain B).
NOTE:
- Here chain A acts as the counterparty
- Identifiers are checked on msg validation
func (Keeper) Connection ¶
func (q Keeper) Connection(c context.Context, req *types.QueryConnectionRequest) (*types.QueryConnectionResponse, error)
Connection implements the Query/Connection gRPC method
func (Keeper) ConnectionClientState ¶
func (q Keeper) ConnectionClientState(c context.Context, req *types.QueryConnectionClientStateRequest) (*types.QueryConnectionClientStateResponse, error)
ConnectionClientState implements the Query/ConnectionClientState gRPC method
func (Keeper) ConnectionConsensusState ¶
func (q Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConnectionConsensusStateRequest) (*types.QueryConnectionConsensusStateResponse, error)
ConnectionConsensusState implements the Query/ConnectionConsensusState gRPC method
func (Keeper) ConnectionParams ¶
func (q Keeper) ConnectionParams(c context.Context, req *types.QueryConnectionParamsRequest) (*types.QueryConnectionParamsResponse, error)
ConnectionParams implements the Query/ConnectionParams gRPC method.
func (Keeper) Connections ¶
func (q Keeper) Connections(c context.Context, req *types.QueryConnectionsRequest) (*types.QueryConnectionsResponse, error)
Connections implements the Query/Connections gRPC method
func (Keeper) GenerateConnectionIdentifier ¶
GenerateConnectionIdentifier returns the next connection identifier.
func (Keeper) GetAllClientConnectionPaths ¶
func (k Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionPaths
GetAllClientConnectionPaths returns all stored clients connection id paths. It will ignore the clients that haven't initialized a connection handshake since no paths are stored.
func (Keeper) GetAllConnections ¶
func (k Keeper) GetAllConnections(ctx sdk.Context) (connections []types.IdentifiedConnection)
GetAllConnections returns all stored ConnectionEnd objects.
func (Keeper) GetClientConnectionPaths ¶
GetClientConnectionPaths returns all the connection paths stored under a particular client
func (Keeper) GetCommitmentPrefix ¶
GetCommitmentPrefix returns the IBC connection store prefix as a commitment Prefix
func (Keeper) GetConnection ¶
GetConnection returns a connection with a particular identifier
func (Keeper) GetMaxExpectedTimePerBlock ¶
GetMaxExpectedTimePerBlock retrieves the maximum expected time per block from the paramstore
func (Keeper) GetNextConnectionSequence ¶
GetNextConnectionSequence gets the next connection sequence from the store.
func (Keeper) GetTimestampAtHeight ¶
func (k Keeper) GetTimestampAtHeight(ctx sdk.Context, connection types.ConnectionEnd, height exported.Height) (uint64, error)
GetTimestampAtHeight returns the timestamp in nanoseconds of the consensus state at the given height.
func (Keeper) IterateConnections ¶
IterateConnections provides an iterator over all ConnectionEnd objects. For each ConnectionEnd, cb will be called. If the cb returns true, the iterator will close and stop.
func (Keeper) SetClientConnectionPaths ¶
SetClientConnectionPaths sets the connections paths for client
func (Keeper) SetConnection ¶
SetConnection sets a connection to the store
func (Keeper) SetNextConnectionSequence ¶
SetNextConnectionSequence sets the next connection sequence to the store.
func (Keeper) VerifyChannelState ¶
func (k Keeper) VerifyChannelState( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, portID, channelID string, channel exported.ChannelI, ) error
VerifyChannelState verifies a proof of the channel state of the specified channel end, under the specified port, stored on the target machine.
func (Keeper) VerifyClientConsensusState ¶
func (k Keeper) VerifyClientConsensusState( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, consensusHeight exported.Height, proof []byte, consensusState exported.ConsensusState, ) error
VerifyClientConsensusState verifies a proof of the consensus state of the specified client stored on the target machine.
func (Keeper) VerifyClientState ¶
func (k Keeper) VerifyClientState( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, clientState exported.ClientState, ) error
VerifyClientState verifies a proof of a client state of the running machine stored on the target machine
func (Keeper) VerifyConnectionState ¶
func (k Keeper) VerifyConnectionState( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, connectionID string, connectionEnd exported.ConnectionI, ) error
VerifyConnectionState verifies a proof of the connection state of the specified connection end stored on the target machine.
func (Keeper) VerifyNextSequenceRecv ¶
func (k Keeper) VerifyNextSequenceRecv( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, portID, channelID string, nextSequenceRecv uint64, ) error
VerifyNextSequenceRecv verifies a proof of the next sequence number to be received of the specified channel at the specified port.
func (Keeper) VerifyPacketAcknowledgement ¶
func (k Keeper) VerifyPacketAcknowledgement( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, portID, channelID string, sequence uint64, acknowledgement []byte, ) error
VerifyPacketAcknowledgement verifies a proof of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.
func (Keeper) VerifyPacketCommitment ¶
func (k Keeper) VerifyPacketCommitment( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, portID, channelID string, sequence uint64, commitmentBytes []byte, ) error
VerifyPacketCommitment verifies a proof of an outgoing packet commitment at the specified port, specified channel, and specified sequence.
func (Keeper) VerifyPacketReceiptAbsence ¶
func (k Keeper) VerifyPacketReceiptAbsence( ctx sdk.Context, connection exported.ConnectionI, height exported.Height, proof []byte, portID, channelID string, sequence uint64, ) error
VerifyPacketReceiptAbsence verifies a proof of the absence of an incoming packet receipt at the specified port, specified channel, and specified sequence.