client

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: ISC Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAuth     = errors.New("authentication failure")
	ErrInvalidEndpoint = errors.New("the endpoint either does not support " +
		"websockets or does not exist")
	ErrClientShutdown     = errors.New("the client has been shutdown")
	ErrClientNotConnected = errors.New("the client was never connected")
	ErrClientDisconnect   = errors.New("the client has been disconnected")
)
View Source
var (
	// ErrWebsocketsRequired is an error to describe the condition where the
	// caller is trying to use a websocket-only feature, such as requesting
	// notifications or other websocket requests when the client is
	// configured to run in HTTP POST mode.
	ErrWebsocketsRequired = errors.New("a websocket connection is required " +
		"to use this feature")
)

Functions

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(config *ConnConfig, ntfnHandlers *NotificationHandlers) (*Client, error)

func (*Client) Banlist

func (c *Client) Banlist() (*j.GetBanlistResult, error)

func (*Client) BanlistAsync

func (c *Client) BanlistAsync() FutureBanlistResult

func (*Client) CheckAddress

func (c *Client) CheckAddress(address string, network string) (bool, error)

func (*Client) CheckAddressAsync

func (c *Client) CheckAddressAsync(address string, network string) FutureCheckAddressResult

func (*Client) CreateRawTransaction

func (c *Client) CreateRawTransaction(inputs []j.TransactionInput, amounts j.Amounts, lockTime int64) (string, error)

func (*Client) CreateRawTransactionAsync

func (c *Client) CreateRawTransactionAsync(inputs []j.TransactionInput, amounts j.Amounts, lockTime int64) FutureCreateRawTransactionResult

func (*Client) DecodeRawTransaction

func (c *Client) DecodeRawTransaction(hexTx string) (*j.DecodeRawTransactionResult, error)

func (*Client) DecodeRawTransactionAsync

func (c *Client) DecodeRawTransactionAsync(hexTx string) FutureDecodeRawTransactionResult

func (*Client) Disconnect

func (c *Client) Disconnect()

func (*Client) Disconnected

func (c *Client) Disconnected() bool

func (*Client) Generate

func (c *Client) Generate(numBlocks uint32, powType pow.PowType) ([]string, error)

func (*Client) GenerateAsync

func (c *Client) GenerateAsync(numBlocks uint32, powType pow.PowType) FutureGenerateCmdResult

func (*Client) GetBestBlockHash

func (c *Client) GetBestBlockHash() (*hash.Hash, error)

func (*Client) GetBestBlockHashAsync

func (c *Client) GetBestBlockHashAsync() FutureGetBestBlockHashResult

func (*Client) GetBlock

func (c *Client) GetBlock(h string, verbose bool, inclTx bool, fullTx bool) (interface{}, error)

func (*Client) GetBlockAsync

func (c *Client) GetBlockAsync(h string, verbose bool, inclTx bool, fullTx bool) FutureGetBlockResult

func (*Client) GetBlockByID

func (c *Client) GetBlockByID(id uint, verbose bool, inclTx bool, fullTx bool) (interface{}, error)

func (*Client) GetBlockByIDAsync

func (c *Client) GetBlockByIDAsync(id uint, verbose bool, inclTx bool, fullTx bool) FutureGetBlockByNumResult

func (*Client) GetBlockByIDFullTx

func (c *Client) GetBlockByIDFullTx(id uint, inclTx bool) (*j.BlockVerboseResult, error)

func (*Client) GetBlockByIDRaw

func (c *Client) GetBlockByIDRaw(id uint, inclTx bool) (string, error)

func (*Client) GetBlockByIDSimpleTx

func (c *Client) GetBlockByIDSimpleTx(id uint, inclTx bool) (*j.BlockResult, error)

func (*Client) GetBlockByNum

func (c *Client) GetBlockByNum(id uint, verbose bool, inclTx bool, fullTx bool) (interface{}, error)

func (*Client) GetBlockByNumAsync

func (c *Client) GetBlockByNumAsync(id uint, verbose bool, inclTx bool, fullTx bool) FutureGetBlockByNumResult

func (*Client) GetBlockByNumFullTx

func (c *Client) GetBlockByNumFullTx(id uint, inclTx bool) (*j.BlockVerboseResult, error)

func (*Client) GetBlockByNumRaw

func (c *Client) GetBlockByNumRaw(id uint, inclTx bool) (string, error)

