ibc

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IBC errors reserve 200 - 299.
	CodeInvalidSequence sdk.CodeType = 200
	CodeIdenticalChains sdk.CodeType = 201
	CodeUnknownRequest  sdk.CodeType = sdk.CodeUnknownRequest
)

Variables

This section is empty.

Functions

func EgressKey added in v0.2.0

func EgressKey(destChain string, index int64) []byte

Stores an outgoing IBC packet under "egress/chain_id/index".

func EgressLengthKey added in v0.2.0

func EgressLengthKey(destChain string) []byte

Stores the number of outgoing IBC packets under "egress/index".

func ErrIdenticalChains added in v0.2.0

func ErrIdenticalChains() sdk.Error

func ErrInvalidSequence added in v0.2.0

func ErrInvalidSequence() sdk.Error

func IngressSequenceKey added in v0.2.0

func IngressSequenceKey(srcChain string) []byte

Stores the sequence number of incoming IBC packet under "ingress/index".

func NewHandler

func NewHandler(ibcm IBCMapper, ck bank.CoinKeeper) sdk.Handler

func RegisterWire added in v0.2.0

func RegisterWire(cdc *wire.Codec)

Register concrete types on wire codec

Types

type IBCMapper added in v0.2.0

type IBCMapper struct {
	// contains filtered or unexported fields
}

func NewIBCMapper added in v0.2.0

func NewIBCMapper(cdc *wire.Codec, key sdk.StoreKey) IBCMapper

XXX: The IBCMapper should not take a CoinKeeper. Rather have the CoinKeeper take an IBCMapper.

func (IBCMapper) GetIngressSequence added in v0.2.0

func (ibcm IBCMapper) GetIngressSequence(ctx sdk.Context, srcChain string) int64

func (IBCMapper) PostIBCPacket added in v0.2.0

func (ibcm IBCMapper) PostIBCPacket(ctx sdk.Context, packet IBCPacket) sdk.Error

XXX: This is not the public API. This will change in MVP2 and will henceforth only be invoked from another module directly and not through a user transaction. TODO: Handle invalid IBC packets and return errors.

func (IBCMapper) ReceiveIBCPacket added in v0.2.0

func (ibcm IBCMapper) ReceiveIBCPacket(ctx sdk.Context, packet IBCPacket) sdk.Error

XXX: In the future every module is able to register it's own handler for handling it's own IBC packets. The "ibc" handler will only route the packets to the appropriate callbacks. XXX: For now this handles all interactions with the CoinKeeper. XXX: This needs to do some authentication checking.

func (IBCMapper) SetIngressSequence added in v0.2.0

func (ibcm IBCMapper) SetIngressSequence(ctx sdk.Context, srcChain string, sequence int64)

type IBCPacket added in v0.2.0

type IBCPacket struct {
	SrcAddr   sdk.Address
	DestAddr  sdk.Address
	Coins     sdk.Coins
	SrcChain  string
	DestChain string
}

IBCPacket defines a piece of data that can be send between two separate blockchains.

func NewIBCPacket added in v0.2.0

func NewIBCPacket(srcAddr sdk.Address, destAddr sdk.Address, coins sdk.Coins,
	srcChain string, destChain string) IBCPacket

func (IBCPacket) ValidateBasic added in v0.2.0

func (ibcp IBCPacket) ValidateBasic() sdk.Error

type IBCReceiveMsg added in v0.2.0

type IBCReceiveMsg struct {
	IBCPacket
	Relayer  sdk.Address
	Sequence int64
}

IBCReceiveMsg defines the message that a relayer uses to post an IBCPacket to the destination chain.

func (IBCReceiveMsg) Get added in v0.2.0

func (msg IBCReceiveMsg) Get(key interface{}) interface{}

func (IBCReceiveMsg) GetSignBytes added in v0.2.0

func (msg IBCReceiveMsg) GetSignBytes() []byte

func (IBCReceiveMsg) GetSigners added in v0.2.0

func (msg IBCReceiveMsg) GetSigners() []sdk.Address

x/bank/tx.go SendMsg.GetSigners()

func (IBCReceiveMsg) Type added in v0.2.0

func (msg IBCReceiveMsg) Type() string

func (IBCReceiveMsg) ValidateBasic added in v0.2.0

func (msg IBCReceiveMsg) ValidateBasic() sdk.Error

type IBCTransferMsg added in v0.2.0

type IBCTransferMsg struct {
	IBCPacket
}

IBCTransferMsg defines how another module can send an IBCPacket.

func (IBCTransferMsg) Get added in v0.2.0

func (msg IBCTransferMsg) Get(key interface{}) interface{}

func (IBCTransferMsg) GetSignBytes added in v0.2.0

func (msg IBCTransferMsg) GetSignBytes() []byte

func (IBCTransferMsg) GetSigners added in v0.2.0

func (msg IBCTransferMsg) GetSigners() []sdk.Address

x/bank/tx.go SendMsg.GetSigners()

func (IBCTransferMsg) Type added in v0.2.0

func (msg IBCTransferMsg) Type() string

func (IBCTransferMsg) ValidateBasic added in v0.2.0

func (msg IBCTransferMsg) ValidateBasic() sdk.Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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