ibc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	IBCTxTypeRegisterChain = byte(0x01)
	IBCTxTypeUpdateChain   = byte(0x02)
	IBCTxTypePacketCreate  = byte(0x03)
	IBCTxTypePacketPost    = byte(0x04)

	IBCCodeEncodingError       = abci.CodeType(1001)
	IBCCodeChainAlreadyExists  = abci.CodeType(1002)
	IBCCodePacketAlreadyExists = abci.CodeType(1003)
	IBCCodeUnknownHeight       = abci.CodeType(1004)
	IBCCodeInvalidCommit       = abci.CodeType(1005)
	IBCCodeInvalidProof        = abci.CodeType(1006)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainGenesis

type BlockchainGenesis struct {
	ChainID string
	Genesis string
}

type BlockchainState

type BlockchainState struct {
	ChainID         string
	Validators      []*tm.Validator
	LastBlockHash   []byte
	LastBlockHeight uint64
}

type IBCPacketCreateTx

type IBCPacketCreateTx struct {
	Packet
}

func (IBCPacketCreateTx) AssertIsIBCTx

func (IBCPacketCreateTx) AssertIsIBCTx()

func (IBCPacketCreateTx) ValidateBasic

func (IBCPacketCreateTx) ValidateBasic() (res abci.Result)

type IBCPacketPostTx

type IBCPacketPostTx struct {
	FromChainID     string // The immediate source of the packet, not always Packet.SrcChainID
	FromChainHeight uint64 // The block height in which Packet was committed, to check Proof
	Packet
	Proof *merkle.IAVLProof
}

func (IBCPacketPostTx) AssertIsIBCTx

func (IBCPacketPostTx) AssertIsIBCTx()

func (IBCPacketPostTx) ValidateBasic

func (IBCPacketPostTx) ValidateBasic() (res abci.Result)

type IBCPlugin

type IBCPlugin struct {
}

func New

func New() *IBCPlugin

func (*IBCPlugin) BeginBlock

func (cp *IBCPlugin) BeginBlock(store types.KVStore, hash []byte, header *abci.Header)

func (*IBCPlugin) EndBlock

func (cp *IBCPlugin) EndBlock(store types.KVStore, height uint64) (res abci.ResponseEndBlock)

func (*IBCPlugin) InitChain

func (ibc *IBCPlugin) InitChain(store types.KVStore, vals []*abci.Validator)

func (*IBCPlugin) Name

func (ibc *IBCPlugin) Name() string

func (*IBCPlugin) RunTx

func (ibc *IBCPlugin) RunTx(store types.KVStore, ctx types.CallContext, txBytes []byte) (res abci.Result)

func (*IBCPlugin) SetOption

func (ibc *IBCPlugin) SetOption(store types.KVStore, key string, value string) (log string)

func (*IBCPlugin) StateKey

func (ibc *IBCPlugin) StateKey() []byte

type IBCPluginState

type IBCPluginState struct {
}

type IBCRegisterChainTx

type IBCRegisterChainTx struct {
	BlockchainGenesis
}

func (IBCRegisterChainTx) AssertIsIBCTx

func (IBCRegisterChainTx) AssertIsIBCTx()

func (IBCRegisterChainTx) ValidateBasic

func (IBCRegisterChainTx) ValidateBasic() (res abci.Result)

type IBCStateMachine

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

type IBCTx

type IBCTx interface {
	AssertIsIBCTx()
	ValidateBasic() abci.Result
}

type IBCUpdateChainTx

type IBCUpdateChainTx struct {
	Header tm.Header
	Commit tm.Commit
}

func (IBCUpdateChainTx) AssertIsIBCTx

func (IBCUpdateChainTx) AssertIsIBCTx()

func (IBCUpdateChainTx) ValidateBasic

func (IBCUpdateChainTx) ValidateBasic() (res abci.Result)

type Packet

type Packet struct {
	SrcChainID string
	DstChainID string
	Sequence   uint64
	Type       string
	Payload    []byte
}

Jump to

Keyboard shortcuts

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