Documentation ¶
Index ¶
- type CMLightSDKAdapter
- func (cls *CMLightSDKAdapter) ForwardTransaction(txRequest *cmCommonPb.TxRequest) (*cmCommonPb.TxResponse, error)
- func (cls *CMLightSDKAdapter) GetBlockByHeight(blockHeight uint64) (common.Blocker, error)
- func (cls *CMLightSDKAdapter) GetChainConfig() (*protogo.RemoteConfig, error)
- func (cls *CMLightSDKAdapter) GetChainHeight() (uint64, error)
- func (cls *CMLightSDKAdapter) GetTransactionByTxKey(txKey string) (common.Transactioner, error)
- func (cls *CMLightSDKAdapter) Stop() error
- func (cls *CMLightSDKAdapter) SubscribeBlock() (chan common.Blocker, error)
- type CMSPVSDKAdapter
- func (css *CMSPVSDKAdapter) ForwardTransaction(txRequest *cmCommonPb.TxRequest) (*cmCommonPb.TxResponse, error)
- func (css *CMSPVSDKAdapter) GetBlockByHeight(blockHeight uint64) (common.Blocker, error)
- func (css *CMSPVSDKAdapter) GetChainConfig() (*protogo.RemoteConfig, error)
- func (css *CMSPVSDKAdapter) GetChainHeight() (uint64, error)
- func (css *CMSPVSDKAdapter) GetTransactionByTxKey(txKey string) (common.Transactioner, error)
- func (css *CMSPVSDKAdapter) Stop() error
- func (css *CMSPVSDKAdapter) SubscribeBlock() (chan common.Blocker, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMLightSDKAdapter ¶
type CMLightSDKAdapter struct {
// contains filtered or unexported fields
}
CMLightSDKAdapter is the implementation of SDKAdapter interface for ChainMaker Light
func NewCMLightSDKAdapter ¶
func NewCMLightSDKAdapter(chainId string, ymlFile string, log *zap.SugaredLogger) (*CMLightSDKAdapter, error)
NewCMLightSDKAdapter creates CMLightSDKAdapter with chainId, ymlFile path and log
func (*CMLightSDKAdapter) ForwardTransaction ¶
func (cls *CMLightSDKAdapter) ForwardTransaction(txRequest *cmCommonPb.TxRequest) (*cmCommonPb.TxResponse, error)
ForwardTransaction forwards transaction to remote ChainMaker chain
func (*CMLightSDKAdapter) GetBlockByHeight ¶
func (cls *CMLightSDKAdapter) GetBlockByHeight(blockHeight uint64) (common.Blocker, error)
GetBlockByHeight gets the block of a specific height from remote ChainMaker chain
func (*CMLightSDKAdapter) GetChainConfig ¶
func (cls *CMLightSDKAdapter) GetChainConfig() (*protogo.RemoteConfig, error)
GetChainConfig gets the config of remote ChainMaker chain
func (*CMLightSDKAdapter) GetChainHeight ¶
func (cls *CMLightSDKAdapter) GetChainHeight() (uint64, error)
GetChainHeight gets the height of the remote ChainMaker chain
func (*CMLightSDKAdapter) GetTransactionByTxKey ¶
func (cls *CMLightSDKAdapter) GetTransactionByTxKey(txKey string) (common.Transactioner, error)
GetTransactionByTxKey gets the transaction by transaction id from remote ChainMaker chain
func (*CMLightSDKAdapter) Stop ¶
func (cls *CMLightSDKAdapter) Stop() error
Stop closes connection pool and release resource
func (*CMLightSDKAdapter) SubscribeBlock ¶
func (cls *CMLightSDKAdapter) SubscribeBlock() (chan common.Blocker, error)
SubscribeBlock subscribes to the latest block generated by the remote ChainMaker chain
type CMSPVSDKAdapter ¶
type CMSPVSDKAdapter struct {
// contains filtered or unexported fields
}
CMSPVSDKAdapter is the implementation of SDKAdapter interface for ChainMaker SPV
func NewCMSPVSDKAdapter ¶
func NewCMSPVSDKAdapter(chainId string, ymlFile string, log *zap.SugaredLogger) (*CMSPVSDKAdapter, error)
NewCMSPVSDKAdapter creates CMSPVSDKAdapter with chainId, ymlFile path and log
func (*CMSPVSDKAdapter) ForwardTransaction ¶
func (css *CMSPVSDKAdapter) ForwardTransaction(txRequest *cmCommonPb.TxRequest) (*cmCommonPb.TxResponse, error)
ForwardTransaction forwards transaction to remote ChainMaker chain
func (*CMSPVSDKAdapter) GetBlockByHeight ¶
func (css *CMSPVSDKAdapter) GetBlockByHeight(blockHeight uint64) (common.Blocker, error)
GetBlockByHeight gets the block without RwSwt by height from remote ChainMaker chain
func (*CMSPVSDKAdapter) GetChainConfig ¶
func (css *CMSPVSDKAdapter) GetChainConfig() (*protogo.RemoteConfig, error)
GetChainConfig gets the config of remote ChainMaker chain
func (*CMSPVSDKAdapter) GetChainHeight ¶
func (css *CMSPVSDKAdapter) GetChainHeight() (uint64, error)
GetChainHeight gets the height of the remote ChainMaker chain
func (*CMSPVSDKAdapter) GetTransactionByTxKey ¶
func (css *CMSPVSDKAdapter) GetTransactionByTxKey(txKey string) (common.Transactioner, error)
GetTransactionByTxKey gets the transaction by txId from remote ChainMaker chain
func (*CMSPVSDKAdapter) Stop ¶
func (css *CMSPVSDKAdapter) Stop() error
Stop closes connection pool and release resource
func (*CMSPVSDKAdapter) SubscribeBlock ¶
func (css *CMSPVSDKAdapter) SubscribeBlock() (chan common.Blocker, error)
SubscribeBlock subscribes to the latest block without RwSet generated by the remote ChainMaker chain