ibc

package
v0.0.0-...-f148bc3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIbcPacketDenom

func GetIbcPacketDenom(packet Packet, packetMsgDenom string) string

Types

type Channel

type Channel struct {
	State          int32               `bson:"state"`
	Ordering       int32               `bson:"ordering"`
	Counterparty   ChannelCounterparty `bson:"counterparty"`
	ConnectionHops []string            `bson:"connection_hops"`
	Version        string              `bson:"version"`
}

type ChannelCounterparty

type ChannelCounterparty struct {
	PortId    string `bson:"port_id"`
	ChannelId string `bson:"channel_id"`
}

type Client

type Client interface {
	HandleTxMsg(v types.Msg) (MsgDocInfo, bool)
}

func NewClient

func NewClient() Client

type Counterparty

type Counterparty struct {
	ClientId     string       `bson:"client_id" json:"client_id"`
	ConnectionId string       `bson:"connection_id" json:"connection_id"`
	Prefix       MerklePrefix `bson:"prefix" json:"prefix"`
}

Counterparty defines the counterparty chain associated with a connection end.

type DocMsgAcknowledgement

type DocMsgAcknowledgement struct {
	PacketId        string `bson:"packet_id"`
	Packet          Packet `bson:"packet"`
	Acknowledgement string `bson:"acknowledgement"`
	ProofAcked      string `bson:"proof_acked"`
	ProofHeight     Height `bson:"proof_height"`
	Signer          string `bson:"signer"`
}

func (*DocMsgAcknowledgement) BuildMsg

func (m *DocMsgAcknowledgement) BuildMsg(v interface{})

func (*DocMsgAcknowledgement) GetType

func (m *DocMsgAcknowledgement) GetType() string

func (*DocMsgAcknowledgement) HandleTxMsg

func (m *DocMsgAcknowledgement) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgChannelCloseConfirm

type DocMsgChannelCloseConfirm struct {
	PortId      string `bson:"port_id"`
	ChannelId   string `bson:"channel_id"`
	ProofInit   string `bson:"proof_init"`
	ProofHeight Height `bson:"proof_height"`
	Signer      string `bson:"signer"`
}

func (*DocMsgChannelCloseConfirm) BuildMsg

func (m *DocMsgChannelCloseConfirm) BuildMsg(v interface{})

func (*DocMsgChannelCloseConfirm) GetType

func (m *DocMsgChannelCloseConfirm) GetType() string

func (*DocMsgChannelCloseConfirm) HandleTxMsg

func (m *DocMsgChannelCloseConfirm) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgChannelCloseInit

type DocMsgChannelCloseInit struct {
	PortId    string `bson:"port_id"`
	ChannelId string `bson:"channel_id"`
	Signer    string `bson:"signer"`
}

func (*DocMsgChannelCloseInit) BuildMsg

func (m *DocMsgChannelCloseInit) BuildMsg(v interface{})

func (*DocMsgChannelCloseInit) GetType

func (m *DocMsgChannelCloseInit) GetType() string

func (*DocMsgChannelCloseInit) HandleTxMsg

func (m *DocMsgChannelCloseInit) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgChannelOpenAck

type DocMsgChannelOpenAck struct {
	PortId                string `bson:"port_id"`
	ChannelId             string `bson:"channel_id"`
	CounterpartyChannelId string `bson:"counterparty_channel_id"`
	CounterpartyVersion   string `bson:"counterparty_version"`
	ProofTry              string `bson:"proof_try"`
	ProofHeight           Height `bson:"proof_height"`
	Signer                string `bson:"signer"`
}

func (*DocMsgChannelOpenAck) BuildMsg

func (m *DocMsgChannelOpenAck) BuildMsg(v interface{})

func (*DocMsgChannelOpenAck) GetType

func (m *DocMsgChannelOpenAck) GetType() string

func (*DocMsgChannelOpenAck) HandleTxMsg

func (m *DocMsgChannelOpenAck) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgChannelOpenConfirm

type DocMsgChannelOpenConfirm struct {
	PortId      string `bson:"port_id"`
	ChannelId   string `bson:"channel_id"`
	ProofAck    string `bson:"proof_ack"`
	ProofHeight Height `bson:"proof_height"`
	Signer      string `bson:"signer"`
}

