Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

core source realm

Constants 5

const SelectorUpdateImpl, SelectorForceUpdateClient, SelectorForceConnectionTry, SelectorForceConnectionAck, SelectorForceConnectionConfirm, SelectorForceChannelTry, SelectorForceChannelAck, SelectorForceChannelConfirm, SelectorChannelCloseInit, SelectorChannelCloseConfirm, SelectorCommitMembershipProof, SelectorCommitNonMembershipProof, SelectorSetEventConfig

 1const (
 2	SelectorUpdateImpl               manager.Selector = "update_impl"
 3	SelectorForceUpdateClient        manager.Selector = "force_update_client"
 4	SelectorForceConnectionTry       manager.Selector = "force_connection_open_try"
 5	SelectorForceConnectionAck       manager.Selector = "force_connection_open_ack"
 6	SelectorForceConnectionConfirm   manager.Selector = "force_connection_open_confirm"
 7	SelectorForceChannelTry          manager.Selector = "force_channel_open_try"
 8	SelectorForceChannelAck          manager.Selector = "force_channel_open_ack"
 9	SelectorForceChannelConfirm      manager.Selector = "force_channel_open_confirm"
10	SelectorChannelCloseInit         manager.Selector = "channel_close_init"
11	SelectorChannelCloseConfirm      manager.Selector = "channel_close_confirm"
12	SelectorCommitMembershipProof    manager.Selector = "commit_membership_proof"
13	SelectorCommitNonMembershipProof manager.Selector = "commit_non_membership_proof"
14
15	// SelectorSetEventConfig gates SetEventConfig calls.
16	SelectorSetEventConfig manager.Selector = "set_event_config"
17)
source

const SelectorRegisterClient, SelectorCreateClient, SelectorUpdateClient, SelectorMisbehaviour, SelectorConnectionOpenInit, SelectorConnectionOpenTry, SelectorConnectionOpenAck, SelectorConnectionOpenConfirm, SelectorChannelOpenInit, SelectorChannelOpenTry, SelectorChannelOpenAck, SelectorChannelOpenConfirm, SelectorPacketRecv, SelectorIntentPacketRecv, SelectorPacketAck, SelectorPacketTimeout, SelectorBatchSend, SelectorBatchAcks

 1const (
 2	SelectorRegisterClient        manager.Selector = types.RelayerSelectorRegisterClient
 3	SelectorCreateClient          manager.Selector = types.RelayerSelectorCreateClient
 4	SelectorUpdateClient          manager.Selector = types.RelayerSelectorUpdateClient
 5	SelectorMisbehaviour          manager.Selector = types.RelayerSelectorMisbehaviour
 6	SelectorConnectionOpenInit    manager.Selector = types.RelayerSelectorConnectionOpenInit
 7	SelectorConnectionOpenTry     manager.Selector = types.RelayerSelectorConnectionOpenTry
 8	SelectorConnectionOpenAck     manager.Selector = types.RelayerSelectorConnectionOpenAck
 9	SelectorConnectionOpenConfirm manager.Selector = types.RelayerSelectorConnectionOpenConfirm
10	SelectorChannelOpenInit       manager.Selector = types.RelayerSelectorChannelOpenInit
11	SelectorChannelOpenTry        manager.Selector = types.RelayerSelectorChannelOpenTry
12	SelectorChannelOpenAck        manager.Selector = types.RelayerSelectorChannelOpenAck
13	SelectorChannelOpenConfirm    manager.Selector = types.RelayerSelectorChannelOpenConfirm
14	SelectorPacketRecv            manager.Selector = types.RelayerSelectorPacketRecv
15	SelectorIntentPacketRecv      manager.Selector = types.RelayerSelectorIntentPacketRecv
16	SelectorPacketAck             manager.Selector = types.RelayerSelectorPacketAck
17	SelectorPacketTimeout         manager.Selector = types.RelayerSelectorPacketTimeout
18	SelectorBatchSend             manager.Selector = types.RelayerSelectorBatchSend
19	SelectorBatchAcks             manager.Selector = types.RelayerSelectorBatchAcks
20)
source

const ErrClientNotActive, ErrInvalidConnectionState, ErrInvalidCounterpartyConnection, ErrInvalidChannelState, ErrInvalidCounterpartyChannelId, ErrSyncAckEmpty, ErrUnknownPacketStatus, ErrUnauthorizedAckWriter, ErrAcknowledgementAlreadyWritten, ErrAcknowledgementEmpty, ErrAcknowledgementMismatch, ErrUnauthorizedPacketSender, ErrTimeoutMustBeSet, ErrPacketCommitmentAlreadyExists, ErrPacketCommitmentNotFound, ErrPacketCombinedDataTooLarge, ErrPacketAlreadyAcknowledged, ErrPacketReceiptNotFound, ErrNotEnoughPackets, ErrBatchSameChannelOnly, ErrAcknowledgementCountMismatch, ErrTimeoutProofTimestampNotFound, ErrPortAlreadyRegistered, ErrBatchPacketsNotFound, ErrBatchReceiptsNotFound, ErrPacketAlreadyReceived, ErrPacketTimeoutExpired, ErrPacketTimeoutNotReached, ErrIntentNotSupported, ErrPortNotFound, ErrClientNotFound, ErrClientStateNotFound, ErrConsensusStateNotFound, ErrConnectionNotFound, ErrChannelNotFound, ErrMembershipProofNotFound, ErrSpoofedRealm, ErrNotProxyRealm

 1const (
 2	ErrClientNotActive               = "client is not active"
 3	ErrInvalidConnectionState        = "invalid connection state"
 4	ErrInvalidCounterpartyConnection = "invalid counterparty connection id"
 5	ErrInvalidChannelState           = "invalid channel state"
 6	ErrInvalidCounterpartyChannelId  = "invalid counterparty channel id"
 7	ErrSyncAckEmpty                  = "sync ack cannot be empty"
 8	ErrUnknownPacketStatus           = "unknown packet status"
 9	ErrUnauthorizedAckWriter         = "caller not authorized to write ack"
10	ErrAcknowledgementAlreadyWritten = "acknowledgement already written"
11	ErrAcknowledgementEmpty          = "acknowledgement cannot be empty"
12	ErrAcknowledgementMismatch       = "acknowledgement mismatch"
13	ErrUnauthorizedPacketSender      = "caller not authorized to send packet"
14	ErrTimeoutMustBeSet              = "timeout must be set"
15	ErrPacketCommitmentAlreadyExists = "packet commitment already exists"
16	ErrPacketCommitmentNotFound      = "packet commitment not found"
17	ErrPacketCombinedDataTooLarge    = "packet combined data too large"
18	ErrPacketAlreadyAcknowledged     = "packet already acknowledged"
19	ErrPacketReceiptNotFound         = "packet receipt not found"
20	ErrNotEnoughPackets              = "not enough packets"
21	ErrBatchSameChannelOnly          = "batch must use the same channel"
22	ErrAcknowledgementCountMismatch  = "acknowledgement count mismatch"
23	ErrTimeoutProofTimestampNotFound = "packet timeout proof timestamp not found"
24	ErrPortAlreadyRegistered         = "port already registered"
25	ErrBatchPacketsNotFound          = "batch packets not found"
26	ErrBatchReceiptsNotFound         = "batch receipts not found"
27	ErrPacketAlreadyReceived         = "packet already received"
28	ErrPacketTimeoutExpired          = "packet timeout expired"
29	ErrPacketTimeoutNotReached       = "packet timeout not reached"
30	ErrIntentNotSupported            = "intent receive not supported"
31
32	// Value-carrying "not found" base messages. The missing id/port is appended
33	// as a second makeError argument at the call site, e.g.
34	// makeError(ErrChannelNotFound, id.String()).
35	ErrPortNotFound = "port not found"
36
37	// Query getters return these when the requested state is missing. Getters
38	// return an error rather than panicking so callers can decide how to handle
39	// a missing lookup.
40	ErrClientNotFound          = "client not found"
41	ErrClientStateNotFound     = "client state not found"
42	ErrConsensusStateNotFound  = "consensus state not found"
43	ErrConnectionNotFound      = "connection not found"
44	ErrChannelNotFound         = "channel not found"
45	ErrMembershipProofNotFound = "membership proof not found"
46
47	// ErrSpoofedRealm guards non-crossing (_ int, rlm realm, ...) entrypoints:
48	// the passed rlm must be the current crossing frame, not a forged or stale
49	// token replayed by a caller.
50	ErrSpoofedRealm  = "rlm does not match the current crossing frame"
51	ErrNotProxyRealm = "rlm is not proxy realm"
52)
source

