Documentation ¶
Index ¶
- func BuildTxParam(state TxParamState, param *BeforeTxParam) (txParam *txtool.GTxParam, e error)
- func CreatePkr(pk *c_type.Uint512, index uint64) c_type.PKr
- func GenTxParam(param *PreTxParam, gen TxParamGenerator, state TxParamState) (txParam *txtool.GTxParam, e error)
- func IsPk(addr c_type.PKr) bool
- type BeforeTxParam
- type Cmds
- type DefaultTxParamState
- func (self *DefaultTxParamState) GetAnchor(roots []c_type.Uint256) (wits []txtool.Witness, e error)
- func (self *DefaultTxParamState) GetOut(root *c_type.Uint256) (out *localdb.RootState)
- func (self *DefaultTxParamState) GetPkgById(id *c_type.Uint256) (ret *localdb.ZPkg)
- func (self *DefaultTxParamState) GetSeroGasLimit(to *common.Address, tfee *assets.Token, gasPrice *big.Int) (gaslimit uint64, e error)
- type PkgCloseCmd
- type PkgCreateCmd
- type PkgTransferCmd
- type PreTxParam
- type Reception
- type TxParamGenerator
- type TxParamState
- type Utxo
- type Utxos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTxParam ¶
func BuildTxParam( state TxParamState, param *BeforeTxParam, ) (txParam *txtool.GTxParam, e error)
func GenTxParam ¶
func GenTxParam(param *PreTxParam, gen TxParamGenerator, state TxParamState) (txParam *txtool.GTxParam, e error)
Types ¶
type BeforeTxParam ¶
type Cmds ¶
type Cmds struct { stx.BuyShareCmd //Pool RegistPool *stx.RegistPoolCmd ClosePool *stx.ClosePoolCmd //Contract Contract *stx.ContractCmd //Package PkgCreate *PkgCreateCmd PkgTransfer *PkgTransferCmd PkgClose *PkgCloseCmd }BuyShare *
type DefaultTxParamState ¶
type DefaultTxParamState struct { }
func (*DefaultTxParamState) GetOut ¶
func (self *DefaultTxParamState) GetOut(root *c_type.Uint256) (out *localdb.RootState)
func (*DefaultTxParamState) GetPkgById ¶
func (self *DefaultTxParamState) GetPkgById(id *c_type.Uint256) (ret *localdb.ZPkg)
type PkgCloseCmd ¶
type PkgCreateCmd ¶
type PreTxParam ¶
type TxParamGenerator ¶
type TxParamGenerator interface { FindRoots(pk *c_type.Uint512, currency string, amount *big.Int) (utxos Utxos, remain big.Int) FindRootsByTicket(pk *c_type.Uint512, tickets []assets.Ticket) (roots Utxos, remain map[c_type.Uint256]c_type.Uint256) GetRoot(root *c_type.Uint256) (utxos *Utxo) DefaultRefundTo(pk *c_type.Uint512) (ret *c_type.PKr) }
type TxParamState ¶
type TxParamState interface { GetAnchor(roots []c_type.Uint256) (wits []txtool.Witness, e error) GetOut(root *c_type.Uint256) (out *localdb.RootState) GetPkgById(id *c_type.Uint256) (ret *localdb.ZPkg) GetSeroGasLimit(to *common.Address, tfee *assets.Token, gasPrice *big.Int) (gaslimit uint64, e error) }
type Utxos ¶
type Utxos []Utxo
func SelectUtxos ¶
func SelectUtxos(param *PreTxParam, generator TxParamGenerator) (utxos Utxos, e error)
Click to show internal directories.
Click to hide internal directories.