Documentation ¶
Index ¶
- Constants
- Variables
- func ChannelCapabilityPath(portID, channelID string) string
- func ChannelPath(portID, channelID string) string
- func ClientConnectionsPath(clientID string) string
- func ClientStatePath() string
- func ClientTypePath() string
- func ConnectionPath(connectionID string) string
- func ConsensusStatePath(height uint64) string
- func DefaultChannelIdentifierValidator(id string) error
- func DefaultClientIdentifierValidator(id string) error
- func DefaultConnectionIdentifierValidator(id string) error
- func DefaultPathValidator(path string) error
- func DefaultPortIdentifierValidator(id string) error
- func GetChannelPortsKeysPrefix(prefix int) []byte
- func KeyChannel(portID, channelID string) []byte
- func KeyClientConnections(clientID string) []byte
- func KeyClientState() []byte
- func KeyClientType() []byte
- func KeyConnection(connectionID string) []byte
- func KeyConsensusState(height uint64) []byte
- func KeyNextSequenceRecv(portID, channelID string) []byte
- func KeyNextSequenceSend(portID, channelID string) []byte
- func KeyPacketAcknowledgement(portID, channelID string, sequence uint64) []byte
- func KeyPacketCommitment(portID, channelID string, sequence uint64) []byte
- func KeyPort(portID string) []byte
- func KeyPrefixBytes(prefix int) []byte
- func MustParseChannelPath(path string) (string, string)
- func NextSequenceRecvPath(portID, channelID string) string
- func NextSequenceSendPath(portID, channelID string) string
- func PacketAcknowledgementPath(portID, channelID string, sequence uint64) string
- func PacketCommitmentPath(portID, channelID string, sequence uint64) string
- func PortPath(portID string) string
- func RemovePath(paths []string, path string) ([]string, bool)
- type ValidateFn
Constants ¶
const ( // ModuleName is the name of the IBC module ModuleName = "ibc" // StoreKey is the string store representation StoreKey string = ModuleName // QuerierRoute is the querier route for the IBC module QuerierRoute string = ModuleName // RouterKey is the msg router key for the IBC module RouterKey string = ModuleName )
const ( KeyChannelPrefix = "channelEnds" KeyChannelCapabilityPrefix = "capabilities" KeyNextSeqSendPrefix = "seqSends" KeyNextSeqRecvPrefix = "seqRecvs" KeyPacketCommitmentPrefix = "commitments" KeyPacketAckPrefix = "acks" )
KVStore key prefixes for IBC
const SubModuleName = "host"
SubModuleName defines the ICS 24 host
Variables ¶
var ( ErrInvalidID = sdkerrors.Register(SubModuleName, 2, "invalid identifier") ErrInvalidPath = sdkerrors.Register(SubModuleName, 3, "invalid path") ErrInvalidPacket = sdkerrors.Register(SubModuleName, 4, "invalid packet") )
IBC client sentinel errors
var ( KeyClientStorePrefix = []byte("clients") KeyConnectionPrefix = []byte("connections") )
KVStore key prefixes for IBC
Functions ¶
func ChannelCapabilityPath ¶
ChannelCapabilityPath defines the path under which capability keys associated with a channel are stored
func ChannelPath ¶
ChannelPath defines the path under which channels are stored
func ClientConnectionsPath ¶
ClientConnectionsPath defines a reverse mapping from clients to a set of connections
func ClientStatePath ¶
func ClientStatePath() string
ClientStatePath takes an Identifier and returns a Path under which to store a particular client state
func ClientTypePath ¶
func ClientTypePath() string
ClientTypePath takes an Identifier and returns Path under which to store the type of a particular client.
func ConnectionPath ¶
ConnectionPath defines the path under which connection paths are stored
func ConsensusStatePath ¶
ConsensusStatePath takes an Identifier and returns a Path under which to store the consensus state of a client.
func DefaultChannelIdentifierValidator ¶
DefaultChannelIdentifierValidator is the default validator function for Channel identifiers A valid Identifier must be between 10-20 characters and only contain lowercase alphabetic characters,
func DefaultClientIdentifierValidator ¶
DefaultClientIdentifierValidator is the default validator function for Client identifiers A valid Identifier must be between 9-20 characters and only contain lowercase alphabetic characters,
func DefaultConnectionIdentifierValidator ¶
DefaultConnectionIdentifierValidator is the default validator function for Connection identifiers A valid Identifier must be between 10-20 characters and only contain lowercase alphabetic characters,
func DefaultPathValidator ¶
DefaultPathValidator takes in path string and validates with default identifier rules. This is optimized by simply checking that all path elements are alphanumeric
func DefaultPortIdentifierValidator ¶
DefaultPortIdentifierValidator is the default validator function for Port identifiers A valid Identifier must be between 2-20 characters and only contain lowercase alphabetic characters,
func GetChannelPortsKeysPrefix ¶
GetChannelPortsKeysPrefix returns the prefix bytes for ICS04 and ICS05 iterators
func KeyChannel ¶
KeyChannel returns the store key for a particular channel
func KeyClientConnections ¶
KeyClientConnections returns the store key for the connectios of a given client
func KeyClientState ¶
func KeyClientState() []byte
KeyClientState returns the store key for a particular client state
func KeyClientType ¶
func KeyClientType() []byte
KeyClientType returns the store key for type of a particular client
func KeyConnection ¶
KeyConnection returns the store key for a particular connection
func KeyConsensusState ¶
KeyConsensusState returns the store key for the consensus state of a particular client
func KeyNextSequenceRecv ¶
KeyNextSequenceRecv returns the store key for the receive sequence of a particular channel binded to a specific port
func KeyNextSequenceSend ¶
KeyNextSequenceSend returns the store key for the send sequence of a particular channel binded to a specific port
func KeyPacketAcknowledgement ¶
KeyPacketAcknowledgement returns the store key of under which a packet acknowledgement is stored
func KeyPacketCommitment ¶
KeyPacketCommitment returns the store key of under which a packet commitment is stored
func KeyPrefixBytes ¶
KeyPrefixBytes return the key prefix bytes from a URL string format
func MustParseChannelPath ¶
func NextSequenceRecvPath ¶
NextSequenceRecvPath defines the next receive sequence counter store path
func NextSequenceSendPath ¶
NextSequenceSendPath defines the next send sequence counter store path
func PacketAcknowledgementPath ¶
PacketAcknowledgementPath defines the packet acknowledgement store path
func PacketCommitmentPath ¶
PacketCommitmentPath defines the commitments to packet data fields store path
Types ¶
type ValidateFn ¶
ValidateFn function type to validate path and identifier bytestrings
func NewPathValidator ¶
func NewPathValidator(idValidator ValidateFn) ValidateFn
NewPathValidator takes in a Identifier Validator function and returns a Path Validator function which requires path only has valid identifiers alphanumeric character strings, and "/" separators