Error messages are defined as constants rather than package-level error values; build them with makeError at the call site (see above).

const AppRegisteredEvent, RegisterClientEvent, CreateClientEvent, UpdateClientEvent, ForceUpdateClientEvent, MisbehaviourEvent, ConnectionOpenInitEvent, ConnectionOpenTryEvent, ConnectionOpenAckEvent, ConnectionOpenConfirmEvent, ChannelOpenInitEvent, ChannelOpenTryEvent, ChannelOpenAckEvent, ChannelOpenConfirmEvent, ChannelCloseInitEvent, ChannelCloseConfirmEvent, PacketSendEvent, BatchSendEvent, BatchAcksEvent, PacketRecvEvent, IntentPacketRecvEvent, WriteAckEvent, PacketAckEvent, PacketTimeoutEvent, CommitMembershipProofEvent, CommitNonMembershipEvent

 1const (
 2	AppRegisteredEvent         = "AppRegistered"
 3	RegisterClientEvent        = "RegisterClient"
 4	CreateClientEvent          = "CreateClient"
 5	UpdateClientEvent          = "UpdateClient"
 6	ForceUpdateClientEvent     = "ForceUpdateClient"
 7	MisbehaviourEvent          = "Misbehaviour"
 8	ConnectionOpenInitEvent    = "ConnectionOpenInit"
 9	ConnectionOpenTryEvent     = "ConnectionOpenTry"
10	ConnectionOpenAckEvent     = "ConnectionOpenAck"
11	ConnectionOpenConfirmEvent = "ConnectionOpenConfirm"
12	ChannelOpenInitEvent       = "ChannelOpenInit"
13	ChannelOpenTryEvent        = "ChannelOpenTry"
14	ChannelOpenAckEvent        = "ChannelOpenAck"
15	ChannelOpenConfirmEvent    = "ChannelOpenConfirm"
16	ChannelCloseInitEvent      = "ChannelCloseInit"
17	ChannelCloseConfirmEvent   = "ChannelCloseConfirm"
18	PacketSendEvent            = "PacketSend"
19	BatchSendEvent             = "BatchSend"
20	BatchAcksEvent             = "BatchAcks"
21	PacketRecvEvent            = "PacketRecv"
22	IntentPacketRecvEvent      = "IntentPacketRecv"
23	WriteAckEvent              = "WriteAck"
24	PacketAckEvent             = "PacketAck"
25	PacketTimeoutEvent         = "PacketTimeout"
26	CommitMembershipProofEvent = "CommitMembershipProof"
27	CommitNonMembershipEvent   = "CommitNonMembershipProof"
28)
source

Functions 110

func BatchAcks

crossing Action
1func BatchAcks(cur realm, msg types.MsgBatchAcks)
source

BatchAcks aggregates the acks of received packets into a batch receipt.

func BatchSend

crossing Action
1func BatchSend(cur realm, msg types.MsgBatchSend)
source

BatchSend aggregates already-committed packets into a batch commitment.

func ChannelValue

Action
1func ChannelValue(channel types.Channel) types.H256
source

ChannelValue returns the H256 commitment value of a channel, exposed so the impl can build the expected counterparty value for membership proofs.

func CommitMembershipProof

crossing Action
1func CommitMembershipProof(cur realm, msg types.MsgCommitMembershipProof)
source

CommitMembershipProof verifies and records a membership proof.

func CommitNonMembershipProof

crossing Action
1func CommitNonMembershipProof(cur realm, msg types.MsgCommitNonMembershipProof)
source

CommitNonMembershipProof verifies and records a non-membership proof.

func CommitPacketHash

Action
1func CommitPacketHash(packet types.Packet) types.H256
source

CommitPacketHash returns the union commitment hash of a single packet.

func CommitPacketsHash

Action
1func CommitPacketsHash(packets []types.Packet) types.H256
source

CommitPacketsHash returns the union commitment hash of a packet batch.

func ConnectionValue

Action
1func ConnectionValue(connection types.Connection) types.H256
source

ConnectionValue returns the H256 commitment value of a connection, exposed so the impl can build the expected counterparty value for membership proofs.

func CreateClient

crossing Action
1func CreateClient(cur realm, msg types.MsgCreateClient)
source

CreateClient assigns a client id, stores the submitted state bytes, then lets the light client verify creation against that freshly stored state.

Union references: https://github.com/unionlabs/union/blob/8cff0ff34f6baa4cdb1e4650a08985dd05de0c5a/cosmwasm/core/src/contract.rs#L867-L903 https://github.com/unionlabs/union/blob/8cff0ff34f6baa4cdb1e4650a08985dd05de0c5a/cosmwasm/core/src/contract.rs#L905-L972

func EmitAppRegistered