func (*DocMsgChannelOpenConfirm) BuildMsg

func (m *DocMsgChannelOpenConfirm) BuildMsg(v interface{})

func (*DocMsgChannelOpenConfirm) GetType

func (m *DocMsgChannelOpenConfirm) GetType() string

func (*DocMsgChannelOpenConfirm) HandleTxMsg

func (m *DocMsgChannelOpenConfirm) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgChannelOpenInit

type DocMsgChannelOpenInit struct {
	PortId  string  `bson:"port_id"`
	Channel Channel `bson:"channel"`
	Signer  string  `bson:"signer"`
}

func (*DocMsgChannelOpenInit) BuildMsg

func (m *DocMsgChannelOpenInit) BuildMsg(v interface{})

func (*DocMsgChannelOpenInit) GetType

func (m *DocMsgChannelOpenInit) GetType() string

func (*DocMsgChannelOpenInit) HandleTxMsg

func (m *DocMsgChannelOpenInit) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgChannelOpenTry

type DocMsgChannelOpenTry struct {
	PortId              string  `bson:"port_id"`
	PreviousChannelId   string  `bson:"previous_channel_id"`
	Channel             Channel `bson:"channel"`
	CounterpartyVersion string  `bson:"counterparty_version"`
	ProofInit           string  `bson:"proof_init"`
	ProofHeight         Height  `bson:"proof_height"`
	Signer              string  `bson:"signer"`
}

func (*DocMsgChannelOpenTry) BuildMsg

func (m *DocMsgChannelOpenTry) BuildMsg(v interface{})

func (*DocMsgChannelOpenTry) GetType

func (m *DocMsgChannelOpenTry) GetType() string

func (*DocMsgChannelOpenTry) HandleTxMsg

func (m *DocMsgChannelOpenTry) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgConnectionOpenAck

type DocMsgConnectionOpenAck struct {
	ConnectionId             string  `bson:"connection_id"`
	CounterpartyConnectionId string  `bson:"counterparty_connection_id"`
	Version                  Version `bson:"version"`
	ClientState              string  `bson:"client_state"`
	ProofHeight              Height  `bson:"proof_height"`
	ProofTry                 string  `bson:"proof_try"`
	ProofClient              string  `bson:"proof_client"`
	ProofConsensus           string  `bson:"proof_consensus"`
	ConsensusHeight          Height  `bson:"consensus_height"`
	Signer                   string  `bson:"signer"`
}

func (*DocMsgConnectionOpenAck) BuildMsg

func (m *DocMsgConnectionOpenAck) BuildMsg(v interface{})

func (*DocMsgConnectionOpenAck) GetType

func (m *DocMsgConnectionOpenAck) GetType() string

func (*DocMsgConnectionOpenAck) HandleTxMsg

func (m *DocMsgConnectionOpenAck) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgConnectionOpenConfirm

type DocMsgConnectionOpenConfirm struct {
	ConnectionId string `bson:"connection_id"`
	ProofAck     string `bson:"proof_ack"`
	ProofHeight  Height `bson:"proof_height"`
	Signer       string `bson:"signer"`
}

func (*DocMsgConnectionOpenConfirm) BuildMsg

func (m *DocMsgConnectionOpenConfirm) BuildMsg(v interface{})

func (*DocMsgConnectionOpenConfirm) GetType

func (m *DocMsgConnectionOpenConfirm) GetType() string

func (*DocMsgConnectionOpenConfirm) HandleTxMsg

func (m *DocMsgConnectionOpenConfirm) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgConnectionOpenInit

type DocMsgConnectionOpenInit struct {
	ClientId     string       `bson:"client_id"`
	Counterparty Counterparty `bson:"counterparty"`
	Version      Version      `bson:"version"`
	DelayPeriod  int64        `bson:"delay_period"`
	Signer       string       `bson:"signer"`
}

func (*DocMsgConnectionOpenInit) BuildMsg

func (m *DocMsgConnectionOpenInit) BuildMsg(v interface{})

func (*DocMsgConnectionOpenInit) GetType

func (m *DocMsgConnectionOpenInit) GetType() string

