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

host source pure

Constants 2

const DefaultMaxCharacterLength

1const DefaultMaxCharacterLength = 64
source

DefaultMaxCharacterLength defines the default maximum character length used in validation of identifiers including the client, connection, port and channel identifiers.

NOTE: this restriction is specific to this golang implementation of IBC. If your use case demands a higher limit, please open an issue and we will consider adjusting this restriction.

Variables 2

var DefaultMaxPortCharacterLength

1var DefaultMaxPortCharacterLength = 128
source

DefaultMaxPortCharacterLength defines the default maximum character length used in validation of port identifiers.

var IsValidID

1var IsValidID = regexp.MustCompile(`^[a-zA-Z0-9\.\_\+\-\#\[\]\<\>]+$`).MatchString
source

IsValidID defines regular expression to check if the string consist of characters in one of the following categories only: - Alphanumeric - `.`, `_`, `+`, `-`, `#` - `[`, `]`, `<`, `>`

Functions 8

func ClientIdentifierValidator

1func ClientIdentifierValidator(id string) error
source

ClientIdentifierValidator is the default validator function for Client identifiers. A valid Identifier must be between 4-64 characters and only contain alphanumeric and some allowed special characters (see IsValidID).

func PacketAcknowledgementKey

1func PacketAcknowledgementKey(clientID string, sequence uint64) []byte
source

PacketAcknowledgementKey returns the store key of under which a packet acknowledgement is stored. clientID must be a generated identifier, not provided externally so key collisions are not possible.

func PacketAcknowledgementPrefixKey

1func PacketAcknowledgementPrefixKey(clientID string) []byte
source

PacketAcknowledgementPrefixKey returns the store key prefix under which packet acknowledgements for a particular channel are stored. clientID must be a generated identifier, not provided externally so key collisions are not possible.

func PacketCommitmentKey

1func PacketCommitmentKey(clientID string, sequence uint64) []byte
source

PacketCommitmentKey returns the store key of under which a packet commitment is stored. clientID must be a generated identifier, not provided externally so key collisions are not possible.

func PacketCommitmentPrefixKey

1func PacketCommitmentPrefixKey(clientID string) []byte
source

PacketCommitmentPrefixKey returns the store key prefix under which packet commitments for a particular client are stored. clientID must be a generated identifier, not provided externally so key collisions are not possible.

func PacketReceiptKey

1func PacketReceiptKey(clientID string, sequence uint64) []byte
source

PacketReceiptKey returns the store key of under which a packet receipt is stored. clientID must be a generated identifier, not provided externally so key collisions are not possible.

func PacketReceiptPrefixKey

1func PacketReceiptPrefixKey(clientID string) []byte
source

PacketReceiptPrefixKey returns the store key prefix under which packet receipts for a particular channel are stored. clientID must be a generated identifier, not provided externally so key collisions are not possible.

func PortIdentifierValidator

1func PortIdentifierValidator(id string) error
source

PortIdentifierValidator is the default validator function for Port identifiers. A valid Identifier must be between 2-64 characters and only contain alphanumeric and some allowed special characters (see IsValidID).

Types 1

type ValidateFn

func
1type ValidateFn func(string) error
source

ValidateFn function type to validate path and identifier bytestrings

Imports 5

Source Files 5