func (*Client) GetBlockByNumSimpleTx

func (c *Client) GetBlockByNumSimpleTx(id uint, inclTx bool) (*j.BlockResult, error)

func (*Client) GetBlockByOrder

func (c *Client) GetBlockByOrder(order uint, verbose bool, inclTx bool, fullTx bool) (interface{}, error)

func (*Client) GetBlockByOrderAsync

func (c *Client) GetBlockByOrderAsync(order uint, verbose bool, inclTx bool, fullTx bool) FutureGetBlockByOrderResult

func (*Client) GetBlockByOrderFullTx

func (c *Client) GetBlockByOrderFullTx(order uint, inclTx bool) (*j.BlockVerboseResult, error)

func (*Client) GetBlockByOrderRaw

func (c *Client) GetBlockByOrderRaw(order uint, inclTx bool) (string, error)

func (*Client) GetBlockByOrderSimpleTx

func (c *Client) GetBlockByOrderSimpleTx(order uint, inclTx bool) (*j.BlockResult, error)

func (*Client) GetBlockCount

func (c *Client) GetBlockCount() (int64, error)

func (*Client) GetBlockCountAsync

func (c *Client) GetBlockCountAsync() FutureGetBlockCountResult

func (*Client) GetBlockFullTx

func (c *Client) GetBlockFullTx(h string, inclTx bool) (*j.BlockVerboseResult, error)

func (*Client) GetBlockHash

func (c *Client) GetBlockHash(order uint) (*hash.Hash, error)

func (*Client) GetBlockHashAsync

func (c *Client) GetBlockHashAsync(order uint) FutureGetBlockHashResult

func (*Client) GetBlockHeader

func (c *Client) GetBlockHeader(hash string, verbose bool) (interface{}, error)

func (*Client) GetBlockHeaderAsync

func (c *Client) GetBlockHeaderAsync(hash string, verbose bool) FutureGetBlockHeaderResult

func (*Client) GetBlockHeaderRaw

func (c *Client) GetBlockHeaderRaw(hash string) (string, error)

func (*Client) GetBlockHeaderVerbose

func (c *Client) GetBlockHeaderVerbose(hash string) (*j.GetBlockHeaderVerboseResult, error)

func (*Client) GetBlockRaw

func (c *Client) GetBlockRaw(h string, inclTx bool) (string, error)

func (*Client) GetBlockSimpleTx

func (c *Client) GetBlockSimpleTx(h string, inclTx bool) (*j.BlockResult, error)

func (*Client) GetBlockTemplate

func (c *Client) GetBlockTemplate(capabilities []string, powType byte) (*j.GetBlockTemplateResult, error)

func (*Client) GetBlockTemplateAsync

func (c *Client) GetBlockTemplateAsync(capabilities []string, powType byte) FutureGetBlockTemplateResult

func (*Client) GetBlockTotal

func (c *Client) GetBlockTotal() (int64, error)

func (*Client) GetBlockTotalAsync

func (c *Client) GetBlockTotalAsync() FutureGetBlockTotalResult

func (*Client) GetBlockV2

func (c *Client) GetBlockV2(h string, verbose bool, inclTx bool, fullTx bool) (interface{}, error)

func (*Client) GetBlockV2Async

func (c *Client) GetBlockV2Async(h string, verbose bool, inclTx bool, fullTx bool) FutureGetBlockResult

func (*Client) GetBlockV2FullTx

func (c *Client) GetBlockV2FullTx(h string, inclTx bool) (*j.BlockVerboseResult, error)

func (*Client) GetBlockV2Raw

func (c *Client) GetBlockV2Raw(h string, inclTx bool) (string, error)

func (*Client) GetBlockV2SimpleTx

func (c *Client) GetBlockV2SimpleTx(h string, inclTx bool) (*j.BlockResult, error)

func (*Client) GetBlockWeight

func (c *Client) GetBlockWeight(h string) (int64, error)

func (*Client) GetBlockWeightAsync

func (c *Client) GetBlockWeightAsync(h string) FutureGetBlockWeightResult

func (*Client) GetBlockhashByRange

func (c *Client) GetBlockhashByRange(start uint, end uint) ([]*hash.Hash, error)

func (*Client) GetBlockhashByRangeAsync

func (c *Client) GetBlockhashByRangeAsync(start uint, end uint) FutureGetBlockhashByRangeResult

func (*Client) GetCoinbase

