Versions in this module Expand all Collapse all v1 v1.1.2 Sep 16, 2021 Changes in this version + func AppendBlocks(chain *protocol.Chain, num uint64) error + func CreateCoinbaseTx(controlProgram []byte, height, txsFee uint64) (*types.Tx, error) + func CreateSpendInput(tx *types.Tx, outputIndex uint64) (*types.SpendInput, error) + func CreateTxFromTx(baseTx *types.Tx, outputIndex uint64, outputAmount uint64, ctrlProgram []byte) (*types.Tx, error) + func MockBlock() *bc.Block + func MockChain(testDB dbm.DB) (*protocol.Chain, *database.Store, *protocol.TxPool, error) + func MockSign(tpl *txbuilder.Template, hsm *pseudohsm.HSM, password string) (bool, error) + func MockTx(utxo *account.UTXO, testAccount *account.Account) (*txbuilder.Template, *types.TxData, error) + func MockUTXO(controlProg *account.CtrlProgram) *account.UTXO + func NewBlock(chain *protocol.Chain, txs []*types.Tx, controlProgram []byte) (*types.Block, error) + func ReplaceCoinbase(block *types.Block, coinbaseTx *types.Tx) (err error) + func SignInstructionFor(input *types.SpendInput, db dbm.DB, signer *signers.Signer) (*txbuilder.SigningInstruction, error) + func Solve(seed *bc.Hash, block *types.Block) + func SolveAndUpdate(chain *protocol.Chain, block *types.Block) error + type TxGenerator struct + AccountManager *account.Manager + Assets *asset.Registry + Builder *txbuilder.TemplateBuilder + Hsm *pseudohsm.HSM + func NewTxGenerator(accountManager *account.Manager, assets *asset.Registry, hsm *pseudohsm.HSM) *TxGenerator + func (g *TxGenerator) AddIssuanceInput(assetAlias string, amount uint64) error + func (g *TxGenerator) AddRetirement(assetAlias string, amount uint64) error + func (g *TxGenerator) AddSpendInput(accountAlias, assetAlias string, amount uint64) error + func (g *TxGenerator) AddTxInput(txInput *types.TxInput, signInstruction *txbuilder.SigningInstruction) error + func (g *TxGenerator) AddTxInputFromUtxo(utxo *account.UTXO, accountAlias string) error + func (g *TxGenerator) AddTxOutput(accountAlias, assetAlias string, amount uint64) error + func (g *TxGenerator) Reset() + func (g *TxGenerator) Sign(passwords []string) (*types.Tx, error)