func (*DocMsgConnectionOpenInit) HandleTxMsg

func (m *DocMsgConnectionOpenInit) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgConnectionOpenTry

type DocMsgConnectionOpenTry struct {
	ClientId             string       `bson:"client_id"`
	PreviousConnectionId string       `bson:"previous_connection_id"`
	ClientState          string       `bson:"client_state"`
	Counterparty         Counterparty `bson:"counterparty"`
	DelayPeriod          int64        `bson:"delay_period"`
	CounterpartyVersions []Version    `bson:"counterparty_versions"`
	ProofHeight          Height       `bson:"proof_height"`
	ProofInit            string       `bson:"proof_init"`
	ProofClient          string       `bson:"proof_client"`
	ProofConsensus       string       `bson:"proof_consensus"`
	ConsensusHeight      Height       `bson:"consensus_height"`
	Signer               string       `bson:"signer"`
}

func (*DocMsgConnectionOpenTry) BuildMsg

func (m *DocMsgConnectionOpenTry) BuildMsg(v interface{})

func (*DocMsgConnectionOpenTry) GetType

func (m *DocMsgConnectionOpenTry) GetType() string

func (*DocMsgConnectionOpenTry) HandleTxMsg

func (m *DocMsgConnectionOpenTry) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgCreateClient

type DocMsgCreateClient struct {
	ClientState    string `bson:"client_state"`
	ConsensusState string `bson:"consensus_state"`
	Signer         string `bson:"signer" yaml:"signer"`
}

MsgCreateClient defines a message to create an IBC client

func (*DocMsgCreateClient) BuildMsg

func (m *DocMsgCreateClient) BuildMsg(v interface{})

func (*DocMsgCreateClient) GetType

func (m *DocMsgCreateClient) GetType() string

func (*DocMsgCreateClient) HandleTxMsg

func (m *DocMsgCreateClient) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgRecvPacket

type DocMsgRecvPacket struct {
	PacketId        string `bson:"packet_id"`
	Packet          Packet `bson:"packet"`
	ProofCommitment string `bson:"proof_commitment"`
	ProofHeight     Height `bson:"proof_height"`
	Signer          string `bson:"signer"`
}

func (*DocMsgRecvPacket) BuildMsg

func (m *DocMsgRecvPacket) BuildMsg(v interface{})

func (*DocMsgRecvPacket) GetType

func (m *DocMsgRecvPacket) GetType() string

func (*DocMsgRecvPacket) HandleTxMsg

func (m *DocMsgRecvPacket) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgSubmitMisbehaviour

type DocMsgSubmitMisbehaviour struct {
	ClientId     string `bson:"client_id"`
	Misbehaviour string `bson:"misbehaviour"`
	Signer       string `bson:"signer"`
}

func (*DocMsgSubmitMisbehaviour) BuildMsg

func (m *DocMsgSubmitMisbehaviour) BuildMsg(v interface{})

func (*DocMsgSubmitMisbehaviour) GetType

func (m *DocMsgSubmitMisbehaviour) GetType() string

func (*DocMsgSubmitMisbehaviour) HandleTxMsg

func (m *DocMsgSubmitMisbehaviour) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgTimeout

type DocMsgTimeout struct {
	PacketId         string `bson:"packet_id"`
	Packet           Packet `bson:"packet"`
	ProofUnreceived  string `bson:"proof_unreceived"`
	ProofHeight      Height `bson:"proof_height"`
	NextSequenceRecv int64  `bson:"next_sequence_recv"`
	Signer           string `bson:"signer"`
}

func (*DocMsgTimeout) BuildMsg

func (m *DocMsgTimeout) BuildMsg(v interface{})

func (*DocMsgTimeout) GetType

func (m *DocMsgTimeout) GetType() string

func (*DocMsgTimeout) HandleTxMsg

func (m *DocMsgTimeout) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgTimeoutOnClose

type DocMsgTimeoutOnClose struct {
	Packet           Packet `bson:"packet"`
	ProofUnreceived  string `bson:"proof_unreceived"`
	ProofClose       string `bson:"proof_close"`
	ProofHeight      Height `bson:"proof_height"`
	NextSequenceRecv int64  `bson:"next_sequence_recv"`
	Signer           string `bson:"signer"`
}