func (c *Client) GetCoinbase() ([]string, error)

func (*Client) GetCoinbaseAsync

func (c *Client) GetCoinbaseAsync() FutureGetCoinbaseResult

func (*Client) GetFees

func (c *Client) GetFees(h string) (int64, error)

func (*Client) GetFeesAsync

func (c *Client) GetFeesAsync(h string) FutureGetFeesResult

func (*Client) GetGetTimeInfoAsync

func (c *Client) GetGetTimeInfoAsync() FutureGetTimeInfoResult

func (*Client) GetMainChainHeight

func (c *Client) GetMainChainHeight() (int64, error)

func (*Client) GetMainChainHeightAsync

func (c *Client) GetMainChainHeightAsync() FutureGetMainChainHeightResult

func (*Client) GetMempool

func (c *Client) GetMempool(txType string, verbose bool) ([]string, error)

func (*Client) GetMempoolAsync

func (c *Client) GetMempoolAsync(txType string, verbose bool) FutureGetMempoolResult

func (*Client) GetNodeInfo

func (c *Client) GetNodeInfo() (*j.InfoNodeResult, error)

func (*Client) GetNodeInfoAsync

func (c *Client) GetNodeInfoAsync() FutureGetNodeInfoResult

func (*Client) GetOrphansTotal

func (c *Client) GetOrphansTotal() (int64, error)

func (*Client) GetOrphansTotalAsync

func (c *Client) GetOrphansTotalAsync() FutureGetOrphansTotalResult

func (*Client) GetPeerInfo

func (c *Client) GetPeerInfo() ([]j.GetPeerInfoResult, error)

func (*Client) GetPeerInfoAsync

func (c *Client) GetPeerInfoAsync() FutureGetPeerInfoResult

func (*Client) GetRawTransaction

func (c *Client) GetRawTransaction(txHash string, verbose bool) (interface{}, error)

func (*Client) GetRawTransactionAsync

func (c *Client) GetRawTransactionAsync(txHash string, verbose bool) FutureGetRawTransactionResult

func (*Client) GetRawTransactionRaw

func (c *Client) GetRawTransactionRaw(txHash string) (string, error)

func (*Client) GetRawTransactionVerbose

func (c *Client) GetRawTransactionVerbose(txHash string) (*j.TxRawResult, error)

func (*Client) GetRawTransactions

func (c *Client) GetRawTransactions(addre string, vinext bool, count uint, skip uint, revers bool, verbose bool, filterAddrs []string) (interface{}, error)

func (*Client) GetRawTransactionsAsync

func (c *Client) GetRawTransactionsAsync(addre string, vinext bool, count uint, skip uint, revers bool, verbose bool, filterAddrs []string) FutureGetRawTransactionsResult

func (*Client) GetRawTransactionsRaw

func (c *Client) GetRawTransactionsRaw(addre string, vinext bool, count uint, skip uint, revers bool, filterAddrs []string) ([]string, error)

func (*Client) GetRawTransactionsVerbose

func (c *Client) GetRawTransactionsVerbose(addre string, vinext bool, count uint, skip uint, revers bool, filterAddrs []string) ([]j.GetRawTransactionsResult, error)

func (*Client) GetRemoteGBT

func (c *Client) GetRemoteGBT(powType pow.PowType) (*types.BlockHeader, error)

func (*Client) GetRemoteGBTAsync

func (c *Client) GetRemoteGBTAsync(powType pow.PowType) FutureGetRemoteGBTCmdResult

func (*Client) GetRpcInfo

func (c *Client) GetRpcInfo() (*cmds.JsonRequestStatus, error)

func (*Client) GetRpcInfoAsync

func (c *Client) GetRpcInfoAsync() FutureGetRpcInfoResult

func (*Client) GetTimeInfo

func (c *Client) GetTimeInfo() (string, error)

func (*Client) GetUtxo

func (c *Client) GetUtxo(txHash string, vout uint32, includeMempool bool) (*j.GetUtxoResult, error)

func (*Client) GetUtxoAsync

func (c *Client) GetUtxoAsync(txHash string, vout uint32, includeMempool bool) FutureGetUtxoResult

func (*Client) IsBlue

func (c *Client) IsBlue(h string) (int, error)

func (*Client) IsBlueAsync

func (c *Client) IsBlueAsync(h string) FutureIsBlueResult

func (*Client) IsCurrent

func (c *Client) IsCurrent() (bool, error)

