Documentation ¶
Overview ¶
package xchain is related to xchain operation
Index ¶
- type Xchain
- func (xc *Xchain) ComplianceCheck(tx *pb.Transaction, fee *pb.Transaction) (*pb.SignatureInfo, error)
- func (xc *Xchain) GenCompleteTxAndPost(preExeResp *pb.PreExecWithSelectUTXOResponse, hdPublicKey string) (string, error)
- func (xc *Xchain) GenComplianceCheckTx(response *pb.PreExecWithSelectUTXOResponse) (*pb.Transaction, error)
- func (xc *Xchain) GenRealTx(response *pb.PreExecWithSelectUTXOResponse, complianceCheckTx *pb.Transaction, ...) (*pb.Transaction, error)
- func (xc *Xchain) GenRealTxOnly(response *pb.PreExecWithSelectUTXOResponse, hdPublicKey string) (*pb.Transaction, error)
- func (xc *Xchain) GenerateMultiTxOutputs(selfAmount string) ([]*pb.TxOutput, error)
- func (xc *Xchain) GeneratePureTxInputs(utxoOutputs *pb.UtxoOutput) ([]*pb.TxInput, error)
- func (xc *Xchain) GenerateTxInput(utxoOutputs *pb.UtxoOutput, totalNeed *big.Int) ([]*pb.TxInput, *pb.TxOutput, error)
- func (xc *Xchain) GenerateTxOutput(to, amount, fee string) ([]*pb.TxOutput, error)
- func (xc *Xchain) GetBalanceDetail() (string, error)
- func (xc *Xchain) PostTx(tx *pb.Transaction) (string, error)
- func (xc *Xchain) PreExec() (*pb.InvokeRPCResponse, error)
- func (xc *Xchain) PreExecWithSelecUTXO() (*pb.PreExecWithSelectUTXOResponse, error)
- func (xc *Xchain) QueryTx(txid string) (*pb.TxStatus, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Xchain ¶
type Xchain struct { Cfg *config.CommConfig // To string // Amount string ToAddressAndAmount map[string]string TotalToAmount string Fee string // DescFile string Desc string FrozenHeight int64 InvokeRPCReq *pb.InvokeRPCRequest PreSelUTXOReq *pb.PreExecWithSelectUTXORequest Initiator string AuthRequire []string Account *account.Account PlatformAccount *account.Account ChainName string XchainSer string ContractAccount string IsNeedComplianceCheck bool }
Xchain xchain struct
func (*Xchain) ComplianceCheck ¶
func (xc *Xchain) ComplianceCheck(tx *pb.Transaction, fee *pb.Transaction) ( *pb.SignatureInfo, error)
ComplianceCheck whether the transaction complies with the rule
func (*Xchain) GenCompleteTxAndPost ¶
func (xc *Xchain) GenCompleteTxAndPost(preExeResp *pb.PreExecWithSelectUTXOResponse, hdPublicKey string) (string, error)
GenCompleteTxAndPost generate comlete tx and post tx
func (*Xchain) GenComplianceCheckTx ¶
func (xc *Xchain) GenComplianceCheckTx(response *pb.PreExecWithSelectUTXOResponse) ( *pb.Transaction, error)
GenComplianceCheckTx generate complianceTx to pay for compliance check
func (*Xchain) GenRealTx ¶
func (xc *Xchain) GenRealTx(response *pb.PreExecWithSelectUTXOResponse, complianceCheckTx *pb.Transaction, hdPublicKey string) (*pb.Transaction, error)
GenRealTx generate really effective transaction
func (*Xchain) GenRealTxOnly ¶ added in v1.1.0
func (xc *Xchain) GenRealTxOnly(response *pb.PreExecWithSelectUTXOResponse, hdPublicKey string) (*pb.Transaction, error)
GenRealTxOnly generate really effective transaction
func (*Xchain) GenerateMultiTxOutputs ¶ added in v1.1.0
GenerateTxOutput generate txoutput part
func (*Xchain) GeneratePureTxInputs ¶ added in v1.1.0
func (*Xchain) GenerateTxInput ¶
func (xc *Xchain) GenerateTxInput(utxoOutputs *pb.UtxoOutput, totalNeed *big.Int) ( []*pb.TxInput, *pb.TxOutput, error)
GenerateTxInput generate txinput part
func (*Xchain) GenerateTxOutput ¶
GenerateTxOutput generate txoutput part
func (*Xchain) GetBalanceDetail ¶
GetBalanceDetail get unfrozen balance and frozen balance
func (*Xchain) PreExec ¶
func (xc *Xchain) PreExec() (*pb.InvokeRPCResponse, error)
PreExec pre exec
func (*Xchain) PreExecWithSelecUTXO ¶
func (xc *Xchain) PreExecWithSelecUTXO() (*pb.PreExecWithSelectUTXOResponse, error)
PreExecWithSelecUTXO preExec and selectUTXO
Click to show internal directories.
Click to hide internal directories.