Documentation ¶
Index ¶
- func GetBlock(api client.QueueProtocolAPI, blockHash []byte) (*types.BlockDetail, error)
- func GetName() string
- func GetTx(api client.QueueProtocolAPI, txHash []byte) (*types.TransactionDetail, error)
- func Init(name string, sub []byte)
- func NewMainAccount(paraTitle, paraExecName, paraSymbol string, db db.KV) (*account.DB, error)
- func NewParaAccount(paraTitle, mainExecName, mainSymbol string, db db.KV) (*account.DB, error)
- type Paracross
- func (c *Paracross) Allow(tx *types.Transaction, index int) error
- func (c *Paracross) CheckReceiptExecOk() bool
- func (e *Paracross) ExecDelLocal_AssetTransfer(payload *types.AssetsTransfer, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecDelLocal_AssetWithdraw(payload *types.AssetsWithdraw, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecDelLocal_Commit(payload *pt.ParacrossCommitAction, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecDelLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecDelLocal_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecDelLocal_TransferToExec(payload *types.AssetsTransferToExec, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecDelLocal_Withdraw(payload *types.AssetsWithdraw, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_AssetTransfer(payload *types.AssetsTransfer, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_AssetWithdraw(payload *types.AssetsWithdraw, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_Commit(payload *pt.ParacrossCommitAction, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_TransferToExec(payload *types.AssetsTransferToExec, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) ExecLocal_Withdraw(payload *types.AssetsWithdraw, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (e *Paracross) Exec_AssetTransfer(payload *types.AssetsTransfer, tx *types.Transaction, index int) (*types.Receipt, error)
- func (e *Paracross) Exec_AssetWithdraw(payload *types.AssetsWithdraw, tx *types.Transaction, index int) (*types.Receipt, error)
- func (e *Paracross) Exec_Commit(payload *pt.ParacrossCommitAction, tx *types.Transaction, index int) (*types.Receipt, error)
- func (e *Paracross) Exec_Miner(payload *pt.ParacrossMinerAction, tx *types.Transaction, index int) (*types.Receipt, error)
- func (e *Paracross) Exec_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, index int) (*types.Receipt, error)
- func (e *Paracross) Exec_TransferToExec(payload *types.AssetsTransferToExec, tx *types.Transaction, index int) (*types.Receipt, error)
- func (e *Paracross) Exec_Withdraw(payload *types.AssetsWithdraw, tx *types.Transaction, index int) (*types.Receipt, error)
- func (c *Paracross) GetDriverName() string
- func (c *Paracross) IsFriend(myexec, writekey []byte, tx *types.Transaction) bool
- func (p *Paracross) Query_GetAssetTxResult(in *types.ReqHash) (types.Message, error)
- func (p *Paracross) Query_GetMainBlockHash(in *types.Transaction) (types.Message, error)
- func (p *Paracross) Query_GetTitle(in *types.ReqString) (types.Message, error)
- func (p *Paracross) Query_GetTitleHeight(in *pt.ReqParacrossTitleHeight) (types.Message, error)
- func (p *Paracross) Query_ListTitles(in *types.ReqNil) (types.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlock ¶
func GetBlock(api client.QueueProtocolAPI, blockHash []byte) (*types.BlockDetail, error)
GetBlock get block detail by block hash
func GetTx ¶
func GetTx(api client.QueueProtocolAPI, txHash []byte) (*types.TransactionDetail, error)
GetTx get tx by tx hash
func NewMainAccount ¶
NewMainAccount create new Main account 以后如果支持从平行链资产转移到主链, 构建平行链资产在主链的paracross帐号 execName: paracross symbol: user.p.{guodun}.coins.{guodun} user.p.{guodun}.token.{TEST} 完整的帐号地址 mavl-paracross-user.p.{guodun}.coins.guodun-{user-address} 对应平行链上子地址 mavl-coins-{guodun}-exec-{Address(paracross)}:{Address(paracross)}
func NewParaAccount ¶
NewParaAccount create new paracross account 其中带{}, 都表示变量, 用需要用真实的地址, 符号代替 构建主链资产在平行链paracross帐号 execName: user.p.{guodun}.paracross symbol: coins.bty, token.{TEST} 完整的帐号地址 mavl-{paracross}-coins.bty-{user-address} 不带title{paracross} 对应主链上paracross 子帐号 malv-coins-bty-exec-{Address(paracross)}:{Address(user.p.{guodun}.paracross)}
Types ¶
type Paracross ¶
type Paracross struct {
drivers.DriverBase
}
Paracross exec
func (*Paracross) Allow ¶
func (c *Paracross) Allow(tx *types.Transaction, index int) error
Allow add paracross allow rule
func (*Paracross) CheckReceiptExecOk ¶
CheckReceiptExecOk return true to check if receipt ty is ok
func (*Paracross) ExecDelLocal_AssetTransfer ¶
func (e *Paracross) ExecDelLocal_AssetTransfer(payload *types.AssetsTransfer, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_AssetTransfer asset transfer del local db process
func (*Paracross) ExecDelLocal_AssetWithdraw ¶
func (e *Paracross) ExecDelLocal_AssetWithdraw(payload *types.AssetsWithdraw, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_AssetWithdraw asset withdraw local db process
func (*Paracross) ExecDelLocal_Commit ¶
func (e *Paracross) ExecDelLocal_Commit(payload *pt.ParacrossCommitAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_Commit consensus commit tx del local db process
func (*Paracross) ExecDelLocal_Miner ¶
func (e *Paracross) ExecDelLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_Miner miner tx del local db process
func (*Paracross) ExecDelLocal_Transfer ¶
func (e *Paracross) ExecDelLocal_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_Transfer asset transfer del local process
func (*Paracross) ExecDelLocal_TransferToExec ¶
func (e *Paracross) ExecDelLocal_TransferToExec(payload *types.AssetsTransferToExec, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_TransferToExec asset transfer to exec del local db process
func (*Paracross) ExecDelLocal_Withdraw ¶
func (e *Paracross) ExecDelLocal_Withdraw(payload *types.AssetsWithdraw, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_Withdraw asset withdraw del local db process
func (*Paracross) ExecLocal_AssetTransfer ¶
func (e *Paracross) ExecLocal_AssetTransfer(payload *types.AssetsTransfer, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_AssetTransfer asset transfer local proc
func (*Paracross) ExecLocal_AssetWithdraw ¶
func (e *Paracross) ExecLocal_AssetWithdraw(payload *types.AssetsWithdraw, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_AssetWithdraw asset withdraw process
func (*Paracross) ExecLocal_Commit ¶
func (e *Paracross) ExecLocal_Commit(payload *pt.ParacrossCommitAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_Commit commit tx local db process
func (*Paracross) ExecLocal_Miner ¶
func (e *Paracross) ExecLocal_Miner(payload *pt.ParacrossMinerAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_Miner miner tx local db process
func (*Paracross) ExecLocal_Transfer ¶
func (e *Paracross) ExecLocal_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_Transfer asset transfer local db process
func (*Paracross) ExecLocal_TransferToExec ¶
func (e *Paracross) ExecLocal_TransferToExec(payload *types.AssetsTransferToExec, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_TransferToExec transfer asset to exec local db process
func (*Paracross) ExecLocal_Withdraw ¶
func (e *Paracross) ExecLocal_Withdraw(payload *types.AssetsWithdraw, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_Withdraw asset withdraw local db process
func (*Paracross) Exec_AssetTransfer ¶
func (e *Paracross) Exec_AssetTransfer(payload *types.AssetsTransfer, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_AssetTransfer asset transfer exec process
func (*Paracross) Exec_AssetWithdraw ¶
func (e *Paracross) Exec_AssetWithdraw(payload *types.AssetsWithdraw, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_AssetWithdraw asset withdraw exec process
func (*Paracross) Exec_Commit ¶
func (e *Paracross) Exec_Commit(payload *pt.ParacrossCommitAction, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_Commit consensus commit tx exec process
func (*Paracross) Exec_Miner ¶
func (e *Paracross) Exec_Miner(payload *pt.ParacrossMinerAction, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_Miner miner tx exec process
func (*Paracross) Exec_Transfer ¶
func (e *Paracross) Exec_Transfer(payload *types.AssetsTransfer, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_Transfer exec asset transfer process
func (*Paracross) Exec_TransferToExec ¶
func (e *Paracross) Exec_TransferToExec(payload *types.AssetsTransferToExec, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_TransferToExec exec transfer asset
func (*Paracross) Exec_Withdraw ¶
func (e *Paracross) Exec_Withdraw(payload *types.AssetsWithdraw, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_Withdraw exec asset withdraw
func (*Paracross) GetDriverName ¶
GetDriverName return paracross driver name
func (*Paracross) IsFriend ¶
func (c *Paracross) IsFriend(myexec, writekey []byte, tx *types.Transaction) bool
IsFriend call exec is same seariase exec
func (*Paracross) Query_GetAssetTxResult ¶
Query_GetAssetTxResult query get asset tx reseult
func (*Paracross) Query_GetMainBlockHash ¶
Query_GetMainBlockHash query get mainblockHash by tx
func (*Paracross) Query_GetTitle ¶
Query_GetTitle query paracross title
func (*Paracross) Query_GetTitleHeight ¶
Query_GetTitleHeight query title height