func (*Client) IsCurrentAsync

func (c *Client) IsCurrentAsync() FutureIsCurrentResult

func (*Client) IsOnMainChain

func (c *Client) IsOnMainChain(h string) (bool, error)

func (*Client) IsOnMainChainAsync

func (c *Client) IsOnMainChainAsync(h string) FutureIsOnMainChainResult

func (*Client) NextID

func (c *Client) NextID() uint64

func (*Client) NotifyBlocks

func (c *Client) NotifyBlocks() error

func (*Client) NotifyBlocksAsync

func (c *Client) NotifyBlocksAsync() FutureNotifyBlocksResult

func (*Client) NotifyNewTransactions

func (c *Client) NotifyNewTransactions(verbose bool) error

func (*Client) NotifyNewTransactionsAsync

func (c *Client) NotifyNewTransactionsAsync(verbose bool) FutureNotifyNewTransactionsResult

func (*Client) NotifyReceived

func (c *Client) NotifyReceived(addresses []types.Address) error

func (*Client) NotifyReceivedAsync

func (c *Client) NotifyReceivedAsync(addresses []types.Address) FutureNotifyReceivedResult

func (*Client) NotifyTxsByAddr

func (c *Client) NotifyTxsByAddr(reload bool, addr []string, outpoint []cmds.OutPoint) error

func (*Client) NotifyTxsByAddrAsync

func (c *Client) NotifyTxsByAddrAsync(reload bool, addr []string, outpoint []cmds.OutPoint) FutureNotifyBlocksResult

func (*Client) NotifyTxsConfirmed

func (c *Client) NotifyTxsConfirmed(txs []cmds.TxConfirm) error

func (*Client) NotifyTxsConfirmedAsync

func (c *Client) NotifyTxsConfirmedAsync(txs []cmds.TxConfirm) FutureNotifyBlocksResult

func (*Client) RemoveBan

func (c *Client) RemoveBan(id string) (bool, error)

func (*Client) RemoveBanAsync

func (c *Client) RemoveBanAsync(id string) FutureRemoveBanResult

func (*Client) RemoveTxsConfirmed

func (c *Client) RemoveTxsConfirmed(txs []cmds.TxConfirm) error

func (*Client) RemoveTxsConfirmedAsync

func (c *Client) RemoveTxsConfirmedAsync(txs []cmds.TxConfirm) FutureNotifyBlocksResult

func (*Client) Rescan

func (c *Client) Rescan(beginBlock, endBlock uint64, addrs []string, op []cmds.OutPoint) error

func (*Client) RescanAsync

func (c *Client) RescanAsync(beginBlock, endBlock uint64, addrs []string, op []cmds.OutPoint) FutureNotifyBlocksResult

func (*Client) SendRawTransaction

func (c *Client) SendRawTransaction(hexTx string, allowHighFees bool) (*hash.Hash, error)

func (*Client) SendRawTransactionAsync

func (c *Client) SendRawTransactionAsync(hexTx string, allowHighFees bool) FutureSendRawTransactionResult

func (*Client) SetLogLevel

func (c *Client) SetLogLevel(level string) (string, error)

func (*Client) SetLogLevelAsync

func (c *Client) SetLogLevelAsync(level string) FutureSetLogLevelResult

func (*Client) SetRpcMaxClients

func (c *Client) SetRpcMaxClients(max int) (int, error)

func (*Client) SetRpcMaxClientsAsync

func (c *Client) SetRpcMaxClientsAsync(max int) FutureSetRpcMaxClientsResult

func (*Client) Shutdown

func (c *Client) Shutdown()

func (*Client) Stop

func (c *Client) Stop() (string, error)

func (*Client) StopAsync

func (c *Client) StopAsync() FutureStopResult

func (*Client) StopNotifyBlocks

func (c *Client) StopNotifyBlocks() error

func (*Client) StopNotifyBlocksAsync

func (c *Client) StopNotifyBlocksAsync() FutureNotifyBlocksResult

func (*Client) StopNotifyNewTransactions

func (c *Client) StopNotifyNewTransactions() error

func (*Client) StopNotifyNewTransactionsAsync

func (c *Client) StopNotifyNewTransactionsAsync() FutureStopNotifyNewTransactionsResult

func (*Client) StopNotifyTxsByAddr

func (c *Client) StopNotifyTxsByAddr(addr []string) error

