Documentation ¶
Index ¶
- func BuildTxParam(state TxParamState, utxos Utxos, refundTo *keys.PKr, receptions []Reception, ...) (txParam *txtool.GTxParam, e error)
- func CreatePkr(pk *keys.Uint512, index uint64) keys.PKr
- func GenTxParam(param *PreTxParam, gen TxParamGenerator, state TxParamState) (txParam *txtool.GTxParam, e error)
- func IsPk(addr keys.PKr) bool
- type CKState
- func (self *CKState) AddIn(asset *assets.Asset) (added bool, e error)
- func (self *CKState) AddOut(asset *assets.Asset) (added bool, e error)
- func (self *CKState) Check() (e error)
- func (self *CKState) CheckTicket() (e error)
- func (self *CKState) CheckToken() (e error)
- func (self *CKState) GetList() (tkns []assets.Token, tkts []assets.Ticket)
- type Cmds
- type DefaultTxParamState
- func (self *DefaultTxParamState) GetAnchor(roots []keys.Uint256) (wits []txtool.Witness, e error)
- func (self *DefaultTxParamState) GetOut(root *keys.Uint256) (out *localdb.RootState)
- func (self *DefaultTxParamState) GetPkgById(id *keys.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 GenTxParam ¶
func GenTxParam(param *PreTxParam, gen TxParamGenerator, state TxParamState) (txParam *txtool.GTxParam, e error)
Types ¶
type CKState ¶
type CKState struct {
// contains filtered or unexported fields
}
func (*CKState) CheckTicket ¶
func (*CKState) CheckToken ¶
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 *keys.Uint256) (out *localdb.RootState)
func (*DefaultTxParamState) GetPkgById ¶
func (self *DefaultTxParamState) GetPkgById(id *keys.Uint256) (ret *localdb.ZPkg)
type PkgCloseCmd ¶
type PkgCreateCmd ¶
type PreTxParam ¶
type TxParamGenerator ¶
type TxParamGenerator interface { FindRoots(pk *keys.Uint512, currency string, amount *big.Int) (utxos Utxos, remain big.Int) FindRootsByTicket(pk *keys.Uint512, tickets map[keys.Uint256]keys.Uint256) (roots Utxos, remain map[keys.Uint256]keys.Uint256) GetRoot(root *keys.Uint256) (utxos *Utxo) DefaultRefundTo(from *keys.Uint512) (ret *keys.PKr) }
type TxParamState ¶
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.