Action
1func EmitAppRegistered(_ int, rlm realm, portId []byte, registrarPkgPath string, adminOverride bool)
source

EmitAppRegistered emits the AppRegistered host event.

func EmitBatchAcks

Action
1func EmitBatchAcks(_ int, rlm realm, channelId types.ChannelId, packetHash, batchHash types.H256)
source

EmitBatchAcks emits the BatchAcks host event.

func EmitBatchSend

Action
1func EmitBatchSend(_ int, rlm realm, channelId types.ChannelId, packetHash, batchHash types.H256)
source

EmitBatchSend emits the BatchSend host event.

func EmitChannelCloseConfirm

Action
1func EmitChannelCloseConfirm(_ int, rlm realm, portId types.Bytes, channelId types.ChannelId, channel types.Channel, connection types.Connection)
source

EmitChannelCloseConfirm emits the ChannelCloseConfirm host event.

func EmitChannelCloseInit

Action
1func EmitChannelCloseInit(_ int, rlm realm, portId types.Bytes, channelId types.ChannelId, channel types.Channel, connection types.Connection)
source

EmitChannelCloseInit emits the ChannelCloseInit host event.

func EmitChannelOpenAck

Action
1func EmitChannelOpenAck(_ int, rlm realm, portId types.Bytes, channelId types.ChannelId, channel types.Channel, connection types.Connection)
source

EmitChannelOpenAck emits the ChannelOpenAck host event.

func EmitChannelOpenConfirm

Action
1func EmitChannelOpenConfirm(_ int, rlm realm, portId types.Bytes, channelId types.ChannelId, channel types.Channel, connection types.Connection)
source

EmitChannelOpenConfirm emits the ChannelOpenConfirm host event.

func EmitChannelOpenInit

Action
1func EmitChannelOpenInit(_ int, rlm realm, portId types.Bytes, channelId types.ChannelId, channel types.Channel, connection types.Connection)
source

EmitChannelOpenInit emits the ChannelOpenInit host event.

func EmitChannelOpenTry

Action
1func EmitChannelOpenTry(_ int, rlm realm, portId types.Bytes, channelId types.ChannelId, channel types.Channel, counterpartyVersion string, connection types.Connection)
source

EmitChannelOpenTry emits the ChannelOpenTry host event.

func EmitCommitMembershipProof

Action
1func EmitCommitMembershipProof(_ int, rlm realm, msg types.MsgCommitMembershipProof)
source

EmitCommitMembershipProof emits the CommitMembershipProof host event.

func EmitCommitNonMembershipProof

Action
1func EmitCommitNonMembershipProof(_ int, rlm realm, msg types.MsgCommitNonMembershipProof)
source

EmitCommitNonMembershipProof emits the CommitNonMembershipProof host event.

func EmitConnectionOpenAck

Action
1func EmitConnectionOpenAck(_ int, rlm realm, connectionId types.ConnectionId, clientId, counterpartyClientId types.ClientId, counterpartyConnectionId types.ConnectionId)
source

EmitConnectionOpenAck emits the ConnectionOpenAck host event.

func EmitConnectionOpenConfirm

Action
1func EmitConnectionOpenConfirm(_ int, rlm realm, connectionId types.ConnectionId, clientId, counterpartyClientId types.ClientId, counterpartyConnectionId types.ConnectionId)
source

EmitConnectionOpenConfirm emits the ConnectionOpenConfirm host event.

func EmitConnectionOpenInit

Action
1func EmitConnectionOpenInit(_ int, rlm realm, connectionId types.ConnectionId, clientId, counterpartyClientId types.ClientId)
source

EmitConnectionOpenInit emits the ConnectionOpenInit host event.

func EmitConnectionOpenTry

Action
1func EmitConnectionOpenTry(_ int, rlm realm, connectionId types.ConnectionId, clientId, counterpartyClientId types.ClientId, counterpartyConnectionId types.ConnectionId)
source

EmitConnectionOpenTry emits the ConnectionOpenTry host event.

func EmitCreateClient

Action
1func EmitCreateClient(_ int, rlm realm, clientId types.ClientId, clientType types.ClientType, counterpartyChainId string)
source

EmitCreateClient emits the CreateClient host event.

func EmitForceUpdateClient

Action
1func EmitForceUpdateClient(_ int, rlm realm, clientId types.ClientId, height types.Height)
source

EmitForceUpdateClient emits the ForceUpdateClient host event.

func EmitIntentPacketRecv

Action
1func EmitIntentPacketRecv(_ int, rlm realm, packet types.Packet, destinationChannel types.Channel, connection types.Connection, marketMakerMsg []byte)
source

EmitIntentPacketRecv emits the IntentPacketRecv host event.

func EmitMisbehaviour

Action
1func EmitMisbehaviour(_ int, rlm realm, clientId types.ClientId)
source

EmitMisbehaviour emits the Misbehaviour host event.

func EmitPacketAck

Action
1func EmitPacketAck(_ int, rlm realm, packet types.Packet, sourceChannel types.Channel, connection types.Connection, acknowledgement []byte)
source

EmitPacketAck emits the PacketAck host event.

func EmitPacketRecv

Action
1func EmitPacketRecv(_ int, rlm realm, packet types.Packet, destinationChannel types.Channel, connection types.Connection, relayerMsg []byte)
source

EmitPacketRecv emits the PacketRecv host event.

func EmitPacketSend

Action
1func EmitPacketSend(_ int, rlm realm, packet types.Packet, sourceChannel types.Channel, sourceConnection types.Connection)
source

EmitPacketSend emits the PacketSend host event.

func EmitPacketTimeout

Action
1func EmitPacketTimeout(_ int, rlm realm, packet types.Packet, sourceChannel types.Channel, connection types.Connection)
source

EmitPacketTimeout emits the PacketTimeout host event.

func EmitRegisterClient

Action
1func EmitRegisterClient(_ int, rlm realm, clientType types.ClientType)
source

EmitRegisterClient emits the RegisterClient host event.

func EmitUpdateClient

Action
1func EmitUpdateClient(_ int, rlm realm, clientId types.ClientId, height types.Height)
source

EmitUpdateClient emits the UpdateClient host event.

func EmitWriteAck

Action
1func EmitWriteAck(_ int, rlm realm, packet types.Packet, destinationChannel types.Channel, connection types.Connection, acknowledgement []byte)
source

EmitWriteAck emits the WriteAck host event.

func ForceUpdateClient

crossing Action
1func ForceUpdateClient(cur realm, msg types.MsgForceUpdateClient)
source

ForceUpdateClient re-initializes a client from submitted state bytes, bypassing header proof verification.

It is restricted to the admin and recovers expired or otherwise unrecoverable clients. The registered light client type for the existing client is reused.