func (*DocMsgTimeoutOnClose) BuildMsg

func (m *DocMsgTimeoutOnClose) BuildMsg(v interface{})

func (*DocMsgTimeoutOnClose) GetType

func (m *DocMsgTimeoutOnClose) GetType() string

func (*DocMsgTimeoutOnClose) HandleTxMsg

func (m *DocMsgTimeoutOnClose) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgTransfer

type DocMsgTransfer struct {
	PacketId         string      `bson:"packet_id"`
	SourcePort       string      `bson:"source_port"`
	SourceChannel    string      `bson:"source_channel"`
	Token            models.Coin `bson:"token"`
	Sender           string      `bson:"sender"`
	Receiver         string      `bson:"receiver"`
	TimeoutHeight    Height      `bson:"timeout_height"`
	TimeoutTimestamp int64       `bson:"timeout_timestamp"`
}

func (*DocMsgTransfer) BuildMsg

func (m *DocMsgTransfer) BuildMsg(v interface{})

func (*DocMsgTransfer) GetType

func (m *DocMsgTransfer) GetType() string

func (*DocMsgTransfer) HandleTxMsg

func (m *DocMsgTransfer) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgUpdateClient

type DocMsgUpdateClient struct {
	ClientId string `bson:"client_id" yaml:"client_id"`
	Header   string `bson:"header" yaml:"header"`
	Signer   string `bson:"signer" yaml:"signer"`
}

MsgUpdateClient defines a message to update an IBC client

func (*DocMsgUpdateClient) BuildMsg

func (m *DocMsgUpdateClient) BuildMsg(v interface{})

func (*DocMsgUpdateClient) GetType

func (m *DocMsgUpdateClient) GetType() string

func (*DocMsgUpdateClient) HandleTxMsg

func (m *DocMsgUpdateClient) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocMsgUpgradeClient

type DocMsgUpgradeClient struct {
	ClientId                   string `bson:"client_id"`
	ClientState                string `bson:"client_state"`
	ConsensusState             string `bson:"consensus_state"`
	ProofUpgradeClient         string `bson:"proof_upgrade_client"`
	ProofUpgradeConsensusState string `bson:"proof_upgrade_consensus_state"`
	Signer                     string `bson:"signer"`
}

func (*DocMsgUpgradeClient) BuildMsg

func (m *DocMsgUpgradeClient) BuildMsg(v interface{})

func (*DocMsgUpgradeClient) GetType

func (m *DocMsgUpgradeClient) GetType() string

func (*DocMsgUpgradeClient) HandleTxMsg

func (m *DocMsgUpgradeClient) HandleTxMsg(v SdkMsg) MsgDocInfo

type Height

type Height struct {
	RevisionNumber int64 `bson:"revision_number"`
	RevisionHeight int64 `bson:"revision_height"`
}

type MerklePrefix

type MerklePrefix struct {
	KeyPrefix string `bson:"key_prefix" json:"key_prefix"`
}

type Packet

type Packet struct {
	Sequence           int64      `bson:"sequence"`
	SourcePort         string     `bson:"source_port"`
	SourceChannel      string     `bson:"source_channel"`
	DestinationPort    string     `bson:"destination_port"`
	DestinationChannel string     `bson:"destination_channel"`
	Data               PacketData `bson:"data"`
	TimeoutHeight      Height     `bson:"timeout_height"`
	TimeoutTimestamp   int64      `bson:"timeout_timestamp"`
}

Packet defines a type that carries data across different chains through IBC

type PacketData

type PacketData struct {
	Denom    string `bson:"denom" json:"denom"`
	Amount   int64  `bson:"amount" json:"amount"`
	Sender   string `bson:"sender" json:"sender"`
	Receiver string `bson:"receiver" json:"receiver"`
}

FungibleTokenPacketData

func UnmarshalPacketData

func UnmarshalPacketData(bytesdata []byte) PacketData

type Version

type Version struct {
	Identifier string   `bson:"identifier" json:"identifier"`
	Features   []string `bson:"features" json:"features"`
}

Jump to

Keyboard shortcuts

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