chainmaker_adapter

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 txId 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL