connection

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConnection        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConnection          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConnection = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ConnectionEnd_State_name = map[int32]string{
	0: "STATE_UNINITIALIZED_UNSPECIFIED",
	1: "STATE_INIT",
	2: "STATE_TRYOPEN",
	3: "STATE_OPEN",
}
View Source
var ConnectionEnd_State_value = map[string]int32{
	"STATE_UNINITIALIZED_UNSPECIFIED": 0,
	"STATE_INIT":                      1,
	"STATE_TRYOPEN":                   2,
	"STATE_OPEN":                      3,
}

Functions

This section is empty.

Types

type ConnectionEnd

type ConnectionEnd struct {
	// client associated with this connection.
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// IBC version which can be utilised to determine encodings or protocols for
	// channels or packets utilising this connection.
	Versions []*Version `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"`
	// current state of the connection end.
	State ConnectionEnd_State `protobuf:"varint,3,opt,name=state,proto3,enum=ConnectionEnd_State" json:"state,omitempty"`
	// counterparty chain associated with this connection.
	Counterparty *Counterparty `protobuf:"bytes,4,opt,name=counterparty,proto3" json:"counterparty,omitempty"`
	// delay period that must pass before a consensus state can be used for packet-verification
	// NOTE: delay period logic is only implemented by some clients.
	DelayPeriod uint64 `protobuf:"varint,5,opt,name=delay_period,json=delayPeriod,proto3" json:"delay_period,omitempty"`
}

ConnectionEnd defines a stateful object on a chain connected to another separate one. NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains.

func (*ConnectionEnd) Descriptor

func (*ConnectionEnd) Descriptor() ([]byte, []int)

func (*ConnectionEnd) GetClientId

func (m *ConnectionEnd) GetClientId() string

func (*ConnectionEnd) GetCounterparty

func (m *ConnectionEnd) GetCounterparty() *Counterparty

func (*ConnectionEnd) GetDelayPeriod

func (m *ConnectionEnd) GetDelayPeriod() uint64

func (*ConnectionEnd) GetState

func (m *ConnectionEnd) GetState() ConnectionEnd_State

func (*ConnectionEnd) GetVersions

func (m *ConnectionEnd) GetVersions() []*Version

func (*ConnectionEnd) Marshal

func (m *ConnectionEnd) Marshal() (dAtA []byte, err error)

func (*ConnectionEnd) MarshalTo

func (m *ConnectionEnd) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionEnd) MarshalToSizedBuffer

func (m *ConnectionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectionEnd) ProtoMessage

func (*ConnectionEnd) ProtoMessage()

func (*ConnectionEnd) Reset

func (m *ConnectionEnd) Reset()

func (*ConnectionEnd) Size

func (m *ConnectionEnd) Size() (n int)

func (*ConnectionEnd) String

func (m *ConnectionEnd) String() string

func (*ConnectionEnd) Unmarshal

func (m *ConnectionEnd) Unmarshal(dAtA []byte) error

func (*ConnectionEnd) XXX_DiscardUnknown

func (m *ConnectionEnd) XXX_DiscardUnknown()

func (*ConnectionEnd) XXX_Marshal

func (m *ConnectionEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionEnd) XXX_Merge

func (m *ConnectionEnd) XXX_Merge(src proto.Message)

func (*ConnectionEnd) XXX_Size

func (m *ConnectionEnd) XXX_Size() int

func (*ConnectionEnd) XXX_Unmarshal

func (m *ConnectionEnd) XXX_Unmarshal(b []byte) error

type ConnectionEnd_State

type ConnectionEnd_State int32

State defines if a connection is in one of the following states: INIT, TRYOPEN, OPEN or UNINITIALIZED.

const (
	// Default State
	ConnectionEnd_STATE_UNINITIALIZED_UNSPECIFIED ConnectionEnd_State = 0
	// A connection end has just started the opening handshake.
	ConnectionEnd_STATE_INIT ConnectionEnd_State = 1
	// A connection end has acknowledged the handshake step on the counterparty
	// chain.
	ConnectionEnd_STATE_TRYOPEN ConnectionEnd_State = 2
	// A connection end has completed the handshake.
	ConnectionEnd_STATE_OPEN ConnectionEnd_State = 3
)

func (ConnectionEnd_State) EnumDescriptor

func (ConnectionEnd_State) EnumDescriptor() ([]byte, []int)

func (ConnectionEnd_State) String

func (x ConnectionEnd_State) String() string

type Counterparty