Union references: https://github.com/unionlabs/union/blob/8cff0ff34f6baa4cdb1e4650a08985dd05de0c5a/cosmwasm/core/src/contract.rs#L146-L166 https://github.com/unionlabs/union/blob/8cff0ff34f6baa4cdb1e4650a08985dd05de0c5a/cosmwasm/core/src/contract.rs#L905-L972

func GetBatchPackets

Action
1func GetBatchPackets(batchHash types.H256) (types.H256, error)
source

GetBatchPackets returns the batch packet commitment for a batch hash, or an error when no batch packet commitment is stored for that hash.

func GetBatchReceipts

Action
1func GetBatchReceipts(batchHash types.H256) (types.H256, error)
source

GetBatchReceipts returns the batch receipt commitment for a batch hash, or an error when no batch receipt commitment is stored for that hash.

func GetChannel

Action
1func GetChannel(channelId types.ChannelId) (types.Channel, error)
source

GetChannel returns the stored channel record for channelId. Apps need this to look up the counterparty channel id when constructing packets to send via BatchSend (the core no longer auto-derives it from a sender-side helper).

func GetChannels

Action
1func GetChannels() ([]types.Channel, error)
source

GetChannels returns all stored channel records.

func GetClientImpl

Action
1func GetClientImpl(clientId types.ClientId) (string, error)
source

GetClientImpl returns the impl identifier for a client (best-effort: type), or an error when the client is missing.

func GetClientState

Action
1func GetClientState(clientId types.ClientId) ([]byte, error)
source

GetClientState returns the mirrored client state bytes, or an error when the client state is missing.

func GetClientStatus

Action
1func GetClientStatus(clientId types.ClientId) string
source

GetClientStatus returns the client status as a uint8 string ("1"=Active, "2"=Expired, "3"=Frozen), or "0" when the client is missing.

func GetClientType

Action
1func GetClientType(clientId types.ClientId) (types.ClientType, error)
source

GetClientType returns the registered client type for a client, or an error when the client is missing.

func GetCommittedMembershipProof

Action
1func GetCommittedMembershipProof(clientId types.ClientId, proofHeight uint64, path []byte) (types.H256, error)
source

GetCommittedMembershipProof returns the committed membership proof value for the client/height/path key.

func GetCommittedNonMembershipProof

Action
1func GetCommittedNonMembershipProof(clientId types.ClientId, proofHeight uint64, path []byte) bool
source

GetCommittedNonMembershipProof reports whether a non-membership proof commitment is stored for the key.

func GetConnection

Action
1func GetConnection(connectionId types.ConnectionId) (types.Connection, error)
source

GetConnection returns the typed connection record, or an error when the connection is missing.

func GetConsensusState

Action
1func GetConsensusState(clientId types.ClientId, height types.Height) ([]byte, error)
source

GetConsensusState returns the consensus state bytes at a height, or an error when no consensus state is stored at that height.

func GetLatestHeight

Action
1func GetLatestHeight(clientId types.ClientId) (uint64, error)
source

GetLatestHeight returns the light client's latest height, or an error when the client is missing.

func GetLightClient

Action
1func GetLightClient(clientId types.ClientId) (lightclient.Interface, bool)
source

GetLightClient returns the live light client instance for a client, or (nil, false) when the client is missing.

func GetRegisteredClientType

Action
1func GetRegisteredClientType(clientType types.ClientType) bool
source

GetRegisteredClientType reports whether a client type is registered (best-effort).

func GetStatus

Action
1func GetStatus(clientId types.ClientId) (types.Status, error)
source

GetStatus returns the client's status, or an error when the client is missing.

func GetTimestampAtHeight

Action
1func GetTimestampAtHeight(clientId types.ClientId, height uint64) (types.Timestamp, error)
source

GetTimestampAtHeight returns the consensus timestamp recorded at a height, or an error when the client is missing or has no consensus state at that height.

func HasApp

Action
1func HasApp(portId []byte) bool
source

HasApp reports whether an app is registered at portId.

func HasClient

Action
1func HasClient(clientType types.ClientType) bool
source

HasClient reports whether a light client is registered for a client type.

func IntentPacketRecv

crossing Action
1func IntentPacketRecv(cur realm, msg types.MsgIntentPacketRecv)
source

IntentPacketRecv settles packets on the proofless market-maker fast path.

func IsValidEventSize

Action
1func IsValidEventSize(fields ...[]byte) bool
source

IsValidEventSize reports whether fields, split together into one host event, stay within chain.Emit's 64-attr-pair ceiling. Fields within IsValidPacketDataSize's solo budget individually can still exceed it combined, so MaxEventAttrPairs also serves as the shared pair budget here.

func IsValidPacketDataSize

Action
1func IsValidPacketDataSize(data []byte) bool
source

IsValidPacketDataSize reports whether data stays within the configured packet_data event budget after hexAttr encoding.

It returns true when SplitEventAttrs is false because that mode intentionally disables packet_data size checks.

func MaxPacketDataEventSize

Action
1func MaxPacketDataEventSize() int
source

MaxPacketDataEventSize returns the configured packet_data event budget after hexAttr encoding.

The budget is MaxEventAttrPairs * MaxEventAttrValueLen and is enforced only when SplitEventAttrs is true.

func NewChannel

Action
1func NewChannel(
2	state types.ChannelState,
3	connectionId types.ConnectionId,
4	counterpartyChannelId types.ChannelId,
5	counterpartyPortId types.Bytes,
6	version string,
7) types.Channel
source

func NewConnection

Action
1func NewConnection(
2	state types.ConnectionState,
3	clientId,
4	counterpartyClientId types.ClientId,
5	counterpartyConnectionId types.ConnectionId,
6) types.Connection
source

func NewMsgChannelOpenAck

Action
1func NewMsgChannelOpenAck(channelId types.ChannelId, counterpartyVersion string, counterpartyChannelId types.ChannelId, proofTry []byte, proofHeight uint64, relayer string) types.MsgChannelOpenAck
source

func NewMsgChannelOpenInit

Action
1func NewMsgChannelOpenInit(portId, counterpartyPortId []byte, connectionId types.ConnectionId, version string, relayer string) types.MsgChannelOpenInit
source

func NewMsgChannelOpenTry

Action
1func NewMsgChannelOpenTry(
2	portId []byte,
3	channel types.Channel,
4	counterpartyVersion string,
5	proofInit []byte,
6	proofHeight uint64,
7	relayer string,
8) types.MsgChannelOpenTry
source

func NewMsgConnectionOpenAck

Action
1func NewMsgConnectionOpenAck(connectionId, counterpartyConnectionId types.ConnectionId, proofTry []byte, proofHeight uint64) types.MsgConnectionOpenAck
source

func NewMsgCreateClient