func (*Client) StopNotifyTxsByAddrAsync

func (c *Client) StopNotifyTxsByAddrAsync(addr []string) FutureNotifyBlocksResult

func (*Client) SubmitBlock

func (c *Client) SubmitBlock(hexBlock string) (string, error)

func (*Client) SubmitBlockAsync

func (c *Client) SubmitBlockAsync(hexBlock string) FutureSubmitBlockResult

func (*Client) SubmitBlockHeader

func (c *Client) SubmitBlockHeader(header *types.BlockHeader) (*j.SubmitBlockResult, error)

func (*Client) SubmitBlockHeaderAsync

func (c *Client) SubmitBlockHeaderAsync(header *types.BlockHeader) FutureSubmitBlockHeaderResult

func (*Client) Tips

func (c *Client) Tips() ([]string, error)

func (*Client) TipsAsync

func (c *Client) TipsAsync() FutureTipsResult

func (*Client) TxSign

func (c *Client) TxSign(privkeyStr string, rawTxStr string) (string, error)

func (*Client) TxSignAsync

func (c *Client) TxSignAsync(privkeyStr string, rawTxStr string) FutureTxSignResult

func (*Client) WaitForShutdown

func (c *Client) WaitForShutdown()

type ConnConfig

type ConnConfig struct {
	// Host is the IP address and port of the RPC server you want to connect
	// to.
	Host string

	// Endpoint is the websocket endpoint on the RPC server.  This is
	// typically "ws".
	Endpoint string

	// User is the username to use to authenticate to the RPC server.
	User string

	// Pass is the passphrase to use to authenticate to the RPC server.
	Pass string

	// CookiePath is the path to a cookie file containing the username and
	// passphrase to use to authenticate to the RPC server.  It is used
	// instead of User and Pass if non-empty.
	CookiePath string

	// Params is the string representing the network that the server
	// is running. If there is no parameter set in the config, then
	// mainnet will be used by default.
	Params string

	// DisableTLS specifies whether transport layer security should be
	// disabled.  It is recommended to always use TLS if the RPC server
	// supports it as otherwise your username and password is sent across
	// the wire in cleartext.
	DisableTLS         bool
	InsecureSkipVerify bool

	// Certificates are the bytes for a PEM-encoded certificate chain used
	// for the TLS connection.  It has no effect if the DisableTLS parameter
	// is true.
	Certificates []byte

	// DisableAutoReconnect specifies the client should not automatically
	// try to reconnect to the server when it has been disconnected.
	DisableAutoReconnect bool

	// DisableConnectOnNew specifies that a websocket client connection
	// should not be tried when creating the client with New.  Instead, the
	// client is created and returned unconnected, and Connect must be
	// called manually.
	DisableConnectOnNew bool

	// HTTPPostMode instructs the client to run using multiple independent
	// connections issuing HTTP POST requests instead of using the default
	// of websockets.  Websockets are generally preferred as some of the
	// features of the client such notifications only work with websockets,
	// however, not all servers support the websocket extensions, so this
	// flag can be set to true to use basic HTTP POST requests instead.
	HTTPPostMode bool

	// ExtraHeaders specifies the extra headers when perform request. It's
	// useful when RPC provider need customized headers.
	ExtraHeaders map[string]string
	// contains filtered or unexported fields
}

type FutureBanlistResult

type FutureBanlistResult chan *response

func (FutureBanlistResult) Receive

func (r FutureBanlistResult) Receive() (*j.GetBanlistResult, error)

type FutureCheckAddressResult

type FutureCheckAddressResult chan *response

func (FutureCheckAddressResult) Receive

func (r FutureCheckAddressResult) Receive() (bool, error)

type FutureCreateRawTransactionResult

type FutureCreateRawTransactionResult chan *response

func (FutureCreateRawTransactionResult) Receive

type FutureDecodeRawTransactionResult

type FutureDecodeRawTransactionResult chan *response

func (FutureDecodeRawTransactionResult) Receive

type FutureGenerateCmdResult

type FutureGenerateCmdResult chan *response

func (FutureGenerateCmdResult) Receive

func (r FutureGenerateCmdResult) Receive() ([]string, error)

type FutureGetBestBlockHashResult

type FutureGetBestBlockHashResult chan *response

func (FutureGetBestBlockHashResult) Receive

func (r FutureGetBestBlockHashResult) Receive() (*hash.Hash, error)

type FutureGetBlockByNumResult

