Versions in this module Expand all Collapse all v2 v2.3.1 Jul 26, 2023 Changes in this version + func InitChainClient() error + func InitChainClientMock() error + type BCOSBlock struct + DbHash string + Hash string + Number string + ParentHash string + ReceiptsRoot string + StateRoot string + Timestamp string + Transactions []string + TransactionsRoot string + func (b *BCOSBlock) TransactionHashs() []string + type BCOSConfigTemplate struct + AccountText []byte + Address string + CaFilePath string + CaText string + CertFilePath string + CertText []byte + ChainID int64 + GroupID int + Http bool + KeyFilePath string + KeyText []byte + SMCrypto bool + func NewBCOSConfigTemplate(chainID int64, groupIDStr, address string, isSMCrypto bool) (*BCOSConfigTemplate, error) + func (t *BCOSConfigTemplate) SetAccount(accountText []byte) error + func (t *BCOSConfigTemplate) SetCa(caText string) error + func (t *BCOSConfigTemplate) SetCert(certText []byte) error + func (t *BCOSConfigTemplate) SetKey(keyText []byte) error + func (t *BCOSConfigTemplate) ToConfig() (*conf.Config, error) + type BCOSEvent struct + ContractName string + Data []string + Topic string + type ChainClient struct + func (c *ChainClient) CheckChain() bool + func (c *ChainClient) GetTxProve(tx *bcostypes.TransactionDetail, chainRid string) string + func (c *ChainClient) InvokeContract(chainRid, contractName, method, abiStr string, args string, needTx bool, ...) ([]string, *bcostypes.TransactionDetail, error) + func (c *ChainClient) TxProve(txProve string) bool + type ChainClientItfc interface + CheckChain func() bool + GetTxProve func(tx *bcostypes.TransactionDetail, chainRid string) string + InvokeContract func(chainRid, contractName, method, abiStr string, args string, needTx bool, ...) ([]string, *bcostypes.TransactionDetail, error) + TxProve func(txProve string) bool + var ChainClientV1 ChainClientItfc + type ChainClientMock struct + func (c *ChainClientMock) CheckChain() bool + func (c *ChainClientMock) GetTxProve(tx *bcostypes.TransactionDetail, chainId string) string + func (c *ChainClientMock) InvokeContract(hainId, contractName, method, abiStr string, args string, needTx bool, ...) ([]string, *bcostypes.TransactionDetail, error) + func (c *ChainClientMock) TxProve(txProve string) bool