Action
1func NewMsgCreateClient(clientType types.ClientType, clientStateBytes, consensusStateBytes []byte) types.MsgCreateClient
source

func NewMsgPacketRecv

Action
1func NewMsgPacketRecv(packets []types.Packet, relayerMsgs [][]byte, proof []byte, proofHeight uint64) types.MsgPacketRecv
source

func NewPacket

Action
1func NewPacket(
2	sourceChannelId,
3	destinationChannelId types.ChannelId,
4	data []byte,
5	timeoutTimestamp types.Timestamp,
6) types.Packet
source

func PacketAcknowledgement

crossing Action
1func PacketAcknowledgement(cur realm, msg types.MsgPacketAcknowledgement)
source

PacketAcknowledgement proves the counterparty acks and notifies the app.

func PacketRecv

crossing Action
1func PacketRecv(cur realm, msg types.MsgPacketRecv)
source

PacketRecv proves and dispatches a batch of received packets.

func PacketTimeout

crossing Action
1func PacketTimeout(cur realm, msg types.MsgPacketTimeout)
source

PacketTimeout proves a packet was never received and notifies the app.

func QueryChannel

Action
1func QueryChannel(channelId types.ChannelId) string
source

QueryChannel returns the ABI-encoded channel as a hex string, or an empty string when the channel is missing.

func QueryClientState

Action
1func QueryClientState(clientId types.ClientId) string
source

QueryClientState returns the client state bytes as a hex string, or an empty string when the client is missing.

func QueryConnection

Action
1func QueryConnection(connectionId types.ConnectionId) string
source

QueryConnection returns the ABI-encoded connection as a hex string, or an empty string when the connection is missing.

func QueryConsensusState

Action
1func QueryConsensusState(clientId types.ClientId, height uint64) string
source

QueryConsensusState returns the consensus state bytes at a given height as a hex string, or an empty string when missing.

func RegisterApp

crossing Action
1func RegisterApp(cur realm, app app.IApp)
source

RegisterApp registers an IBC application at the caller realm's package path, delegating to the installed mustGetImpl().

func SendPacket

crossing Action
1func SendPacket(cur realm, sourceChannelId types.ChannelId, timeoutTimestamp types.Timestamp, data []byte) types.Packet
source

SendPacket commits a packet for the caller's port.

func SetEventConfig

crossing Action
1func SetEventConfig(cur realm, config EventConfig)
source

SetEventConfig updates the host event attribute policy. The caller must be authorized for SelectorSetEventConfig.

func SetMaxEventAttrPairs

crossing Action
1func SetMaxEventAttrPairs(cur realm, maxEventAttrPairs uint)
source

SetMaxEventAttrPairs updates the shared event attr-pair budget. The caller must be authorized for SelectorSetEventConfig.

func SetMaxEventAttrValueLen

crossing Action
1func SetMaxEventAttrValueLen(cur realm, maxEventAttrValueLen uint)
source

SetMaxEventAttrValueLen updates the maximum value length for each split event attribute column. The caller must be authorized for SelectorSetEventConfig.

func SetSplitEventAttrs

crossing Action
1func SetSplitEventAttrs(cur realm, splitEventAttrs bool)
source

SetSplitEventAttrs updates whether large event attributes are split. The caller must be authorized for SelectorSetEventConfig.

func UpdateImpl

crossing Action
1func UpdateImpl(cur realm, path string)
source

UpdateImpl installs or re-points the implementation. It is admin-gated and injects the proxy-owned store into the target, so the store needs no public getter — the only way to obtain it is through this gated install.

func WriteAcknowledgement

crossing Action
1func WriteAcknowledgement(cur realm, msg types.MsgWriteAcknowledgement)
source

WriteAcknowledgement commits a deferred acknowledgement for a received packet.

func NewEventConfig

Action
1func NewEventConfig(splitEventAttrs bool, maxEventAttrValueLen uint, maxEventAttrPairs uint) EventConfig
source

NewEventConfig constructs an EventConfig value. SetEventConfig validates the value before storing it.

Types 5

type EventConfig

struct
 1type EventConfig struct {
 2	// SplitEventAttrs controls whether large event attributes are emitted as
 3	// indexed columns and whether split-dependent size checks are enforced.
 4	SplitEventAttrs bool
 5
 6	// MaxEventAttrValueLen is the maximum value length of each split event
 7	// attribute column.
 8	MaxEventAttrValueLen uint
 9
10	// MaxEventAttrPairs is the shared key/value attr-pair budget for one host
11	// event: both the max packet_data columns allowed when packet_data size
12	// checks are enforced solo, and the combined pair budget IsValidEventSize
13	// checks across packet_data plus whatever else lands in the same event
14	// (ack, relayerMsg, marketMakerMsg). Mirrors chain.Emit's own
15	// MaxEventPairs ceiling (64), kept comfortably under it to leave room for
16	// the event's other fixed attrs.
17	MaxEventAttrPairs uint
18}
source

EventConfig controls host event attribute splitting and sizing.

type ICore

