Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestKit ¶
type TestKit struct {
// contains filtered or unexported fields
}
TestKit provides a simple API to test your service against a running node.
func NewTestKit ¶
NewTestKit creates an in-process Tendermint node. homedir: is the directory where Tendermint will store configuration. You should use a
'defer os.RemoveAll()' at the start of your test to delete this directory when the test finishes
service: is you application service to test
func (TestKit) Launch ¶
func (tk TestKit) Launch()
Launch start the Tendermint node and waits for 2 seconds to ensure the node is running
func (TestKit) Query ¶
func (tk TestKit) Query(key []byte) (*core_types.ResultABCIQuery, error)
Query your service for the given key. The key should match what's expected when you implemented service.Query(...)
func (TestKit) SendTxAsync ¶
func (tk TestKit) SendTxAsync(txencoded []byte) (*core_types.ResultBroadcastTx, error)
SendTxAsync can be used to send several transactions at once. It doesn't wait for commit
func (TestKit) SendTxCommit ¶
func (tk TestKit) SendTxCommit(txencoded []byte) (*core_types.ResultBroadcastTxCommit, error)
SendTxCommit sends a transaction and waits for it to be committed
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet provides a way to generate and sign transactions
func WalletFromSeed ¶
WalletFromSeed create a wallet based on the seed. This is a good way to create a predictable wallet with the same private key