Documentation ¶
Index ¶
- func CreateAddress() (types.Address, *ecdsa.PrivateKey)
- func CreateApp(state types.AppState) *minter.Blockchain
- func CreateTx(app *minter.Blockchain, address types.Address, txType transaction.TxType, ...) transaction.Transaction
- func DefaultAppState() types.AppState
- func SendBeginBlock(app *minter.Blockchain) tmTypes.ResponseBeginBlock
- func SendCommit(app *minter.Blockchain) tmTypes.ResponseCommit
- func SendEndBlock(app *minter.Blockchain) tmTypes.ResponseEndBlock
- func SendTx(app *minter.Blockchain, bytes []byte) tmTypes.ResponseDeliverTx
- func SignTx(pk *ecdsa.PrivateKey, tx transaction.Transaction) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAddress ¶
func CreateAddress() (types.Address, *ecdsa.PrivateKey)
CreateAddress returns random address and corresponding private key
func CreateApp ¶
func CreateApp(state types.AppState) *minter.Blockchain
CreateApp creates and returns new Blockchain instance Recreates $HOME/.minter_test dir
func CreateTx ¶
func CreateTx(app *minter.Blockchain, address types.Address, txType transaction.TxType, data interface{}) transaction.Transaction
CreateTx composes and returns Tx with given params. Nonce, chain id, gas price, gas coin and signature type fields are auto-filled.
func DefaultAppState ¶
DefaultAppState returns new AppState with some predefined values
func SendBeginBlock ¶
func SendBeginBlock(app *minter.Blockchain) tmTypes.ResponseBeginBlock
SendBeginBlock sends BeginBlock message to given Blockchain instance
func SendCommit ¶
func SendCommit(app *minter.Blockchain) tmTypes.ResponseCommit
SendCommit sends Commit message to given Blockchain instance
func SendEndBlock ¶
func SendEndBlock(app *minter.Blockchain) tmTypes.ResponseEndBlock
SendEndBlock sends EndBlock message to given Blockchain instance
func SendTx ¶
func SendTx(app *minter.Blockchain, bytes []byte) tmTypes.ResponseDeliverTx
SendTx sends DeliverTx message to given Blockchain instance
func SignTx ¶
func SignTx(pk *ecdsa.PrivateKey, tx transaction.Transaction) []byte
SignTx returns bytes of signed with given pk transaction
Types ¶
This section is empty.