Versions in this module Expand all Collapse all v3 v3.0.1 Mar 15, 2024 v3.0.0 Mar 4, 2024 Changes in this version + const BlockLimit + const Secp256k1 + const Sm2p256v1 + var ErrClientQuit = errors.New("client is closed") + var ErrNoResult = errors.New("no result in JSON-RPC response") + var ErrNoRpcMethod = errors.New("no rpc method") + var ErrSubscriptionQueueOverflow = errors.New("subscription queue overflow") + func LoadECPrivateKeyFromPEM(path string) ([]byte, string, error) + func LoadECPublicKeyFromPEM(path string) ([]byte, string, error) + type Client struct + func Dial(configFile, groupID string, privateKey []byte) (*Client, error) + func DialContext(ctx context.Context, config *Config) (*Client, error) + func (c *Client) AsyncSendEncodedTransaction(ctx context.Context, encodedTransaction []byte, withProof bool, ...) error + func (c *Client) AsyncSendTransaction(ctx context.Context, tx *types.Transaction, ...) error + func (c *Client) BroadcastAMOPMsg(topic string, data []byte) error + func (c *Client) CallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) + func (c *Client) Close() + func (c *Client) CodeAt(ctx context.Context, address common.Address) ([]byte, error) + func (c *Client) CreateEncodedSignature(hash []byte) ([]byte, error) + func (c *Client) CreateEncodedTransaction(transactionData, transactionDataHash, signature []byte, attribute int32, ...) ([]byte, error) + func (c *Client) CreateEncodedTransactionDataV1(to *common.Address, input []byte, blockLimit int64, abi string) ([]byte, []byte, error) + func (c *Client) GetABI(ctx context.Context, address common.Address) (string, error) + func (c *Client) GetBlockByHash(ctx context.Context, blockHash common.Hash, onlyHeader, onlyTxHash bool) (*types.Block, error) + func (c *Client) GetBlockByNumber(ctx context.Context, blockNumber int64, onlyHeader, onlyTxHash bool) (*types.Block, error) + func (c *Client) GetBlockHashByNumber(ctx context.Context, blockNumber int64) (*common.Hash, error) + func (c *Client) GetBlockNumber(ctx context.Context) (int64, error) + func (c *Client) GetCallOpts() *bind.CallOpts + func (c *Client) GetChainID(ctx context.Context) (string, error) + func (c *Client) GetCode(ctx context.Context, address common.Address) ([]byte, error) + func (c *Client) GetConsensusStatus(ctx context.Context) ([]byte, error) + func (c *Client) GetContractAddress(ctx context.Context, txHash common.Hash) (common.Address, error) + func (c *Client) GetGroupID() string + func (c *Client) GetGroupInfo(ctx context.Context) ([]byte, error) + func (c *Client) GetGroupInfoList(ctx context.Context) ([]byte, error) + func (c *Client) GetGroupList(ctx context.Context) ([]byte, error) + func (c *Client) GetGroupPeers(ctx context.Context) ([]byte, error) + func (c *Client) GetNodeIDList(ctx context.Context) ([]byte, error) + func (c *Client) GetNodeInfo(ctx context.Context, nodeId string) ([]byte, error) + func (c *Client) GetObserverList(ctx context.Context) ([]string, error) + func (c *Client) GetPBFTView(ctx context.Context) ([]byte, error) + func (c *Client) GetPeers(ctx context.Context) ([]byte, error) + func (c *Client) GetPendingTxSize(ctx context.Context) (int64, error) + func (c *Client) GetSealerList(ctx context.Context) ([]ConsensusNodeInfo, error) + func (c *Client) GetSyncStatus(ctx context.Context) (*types.SyncStatus, error) + func (c *Client) GetSystemConfigByKey(ctx context.Context, configKey string) (*types.SystemConfig, error) + func (c *Client) GetTotalTransactionCount(ctx context.Context) (*types.TransactionCount, error) + func (c *Client) GetTransactOpts() *bind.TransactOpts + func (c *Client) GetTransactionByHash(ctx context.Context, txHash common.Hash, withProof bool) (*types.TransactionDetail, error) + func (c *Client) GetTransactionReceipt(ctx context.Context, txHash common.Hash, withProof bool) (*types.Receipt, error) + func (c *Client) PendingCodeAt(ctx context.Context, address common.Address) ([]byte, error) + func (c *Client) PrivateKeyBytes() []byte + func (c *Client) PublishAmopTopicMessage(ctx context.Context, topic string, data []byte, handler func([]byte, error)) error + func (c *Client) SMCrypto() bool + func (c *Client) SendAmopResponse(peer, seq string, data []byte) error + func (c *Client) SendEncodedTransaction(ctx context.Context, encodedTransaction []byte, withProof bool) (*types.Receipt, error) + func (c *Client) SendTransaction(ctx context.Context, tx *types.Transaction) (*types.Receipt, error) + func (c *Client) SetCallOpts(opts *bind.CallOpts) + func (c *Client) SetGroupID(newID string) + func (c *Client) SetPrivateKey(privateKey []byte) error + func (c *Client) SetTransactOpts(opts *bind.TransactOpts) + func (c *Client) SubscribeAmopTopic(ctx context.Context, topic string, handler func([]byte, *[]byte)) error + func (c *Client) SubscribeBlockNumberNotify(ctx context.Context, handler func(int64)) error + func (c *Client) SubscribeEventLogs(ctx context.Context, eventLogParams types.EventLogParams, ...) (string, error) + func (c *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + func (c *Client) UnSubscribeEventLogs(ctx context.Context, taskId string) error + func (c *Client) UnsubscribeAmopTopic(topic string) error + func (c *Client) UnsubscribeBlockNumberNotify() + type Config struct + DisableSsl bool + GroupID string + Host string + IsSMCrypto bool + Port int + PrivateKey []byte + TLSCaFile string + TLSCertFile string + TLSKeyFile string + TLSSmEnCertFile string + TLSSmEnKeyFile string + func ParseConfigOptions(caFile string, key string, cert, keyFile string, groupId string, host string, ...) (*Config, error) + type Connection struct + func NewConnection(config *Config) (*Connection, error) + func NewConnectionByFile(configFile, groupID string, privateKey []byte) (*Connection, error) + func (c *Connection) BroadcastAmopMsg(topic string, data []byte) + func (c *Connection) Call(result interface{}, method string, args ...interface{}) error + func (c *Connection) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error + func (c *Connection) Close() + func (c *Connection) GetCSDK() *csdk.CSDK + func (c *Connection) NewMessage(method string, paramsIn ...interface{}) (*jsonrpcMessage, error) + func (c *Connection) PublishAmopTopicMessage(ctx context.Context, topic string, data []byte, handler func([]byte, error)) error + func (c *Connection) SendAmopResponse(peer, seq string, data []byte) + func (c *Connection) SubscribeAmopTopic(topic string, handler func(data []byte, response *[]byte)) error + func (c *Connection) SubscribeBlockNumberNotify(handler func(int64)) error + func (c *Connection) SubscribeEventLogs(eventLogParams types.EventLogParams, handler func(int, []types.Log)) (string, error) + func (c *Connection) UnsubscribeAmopTopic(topic string) + func (c *Connection) UnsubscribeBlockNumberNotify() + func (c *Connection) UnsubscribeEventLogs(taskID string) + type ConsensusNodeInfo struct + ID string + Weight uint + type Error interface + Error func() string + ErrorCode func() int + type EventLogRespResult struct + Address string + BlockNumber uint64 + Data string + LogIndex int + Topics []string + TransactionHash string + TransactionIndex int Other modules containing this package github.com/FISCO-BCOS/go-sdk