interface
 1type ICore interface {
 2	// --- Client ---
 3	RegisterClient(_ int, rlm realm, typ types.ClientType, impl lightclient.ClientImpl)
 4	HasClient(typ types.ClientType) bool
 5	CreateClient(_ int, rlm realm, msg types.MsgCreateClient)
 6	UpdateClient(_ int, rlm realm, msg types.MsgUpdateClient)
 7	ForceUpdateClient(_ int, rlm realm, msg types.MsgForceUpdateClient)
 8	Misbehaviour(_ int, rlm realm, msg types.MsgMisbehaviour)
 9
10	// --- Connection handshake ---
11	ConnectionOpenInit(_ int, rlm realm, msg types.MsgConnectionOpenInit)
12	ConnectionOpenTry(_ int, rlm realm, msg types.MsgConnectionOpenTry)
13	ConnectionOpenAck(_ int, rlm realm, msg types.MsgConnectionOpenAck)
14	ConnectionOpenConfirm(_ int, rlm realm, msg types.MsgConnectionOpenConfirm)
15	// Force* are the admin recovery variants that skip counterparty proof
16	// verification. The admin gate stays on the proxy.
17	ForceConnectionOpenTry(_ int, rlm realm, msg types.MsgConnectionOpenTry)
18	ForceConnectionOpenAck(_ int, rlm realm, msg types.MsgConnectionOpenAck)
19	ForceConnectionOpenConfirm(_ int, rlm realm, msg types.MsgConnectionOpenConfirm)
20
21	// --- Channel handshake ---
22	ChannelOpenInit(_ int, rlm realm, msg types.MsgChannelOpenInit)
23	ChannelOpenTry(_ int, rlm realm, msg types.MsgChannelOpenTry)
24	ChannelOpenAck(_ int, rlm realm, msg types.MsgChannelOpenAck)
25	ChannelOpenConfirm(_ int, rlm realm, msg types.MsgChannelOpenConfirm)
26	ChannelCloseInit(_ int, rlm realm, msg types.MsgChannelCloseInit)
27	ChannelCloseConfirm(_ int, rlm realm, msg types.MsgChannelCloseConfirm)
28	// Force* are the admin recovery variants that skip counterparty proof
29	// verification. The admin gate stays on the proxy.
30	ForceChannelOpenTry(_ int, rlm realm, msg types.MsgChannelOpenTry)
31	ForceChannelOpenAck(_ int, rlm realm, msg types.MsgChannelOpenAck)
32	ForceChannelOpenConfirm(_ int, rlm realm, msg types.MsgChannelOpenConfirm)
33
34	// --- Packet lifecycle ---
35	SendPacket(_ int, rlm realm, sourceChannelId types.ChannelId, timeoutTimestamp types.Timestamp, data []byte) types.Packet
36	PacketRecv(_ int, rlm realm, msg types.MsgPacketRecv)
37	IntentPacketRecv(_ int, rlm realm, msg types.MsgIntentPacketRecv)
38	PacketAcknowledgement(_ int, rlm realm, msg types.MsgPacketAcknowledgement)
39	PacketTimeout(_ int, rlm realm, msg types.MsgPacketTimeout)
40	CommitMembershipProof(_ int, rlm realm, msg types.MsgCommitMembershipProof)
41	CommitNonMembershipProof(_ int, rlm realm, msg types.MsgCommitNonMembershipProof)
42	BatchSend(_ int, rlm realm, msg types.MsgBatchSend)
43	BatchAcks(_ int, rlm realm, msg types.MsgBatchAcks)
44	WriteAcknowledgement(_ int, rlm realm, msg types.MsgWriteAcknowledgement)
45
46	// --- App registry ---
47	RegisterApp(_ int, rlm realm, app app.IApp)
48
49	// Read-only relayer/tooling query surface.
50	ICoreGetter
51}
source

types.gno declares the upgradeable-proxy contracts for the IBC host, mirroring the apps/ucs03_zkgm split. core is the proxy: it owns the stable identity (package address/path), the Store, and the app registry, and delegates its logic to the installed mustGetImpl(). Shared access-manager authority lives in gno.land/r/onbloc/ibc/union/access and stays outside the swappable impl.

ICore is the swappable logic surface: it carries every non-admin entrypoint (client, connection, channel, packet, app registration). The access-managed recovery entrypoints (Force* handshake overrides) and the read-only queries stay on the proxy: authorization is not swappable, and queries are pure views.

core/v1 currently implements the client, connection, channel, packet, app registry, and query surfaces behind this interface.

type ICoreGetter

interface
 1type ICoreGetter interface {
 2	GetStatus(clientId types.ClientId) (types.Status, error)
 3	GetClientType(clientId types.ClientId) (types.ClientType, error)
 4	GetLightClient(clientId types.ClientId) (lightclient.Interface, bool)
 5	GetClientImpl(clientId types.ClientId) (string, error)
 6	GetRegisteredClientType(clientType types.ClientType) bool
 7	GetClientStateBytes(clientId types.ClientId) ([]byte, error)
 8	GetConsensusStateBytes(clientId types.ClientId, height types.Height) ([]byte, error)
 9	GetLatestHeight(clientId types.ClientId) (uint64, error)
10	GetTimestampAtHeight(clientId types.ClientId, height uint64) (types.Timestamp, error)
11	GetConnection(connectionId types.ConnectionId) (types.Connection, error)
12	GetChannels() ([]types.Channel, error)
13	GetChannel(channelId types.ChannelId) (types.Channel, error)
14	GetBatchPacketsCommitment(batchHash types.H256) (types.H256, error)
15	GetBatchReceiptsCommitment(batchHash types.H256) (types.H256, error)
16	GetCommittedMembershipProofCommitment(clientId types.ClientId, proofHeight uint64, path []byte) (types.H256, error)
17	GetCommittedNonMembershipProof(clientId types.ClientId, proofHeight uint64, path []byte) bool
18}
source

ICoreGetter is the read-only query surface, implemented by the impl and exposed by the proxy's getters.gno. Queries that fail on a missing lookup return an error. Best-effort Union query mirrors, such as GetClientImpl, return Gno-native identifiers; see getters.gno for the notes.

type IStore

interface
 1type IStore interface {
 2	// --- Client ---
 3	RegisterClient(_ int, rlm realm, typ types.ClientType, impl lightclient.ClientImpl)
 4	ClientRegistry(typ types.ClientType) (lightclient.ClientImpl, bool)
 5	HasRegisteredClient(typ types.ClientType) bool
 6	AddClient(_ int, rlm realm, typ types.ClientType, creator address, lc lightclient.Interface) types.ClientId
 7	GetClientImpl(clientId types.ClientId) (lightclient.ClientImpl, bool)
 8	ClientExists(clientId types.ClientId) bool
 9	ClientType(clientId types.ClientId) (types.ClientType, bool)
10	GetLightClient(clientId types.ClientId) (lightclient.Interface, bool)
11	SetLightClient(_ int, rlm realm, clientId types.ClientId, lc lightclient.Interface) bool
12	SaveClientState(_ int, rlm realm, clientId types.ClientId, clientStateBytes []byte) bool
13	SaveConsensusState(_ int, rlm realm, clientId types.ClientId, height types.Height, consensusStateBytes []byte) bool
14	SaveClientStore(_ int, rlm realm, clientId types.ClientId, key string, value []byte) bool
15
16	// --- Connection ---
17	NextConnectionId(_ int, rlm realm) types.ConnectionId
18	SaveConnection(_ int, rlm realm, connectionId types.ConnectionId, connection types.Connection)
19	GetConnection(connectionId types.ConnectionId) (types.Connection, bool)
20
21	// --- Channel ---
22	NextChannelId(_ int, rlm realm) types.ChannelId
23	CreateChannel(_ int, rlm realm, channelId types.ChannelId, channel types.Channel, portId types.Bytes)
24	SaveChannel(_ int, rlm realm, channelId types.ChannelId, channel types.Channel)
25	GetChannels() ([]types.Channel, error)
26	GetChannel(channelId types.ChannelId) (types.Channel, bool)
27	GetChannelOwner(channelId types.ChannelId) (types.Bytes, bool)
28
29	// --- App registry ---
30	GetAppByPortId(portId types.Bytes) (app.IApp, bool)
31	HasApp(portId types.Bytes) bool
32	RegisterAppAtPort(_ int, rlm realm, portId types.Bytes, a app.IApp)
33
34	// --- Packet commitment (source side) ---
35	HasPacketCommitment(packet types.Packet) bool
36	CommitPacket(_ int, rlm realm, packet types.Packet)
37	// SetPacketAcknowledged flips a packet's source commitment to the acknowledged
38	// marker. The acknowledge/timeout state machine (the read-check that the
39	// commitment exists and is not already acknowledged) lives in the mustGetImpl().
40	SetPacketAcknowledged(_ int, rlm realm, packet types.Packet)
41
42	// --- Packet receipt / acknowledgement (destination side) ---
43	HasPacketReceipt(packet types.Packet) bool
44	SetPacketReceipt(_ int, rlm realm, packet types.Packet)
45	CommitAcknowledgement(_ int, rlm realm, packet types.Packet, ack []byte)
46	AcknowledgementReceipt(channelId types.ChannelId, packet types.Packet) (types.H256, bool)
47
48	// --- Batch ---
49	PacketCommitment(channelId types.ChannelId, packet types.Packet) (types.H256, bool)
50	SaveBatchPackets(_ int, rlm realm, channelId types.ChannelId, batchHash, value types.H256)
51	SaveBatchReceipts(_ int, rlm realm, channelId types.ChannelId, batchHash, value types.H256)
52
53	// --- Committed proofs ---
54	SaveMembershipProof(_ int, rlm realm, clientId types.ClientId, proofHeight uint64, path []byte, value types.H256)
55	SaveNonMembershipProof(_ int, rlm realm, clientId types.ClientId, proofHeight uint64, path []byte, value types.H256)
56
57	// --- Read-only query support ---
58	ClientStateBytes(clientId types.ClientId) ([]byte, bool)
59	ConsensusStateBytes(clientId types.ClientId, height types.Height) ([]byte, bool)
60	BatchPacketsAt(batchHash types.H256) (types.H256, bool)
61	BatchReceiptsAt(batchHash types.H256) (types.H256, bool)
62	MembershipProofAt(clientId types.ClientId, proofHeight uint64, path []byte) (types.H256, bool)
63	HasNonMembershipProof(clientId types.ClientId, proofHeight uint64, path []byte) bool
64}
source

