Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainReader ¶
type ChainReader interface { // 获取链状态 (GetBlockChainStatus) GetChainStatus() (*xpb.ChainStatus, error) // 检查是否是主干Tip Block (ConfirmBlockChainStatus) IsTrunkTipBlock(blkId []byte) (bool, error) // 获取系统状态 GetSystemStatus() (*xpb.SystemStatus, error) // 获取节点NetUR GetNetURL() (string, error) // 获取共识状态 GetConsensusStatus() (*xpb.ConsensusStatus, error) }
func NewChainReader ¶
func NewChainReader(chainCtx *common.ChainCtx, baseCtx xctx.XContext) ChainReader
type ConsensusReader ¶
type ConsensusReader interface { // 获取共识状态 GetConsStatus() (cons.ConsensusStatus, error) }
func NewConsensusReader ¶
func NewConsensusReader(chainCtx *common.ChainCtx, baseCtx xctx.XContext) ConsensusReader
type ContractReader ¶
type ContractReader interface { // 查询该链合约统计数据 QueryContractStatData() (*protos.ContractStatData, error) // 查询账户下合约状态 GetAccountContracts(account string) ([]*protos.ContractStatus, error) // 查询地址下合约状态 GetAddressContracts(addr string, needContent bool) (map[string][]*protos.ContractStatus, error) // 查询地址下账户 GetAccountByAK(addr string) ([]string, error) // 查询合约账户ACL QueryAccountACL(account string) (*protos.Acl, error) // 查询合约方法ACL QueryContractMethodACL(contract, method string) (*protos.Acl, error) // 查询账户治理代币余额 QueryAccountGovernTokenBalance(account string) (*protos.GovernTokenBalance, error) // GetContractDesc(name string) (*protos.WasmCodeDesc, error) }
func NewContractReader ¶
func NewContractReader(chainCtx *common.ChainCtx, baseCtx xctx.XContext) ContractReader
type LedgerReader ¶
type LedgerReader interface { // 查询交易信息(QueryTx) QueryTx(txId []byte) (*xpb.TxInfo, error) // 查询区块ID信息(GetBlock) QueryBlock(blkId []byte, needContent bool) (*xpb.BlockInfo, error) QueryBlockHeader(blkId []byte) (*xpb.BlockInfo, error) // 通过区块高度查询区块信息(GetBlockByHeight) QueryBlockByHeight(height int64, needContent bool) (*xpb.BlockInfo, error) QueryBlockHeaderByHeight(height int64) (*xpb.BlockInfo, error) }
func NewLedgerReader ¶
func NewLedgerReader(chainCtx *common.ChainCtx, baseCtx xctx.XContext) LedgerReader
type UtxoReader ¶
type UtxoReader interface { // 获取账户余额 GetBalance(account string) (string, error) // 获取账户冻结余额 GetFrozenBalance(account string) (string, error) // 获取账户余额详情 GetBalanceDetail(account string) ([]*lpb.BalanceDetailInfo, error) // 拉取固定数目的utxo QueryUtxoRecord(account string, count int64) (*lpb.UtxoRecordDetail, error) // 选择合适金额的utxo SelectUTXO(account string, need *big.Int, isLock, isExclude bool) (*lpb.UtxoOutput, error) // 按最大交易大小选择utxo SelectUTXOBySize(account string, isLock, isExclude bool) (*lpb.UtxoOutput, error) }
func NewUtxoReader ¶
func NewUtxoReader(chainCtx *common.ChainCtx, baseCtx xctx.XContext) UtxoReader
Click to show internal directories.
Click to hide internal directories.