type FutureGetBlockByNumResult chan *response

func (FutureGetBlockByNumResult) Receive

func (r FutureGetBlockByNumResult) Receive(verbose bool, fullTx bool) (interface{}, error)

type FutureGetBlockByOrderResult

type FutureGetBlockByOrderResult chan *response

func (FutureGetBlockByOrderResult) Receive

func (r FutureGetBlockByOrderResult) Receive(verbose bool, fullTx bool) (interface{}, error)

type FutureGetBlockCountResult

type FutureGetBlockCountResult chan *response

func (FutureGetBlockCountResult) Receive

func (r FutureGetBlockCountResult) Receive() (int64, error)

type FutureGetBlockHashResult

type FutureGetBlockHashResult chan *response

func (FutureGetBlockHashResult) Receive

func (r FutureGetBlockHashResult) Receive() (*hash.Hash, error)

type FutureGetBlockHeaderResult

type FutureGetBlockHeaderResult chan *response

func (FutureGetBlockHeaderResult) Receive

func (r FutureGetBlockHeaderResult) Receive(verbose bool) (interface{}, error)

type FutureGetBlockResult

type FutureGetBlockResult chan *response

func (FutureGetBlockResult) Receive

func (r FutureGetBlockResult) Receive(verbose bool, fullTx bool) (interface{}, error)

type FutureGetBlockTemplateResult

type FutureGetBlockTemplateResult chan *response

func (FutureGetBlockTemplateResult) Receive

type FutureGetBlockTotalResult

type FutureGetBlockTotalResult chan *response

func (FutureGetBlockTotalResult) Receive

func (r FutureGetBlockTotalResult) Receive() (int64, error)

type FutureGetBlockV2Result

type FutureGetBlockV2Result chan *response

func (FutureGetBlockV2Result) Receive

func (r FutureGetBlockV2Result) Receive(verbose bool, fullTx bool) (interface{}, error)

type FutureGetBlockWeightResult

type FutureGetBlockWeightResult chan *response

func (FutureGetBlockWeightResult) Receive

func (r FutureGetBlockWeightResult) Receive() (int64, error)

type FutureGetBlockhashByRangeResult

type FutureGetBlockhashByRangeResult chan *response

func (FutureGetBlockhashByRangeResult) Receive

func (r FutureGetBlockhashByRangeResult) Receive() ([]*hash.Hash, error)

type FutureGetCoinbaseResult

type FutureGetCoinbaseResult chan *response

func (FutureGetCoinbaseResult) Receive

func (r FutureGetCoinbaseResult) Receive() ([]string, error)

type FutureGetFeesResult

type FutureGetFeesResult chan *response

func (FutureGetFeesResult) Receive

func (r FutureGetFeesResult) Receive() (int64, error)

type FutureGetMainChainHeightResult

type FutureGetMainChainHeightResult chan *response

func (FutureGetMainChainHeightResult) Receive

type FutureGetMempoolResult

type FutureGetMempoolResult chan *response

func (FutureGetMempoolResult) Receive

func (r FutureGetMempoolResult) Receive() ([]string, error)

type FutureGetNodeInfoResult

type FutureGetNodeInfoResult chan *response

func (FutureGetNodeInfoResult) Receive

type FutureGetOrphansTotalResult

type FutureGetOrphansTotalResult chan *response

func (FutureGetOrphansTotalResult) Receive

func (r FutureGetOrphansTotalResult) Receive() (int64, error)

type FutureGetPeerInfoResult

type FutureGetPeerInfoResult chan *response

func (FutureGetPeerInfoResult) Receive

type FutureGetRawTransactionResult

type FutureGetRawTransactionResult chan *response

func (FutureGetRawTransactionResult) Receive

func (r FutureGetRawTransactionResult) Receive(verbose bool) (interface{}, error)

type FutureGetRawTransactionsResult

type FutureGetRawTransactionsResult chan *response

func (FutureGetRawTransactionsResult) Receive

func (r FutureGetRawTransactionsResult) Receive(verbose bool) (interface{}, error)

type FutureGetRemoteGBTCmdResult

type FutureGetRemoteGBTCmdResult chan *response

func (FutureGetRemoteGBTCmdResult) Receive

type FutureGetRpcInfoResult

type FutureGetRpcInfoResult chan *response

func (FutureGetRpcInfoResult) Receive

type FutureGetTimeInfoResult