IStore is the proxy-owned persistent state injected into the mustGetImpl(). Setters take the borrow-rule (_ int, rlm realm, ...) form; getters are plain. The nested per-client structure (consensus/connection/channel/batch trees, chain-param commitment mirror) stays private to the Store — the impl operates by id, so the encapsulation survives impl upgrades.

IStore exposes the client, connection, channel, packet, app registry, proof, batch, and query-support operations used by the installed impl.

type Store

struct
 1type Store struct {
 2	clientSeq      seqid.ID
 3	clientRegistry map[string]lightclient.ClientImpl // ClientRegistry: type → factory
 4	clientTypeByID map[uint32]types.ClientType       // ClientTypes: clientId → type
 5	clientImplByID map[uint32]lightclient.ClientImpl // ClientImpls: clientId → factory
 6	clientByID     map[uint32]*client                // clientId → instantiated state
 7
 8	connectionSeq seqid.ID
 9	connections   *bptree.BPTree // connectionKey(ConnectionId) → types.Connection
10
11	channelSeq seqid.ID
12	channels   *bptree.BPTree // channelKey(ChannelId) → *channelEntry
13
14	// commitments holds every packet/batch commitment keyed by its global storage
15	// path. The path derivations (packet commitment, packet receipt, batch packets,
16	// batch receipts) are namespaced so they never collide, so a single flat map
17	// replaces the former per-client batch trees. Membership proofs keep their own
18	// maps because they are read back by a different key shape.
19	commitments         map[types.H256]types.H256
20	membershipProofs    map[types.H256]types.H256
21	nonMembershipProofs map[types.H256]types.H256
22
23	ports map[string]app.IApp
24}
source

Store is the proxy-owned persistent state. It is a flat data layer: clients, connections, channels, and commitments are keyed directly by their globally allocated id or storage path, with no cross-entity indirection. All protocol logic — handshake state machines, the acknowledge/timeout flow, proof verification — lives in the impl (core/v1). The Store only stores and retrieves, mirroring commitment values into chain params so counterparties can prove them.

Methods on Store

func AcknowledgementReceipt

method on Store
1func (s *Store) AcknowledgementReceipt(channelId types.ChannelId, packet types.Packet) (types.H256, bool)
source

AcknowledgementReceipt returns the receipt stored at a packet's ack path.

func AddClient

method on Store
1func (s *Store) AddClient(_ int, rlm realm, typ types.ClientType, creator address, lc lightclient.Interface) types.ClientId
source

AddClient allocates a new client id and stores the light client object, returning the assigned id.

func BatchPacketsAt

method on Store
1func (s *Store) BatchPacketsAt(batchHash types.H256) (types.H256, bool)
source

BatchPacketsAt returns the batch packet commitment for a batch hash. The commitment is keyed by the global batch path, so no channel id is required.

func BatchReceiptsAt

method on Store
1func (s *Store) BatchReceiptsAt(batchHash types.H256) (types.H256, bool)
source

BatchReceiptsAt returns the batch receipt commitment for a batch hash. The commitment is keyed by the global batch path, so no channel id is required.

func ClientExists

method on Store
1func (s *Store) ClientExists(clientId types.ClientId) bool
source

ClientExists reports whether a client is registered under clientId.

func ClientRegistry

method on Store
1func (s *Store) ClientRegistry(typ types.ClientType) (lightclient.ClientImpl, bool)
source

ClientRegistry returns the registered factory for typ.

func ClientStateBytes

method on Store
1func (s *Store) ClientStateBytes(clientId types.ClientId) ([]byte, bool)
source

ClientStateBytes returns the mirrored client state bytes for a client.

func ClientType

method on Store
1func (s *Store) ClientType(clientId types.ClientId) (types.ClientType, bool)
source

ClientType returns the registered client type for clientId.

func CommitAcknowledgement

method on Store
1func (s *Store) CommitAcknowledgement(_ int, rlm realm, packet types.Packet, ack []byte)
source

CommitAcknowledgement records the acknowledgement for a received packet.

func CommitPacket

method on Store
1func (s *Store) CommitPacket(_ int, rlm realm, packet types.Packet)
source

CommitPacket records the source-side commitment for a sent packet.

func ConsensusStateBytes

method on Store
1func (s *Store) ConsensusStateBytes(clientId types.ClientId, height types.Height) ([]byte, bool)
source

ConsensusStateBytes returns the consensus state bytes at a height.

func CreateChannel

method on Store
1func (s *Store) CreateChannel(_ int, rlm realm, channelId types.ChannelId, channel types.Channel, portId types.Bytes)
source