type Counterparty struct {
	// identifies the client on the counterparty chain associated with a given
	// connection.
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// identifies the connection end on the counterparty chain associated with a
	// given connection.
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	// commitment merkle prefix of the counterparty chain.
	Prefix *MerklePrefix `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

Counterparty defines the counterparty chain associated with a connection end.

func (*Counterparty) Descriptor

func (*Counterparty) Descriptor() ([]byte, []int)

func (*Counterparty) GetClientId

func (m *Counterparty) GetClientId() string

func (*Counterparty) GetConnectionId

func (m *Counterparty) GetConnectionId() string

func (*Counterparty) GetPrefix

func (m *Counterparty) GetPrefix() *MerklePrefix

func (*Counterparty) Marshal

func (m *Counterparty) Marshal() (dAtA []byte, err error)

func (*Counterparty) MarshalTo

func (m *Counterparty) MarshalTo(dAtA []byte) (int, error)

func (*Counterparty) MarshalToSizedBuffer

func (m *Counterparty) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Counterparty) ProtoMessage

func (*Counterparty) ProtoMessage()

func (*Counterparty) Reset

func (m *Counterparty) Reset()

func (*Counterparty) Size

func (m *Counterparty) Size() (n int)

func (*Counterparty) String

func (m *Counterparty) String() string

func (*Counterparty) Unmarshal

func (m *Counterparty) Unmarshal(dAtA []byte) error

func (*Counterparty) XXX_DiscardUnknown

func (m *Counterparty) XXX_DiscardUnknown()

func (*Counterparty) XXX_Marshal

func (m *Counterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Counterparty) XXX_Merge

func (m *Counterparty) XXX_Merge(src proto.Message)

func (*Counterparty) XXX_Size

func (m *Counterparty) XXX_Size() int

func (*Counterparty) XXX_Unmarshal

func (m *Counterparty) XXX_Unmarshal(b []byte) error

type MerklePrefix

type MerklePrefix struct {
	KeyPrefix []byte `protobuf:"bytes,1,opt,name=key_prefix,json=keyPrefix,proto3" json:"key_prefix,omitempty"`
}

func (*MerklePrefix) Descriptor

func (*MerklePrefix) Descriptor() ([]byte, []int)

func (*MerklePrefix) GetKeyPrefix

func (m *MerklePrefix) GetKeyPrefix() []byte

func (*MerklePrefix) Marshal

func (m *MerklePrefix) Marshal() (dAtA []byte, err error)

func (*MerklePrefix) MarshalTo

func (m *MerklePrefix) MarshalTo(dAtA []byte) (int, error)

func (*MerklePrefix) MarshalToSizedBuffer

func (m *MerklePrefix) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MerklePrefix) ProtoMessage

func (*MerklePrefix) ProtoMessage()

func (*MerklePrefix) Reset

func (m *MerklePrefix) Reset()

func (*MerklePrefix) Size

func (m *MerklePrefix) Size() (n int)

func (*MerklePrefix) String

func (m *MerklePrefix) String() string

func (*MerklePrefix) Unmarshal

func (m *MerklePrefix) Unmarshal(dAtA []byte) error

func (*MerklePrefix) XXX_DiscardUnknown

func (m *MerklePrefix) XXX_DiscardUnknown()

func (*MerklePrefix) XXX_Marshal

func (m *MerklePrefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MerklePrefix) XXX_Merge

func (m *MerklePrefix) XXX_Merge(src proto.Message)

func (*MerklePrefix) XXX_Size

func (m *MerklePrefix) XXX_Size() int

func (*MerklePrefix) XXX_Unmarshal

func (m *MerklePrefix) XXX_Unmarshal(b []byte) error

type Version

type Version struct {
	// unique version identifier
	Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// list of features compatible with the specified identifier
	Features []string `protobuf:"bytes,2,rep,name=features,proto3" json:"features,omitempty"`
}

Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake.

func (*Version) Descriptor

func (*Version) Descriptor() ([]byte, []int)

func (*Version) GetFeatures

func (m *Version) GetFeatures() []string

func (*Version) GetIdentifier

func (m *Version) GetIdentifier() string

func (*Version) Marshal

func (m *Version) Marshal() (dAtA []byte, err error)

func (*Version) MarshalTo

func (m *Version) MarshalTo(dAtA []byte) (int, error)

func (*Version) MarshalToSizedBuffer

func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) Size

func (m *Version) Size() (n int)

func (*Version) String

func (m *Version) String() string

func (*Version) Unmarshal

func (m *Version) Unmarshal(dAtA []byte) error

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

func (m *Version) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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