Versions in this module Expand all Collapse all v3 v3.3.5 Oct 6, 2022 v3.3.4 Oct 6, 2022 Changes in this version + const DefaultChannelVersion + const DefaultDelayPeriod + const Description + const FirstChannelID + const FirstClientID + const FirstConnectionID + const InvalidID + const LongString + const MaxClockDrift + const MockPort + const Title + const TransferPort + const TrustingPeriod + const UnbondingPeriod + var ChainIDPrefix = "testchain" + var ConnectionVersion = connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())[0] + var DefaultOpenInitVersion *connectiontypes.Version + var DefaultTestingAppInit func() (TestingApp, map[string]json.RawMessage) = SetupTestingApp + var DefaultTrustLevel ibctmtypes.Fraction = ibctmtypes.DefaultTrustLevel + var MaxAccounts = 10 + var MockAcknowledgement = mock.MockAcknowledgement.Acknowledgement() + var MockFailPacketData = mock.MockFailPacketData + var MockPacketData = mock.MockPacketData + var MockRecvCanaryCapabilityName = mock.MockRecvCanaryCapabilityName + var TestAccAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" + var TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) + var TimeIncrement = time.Second * 5 + var UpgradePath = []string + func CreateSortedSignerArray(altPrivVal, suitePrivVal tmtypes.PrivValidator, ...) []tmtypes.PrivValidator + func GenerateKeys(t *testing.T, n uint64) ([]cryptotypes.PrivKey, []cryptotypes.PubKey, cryptotypes.PubKey) + func GetChainID(index int) string + func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) tmtypes.BlockID + func ParseAckFromEvents(events sdk.Events) ([]byte, error) + func ParseChannelIDFromEvents(events sdk.Events) (string, error) + func ParseClientIDFromEvents(events sdk.Events) (string, error) + func ParseConnectionIDFromEvents(events sdk.Events) (string, error) + func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) + type ChannelConfig struct + Order channeltypes.Order + PortID string + Version string + func NewChannelConfig() *ChannelConfig + type ClientConfig interface + GetClientType func() string + type ConnectionConfig struct + DelayPeriod uint64 + Version *connectiontypes.Version + func NewConnectionConfig() *ConnectionConfig + type Coordinator struct + Chains map[string]*TestChain + CurrentTime time.Time + func NewCoordinator(t *testing.T, n int) *Coordinator + func (coord *Coordinator) ChanOpenInitOnBothChains(path *Path) error + func (coord *Coordinator) CommitBlock(chains ...*TestChain) + func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) + func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error + func (coord *Coordinator) CreateChannels(path *Path) + func (coord *Coordinator) CreateConnections(path *Path) + func (coord *Coordinator) CreateMockChannels(path *Path) + func (coord *Coordinator) CreateTransferChannels(path *Path) + func (coord *Coordinator) GetChain(chainID string) *TestChain + func (coord *Coordinator) IncrementTime() + func (coord *Coordinator) IncrementTimeBy(increment time.Duration) + func (coord *Coordinator) Setup(path *Path) + func (coord *Coordinator) SetupClients(path *Path) + func (coord *Coordinator) SetupConnections(path *Path) + func (coord *Coordinator) UpdateTime() + func (coord *Coordinator) UpdateTimeForChain(chain *TestChain) + type Endpoint struct + Chain *TestChain + ChannelConfig *ChannelConfig + ChannelID string + ClientConfig ClientConfig + ClientID string + ConnectionConfig *ConnectionConfig + ConnectionID string + Counterparty *Endpoint + func NewDefaultEndpoint(chain *TestChain) *Endpoint + func NewEndpoint(chain *TestChain, clientConfig ClientConfig, ...) *Endpoint + func (endpoint *Endpoint) AcknowledgePacket(packet channeltypes.Packet, ack []byte) error + func (endpoint *Endpoint) ChanCloseInit() error + func (endpoint *Endpoint) ChanOpenAck() error + func (endpoint *Endpoint) ChanOpenConfirm() error + func (endpoint *Endpoint) ChanOpenInit() error + func (endpoint *Endpoint) ChanOpenTry() error + func (endpoint *Endpoint) ConnOpenAck() error + func (endpoint *Endpoint) ConnOpenConfirm() error + func (endpoint *Endpoint) ConnOpenInit() error + func (endpoint *Endpoint) ConnOpenTry() error + func (endpoint *Endpoint) CreateClient() (err error) + func (endpoint *Endpoint) GetChannel() channeltypes.Channel + func (endpoint *Endpoint) GetClientState() exported.ClientState + func (endpoint *Endpoint) GetConnection() connectiontypes.ConnectionEnd + func (endpoint *Endpoint) GetConsensusState(height exported.Height) exported.ConsensusState + func (endpoint *Endpoint) QueryClientStateProof() (exported.ClientState, []byte) + func (endpoint *Endpoint) QueryConnectionHandshakeProof() (clientState exported.ClientState, proofClient, proofConsensus []byte, ...) + func (endpoint *Endpoint) QueryProof(key []byte) ([]byte, clienttypes.Height) + func (endpoint *Endpoint) QueryProofAtHeight(key []byte, height uint64) ([]byte, clienttypes.Height) + func (endpoint *Endpoint) RecvPacket(packet channeltypes.Packet) error + func (endpoint *Endpoint) RecvPacketWithResult(packet channeltypes.Packet) (*sdk.Result, error) + func (endpoint *Endpoint) SendPacket(packet exported.PacketI) error + func (endpoint *Endpoint) SetChannel(channel channeltypes.Channel) + func (endpoint *Endpoint) SetChannelClosed() error + func (endpoint *Endpoint) SetClientState(clientState exported.ClientState) + func (endpoint *Endpoint) SetConnection(connection connectiontypes.ConnectionEnd) + func (endpoint *Endpoint) SetConsensusState(consensusState exported.ConsensusState, height exported.Height) + func (endpoint *Endpoint) TimeoutOnClose(packet channeltypes.Packet) error + func (endpoint *Endpoint) TimeoutPacket(packet channeltypes.Packet) error + func (endpoint *Endpoint) UpdateClient() (err error) + func (endpoint *Endpoint) WriteAcknowledgement(ack exported.Acknowledgement, packet exported.PacketI) error + type Path struct + EndpointA *Endpoint + EndpointB *Endpoint + func NewPath(chainA, chainB *TestChain) *Path + func (path *Path) RelayPacket(packet channeltypes.Packet) error + func (path *Path) SetChannelOrdered() + type SenderAccount struct + SenderAccount authtypes.AccountI + SenderPrivKey cryptotypes.PrivKey + type Solomachine struct + ClientID string + Diversifier string + PrivateKeys []cryptotypes.PrivKey + PublicKey cryptotypes.PubKey + PublicKeys []cryptotypes.PubKey + Sequence uint64 + Time uint64 + func NewSolomachine(t *testing.T, cdc codec.BinaryCodec, clientID, diversifier string, ...) *Solomachine + func (solo *Solomachine) ClientState() *solomachinetypes.ClientState + func (solo *Solomachine) ConsensusState() *solomachinetypes.ConsensusState + func (solo *Solomachine) CreateHeader() *solomachinetypes.Header + func (solo *Solomachine) CreateMisbehaviour() *solomachinetypes.Misbehaviour + func (solo *Solomachine) GenerateSignature(signBytes []byte) []byte + func (solo *Solomachine) GetChannelStatePath(portID, channelID string) commitmenttypes.MerklePath + func (solo *Solomachine) GetClientStatePath(counterpartyClientIdentifier string) commitmenttypes.MerklePath + func (solo *Solomachine) GetConnectionStatePath(connID string) commitmenttypes.MerklePath + func (solo *Solomachine) GetConsensusStatePath(counterpartyClientIdentifier string, consensusHeight exported.Height) commitmenttypes.MerklePath + func (solo *Solomachine) GetHeight() exported.Height + func (solo *Solomachine) GetNextSequenceRecvPath(portID, channelID string) commitmenttypes.MerklePath + func (solo *Solomachine) GetPacketAcknowledgementPath(portID, channelID string) commitmenttypes.MerklePath + func (solo *Solomachine) GetPacketCommitmentPath(portID, channelID string) commitmenttypes.MerklePath + func (solo *Solomachine) GetPacketReceiptPath(portID, channelID string) commitmenttypes.MerklePath + type TendermintConfig struct + AllowUpdateAfterExpiry bool + AllowUpdateAfterMisbehaviour bool + MaxClockDrift time.Duration + TrustLevel ibctmtypes.Fraction + TrustingPeriod time.Duration + UnbondingPeriod time.Duration + func NewTendermintConfig() *TendermintConfig + func (tmcfg *TendermintConfig) GetClientType() string + type TestChain struct + App TestingApp + ChainID string + Codec codec.BinaryCodec + Coordinator *Coordinator + CurrentHeader tmproto.Header + LastHeader *ibctmtypes.Header + QueryServer types.QueryServer + SenderAccount authtypes.AccountI + SenderAccounts []SenderAccount + SenderPrivKey cryptotypes.PrivKey + Signers []tmtypes.PrivValidator + TxConfig client.TxConfig + Vals *tmtypes.ValidatorSet + func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain + func NewTestChainWithValSet(t *testing.T, coord *Coordinator, chainID string, valSet *tmtypes.ValidatorSet, ...) *TestChain + func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, clientID string) (*ibctmtypes.Header, error) + func (chain *TestChain) ConstructUpdateTMClientHeaderWithTrustedHeight(counterparty *TestChain, clientID string, trustedHeight clienttypes.Height) (*ibctmtypes.Header, error) + func (chain *TestChain) CreateChannelCapability(scopedKeeper capabilitykeeper.ScopedKeeper, portID, channelID string) + func (chain *TestChain) CreatePortCapability(scopedKeeper capabilitykeeper.ScopedKeeper, portID string) + func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, ...) *ibctmtypes.Header + func (chain *TestChain) CurrentTMClientHeader() *ibctmtypes.Header + func (chain *TestChain) ExpireClient(amount time.Duration) + func (chain *TestChain) GetAcknowledgement(packet exported.PacketI) []byte + func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabilitytypes.Capability + func (chain *TestChain) GetClientState(clientID string) exported.ClientState + func (chain *TestChain) GetConsensusState(clientID string, height exported.Height) (exported.ConsensusState, bool) + func (chain *TestChain) GetContext() sdk.Context + func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capability + func (chain *TestChain) GetPrefix() commitmenttypes.MerklePrefix + func (chain *TestChain) GetSimApp() *simapp.SimApp + func (chain *TestChain) GetTimeoutHeight() clienttypes.Height + func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bool) + func (chain *TestChain) NextBlock() + func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryProofAtHeight(key []byte, height int64) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) + func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) + type TestingApp interface + AppCodec func() codec.Codec + GetBaseApp func() *baseapp.BaseApp + GetIBCKeeper func() *keeper.Keeper + GetScopedIBCKeeper func() capabilitykeeper.ScopedKeeper + GetStakingKeeper func() stakingkeeper.Keeper + GetTxConfig func() client.TxConfig + LastBlockHeight func() int64 + LastCommitID func() sdk.CommitID + func SetupTestingApp() (TestingApp, map[string]json.RawMessage) + func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, ...) TestingApp