CreateChannel persists a new channel owned by portId and mirrors its commitment.

func GetAppByPortId

method on Store
1func (s *Store) GetAppByPortId(portId types.Bytes) (app.IApp, bool)
source

GetAppByPortId returns the IBC app registered at portId.

func GetChannel

method on Store
1func (s *Store) GetChannel(channelId types.ChannelId) (types.Channel, bool)
source

GetChannel returns the stored channel for channelId.

func GetChannelOwner

method on Store
1func (s *Store) GetChannelOwner(channelId types.ChannelId) (types.Bytes, bool)
source

GetChannelOwner returns the port id that owns channelId.

func GetChannels

method on Store
1func (s *Store) GetChannels() ([]types.Channel, error)
source

GetChannels returns all stored channel records. The bptree callback returns false to keep iterating (returning true stops early), and the empty range bounds walk every entry.

func GetClientImpl

method on Store
1func (s *Store) GetClientImpl(clientId types.ClientId) (lightclient.ClientImpl, bool)
source

GetClientImpl returns the factory stored for clientId.

func GetConnection

method on Store
1func (s *Store) GetConnection(connectionId types.ConnectionId) (types.Connection, bool)
source

GetConnection returns the stored connection for connectionId.

func GetLightClient

method on Store
1func (s *Store) GetLightClient(clientId types.ClientId) (lightclient.Interface, bool)
source

GetLightClient returns the stored light client object for clientId.

func HasApp

method on Store
1func (s *Store) HasApp(portId types.Bytes) bool
source

HasApp reports whether an app is registered at portId.

func HasNonMembershipProof

method on Store
1func (s *Store) HasNonMembershipProof(clientId types.ClientId, proofHeight uint64, path []byte) bool
source

HasNonMembershipProof reports whether a non-membership proof was committed for the client/height/path key.

func HasPacketCommitment

method on Store
1func (s *Store) HasPacketCommitment(packet types.Packet) bool
source

HasPacketCommitment reports whether the source-side packet commitment exists.

func HasPacketReceipt

method on Store
1func (s *Store) HasPacketReceipt(packet types.Packet) bool
source

HasPacketReceipt reports whether a destination-side receipt exists.

func HasRegisteredClient

method on Store
1func (s *Store) HasRegisteredClient(typ types.ClientType) bool
source

HasRegisteredClient reports whether a factory is registered for typ.

func MembershipProofAt

method on Store
1func (s *Store) MembershipProofAt(clientId types.ClientId, proofHeight uint64, path []byte) (types.H256, bool)
source

MembershipProofAt returns the committed membership proof value for the client/height/path key.

func NextChannelId

method on Store
1func (s *Store) NextChannelId(_ int, rlm realm) types.ChannelId
source

NextChannelId allocates the next channel id from the sequence.

func NextConnectionId

method on Store
1func (s *Store) NextConnectionId(_ int, rlm realm) types.ConnectionId
source

NextConnectionId allocates the next connection id from the sequence.

func PacketCommitment

method on Store
1func (s *Store) PacketCommitment(channelId types.ChannelId, packet types.Packet) (types.H256, bool)
source

PacketCommitment returns the commitment stored at a packet's commitment path.

func RegisterAppAtPort

method on Store
1func (s *Store) RegisterAppAtPort(_ int, rlm realm, portId types.Bytes, a app.IApp)
source

RegisterAppAtPort installs an app at portId, panicking if one is already registered there.

func RegisterClient

method on Store
1func (s *Store) RegisterClient(_ int, rlm realm, typ types.ClientType, impl lightclient.ClientImpl)
source

RegisterClient stores a factory function for typ in the client registry.

func SaveBatchPackets

method on Store
1func (s *Store) SaveBatchPackets(_ int, rlm realm, channelId types.ChannelId, batchHash, value types.H256)
source

SaveBatchPackets records a batch commitment under batchHash.

func SaveBatchReceipts

method on Store
1func (s *Store) SaveBatchReceipts(_ int, rlm realm, channelId types.ChannelId, batchHash, value types.H256)
source

SaveBatchReceipts records a batch receipt under batchHash.

func SaveChannel

method on Store
1func (s *Store) SaveChannel(_ int, rlm realm, channelId types.ChannelId, channel types.Channel)
source

SaveChannel updates a stored channel and mirrors its commitment.

func SaveClientState

method on Store
1func (s *Store) SaveClientState(_ int, rlm realm, clientId types.ClientId, clientStateBytes []byte) bool
source

SaveClientState mirrors the client state bytes for queries and counterparty proofs, returning false when the client is unknown.

func SaveClientStore

method on Store
1func (s *Store) SaveClientStore(_ int, rlm realm, clientId types.ClientId, key string, value []byte) bool
source

SaveClientStore records a light client storage write (result StorageWrites), returning false when the client is unknown.

func SaveConnection

method on Store
1func (s *Store) SaveConnection(_ int, rlm realm, connectionId types.ConnectionId, connection types.Connection)
source

SaveConnection persists a connection and mirrors its commitment.

func SaveConsensusState

method on Store
1func (s *Store) SaveConsensusState(_ int, rlm realm, clientId types.ClientId, height types.Height, consensusStateBytes []byte) bool
source

SaveConsensusState records the consensus state at height, returning false when the client is unknown.

func SaveMembershipProof

method on Store
1func (s *Store) SaveMembershipProof(_ int, rlm realm, clientId types.ClientId, proofHeight uint64, path []byte, value types.H256)
source

SaveMembershipProof records a verified membership commitment.

func SaveNonMembershipProof

method on Store
1func (s *Store) SaveNonMembershipProof(_ int, rlm realm, clientId types.ClientId, proofHeight uint64, path []byte, value types.H256)
source

SaveNonMembershipProof records a verified non-membership commitment.

func SetLightClient

method on Store
1func (s *Store) SetLightClient(_ int, rlm realm, clientId types.ClientId, lc lightclient.Interface) bool
source

SetLightClient replaces a client's light client object (force-update recovery), returning false when the client is unknown.

func SetPacketAcknowledged

method on Store
1func (s *Store) SetPacketAcknowledged(_ int, rlm realm, packet types.Packet)
source

SetPacketAcknowledged flips a source-side commitment to the acknowledged marker. It is a pure write: the impl owns the state machine (verifying the commitment exists and is not already acknowledged) before calling this. The flip stays in memory only — the chain-param commitment keeps recording that the packet was sent.

func SetPacketReceipt

method on Store
1func (s *Store) SetPacketReceipt(_ int, rlm realm, packet types.Packet)
source

SetPacketReceipt records a destination-side receipt (replay protection).

Imports 13

Source Files 20

Directories 1