Versions in this module Expand all Collapse all v1 v1.0.0 Nov 17, 2022 Changes in this version + const ChannelIDPrefix + const ConnectionIDPrefix + const DefaultChannelVersion + const DefaultDelayPeriod + const Description + const InvalidID + 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 DefaultTrustLevel icptmtypes.Fraction = icptmtypes.DefaultTrustLevel + var MockAcknowledgement = mock.MockAcknowledgement + var MockCommitment = mock.MockCommitment + var TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) + var TestHash = tmhash.Sum([]byte("TESTING HASH")) + 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 + type Coordinator struct + Chains map[string]*TestChain + func NewCoordinator(t *testing.T, n int) *Coordinator + func (coord *Coordinator) AcknowledgePacket(source, counterparty *TestChain, counterpartyClient string, ...) error + func (coord *Coordinator) ChanCloseInit(source, counterparty *TestChain, channel TestChannel) error + func (coord *Coordinator) ChanOpenAck(source, counterparty *TestChain, ...) error + func (coord *Coordinator) ChanOpenConfirm(source, counterparty *TestChain, ...) error + func (coord *Coordinator) ChanOpenInit(source, counterparty *TestChain, ...) (TestChannel, TestChannel, error) + func (coord *Coordinator) ChanOpenInitOnBothChains(source, counterparty *TestChain, ...) (TestChannel, TestChannel, error) + func (coord *Coordinator) ChanOpenTry(source, counterparty *TestChain, ...) error + func (coord *Coordinator) CommitBlock(chains ...*TestChain) + func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) + func (coord *Coordinator) ConnOpenAck(source, counterparty *TestChain, ...) error + func (coord *Coordinator) ConnOpenConfirm(source, counterparty *TestChain, ...) error + func (coord *Coordinator) ConnOpenInit(source, counterparty *TestChain, clientID, counterpartyClientID string) (*TestConnection, *TestConnection, error) + func (coord *Coordinator) ConnOpenInitOnBothChains(source, counterparty *TestChain, clientID, counterpartyClientID string) (*TestConnection, *TestConnection, error) + func (coord *Coordinator) ConnOpenTry(source, counterparty *TestChain, ...) error + func (coord *Coordinator) CreateChannel(chainA, chainB *TestChain, connA, connB *TestConnection, ...) (TestChannel, TestChannel) + func (coord *Coordinator) CreateClient(source, counterparty *TestChain, clientType string) (clientID string, err error) + func (coord *Coordinator) CreateConnection(chainA, chainB *TestChain, clientA, clientB string) (*TestConnection, *TestConnection) + func (coord *Coordinator) CreateMockChannels(chainA, chainB *TestChain, connA, connB *TestConnection, ...) (TestChannel, TestChannel) + func (coord *Coordinator) CreateTransferChannels(chainA, chainB *TestChain, connA, connB *TestConnection, ...) (TestChannel, TestChannel) + func (coord *Coordinator) GetChain(chainID string) *TestChain + func (coord *Coordinator) IncrementTime() + func (coord *Coordinator) IncrementTimeBy(increment time.Duration) + func (coord *Coordinator) RecvPacket(source, counterparty *TestChain, sourceClient string, ...) error + func (coord *Coordinator) RelayPacket(source, counterparty *TestChain, sourceClient, counterpartyClient string, ...) error + func (coord *Coordinator) SendMsg(source, counterparty *TestChain, counterpartyClientID string, msg sdk.Msg) error + func (coord *Coordinator) SendMsgs(source, counterparty *TestChain, counterpartyClientID string, msgs []sdk.Msg) error + func (coord *Coordinator) SendPacket(source, counterparty *TestChain, packet exported.PacketI, ...) error + func (coord *Coordinator) SetChannelClosed(source, counterparty *TestChain, testChannel TestChannel) error + func (coord *Coordinator) Setup(chainA, chainB *TestChain, order channeltypes.Order) (string, string, *TestConnection, *TestConnection, TestChannel, TestChannel) + func (coord *Coordinator) SetupClientConnections(chainA, chainB *TestChain, clientType string) (string, string, *TestConnection, *TestConnection) + func (coord *Coordinator) SetupClients(chainA, chainB *TestChain, clientType string) (string, string) + func (coord *Coordinator) UpdateClient(source, counterparty *TestChain, clientID string, clientType string) (err error) + func (coord *Coordinator) WriteAcknowledgement(source, counterparty *TestChain, packet exported.PacketI, ...) error + 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.BinaryMarshaler, 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 TestChain struct + App *creataapp.CreataApp + ChainID string + ClientIDs []string + Codec codec.BinaryMarshaler + Connections []*TestConnection + CurrentHeader tmproto.Header + LastHeader *icptmtypes.Header + QueryServer types.QueryServer + SenderAccount authtypes.AccountI + Signers []tmtypes.PrivValidator + TxConfig client.TxConfig + Vals *tmtypes.ValidatorSet + func NewTestChain(t *testing.T, chainID string) *TestChain + func (chain *TestChain) AddTestChannel(conn *TestConnection, portID string) TestChannel + func (chain *TestChain) AddTestConnection(clientID, counterpartyClientID string) *TestConnection + func (chain *TestChain) ChanCloseInit(counterparty *TestChain, channel TestChannel) error + func (chain *TestChain) ChanOpenAck(counterparty *TestChain, ch, counterpartyCh TestChannel) error + func (chain *TestChain) ChanOpenConfirm(counterparty *TestChain, ch, counterpartyCh TestChannel) error + func (chain *TestChain) ChanOpenInit(ch, counterparty TestChannel, order channeltypes.Order, connectionID string) error + func (chain *TestChain) ChanOpenTry(counterparty *TestChain, ch, counterpartyCh TestChannel, ...) error + func (chain *TestChain) ConnectionOpenAck(counterparty *TestChain, connection, counterpartyConnection *TestConnection) error + func (chain *TestChain) ConnectionOpenConfirm(counterparty *TestChain, connection, counterpartyConnection *TestConnection) error + func (chain *TestChain) ConnectionOpenInit(counterparty *TestChain, connection, counterpartyConnection *TestConnection) error + func (chain *TestChain) ConnectionOpenTry(counterparty *TestChain, connection, counterpartyConnection *TestConnection) error + func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, clientID string, clientType string) *clienttypes.MsgCreateClient + func (chain *TestChain) ConstructNextTestConnection(clientID, counterpartyClientID string) *TestConnection + func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, clientID string) (*icptmtypes.Header, error) + func (chain *TestChain) CreateChannelCapability(portID, channelID string) + func (chain *TestChain) CreatePortCapability(portID string) + func (chain *TestChain) CreateTMClient(counterparty *TestChain, clientID string) error + func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, ...) *icptmtypes.Header + func (chain *TestChain) CurrentTMClientHeader() *icptmtypes.Header + func (chain *TestChain) ExpireClient(amount time.Duration) + func (chain *TestChain) GetAcknowledgement(packet exported.PacketI) []byte + func (chain *TestChain) GetChannel(testChannel TestChannel) channeltypes.Channel + func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabilitytypes.Capability + func (chain *TestChain) GetClientState(clientID string) exported.ClientState + func (chain *TestChain) GetConnection(testConnection *TestConnection) connectiontypes.ConnectionEnd + func (chain *TestChain) GetConsensusState(clientID string, height exported.Height) (exported.ConsensusState, bool) + func (chain *TestChain) GetContext() sdk.Context + func (chain *TestChain) GetFirstTestConnection(clientID, counterpartyClientID string) *TestConnection + func (chain *TestChain) GetPacketData(counterparty *TestChain) []byte + func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capability + func (chain *TestChain) GetPrefix() commitmenttypes.MerklePrefix + func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bool) + func (chain *TestChain) NewClientID(clientType string) string + func (chain *TestChain) NextBlock() + func (chain *TestChain) NextTestChannel(conn *TestConnection, portID string) TestChannel + func (chain *TestChain) QueryClientStateProof(clientID string) (exported.ClientState, []byte) + func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) + func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) + func (chain *TestChain) SendPacket(packet exported.PacketI) error + func (chain *TestChain) UpdateTMClient(counterparty *TestChain, clientID string) error + func (chain *TestChain) WriteAcknowledgement(packet exported.PacketI) error + type TestChannel struct + ClientID string + CounterpartyClientID string + ID string + PortID string + Version string + type TestConnection struct + Channels []TestChannel + ClientID string + CounterpartyClientID string + ID string + NextChannelVersion string + func (conn *TestConnection) FirstOrNextTestChannel(portID string) TestChannel