type FutureGetTimeInfoResult chan *response

func (FutureGetTimeInfoResult) Receive

func (r FutureGetTimeInfoResult) Receive() (string, error)

type FutureGetUtxoResult

type FutureGetUtxoResult chan *response

func (FutureGetUtxoResult) Receive

func (r FutureGetUtxoResult) Receive() (*j.GetUtxoResult, error)

type FutureIsBlueResult

type FutureIsBlueResult chan *response

func (FutureIsBlueResult) Receive

func (r FutureIsBlueResult) Receive() (int, error)

type FutureIsCurrentResult

type FutureIsCurrentResult chan *response

func (FutureIsCurrentResult) Receive

func (r FutureIsCurrentResult) Receive() (bool, error)

type FutureIsOnMainChainResult

type FutureIsOnMainChainResult chan *response

func (FutureIsOnMainChainResult) Receive

func (r FutureIsOnMainChainResult) Receive() (bool, error)

type FutureNotifyBlocksResult

type FutureNotifyBlocksResult chan *response

func (FutureNotifyBlocksResult) Receive

func (r FutureNotifyBlocksResult) Receive() error

type FutureNotifyNewTransactionsResult

type FutureNotifyNewTransactionsResult chan *response

func (FutureNotifyNewTransactionsResult) Receive

type FutureNotifyReceivedResult

type FutureNotifyReceivedResult chan *response

func (FutureNotifyReceivedResult) Receive

func (r FutureNotifyReceivedResult) Receive() error

type FutureRemoveBanResult

type FutureRemoveBanResult chan *response

func (FutureRemoveBanResult) Receive

func (r FutureRemoveBanResult) Receive() (bool, error)

type FutureSendRawTransactionResult

type FutureSendRawTransactionResult chan *response

func (FutureSendRawTransactionResult) Receive

type FutureSetLogLevelResult

type FutureSetLogLevelResult chan *response

func (FutureSetLogLevelResult) Receive

func (r FutureSetLogLevelResult) Receive() (string, error)

type FutureSetRpcMaxClientsResult

type FutureSetRpcMaxClientsResult chan *response

func (FutureSetRpcMaxClientsResult) Receive

func (r FutureSetRpcMaxClientsResult) Receive() (int, error)

type FutureStopNotifyNewTransactionsResult

type FutureStopNotifyNewTransactionsResult chan *response

func (FutureStopNotifyNewTransactionsResult) Receive

type FutureStopResult

type FutureStopResult chan *response

func (FutureStopResult) Receive

func (r FutureStopResult) Receive() (string, error)

type FutureSubmitBlockHeaderResult

type FutureSubmitBlockHeaderResult chan *response

func (FutureSubmitBlockHeaderResult) Receive

type FutureSubmitBlockResult

type FutureSubmitBlockResult chan *response

func (FutureSubmitBlockResult) Receive

func (r FutureSubmitBlockResult) Receive() (string, error)

type FutureTipsResult

type FutureTipsResult chan *response

func (FutureTipsResult) Receive

func (r FutureTipsResult) Receive() ([]string, error)

type FutureTxSignResult

type FutureTxSignResult chan *response

func (FutureTxSignResult) Receive

func (r FutureTxSignResult) Receive() (string, error)

type NotificationHandlers

type NotificationHandlers struct {
	OnClientConnected   func()
	OnBlockConnected    func(hash *hash.Hash, height, order int64, t time.Time, txs []*types.Transaction)
	OnBlockDisconnected func(hash *hash.Hash, height, order int64, t time.Time, txs []*types.Transaction)
	OnBlockAccepted     func(hash *hash.Hash, height, order int64, t time.Time, txs []*types.Transaction)
	OnReorganization    func(hash *hash.Hash, order int64, olds []*hash.Hash)
	OnTxAccepted        func(hash *hash.Hash, amounts types.AmountGroup)
	OnTxAcceptedVerbose func(c *Client, tx *j.DecodeRawTransactionResult)
	OnTxConfirm         func(txConfirm *cmds.TxConfirmResult)
	OnRescanProgress    func(param *cmds.RescanProgressNtfn)
	OnRescanFinish      func(param *cmds.RescanFinishedNtfn)
	OnNodeExit          func(nodeExit *cmds.NodeExitNtfn)
	OnBlockTemplate     func(bt *j.RemoteGBTResult)

	OnUnknownNotification func(method string, params []json.RawMessage)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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