Documentation
¶
Overview ¶
- Copyright (c) 2021. Baidu Inc. All Rights Reserved.
Copyright (c) 2021. Baidu Inc. All Rights Reserved.
Index ¶
- Constants
- Variables
- func AddCommand(cmd CommandFunc)
- func NewACLCommand(cli *Cli) *cobra.Command
- func NewACLQueryCommand(cli *Cli) *cobra.Command
- func NewAccountBalanceCommand(cli *Cli) *cobra.Command
- func NewAccountCommand(cli *Cli) *cobra.Command
- func NewAccountContractsCommand(cli *Cli) *cobra.Command
- func NewAccountDecryptCommand(cli *Cli) *cobra.Command
- func NewAccountNewCommand(cli *Cli) *cobra.Command
- func NewAccountNewkeysCommand(cli *Cli) *cobra.Command
- func NewAccountQueryCommand(cli *Cli) *cobra.Command
- func NewAccountRestoreCommand(cli *Cli) *cobra.Command
- func NewBlockCommand(cli *Cli) *cobra.Command
- func NewConsensusCommand(cli *Cli) *cobra.Command
- func NewConsensusInvokeCommand(cli *Cli) *cobra.Command
- func NewConsensusStatusCommand(cli *Cli) *cobra.Command
- func NewContractCommand(cli *Cli) *cobra.Command
- func NewContractDeployCommand(cli *Cli, module string) *cobra.Command
- func NewContractInvokeCommand(cli *Cli, module string) *cobra.Command
- func NewContractQueryCommand(cli *Cli, module string) *cobra.Command
- func NewContractStatDataQueryCommand(cli *Cli) *cobra.Command
- func NewContractUpgradeCommand(cli *Cli) *cobra.Command
- func NewCreateChainVersion(cli *Cli) *cobra.Command
- func NewEVMAddrTransCommand(cli *Cli) *cobra.Command
- func NewEvmCommand(cli *Cli) *cobra.Command
- func NewGetComplianceCheckSignCommand(cli *Cli) *cobra.Command
- func NewGovernInitCommand(cli *Cli) *cobra.Command
- func NewGovernTokenCommand(cli *Cli) *cobra.Command
- func NewGovernTokenQueryCommand(cli *Cli) *cobra.Command
- func NewGovernTransferCommand(cli *Cli) *cobra.Command
- func NewListUtxoCommand(cli *Cli) *cobra.Command
- func NewMergeUtxoCommand(cli *Cli) *cobra.Command
- func NewMultisigCheckCommand(cli *Cli) *cobra.Command
- func NewMultisigCommand(cli *Cli) *cobra.Command
- func NewMultisigGenCommand(cli *Cli) *cobra.Command
- func NewMultisigSendCommand(cli *Cli) *cobra.Command
- func NewMultisigSignCommand(cli *Cli) *cobra.Command
- func NewNativeCommand(cli *Cli) *cobra.Command
- func NewNetURLCommand(cli *Cli) *cobra.Command
- func NewNetURLConvertCommand(cli *Cli) *cobra.Command
- func NewNetURLGenCommand(cli *Cli) *cobra.Command
- func NewNetURLGetCommand(cli *Cli) *cobra.Command
- func NewNetURLPreviewCommand(cli *Cli) *cobra.Command
- func NewProposalCommand(cli *Cli) *cobra.Command
- func NewProposalProposeCommand(cli *Cli) *cobra.Command
- func NewProposalQueryCommand(cli *Cli) *cobra.Command
- func NewProposalThawCommand(cli *Cli) *cobra.Command
- func NewProposalVoteCommand(cli *Cli) *cobra.Command
- func NewQueryCandidatesCommand(cli *Cli) *cobra.Command
- func NewQueryCheckResultCommand(cli *Cli) *cobra.Command
- func NewQueryNominateRecordsCommand(cli *Cli) *cobra.Command
- func NewQueryNomineeRecordsCommand(cli *Cli) *cobra.Command
- func NewQueryStatusCommand(cli *Cli) *cobra.Command
- func NewQueryVoteRecordsCommand(cli *Cli) *cobra.Command
- func NewQueryVotedRecordsCommand(cli *Cli) *cobra.Command
- func NewSplitUtxoCommand(cli *Cli) *cobra.Command
- func NewStatusCommand(cli *Cli) *cobra.Command
- func NewTDposCommand(cli *Cli) *cobra.Command
- func NewTransferCommand(cli *Cli) *cobra.Command
- func NewTxCommand(cli *Cli) *cobra.Command
- func NewTxQueryCommand(cli *Cli) *cobra.Command
- func NewUtxoCommand(cli *Cli) *cobra.Command
- func NewVoteCommand(cli *Cli) *cobra.Command
- func NewWasmCommand(cli *Cli) *cobra.Command
- type ACLCommand
- type ACLQueryCommand
- type AccountBalanceCommand
- type AccountCommand
- type AccountContractsCommand
- type AccountDecryptCommand
- type AccountNewCommand
- type AccountNewkeysCommand
- type AccountQueryCommand
- type AccountRestoreCommand
- type BigInt
- type BlockCommand
- type ChainStatus
- type Cli
- func (c *Cli) AddCommands(cmds []CommandFunc)
- func (c *Cli) EventClient() pb.EventServiceClient
- func (c *Cli) Execute()
- func (c *Cli) GetNodes(ctx context.Context) ([]string, error)
- func (c *Cli) Init() error
- func (c *Cli) RangeNodes(ctx context.Context, ...) error
- func (c *Cli) SetVer(ver string)
- func (c *Cli) Transfer(ctx context.Context, opt *TransferOptions) (string, error)
- func (c *Cli) XchainClient() pb.XchainClient
- type CliConfig
- type CommTrans
- func (c *CommTrans) ComplianceCheck(tx *pb.Transaction, fee *pb.Transaction) (*pb.SignatureInfo, error)
- func (c *CommTrans) GenAuthRequire(filename string) ([]string, error)
- func (c *CommTrans) GenCompleteTxAndPost(ctx context.Context, preExeResp *pb.PreExecWithSelectUTXOResponse) error
- func (c *CommTrans) GenComplianceCheckTx(utxoOutput *pb.UtxoOutput) (*pb.Transaction, error)
- func (c *CommTrans) GenPreExeRes(ctx context.Context) (*pb.InvokeRPCResponse, []*pb.InvokeRequest, error)
- func (c *CommTrans) GenPreExeWithSelectUtxoRes(ctx context.Context) (*pb.PreExecWithSelectUTXOResponse, error)
- func (c *CommTrans) GenRawTx(ctx context.Context, desc []byte, preExeRes *pb.InvokeResponse, ...) (*pb.Transaction, error)
- func (c *CommTrans) GenRealTx(response *pb.PreExecWithSelectUTXOResponse, complianceCheckTx *pb.Transaction) (*pb.Transaction, error)
- func (c *CommTrans) GenTxFile(tx *pb.Transaction) error
- func (c *CommTrans) GenTxInputs(ctx context.Context, totalNeed *big.Int) ([]*pb.TxInput, *pb.TxOutput, error)
- func (c *CommTrans) GenTxInputsWithMergeUTXO(ctx context.Context) ([]*pb.TxInput, *pb.TxOutput, error)
- func (c *CommTrans) GenTxOutputs(gasUsed int64) ([]*pb.TxOutput, *big.Int, error)
- func (c *CommTrans) GenerateMultiTxOutputs(selfAmount string, gasUsed string) ([]*pb.TxOutput, error)
- func (c *CommTrans) GenerateMultisigGenRawTx(ctx context.Context) error
- func (c *CommTrans) GeneratePureTxInputs(utxoOutputs *pb.UtxoOutput) ([]*pb.TxInput, error)
- func (c *CommTrans) GenerateTx(ctx context.Context) (*pb.Transaction, error)
- func (c *CommTrans) GenerateTxInput(utxoOutputs *pb.UtxoOutput, totalNeed *big.Int) ([]*pb.TxInput, *pb.TxOutput, error)
- func (xc *CommTrans) GenerateTxOutput(to, amount, fee string) ([]*pb.TxOutput, error)
- func (c *CommTrans) GetDesc() ([]byte, error)
- func (c *CommTrans) GetInvokeRequestFromDesc() (*pb.InvokeRequest, error)
- func (c *CommTrans) ReadPreExeReq(buf []byte) (*pb.InvokeRequest, error)
- func (c *CommTrans) SendTx(ctx context.Context, tx *pb.Transaction) error
- func (c *CommTrans) Transfer(ctx context.Context) error
- type CommandFunc
- type ComplianceCheckConfig
- type ConsensusCommand
- type ConsensusInvokeCommand
- type ConsensusStatusCommand
- type ContractCommand
- type ContractDeployCommand
- type ContractDesc
- type ContractEvent
- type ContractInvokeCommand
- type ContractQueryCommand
- type ContractStatData
- type ContractStatDataQueryCommand
- type ContractUpgradeCommand
- type CreateChainCommand
- type EVMAddrTransCommand
- type EvmCommand
- type FilteredBlock
- type FilteredTransaction
- type GasPrice
- type GetComplianceCheckSignCommand
- type GovernInitCommand
- type GovernTokenCommand
- type GovernTokenQueryCommand
- type GovernTransferCommand
- type HexID
- type InternalBlock
- type InvokeRequest
- type LedgerMeta
- type ListUtxoCommand
- type MergeUtxoCommand
- type ModifyBlock
- type MultisigCheckCommand
- type MultisigCommand
- type MultisigData
- type MultisigGenCommand
- type MultisigSendCommand
- type MultisigSignCommand
- type NativeCommand
- type NetURLCommand
- type NetURLConvertCommand
- type NetURLGenCommand
- type NetURLGetCommand
- type NetURLPreviewCommand
- type PartialSign
- type ProposalCommand
- type ProposalProposeCommand
- type ProposalQueryCommand
- type ProposalThawCommand
- type ProposalVoteCommand
- type QCSignInfos
- type QCState
- type QueryCandidatesCommand
- type QueryCheckResultCommand
- type QueryNominateRecordsCommand
- type QueryNomineeRecordsCommand
- type QueryStatusCommand
- type QueryVoteRecordsCommand
- type QueryVotedRecordsCommand
- type QuorumCert
- type ResourceLimit
- type RootOptions
- type SignInfo
- type SignatureInfo
- type SplitUtxoCommand
- type StatusCommand
- type SystemStatus
- type TDposCommand
- type TLSOptions
- type Transaction
- type TransferCommand
- type TransferOptions
- type TriggerDesc
- type TxCommand
- type TxInput
- type TxInputExt
- type TxOutput
- type TxOutputExt
- type TxQueryCommand
- type UtxoCommand
- type UtxoMeta
- type VoteCommand
- type WasmCommand
Constants ¶
const (
ModuleName = "xkernel"
)
本文件封装了和共识模块有关的client调用接口, 具体格式为: xchain-cli consensus invoke 当前共识kernel调用
--type 标识共识名称,需符合当前共识状态 --method 标识共识方法,即调用的目标kernerl方法 --desc 标识输入参数,json格式
Variables ¶
var ( // ErrInvalidAmount error ErrInvalidAmount = errors.New("Invalid amount number") // ErrNegativeAmount error ErrNegativeAmount = errors.New("Amount in transaction can not be negative number") // ErrPutTx error ErrPutTx = errors.New("Put tx error") // ErrSelectUtxo error ErrSelectUtxo = errors.New("Select utxo error") )
var ( // commands 用于收集所有的子命令,在启动的时候统一往Cli注册 Commands []CommandFunc )
Functions ¶
func NewACLQueryCommand ¶
NewACLQueryCommand new acl query cmd
func NewAccountBalanceCommand ¶
NewAccountBalanceCommand new function
func NewAccountCommand ¶
NewAccountCommand new account cmd
func NewAccountContractsCommand ¶
NewAccountContractsCommand new account contracts cmd
func NewAccountDecryptCommand ¶
NewAccountDecryptCommand new decrypt account command
func NewAccountNewCommand ¶
NewAccountNewCommand new account new cmd
func NewAccountNewkeysCommand ¶
NewAccountNewkeysCommand new addr account cmd
func NewAccountQueryCommand ¶
NewAccountQueryCommand new account query cmd
func NewAccountRestoreCommand ¶
NewAccountRestoreCommand
func NewConsensusCommand ¶
NewAccountCommand new account cmd
func NewConsensusInvokeCommand ¶
NewConsensusCommand new consensus cmd
func NewConsensusStatusCommand ¶
NewConsensusCommand new consensus cmd
func NewContractCommand ¶
NewContractCommand new contract cmd
func NewContractDeployCommand ¶
NewContractDeployCommand new wasm/native/evm deploy cmd
func NewContractInvokeCommand ¶
NewContractInvokeCommand new wasm/native/evm invoke cmd
func NewContractQueryCommand ¶
NewContractQueryCommand new wasm/native/evm query cmd
func NewContractStatDataQueryCommand ¶
NewContractStatDataQueryCommand new a command for ContractStatDataQueryCommand
func NewContractUpgradeCommand ¶
NewContractUpgradeCommand new wasm deploy cmd
func NewCreateChainVersion ¶
NewCreateChainVersion new create chain cmd
func NewEVMAddrTransCommand ¶
NewEVMAddrTransCommand new trans cmd
func NewGovernInitCommand ¶
NewGovernInitCommand new transfer govern token cmd
func NewGovernTokenCommand ¶
NewGovernTokenCommand new govern token cmd
func NewGovernTokenQueryCommand ¶
NewContractQueryCommand new wasm/native/evm query cmd
func NewGovernTransferCommand ¶
NewGovernTransferCommand new transfer govern token cmd
func NewListUtxoCommand ¶
NewListUtxoCommand an entry to query utxo records
func NewMergeUtxoCommand ¶
NewMergeUtxoCommand new an instance of merge utxo command
func NewMultisigCheckCommand ¶
NewMultisigCheckCommand multisig check init method
func NewMultisigCommand ¶
NewMultisigCommand MultisigCommand init method
func NewMultisigGenCommand ¶
NewMultisigGenCommand multisig gen init method
func NewMultisigSendCommand ¶
NewMultisigSendCommand multisig gen init method
func NewMultisigSignCommand ¶
NewMultisigSignCommand multisig sign init method
func NewNativeCommand ¶
NewNativeCommand new native cmd
func NewNetURLCommand ¶
NewNetURLCommand new neturl cmd
func NewNetURLConvertCommand ¶
NewNetURLGenCommand new neturl gen cmd
func NewNetURLGenCommand ¶
NewNetURLGenCommand new neturl gen cmd
func NewNetURLGetCommand ¶
NewNetURLGetCommand new get neturl cmd
func NewNetURLPreviewCommand ¶
NewNetURLPreviewCommand new get neturl cmd
func NewProposalCommand ¶
NewProposalCommand new proposal cmd
func NewProposalProposeCommand ¶
NewProposalProposeCommand propose a proposal cmd
func NewProposalQueryCommand ¶
NewProposalQueryCommand new proposal query cmd
func NewProposalThawCommand ¶
NewProposalThawCommand vote a proposal cmd
func NewProposalVoteCommand ¶
NewProposalVoteCommand vote a proposal cmd
func NewQueryCandidatesCommand ¶
NewQueryCandidatesCommand new query candidates cmd
func NewQueryCheckResultCommand ¶
NewQueryCheckResultCommand new query res
func NewQueryNominateRecordsCommand ¶
NewQueryNominateRecordsCommand new query Nominate cmd
func NewQueryNomineeRecordsCommand ¶
NewQueryNomineeRecordsCommand new query nominee records
func NewQueryStatusCommand ¶
NewQueryStatusCommand new query vote records
func NewQueryVoteRecordsCommand ¶
NewQueryVoteRecordsCommand new query vote records
func NewQueryVotedRecordsCommand ¶
NewQueryVotedRecordsCommand new query votedrecords cmd
func NewSplitUtxoCommand ¶
NewSplitUtxoCommand return
func NewStatusCommand ¶
NewStatusCommand new status cmd
func NewTransferCommand ¶
NewTransferCommand new transfer cmd
func NewTxQueryCommand ¶
NewTxQueryCommand new tx query cmd
func NewUtxoCommand ¶
NewUtxoCommand init child utxo command
Types ¶
type ACLCommand ¶
type ACLCommand struct {
// contains filtered or unexported fields
}
ACLCommand acl cmd struct
type ACLQueryCommand ¶
type ACLQueryCommand struct {
// contains filtered or unexported fields
}
ACLQueryCommand query acl struct
type AccountBalanceCommand ¶
type AccountBalanceCommand struct {
// contains filtered or unexported fields
}
AccountBalanceCommand account balance command
type AccountCommand ¶
type AccountCommand struct {
// contains filtered or unexported fields
}
AccountCommand account cmd entrance
type AccountContractsCommand ¶
type AccountContractsCommand struct {
// contains filtered or unexported fields
}
AccountContractsCommand
type AccountDecryptCommand ¶
type AccountDecryptCommand struct {
// contains filtered or unexported fields
}
AccountDecryptCommand decrypt account struct
type AccountNewCommand ¶
type AccountNewCommand struct {
// contains filtered or unexported fields
}
AccountNewCommand new account struct
type AccountNewkeysCommand ¶
type AccountNewkeysCommand struct {
// contains filtered or unexported fields
}
AccountNewkeysCommand create account addr
type AccountQueryCommand ¶
type AccountQueryCommand struct {
// contains filtered or unexported fields
}
AccountQueryCommand query acl struct
type AccountRestoreCommand ¶
type AccountRestoreCommand struct {
// contains filtered or unexported fields
}
AccountRestoreCommand restore account by mnemonic
type BigInt ¶
BigInt big int
func FromAmountBytes ¶
FromAmountBytes transfer bytes to bigint
func (*BigInt) MarshalJSON ¶
MarshalJSON json.marshal
type BlockCommand ¶
type BlockCommand struct {
// contains filtered or unexported fields
}
BlockCommand query block
type ChainStatus ¶
type ChainStatus struct { Name string `json:"name"` LedgerMeta LedgerMeta `json:"ledger"` UtxoMeta UtxoMeta `json:"utxo"` // add BranchBlockid BranchBlockid []string `json:"branchBlockid"` }
ChainStatus proto.ChainStatus
type Cli ¶
type Cli struct { RootOptions RootOptions CliConf *CliConfig // contains filtered or unexported fields }
Cli 是所有子命令执行的上下文.
func (*Cli) AddCommands ¶
func (c *Cli) AddCommands(cmds []CommandFunc)
AddCommands add sub commands
func (*Cli) EventClient ¶
func (c *Cli) EventClient() pb.EventServiceClient
EventClient get EventService client
func (*Cli) RangeNodes ¶
func (c *Cli) RangeNodes(ctx context.Context, f func(addr string, client pb.XchainClient, err error) error) error
RangeNodes exe func in all nodes
func (*Cli) XchainClient ¶
func (c *Cli) XchainClient() pb.XchainClient
XchainClient get xchain client
type CliConfig ¶
type CliConfig struct { Host string `yaml:"host,omitempty"` Name string `yaml:"name,omitempty"` Keys string `yaml:"keys,omitempty"` Crypto string `yaml:"crypto,omitempty"` TLS TLSOptions `yaml:"tls,omitempty"` EndorseServiceHost string `yaml:"endorseServiceHost,omitempty"` ComplianceCheck ComplianceCheckConfig `yaml:"complianceCheck,omitempty"` MinNewChainAmount string `yaml:"minNewChainAmount,omitempty"` }
func (*CliConfig) LoadConfig ¶
LoadConfig load Node Config from the specific path/file
type CommTrans ¶
type CommTrans struct { To string Amount string Descfile string Fee string FrozenHeight int64 Version int32 From string ModuleName string ContractName string MethodName string Args map[string][]byte // 走mulitisig gen流程 MultiAddrs string Output string IsQuick bool IsPrint bool ChainName string Keys string XchainClient pb.XchainClient CryptoType string // DebugTx if enabled, tx will be printed instead of being posted DebugTx bool CliConf *CliConfig }
CommTrans base method a. generate tx b. sign it for default single and send it
func (*CommTrans) ComplianceCheck ¶
func (c *CommTrans) ComplianceCheck(tx *pb.Transaction, fee *pb.Transaction) ( *pb.SignatureInfo, error)
func (*CommTrans) GenAuthRequire ¶
GenAuthRequire get auth require aks from file
func (*CommTrans) GenCompleteTxAndPost ¶
func (*CommTrans) GenComplianceCheckTx ¶
func (c *CommTrans) GenComplianceCheckTx(utxoOutput *pb.UtxoOutput) (*pb.Transaction, error)
func (*CommTrans) GenPreExeRes ¶
func (c *CommTrans) GenPreExeRes(ctx context.Context) ( *pb.InvokeRPCResponse, []*pb.InvokeRequest, error)
GenPreExeRes 得到预执行的结果
func (*CommTrans) GenPreExeWithSelectUtxoRes ¶
func (*CommTrans) GenRawTx ¶
func (c *CommTrans) GenRawTx(ctx context.Context, desc []byte, preExeRes *pb.InvokeResponse, preExeReqs []*pb.InvokeRequest) (*pb.Transaction, error)
GenRawTx 生成一个完整raw的交易
func (*CommTrans) GenRealTx ¶
func (c *CommTrans) GenRealTx(response *pb.PreExecWithSelectUTXOResponse, complianceCheckTx *pb.Transaction) (*pb.Transaction, error)
func (*CommTrans) GenTxFile ¶
func (c *CommTrans) GenTxFile(tx *pb.Transaction) error
GenTxFile generate raw tx file
func (*CommTrans) GenTxInputs ¶
func (c *CommTrans) GenTxInputs(ctx context.Context, totalNeed *big.Int) ( []*pb.TxInput, *pb.TxOutput, error)
GenTxInputs 填充得到transaction的repeated TxInput tx_inputs, 如果输入大于输出,增加一个转给自己(data/keys/)的输入-输出的交易
func (*CommTrans) GenTxInputsWithMergeUTXO ¶
func (c *CommTrans) GenTxInputsWithMergeUTXO(ctx context.Context) ([]*pb.TxInput, *pb.TxOutput, error)
GenTxInputsWithMergeUTXO generate tx with merge utxo
func (*CommTrans) GenTxOutputs ¶
GenTxOutputs 填充得到transaction的repeated TxOutput tx_outputs
func (*CommTrans) GenerateMultiTxOutputs ¶
func (*CommTrans) GenerateMultisigGenRawTx ¶
GenerateMultisigGenRawTx for mulitisig gen cmd
func (*CommTrans) GeneratePureTxInputs ¶
func (*CommTrans) GenerateTx ¶
GenerateTx generate raw tx
func (*CommTrans) GenerateTxInput ¶
func (*CommTrans) GenerateTxOutput ¶
func (*CommTrans) GetInvokeRequestFromDesc ¶
func (c *CommTrans) GetInvokeRequestFromDesc() (*pb.InvokeRequest, error)
GetInvokeRequestFromDesc get invokerequest from desc file
func (*CommTrans) ReadPreExeReq ¶
func (c *CommTrans) ReadPreExeReq(buf []byte) (*pb.InvokeRequest, error)
ReadPreExeReq 从desc中填充出发起合约调用的结构体
type ComplianceCheckConfig ¶
type ComplianceCheckConfig struct { IsNeedComplianceCheck bool `yaml:"isNeedComplianceCheck,omitempty"` IsNeedComplianceCheckFee bool `yaml:"isNeedComplianceCheckFee,omitempty"` ComplianceCheckEndorseServiceFee int `yaml:"complianceCheckEndorseServiceFee,omitempty"` ComplianceCheckEndorseFeeAddr string `yaml:"complianceCheckEndorseFeeAddr,omitempty"` ComplianceCheckEndorseServiceAddr string `yaml:"complianceCheckEndorseServiceAddr,omitempty"` }
ComplianceCheckConfig: config of xendorser service control IsNeedComplianceCheck: is need compliance check IsNeedComplianceCheckFee: is need pay for compliance check ComplianceCheckEndorseServiceFee: fee for compliance check ComplianceCheckEndorseServiceAddr: compliance check addr
type ConsensusCommand ¶
type ConsensusCommand struct {
// contains filtered or unexported fields
}
AccountCommand account cmd entrance
type ConsensusInvokeCommand ¶
type ConsensusInvokeCommand struct {
// contains filtered or unexported fields
}
type ConsensusStatusCommand ¶
type ConsensusStatusCommand struct {
// contains filtered or unexported fields
}
type ContractDeployCommand ¶
type ContractDeployCommand struct {
// contains filtered or unexported fields
}
ContractDeployCommand wasm/native/evm deploy cmd
type ContractDesc ¶
type ContractDesc struct { Module string `json:"module"` Method string `json:"method"` Args interface{} `json:"args"` Trigger TriggerDesc `json:"trigger"` }
ContractDesc proto.ContractDesc
type ContractEvent ¶
type ContractEvent struct { Contract string `json:"contract,omitempty"` Name string `json:"name,omitempty"` Body string `json:"body,omitempty"` }
ContractEvent pb.ContractEvent
type ContractInvokeCommand ¶
type ContractInvokeCommand struct {
// contains filtered or unexported fields
}
ContractInvokeCommand wasm/native/evm invoke cmd
type ContractQueryCommand ¶
type ContractQueryCommand struct {
// contains filtered or unexported fields
}
ContractQueryCommand wasm/native/evm query cmd
type ContractStatData ¶
type ContractStatData struct { AccountCount int64 `json:"accountCount"` ContractCount int64 `json:"contractCount"` }
ContractStatData proto.ContractStatData
type ContractStatDataQueryCommand ¶
type ContractStatDataQueryCommand struct {
// contains filtered or unexported fields
}
ContractStatDataQueryCommand contract statistic data query cmd
type ContractUpgradeCommand ¶
type ContractUpgradeCommand struct {
// contains filtered or unexported fields
}
ContractUpgradeCommand wasm upgrade cmd
type CreateChainCommand ¶
type CreateChainCommand struct { // 创世块配置文件 GenesisConf string // 环境配置文件 EnvConf string // contains filtered or unexported fields }
CreateChainCommand create chain cmd
type EVMAddrTransCommand ¶
type EVMAddrTransCommand struct {
// contains filtered or unexported fields
}
EVMAddrTransCommand address translation between EVM and xchain
type FilteredBlock ¶
type FilteredBlock struct { Bcname string `json:"bcname,omitempty"` Blockid string `json:"blockid,omitempty"` BlockHeight int64 `json:"block_height,omitempty"` Txs []*FilteredTransaction `json:"txs,omitempty"` }
FilteredBlock pb.FilteredBlock
func FromFilteredBlockPB ¶
func FromFilteredBlockPB(pbblock *pb.FilteredBlock) *FilteredBlock
FromFilteredBlockPB convert pb.FilteredBlock to FilteredBlock
type FilteredTransaction ¶
type FilteredTransaction struct { Txid string `json:"txid,omitempty"` Events []*ContractEvent `json:"events,omitempty"` }
FilteredTransaction pb.FilteredTransaction
type GasPrice ¶
type GasPrice struct { CpuRate int64 `json:"cpu_rate"` MemRate int64 `json:"mem_rate"` DiskRate int64 `json:"disk_rate"` XfeeRate int64 `json:"xfee_rate"` }
GasPrice proto.GasPrice
type GetComplianceCheckSignCommand ¶
type GetComplianceCheckSignCommand struct {
// contains filtered or unexported fields
}
func (*GetComplianceCheckSignCommand) XEndorserClient ¶
func (c *GetComplianceCheckSignCommand) XEndorserClient() pb.XendorserClient
type GovernInitCommand ¶
type GovernInitCommand struct {
// contains filtered or unexported fields
}
GovernInitCommand transfer govern token struct
type GovernTokenCommand ¶
type GovernTokenCommand struct {
// contains filtered or unexported fields
}
GovernTokenCommand govern token cmd entrance
type GovernTokenQueryCommand ¶
type GovernTokenQueryCommand struct {
// contains filtered or unexported fields
}
GovernTokenQueryCommand govern token query cmd
type GovernTransferCommand ¶
type GovernTransferCommand struct {
// contains filtered or unexported fields
}
GovernTransferCommand transfer govern token struct
type InternalBlock ¶
type InternalBlock struct { Version int32 `json:"version"` Blockid HexID `json:"blockid"` PreHash HexID `json:"preHash"` Proposer string `json:"proposer"` Sign HexID `json:"sign"` Pubkey string `json:"pubkey"` MerkleRoot HexID `json:"merkleRoot"` Height int64 `json:"height"` Timestamp int64 `json:"timestamp"` Transactions []*Transaction `json:"transactions"` TxCount int32 `json:"txCount"` MerkleTree []HexID `json:"merkleTree"` InTrunk bool `json:"inTrunk"` NextHash HexID `json:"nextHash"` FailedTxs map[string]string `json:"failedTxs"` CurTerm int64 `json:"curTerm"` CurBlockNum int64 `json:"curBlockNum"` Justify *QuorumCert `json:"justify"` }
InternalBlock proto.InternalBlock
func FromInternalBlockPB ¶
func FromInternalBlockPB(block *pb.InternalBlock) *InternalBlock
FromInternalBlockPB block info
type InvokeRequest ¶
type InvokeRequest struct { ModuleName string `json:"moduleName"` ContractName string `json:"contractName"` MethodName string `json:"methodName"` Args map[string]string `json:"args"` ResouceLimits []ResourceLimit `json:"resource_limits"` }
InvokeRequest proto.InvokeRequest
type LedgerMeta ¶
type LedgerMeta struct { // RootBlockid root block id RootBlockid HexID `json:"rootBlockid"` // TipBlockid TipBlockid TipBlockid HexID `json:"tipBlockid"` // TrunkHeight TrunkHeight TrunkHeight int64 `json:"trunkHeight"` }
LedgerMeta proto.LedgerMeta
type ListUtxoCommand ¶
type ListUtxoCommand struct {
// contains filtered or unexported fields
}
ListUtxoCommand necessary parmeters for query utxo records
type MergeUtxoCommand ¶
type MergeUtxoCommand struct {
// contains filtered or unexported fields
}
MergeUtxoCommand necessary parameter for merge utxo
type ModifyBlock ¶
type MultisigCheckCommand ¶
type MultisigCheckCommand struct {
// contains filtered or unexported fields
}
MultisigCheckCommand multisig check struct
type MultisigData ¶
type MultisigData struct { R []byte // common random value C []byte // common public key KList [][]byte // random value list PubKeys [][]byte // all public keys }
MultisigData generated multisig data
type MultisigGenCommand ¶
type MultisigGenCommand struct {
// contains filtered or unexported fields
}
MultisigGenCommand multisig generate struct
type MultisigSendCommand ¶
type MultisigSendCommand struct {
// contains filtered or unexported fields
}
MultisigSendCommand multisig send struct
type MultisigSignCommand ¶
type MultisigSignCommand struct {
// contains filtered or unexported fields
}
MultisigSignCommand multisig sign struct
type NetURLConvertCommand ¶
type NetURLConvertCommand struct {
// contains filtered or unexported fields
}
NetURLConvertCommand neturl gen cmd
type NetURLGenCommand ¶
type NetURLGenCommand struct {
// contains filtered or unexported fields
}
NetURLGenCommand neturl gen cmd
type NetURLGetCommand ¶
type NetURLGetCommand struct {
// contains filtered or unexported fields
}
NetURLGetCommand get neturl cmd
type NetURLPreviewCommand ¶
type NetURLPreviewCommand struct {
// contains filtered or unexported fields
}
NetURLPreviewCommand preview neturl using given params
type PartialSign ¶
PartialSign partial sign is single Si sign for multisig
type ProposalCommand ¶
type ProposalCommand struct {
// contains filtered or unexported fields
}
ProposalCommand proposal cmd entrance
type ProposalProposeCommand ¶
type ProposalProposeCommand struct {
// contains filtered or unexported fields
}
ProposalProposeCommand proposal a proposal struct
type ProposalQueryCommand ¶
type ProposalQueryCommand struct {
// contains filtered or unexported fields
}
ProposalQueryCommand proposal query cmd
type ProposalThawCommand ¶
type ProposalThawCommand struct {
// contains filtered or unexported fields
}
ProposalThawCommand thaw a proposal struct
type ProposalVoteCommand ¶
type ProposalVoteCommand struct {
// contains filtered or unexported fields
}
ProposalVoteCommand vote a proposal struct
type QCSignInfos ¶
type QCSignInfos struct { // QCSignInfos QCSignInfos []*SignInfo `protobuf:"bytes,1,rep,name=QCSignInfos,proto3" json:"QCSignInfos,omitempty"` }
QCSignInfos is the signs of the leader gathered from replicas of a specifically certType. A slice of signs is used at present. TODO @qizheng09: It will be change to Threshold-Signatures after Crypto lib support Threshold-Signatures.
type QueryCandidatesCommand ¶
type QueryCandidatesCommand struct {
// contains filtered or unexported fields
}
QueryCandidatesCommand query candidates cmd
type QueryCheckResultCommand ¶
type QueryCheckResultCommand struct {
// contains filtered or unexported fields
}
QueryCheckResultCommand query res
type QueryNominateRecordsCommand ¶
type QueryNominateRecordsCommand struct {
// contains filtered or unexported fields
}
QueryNominateRecordsCommand query Nominate cmd
type QueryNomineeRecordsCommand ¶
type QueryNomineeRecordsCommand struct {
// contains filtered or unexported fields
}
QueryNomineeRecordsCommand query nominee records
type QueryStatusCommand ¶
type QueryStatusCommand struct {
// contains filtered or unexported fields
}
QueryStatusCommand query vote records
type QueryVoteRecordsCommand ¶
type QueryVoteRecordsCommand struct {
// contains filtered or unexported fields
}
QueryVoteRecordsCommand query vote records
type QueryVotedRecordsCommand ¶
type QueryVotedRecordsCommand struct {
// contains filtered or unexported fields
}
QueryVotedRecordsCommand query votedrecords cmd
type QuorumCert ¶
type QuorumCert struct { // The id of Proposal this QC certified. ProposalId string `protobuf:"bytes,1,opt,name=ProposalId,proto3" json:"ProposalId,omitempty"` // The msg of Proposal this QC certified. ProposalMsg []byte `protobuf:"bytes,2,opt,name=ProposalMsg,proto3" json:"ProposalMsg,omitempty"` // The current type of this QC certified. // the type contains `NEW_VIEW`, `PREPARE` Type QCState `protobuf:"varint,3,opt,name=Type,proto3,enum=pb.QCState" json:"Type,omitempty"` // The view number of this QC certified. ViewNumber int64 `protobuf:"varint,4,opt,name=ViewNumber,proto3" json:"ViewNumber,omitempty"` // SignInfos is the signs of the leader gathered from replicas // of a specifically certType. SignInfos *QCSignInfos `protobuf:"bytes,5,opt,name=SignInfos,proto3" json:"SignInfos,omitempty"` }
QuorumCert is a data type that combines a collection of signatures from replicas.
func FromPBJustify ¶
func FromPBJustify(qc *pb.QuorumCert) *QuorumCert
FromPBJustify use pb.QuorumCert to construct local QuorumCert in block
type ResourceLimit ¶
type RootOptions ¶
RootOptions 代表全局通用的flag,可以以嵌套结构体的方式组织flags.
type SignInfo ¶
type SignInfo struct { Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` PublicKey string `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` Sign []byte `protobuf:"bytes,3,opt,name=Sign,proto3" json:"Sign,omitempty"` }
SignInfo is the signature information of the
type SignatureInfo ¶
SignatureInfo proto.SignatureInfo
type SplitUtxoCommand ¶
type SplitUtxoCommand struct {
// contains filtered or unexported fields
}
SplitUtxoCommand split utxo of ak or account
type StatusCommand ¶
type StatusCommand struct {
// contains filtered or unexported fields
}
StatusCommand status cmd
type SystemStatus ¶
type SystemStatus struct { ChainStatus []ChainStatus `json:"blockchains"` Peers []string `json:"peers"` Speeds *pb.Speeds `json:"speeds"` }
SystemStatus proto.SystemStatus
func FromSystemStatusPB ¶
func FromSystemStatusPB(statuspb *pb.SystemsStatus) *SystemStatus
FromSystemStatusPB systemstatus info
type TLSOptions ¶
type TLSOptions struct { Cert string `yaml:"cert,omitempty"` Server string `yaml:"server,omitempty"` Enable bool `yaml:"enable,omitempty"` }
TLSOptions TLS part
type Transaction ¶
type Transaction struct { Txid HexID `json:"txid"` Blockid HexID `json:"blockid"` TxInputs []TxInput `json:"txInputs"` TxOutputs []TxOutput `json:"txOutputs"` Desc string `json:"desc"` Nonce string `json:"nonce"` Timestamp int64 `json:"timestamp"` Version int32 `json:"version"` Autogen bool `json:"autogen"` Coinbase bool `json:"coinbase"` TxInputsExt []TxInputExt `json:"txInputsExt"` TxOutputsExt []TxOutputExt `json:"txOutputsExt"` ContractRequests []*InvokeRequest `json:"contractRequests"` Initiator string `json:"initiator"` AuthRequire []string `json:"authRequire"` InitiatorSigns []SignatureInfo `json:"initiatorSigns"` AuthRequireSigns []SignatureInfo `json:"authRequireSigns"` ReceivedTimestamp int64 `json:"receivedTimestamp"` ModifyBlock ModifyBlock `json:"modifyBlock"` }
Transaction proto.Transaction
type TransferCommand ¶
type TransferCommand struct {
// contains filtered or unexported fields
}
TransferCommand transfer cmd
type TransferOptions ¶
type TransferOptions struct { BlockchainName string KeyPath string CryptoType string To string Amount string Fee string Desc []byte FrozenHeight int64 Version int32 // 支持账户转账 From string AccountPath string Debug bool }
TransferOptions transfer cmd options
type TriggerDesc ¶
type TriggerDesc struct { Module string `json:"module"` Method string `json:"method"` Args interface{} `json:"args"` Height int64 `json:"height"` }
TriggerDesc proto.TriggerDesc
type TxInput ¶
type TxInput struct { RefTxid HexID `json:"refTxid"` RefOffset int32 `json:"refOffset"` FromAddr string `json:"fromAddr"` Amount BigInt `json:"amount"` }
TxInput proto.TxInput
type TxInputExt ¶
type TxInputExt struct { Bucket string `json:"bucket"` Key string `json:"key"` RefTxid HexID `json:"refTxid"` RefOffset int32 `json:"refOffset"` }
TxInputExt proto.TxInputExt
type TxOutputExt ¶
type TxOutputExt struct { Bucket string `json:"bucket"` Key string `json:"key"` Value string `json:"value"` }
TxOutputExt proto.TxOutputExt
type TxQueryCommand ¶
type TxQueryCommand struct {
// contains filtered or unexported fields
}
TxQueryCommand tx query cmd
type UtxoCommand ¶
type UtxoCommand struct {
// contains filtered or unexported fields
}
UtxoCommand utxo cmd entry
type UtxoMeta ¶
type UtxoMeta struct { // LatestBlockid LatestBlockid LatestBlockid HexID `json:"latestBlockid"` // LockKeyList LockKeyList LockKeyList []string `json:"lockKeyList"` // UtxoTotal UtxoTotal UtxoTotal string `json:"utxoTotal"` // Average confirmed dealy (ms) AvgDelay int64 `json:"avgDelay"` // Current unconfirmed tx amount UnconfirmTxAmount int64 `json:"unconfirmed"` // MaxBlockSize MaxBlockSize MaxBlockSize int64 `json:"maxBlockSize"` // ReservedContracts ReservedContracts ReservedContracts []InvokeRequest `json:"reservedContracts"` // ForbiddenContract forbidden contract ForbiddenContract InvokeRequest `json:"forbiddenContract"` // NewAccountResourceAmount resource amount of creating an account NewAccountResourceAmount int64 `json:"newAccountResourceAmount"` // IrreversibleBlockHeight irreversible block height IrreversibleBlockHeight int64 `json:"irreversibleBlockHeight"` // IrreversibleSlideWindow irreversible slide window IrreversibleSlideWindow int64 `json:"irreversibleSlideWindow"` // GasPrice gas rate to utxo for different type resources GasPrice GasPrice `json:"gasPrice"` }
UtxoMeta proto.UtxoMeta
type VoteCommand ¶
type VoteCommand struct {
// contains filtered or unexported fields
}
VoteCommand vote cmd
Source Files
¶
- account.go
- account_balance.go
- account_contracts.go
- account_decrypt.go
- account_new.go
- account_newkeys.go
- account_query.go
- account_restore.go
- acl.go
- acl_query.go
- block.go
- cli.go
- comm_trans.go
- config.go
- consensus.go
- consensus_invoke.go
- consensus_status.go
- contract.go
- contract_deploy.go
- contract_invoke.go
- contract_query.go
- contract_stat_query.go
- contract_upgrade.go
- createchains.go
- evm.go
- evm_addrs_trans.go
- govern_token.go
- govern_token_init.go
- govern_token_query.go
- govern_token_transfer.go
- multisig.go
- multisig_check.go
- multisig_gen.go
- multisig_get.go
- multisig_send.go
- multisig_sign.go
- native.go
- neturl.go
- neturl_convert.go
- neturl_gen.go
- neturl_get.go
- neturl_preview.go
- proposal.go
- proposal_propose.go
- proposal_query.go
- proposal_thaw.go
- proposal_vote.go
- status.go
- tdpos.go
- tdpos_candidates.go
- tdpos_checkresult.go
- tdpos_nominate_records.go
- tdpos_nominee_record.go
- tdpos_status.go
- tdpos_vote_records.go
- tdpos_voted_records.go
- transfer.go
- tx.go
- tx_query.go
- types.go
- utxo.go
- utxo_list.go
- utxo_merge.go
- utxo_split.go
- vote.go
- wasm.go
- watch.go