Documentation ¶
Index ¶
- type ChainCoreAgent
- func (t *ChainCoreAgent) GetAccountAddresses(accountName string) ([]string, error)
- func (t *ChainCoreAgent) QueryBlock(blockid []byte) (ledger.BlockHandle, error)
- func (t *ChainCoreAgent) QueryTransaction(txid []byte) (*protos.Transaction, error)
- func (t *ChainCoreAgent) VerifyContractOwnerPermission(contractName string, authRequire []string) error
- func (t *ChainCoreAgent) VerifyContractPermission(initiator string, authRequire []string, contractName, methodName string) (bool, error)
- type ChainRelyAgentImpl
- func (t *ChainRelyAgentImpl) CreateAcl() (base.AclManager, error)
- func (t *ChainRelyAgentImpl) CreateConsensus() (cbase.PluggableConsensus, error)
- func (t *ChainRelyAgentImpl) CreateContract(xReader ledger.XReader) (contractBase.Manager, error)
- func (t *ChainRelyAgentImpl) CreateCrypto(cryptoType string) (cryptoBase.CryptoClient, error)
- func (t *ChainRelyAgentImpl) CreateGovernToken() (govern.GovManager, error)
- func (t *ChainRelyAgentImpl) CreateLedger() (*ledger.Ledger, error)
- func (t *ChainRelyAgentImpl) CreateProposal() (propose.ProposeManager, error)
- func (t *ChainRelyAgentImpl) CreateState(leg *ledger.Ledger, crypt cryptoBase.CryptoClient) (*state.State, error)
- func (t *ChainRelyAgentImpl) CreateTimerTask() (ptimer.TimerManager, error)
- type LedgerAgent
- func (t *LedgerAgent) CreateSnapshot(blkId []byte) (ledger.XReader, error)
- func (t *LedgerAgent) CreateXMReader() ledger.XReader
- func (t *LedgerAgent) GetConsensusConf() ([]byte, error)
- func (t *LedgerAgent) GetCryptoType() (string, error)
- func (t *LedgerAgent) GetGenesisPreDistribution() ([]ledger.Predistribution, error)
- func (t *LedgerAgent) GetNewAccountGas() (int64, error)
- func (t *LedgerAgent) GetNewGovGas() (int64, error)
- func (t *LedgerAgent) GetTipBlock() ledger.BlockHandle
- func (t *LedgerAgent) GetTipSnapshot() (ledger.XReader, error)
- func (t *LedgerAgent) GetTipXMSnapshotReader() (ledger.SnapshotReader, error)
- func (t *LedgerAgent) QueryBlock(blkId []byte) (ledger.BlockHandle, error)
- func (t *LedgerAgent) QueryBlockByHeight(height int64) (ledger.BlockHandle, error)
- func (t *LedgerAgent) QueryBlockHeader(blkId []byte) (ledger.BlockHandle, error)
- func (t *LedgerAgent) QueryBlockHeaderByHeight(height int64) (ledger.BlockHandle, error)
- func (t *LedgerAgent) QueryTipBlockHeader() ledger.BlockHandle
- func (t *LedgerAgent) QueryTipBlockHeight() (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainCoreAgent ¶
type ChainCoreAgent struct {
// contains filtered or unexported fields
}
func NewChainCoreAgent ¶
func NewChainCoreAgent(chainCtx *base.ChainCtx) *ChainCoreAgent
func (*ChainCoreAgent) GetAccountAddresses ¶
func (t *ChainCoreAgent) GetAccountAddresses(accountName string) ([]string, error)
GetAccountAddresses 查询合约acl
func (*ChainCoreAgent) QueryBlock ¶
func (t *ChainCoreAgent) QueryBlock(blockid []byte) (ledger.BlockHandle, error)
QueryBlock query block
func (*ChainCoreAgent) QueryTransaction ¶
func (t *ChainCoreAgent) QueryTransaction(txid []byte) (*protos.Transaction, error)
QueryTransaction query confirmed tx
func (*ChainCoreAgent) VerifyContractOwnerPermission ¶
func (t *ChainCoreAgent) VerifyContractOwnerPermission(contractName string, authRequire []string) error
VerifyContractOwnerPermission used to verify contract ownership permisson
func (*ChainCoreAgent) VerifyContractPermission ¶
func (t *ChainCoreAgent) VerifyContractPermission(initiator string, authRequire []string, contractName, methodName string) (bool, error)
VerifyContractPermission used to verify contract permission while contract running
type ChainRelyAgentImpl ¶
type ChainRelyAgentImpl struct {
// contains filtered or unexported fields
}
区块链依赖代理
func NewChainRelyAgent ¶
func NewChainRelyAgent(chainCtx *engineBase.ChainCtx) *ChainRelyAgentImpl
func (*ChainRelyAgentImpl) CreateAcl ¶
func (t *ChainRelyAgentImpl) CreateAcl() (base.AclManager, error)
CreateAcl 创建权限控制器
func (*ChainRelyAgentImpl) CreateConsensus ¶
func (t *ChainRelyAgentImpl) CreateConsensus() (cbase.PluggableConsensus, error)
CreateConsensus 创建共识实例
func (*ChainRelyAgentImpl) CreateContract ¶
func (t *ChainRelyAgentImpl) CreateContract(xReader ledger.XReader) (contractBase.Manager, error)
CreateContract 创建合约管理器
func (*ChainRelyAgentImpl) CreateCrypto ¶
func (t *ChainRelyAgentImpl) CreateCrypto(cryptoType string) (cryptoBase.CryptoClient, error)
CreateCrypto 创建加密客户端
func (*ChainRelyAgentImpl) CreateGovernToken ¶
func (t *ChainRelyAgentImpl) CreateGovernToken() (govern.GovManager, error)
CreateGovernToken 创建治理代币实例
func (*ChainRelyAgentImpl) CreateLedger ¶
func (t *ChainRelyAgentImpl) CreateLedger() (*ledger.Ledger, error)
CreateLedger 创建账本
func (*ChainRelyAgentImpl) CreateProposal ¶
func (t *ChainRelyAgentImpl) CreateProposal() (propose.ProposeManager, error)
CreateProposal 创建提案实例
func (*ChainRelyAgentImpl) CreateState ¶
func (t *ChainRelyAgentImpl) CreateState(leg *ledger.Ledger, crypt cryptoBase.CryptoClient) (*state.State, error)
CreateState 创建状态机实例
func (*ChainRelyAgentImpl) CreateTimerTask ¶
func (t *ChainRelyAgentImpl) CreateTimerTask() (ptimer.TimerManager, error)
CreateTimerTask 创建定时器任务实例
type LedgerAgent ¶
type LedgerAgent struct {
// contains filtered or unexported fields
}
func NewLedgerAgent ¶
func NewLedgerAgent(chainCtx *base.ChainCtx) *LedgerAgent
func (*LedgerAgent) CreateSnapshot ¶
func (t *LedgerAgent) CreateSnapshot(blkId []byte) (ledger.XReader, error)
根据指定blockid创建快照(Select方法不可用)
func (*LedgerAgent) GetConsensusConf ¶
func (t *LedgerAgent) GetConsensusConf() ([]byte, error)
从创世块获取共识配置
func (*LedgerAgent) GetCryptoType ¶
func (t *LedgerAgent) GetCryptoType() (string, error)
从创世块获取加密算法类型
func (*LedgerAgent) GetGenesisPreDistribution ¶
func (t *LedgerAgent) GetGenesisPreDistribution() ([]ledger.Predistribution, error)
从创世块获取治理代币消耗gas
func (*LedgerAgent) GetNewAccountGas ¶
func (t *LedgerAgent) GetNewAccountGas() (int64, error)
从创世块获取创建合约账户消耗gas
func (*LedgerAgent) GetNewGovGas ¶
func (t *LedgerAgent) GetNewGovGas() (int64, error)
从创世块获取治理代币消耗gas
func (*LedgerAgent) GetTipBlock ¶
func (t *LedgerAgent) GetTipBlock() ledger.BlockHandle
func (*LedgerAgent) GetTipSnapshot ¶
func (t *LedgerAgent) GetTipSnapshot() (ledger.XReader, error)
获取最新确认高度快照(Select方法不可用)
func (*LedgerAgent) GetTipXMSnapshotReader ¶
func (t *LedgerAgent) GetTipXMSnapshotReader() (ledger.SnapshotReader, error)
获取状态机最新确认高度快照(只有Get方法,直接返回[]byte)
func (*LedgerAgent) QueryBlock ¶
func (t *LedgerAgent) QueryBlock(blkId []byte) (ledger.BlockHandle, error)
查询区块
func (*LedgerAgent) QueryBlockByHeight ¶
func (t *LedgerAgent) QueryBlockByHeight(height int64) (ledger.BlockHandle, error)
func (*LedgerAgent) QueryBlockHeader ¶
func (t *LedgerAgent) QueryBlockHeader(blkId []byte) (ledger.BlockHandle, error)
仅查询区块头
func (*LedgerAgent) QueryBlockHeaderByHeight ¶
func (t *LedgerAgent) QueryBlockHeaderByHeight(height int64) (ledger.BlockHandle, error)
func (*LedgerAgent) QueryTipBlockHeader ¶
func (t *LedgerAgent) QueryTipBlockHeader() ledger.BlockHandle
func (*LedgerAgent) QueryTipBlockHeight ¶
func (t *LedgerAgent) QueryTipBlockHeight() (int64, error)
Click to show internal directories.
Click to hide internal directories.