Documentation ¶
Index ¶
- Variables
- func UseLogger(logger l.Logger)
- type Client
- func (c *Client) Banlist() (*j.GetBanlistResult, error)
- func (c *Client) BanlistAsync() FutureBanlistResult
- func (c *Client) CheckAddress(address string, network string) (bool, error)
- func (c *Client) CheckAddressAsync(address string, network string) FutureCheckAddressResult
- func (c *Client) CreateRawTransaction(inputs []j.TransactionInput, amounts j.Amounts, lockTime int64) (string, error)
- func (c *Client) CreateRawTransactionAsync(inputs []j.TransactionInput, amounts j.Amounts, lockTime int64) FutureCreateRawTransactionResult
- func (c *Client) DecodeRawTransaction(hexTx string) (*j.DecodeRawTransactionResult, error)
- func (c *Client) DecodeRawTransactionAsync(hexTx string) FutureDecodeRawTransactionResult
- func (c *Client) Disconnect()
- func (c *Client) Disconnected() bool
- func (c *Client) Generate(numBlocks uint32, powType pow.PowType) ([]string, error)
- func (c *Client) GenerateAsync(numBlocks uint32, powType pow.PowType) FutureGenerateCmdResult
- func (c *Client) GetBestBlockHash() (*hash.Hash, error)
- func (c *Client) GetBestBlockHashAsync() FutureGetBestBlockHashResult
- func (c *Client) GetBlock(h string, verbose bool, inclTx bool, fullTx bool) (interface{}, error)
- func (c *Client) GetBlockAsync(h string, verbose bool, inclTx bool, fullTx bool) FutureGetBlockResult
- func (c *Client) GetBlockByID(id uint, verbose bool, inclTx bool, fullTx bool) (interface{}, error)
- func (c *Client) GetBlockByIDAsync(id uint, verbose bool, inclTx bool, fullTx bool) FutureGetBlockByNumResult
- func (c *Client) GetBlockByIDFullTx(id uint, inclTx bool) (*j.BlockVerboseResult, error)
- func (c *Client) GetBlockByIDRaw(id uint, inclTx bool) (string, error)
- func (c *Client) GetBlockByIDSimpleTx(id uint, inclTx bool) (*j.BlockResult, error)
- func (c *Client) GetBlockByNum(id uint, verbose bool, inclTx bool, fullTx bool) (interface{}, error)
- func (c *Client) GetBlockByNumAsync(id uint, verbose bool, inclTx bool, fullTx bool) FutureGetBlockByNumResult
- func (c *Client) GetBlockByNumFullTx(id uint, inclTx bool) (*j.BlockVerboseResult, error)
- func (c *Client) GetBlockByNumRaw(id uint, inclTx bool) (string, error)
- func (c *Client) GetBlockByNumSimpleTx(id uint, inclTx bool) (*j.BlockResult, error)
- func (c *Client) GetBlockByOrder(order uint, verbose bool, inclTx bool, fullTx bool) (interface{}, error)
- func (c *Client) GetBlockByOrderAsync(order uint, verbose bool, inclTx bool, fullTx bool) FutureGetBlockByOrderResult
- func (c *Client) GetBlockByOrderFullTx(order uint, inclTx bool) (*j.BlockVerboseResult, error)
- func (c *Client) GetBlockByOrderRaw(order uint, inclTx bool) (string, error)
- func (c *Client) GetBlockByOrderSimpleTx(order uint, inclTx bool) (*j.BlockResult, error)
- func (c *Client) GetBlockCount() (int64, error)
- func (c *Client) GetBlockCountAsync() FutureGetBlockCountResult
- func (c *Client) GetBlockFullTx(h string, inclTx bool) (*j.BlockVerboseResult, error)
- func (c *Client) GetBlockHash(order uint) (*hash.Hash, error)
- func (c *Client) GetBlockHashAsync(order uint) FutureGetBlockHashResult
- func (c *Client) GetBlockHeader(hash string, verbose bool) (interface{}, error)
- func (c *Client) GetBlockHeaderAsync(hash string, verbose bool) FutureGetBlockHeaderResult
- func (c *Client) GetBlockHeaderRaw(hash string) (string, error)
- func (c *Client) GetBlockHeaderVerbose(hash string) (*j.GetBlockHeaderVerboseResult, error)
- func (c *Client) GetBlockRaw(h string, inclTx bool) (string, error)
- func (c *Client) GetBlockSimpleTx(h string, inclTx bool) (*j.BlockResult, error)
- func (c *Client) GetBlockTemplate(capabilities []string, powType byte) (*j.GetBlockTemplateResult, error)
- func (c *Client) GetBlockTemplateAsync(capabilities []string, powType byte) FutureGetBlockTemplateResult
- func (c *Client) GetBlockTotal() (int64, error)
- func (c *Client) GetBlockTotalAsync() FutureGetBlockTotalResult
- func (c *Client) GetBlockV2(h string, verbose bool, inclTx bool, fullTx bool) (interface{}, error)
- func (c *Client) GetBlockV2Async(h string, verbose bool, inclTx bool, fullTx bool) FutureGetBlockResult
- func (c *Client) GetBlockV2FullTx(h string, inclTx bool) (*j.BlockVerboseResult, error)
- func (c *Client) GetBlockV2Raw(h string, inclTx bool) (string, error)
- func (c *Client) GetBlockV2SimpleTx(h string, inclTx bool) (*j.BlockResult, error)
- func (c *Client) GetBlockWeight(h string) (int64, error)
- func (c *Client) GetBlockWeightAsync(h string) FutureGetBlockWeightResult
- func (c *Client) GetBlockhashByRange(start uint, end uint) ([]*hash.Hash, error)
- func (c *Client) GetBlockhashByRangeAsync(start uint, end uint) FutureGetBlockhashByRangeResult
- func (c *Client) GetCoinbase() ([]string, error)
- func (c *Client) GetCoinbaseAsync() FutureGetCoinbaseResult
- func (c *Client) GetFees(h string) (int64, error)
- func (c *Client) GetFeesAsync(h string) FutureGetFeesResult
- func (c *Client) GetGetTimeInfoAsync() FutureGetTimeInfoResult
- func (c *Client) GetMainChainHeight() (int64, error)
- func (c *Client) GetMainChainHeightAsync() FutureGetMainChainHeightResult
- func (c *Client) GetMempool(txType string, verbose bool) ([]string, error)
- func (c *Client) GetMempoolAsync(txType string, verbose bool) FutureGetMempoolResult
- func (c *Client) GetNodeInfo() (*j.InfoNodeResult, error)
- func (c *Client) GetNodeInfoAsync() FutureGetNodeInfoResult
- func (c *Client) GetOrphansTotal() (int64, error)
- func (c *Client) GetOrphansTotalAsync() FutureGetOrphansTotalResult
- func (c *Client) GetPeerInfo() ([]j.GetPeerInfoResult, error)
- func (c *Client) GetPeerInfoAsync() FutureGetPeerInfoResult
- func (c *Client) GetRawTransaction(txHash string, verbose bool) (interface{}, error)
- func (c *Client) GetRawTransactionAsync(txHash string, verbose bool) FutureGetRawTransactionResult
- func (c *Client) GetRawTransactionRaw(txHash string) (string, error)
- func (c *Client) GetRawTransactionVerbose(txHash string) (*j.TxRawResult, error)
- func (c *Client) GetRawTransactions(addre string, vinext bool, count uint, skip uint, revers bool, verbose bool, ...) (interface{}, error)
- func (c *Client) GetRawTransactionsAsync(addre string, vinext bool, count uint, skip uint, revers bool, verbose bool, ...) FutureGetRawTransactionsResult
- func (c *Client) GetRawTransactionsRaw(addre string, vinext bool, count uint, skip uint, revers bool, ...) ([]string, error)
- func (c *Client) GetRawTransactionsVerbose(addre string, vinext bool, count uint, skip uint, revers bool, ...) ([]j.GetRawTransactionsResult, error)
- func (c *Client) GetRemoteGBT(powType pow.PowType) (*types.BlockHeader, error)
- func (c *Client) GetRemoteGBTAsync(powType pow.PowType) FutureGetRemoteGBTCmdResult
- func (c *Client) GetRpcInfo() (*cmds.JsonRequestStatus, error)
- func (c *Client) GetRpcInfoAsync() FutureGetRpcInfoResult
- func (c *Client) GetTimeInfo() (string, error)
- func (c *Client) GetUtxo(txHash string, vout uint32, includeMempool bool) (*j.GetUtxoResult, error)
- func (c *Client) GetUtxoAsync(txHash string, vout uint32, includeMempool bool) FutureGetUtxoResult
- func (c *Client) IsBlue(h string) (int, error)
- func (c *Client) IsBlueAsync(h string) FutureIsBlueResult
- func (c *Client) IsCurrent() (bool, error)
- func (c *Client) IsCurrentAsync() FutureIsCurrentResult
- func (c *Client) IsOnMainChain(h string) (bool, error)
- func (c *Client) IsOnMainChainAsync(h string) FutureIsOnMainChainResult
- func (c *Client) NextID() uint64
- func (c *Client) NotifyBlocks() error
- func (c *Client) NotifyBlocksAsync() FutureNotifyBlocksResult
- func (c *Client) NotifyNewTransactions(verbose bool) error
- func (c *Client) NotifyNewTransactionsAsync(verbose bool) FutureNotifyNewTransactionsResult
- func (c *Client) NotifyReceived(addresses []types.Address) error
- func (c *Client) NotifyReceivedAsync(addresses []types.Address) FutureNotifyReceivedResult
- func (c *Client) NotifyTxsByAddr(reload bool, addr []string, outpoint []cmds.OutPoint) error
- func (c *Client) NotifyTxsByAddrAsync(reload bool, addr []string, outpoint []cmds.OutPoint) FutureNotifyBlocksResult
- func (c *Client) NotifyTxsConfirmed(txs []cmds.TxConfirm) error
- func (c *Client) NotifyTxsConfirmedAsync(txs []cmds.TxConfirm) FutureNotifyBlocksResult
- func (c *Client) RemoveBan(id string) (bool, error)
- func (c *Client) RemoveBanAsync(id string) FutureRemoveBanResult
- func (c *Client) RemoveTxsConfirmed(txs []cmds.TxConfirm) error
- func (c *Client) RemoveTxsConfirmedAsync(txs []cmds.TxConfirm) FutureNotifyBlocksResult
- func (c *Client) Rescan(beginBlock, endBlock uint64, addrs []string, op []cmds.OutPoint) error
- func (c *Client) RescanAsync(beginBlock, endBlock uint64, addrs []string, op []cmds.OutPoint) FutureNotifyBlocksResult
- func (c *Client) SendRawTransaction(hexTx string, allowHighFees bool) (*hash.Hash, error)
- func (c *Client) SendRawTransactionAsync(hexTx string, allowHighFees bool) FutureSendRawTransactionResult
- func (c *Client) SetLogLevel(level string) (string, error)
- func (c *Client) SetLogLevelAsync(level string) FutureSetLogLevelResult
- func (c *Client) SetRpcMaxClients(max int) (int, error)
- func (c *Client) SetRpcMaxClientsAsync(max int) FutureSetRpcMaxClientsResult
- func (c *Client) Shutdown()
- func (c *Client) Stop() (string, error)
- func (c *Client) StopAsync() FutureStopResult
- func (c *Client) StopNotifyBlocks() error
- func (c *Client) StopNotifyBlocksAsync() FutureNotifyBlocksResult
- func (c *Client) StopNotifyNewTransactions() error
- func (c *Client) StopNotifyNewTransactionsAsync() FutureStopNotifyNewTransactionsResult
- func (c *Client) StopNotifyTxsByAddr(addr []string) error
- func (c *Client) StopNotifyTxsByAddrAsync(addr []string) FutureNotifyBlocksResult
- func (c *Client) SubmitBlock(hexBlock string) (string, error)
- func (c *Client) SubmitBlockAsync(hexBlock string) FutureSubmitBlockResult
- func (c *Client) SubmitBlockHeader(header *types.BlockHeader) (*j.SubmitBlockResult, error)
- func (c *Client) SubmitBlockHeaderAsync(header *types.BlockHeader) FutureSubmitBlockHeaderResult
- func (c *Client) Tips() ([]string, error)
- func (c *Client) TipsAsync() FutureTipsResult
- func (c *Client) TxSign(privkeyStr string, rawTxStr string) (string, error)
- func (c *Client) TxSignAsync(privkeyStr string, rawTxStr string) FutureTxSignResult
- func (c *Client) WaitForShutdown()
- type ConnConfig
- type FutureBanlistResult
- type FutureCheckAddressResult
- type FutureCreateRawTransactionResult
- type FutureDecodeRawTransactionResult
- type FutureGenerateCmdResult
- type FutureGetBestBlockHashResult
- type FutureGetBlockByNumResult
- type FutureGetBlockByOrderResult
- type FutureGetBlockCountResult
- type FutureGetBlockHashResult
- type FutureGetBlockHeaderResult
- type FutureGetBlockResult
- type FutureGetBlockTemplateResult
- type FutureGetBlockTotalResult
- type FutureGetBlockV2Result
- type FutureGetBlockWeightResult
- type FutureGetBlockhashByRangeResult
- type FutureGetCoinbaseResult
- type FutureGetFeesResult
- type FutureGetMainChainHeightResult
- type FutureGetMempoolResult
- type FutureGetNodeInfoResult
- type FutureGetOrphansTotalResult
- type FutureGetPeerInfoResult
- type FutureGetRawTransactionResult
- type FutureGetRawTransactionsResult
- type FutureGetRemoteGBTCmdResult
- type FutureGetRpcInfoResult
- type FutureGetTimeInfoResult
- type FutureGetUtxoResult
- type FutureIsBlueResult
- type FutureIsCurrentResult
- type FutureIsOnMainChainResult
- type FutureNotifyBlocksResult
- type FutureNotifyNewTransactionsResult
- type FutureNotifyReceivedResult
- type FutureRemoveBanResult
- type FutureSendRawTransactionResult
- type FutureSetLogLevelResult
- type FutureSetRpcMaxClientsResult
- type FutureStopNotifyNewTransactionsResult
- type FutureStopResult
- type FutureSubmitBlockHeaderResult
- type FutureSubmitBlockResult
- type FutureTipsResult
- type FutureTxSignResult
- type NotificationHandlers
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 ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(config *ConnConfig, ntfnHandlers *NotificationHandlers) (*Client, error)
func (*Client) BanlistAsync ¶
func (c *Client) BanlistAsync() FutureBanlistResult
func (*Client) CheckAddress ¶
func (*Client) CheckAddressAsync ¶
func (c *Client) CheckAddressAsync(address string, network string) FutureCheckAddressResult
func (*Client) CreateRawTransaction ¶
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 (*Client) GenerateAsync ¶
func (c *Client) GenerateAsync(numBlocks uint32, powType pow.PowType) FutureGenerateCmdResult
func (*Client) GetBestBlockHashAsync ¶
func (c *Client) GetBestBlockHashAsync() FutureGetBestBlockHashResult
func (*Client) GetBlockAsync ¶
func (*Client) GetBlockByID ¶
func (*Client) GetBlockByIDAsync ¶
func (*Client) GetBlockByIDFullTx ¶
func (*Client) GetBlockByIDRaw ¶
func (*Client) GetBlockByIDSimpleTx ¶
func (*Client) GetBlockByNum ¶
func (*Client) GetBlockByNumAsync ¶
func (*Client) GetBlockByNumFullTx ¶
func (*Client) GetBlockByNumRaw ¶
func (*Client) GetBlockByNumSimpleTx ¶
func (*Client) GetBlockByOrder ¶
func (*Client) GetBlockByOrderAsync ¶
func (*Client) GetBlockByOrderFullTx ¶
func (*Client) GetBlockByOrderRaw ¶
func (*Client) GetBlockByOrderSimpleTx ¶
func (*Client) GetBlockCount ¶
func (*Client) GetBlockCountAsync ¶
func (c *Client) GetBlockCountAsync() FutureGetBlockCountResult
func (*Client) GetBlockFullTx ¶
func (*Client) GetBlockHashAsync ¶
func (c *Client) GetBlockHashAsync(order uint) FutureGetBlockHashResult
func (*Client) GetBlockHeader ¶
func (*Client) GetBlockHeaderAsync ¶
func (c *Client) GetBlockHeaderAsync(hash string, verbose bool) FutureGetBlockHeaderResult
func (*Client) GetBlockHeaderVerbose ¶
func (c *Client) GetBlockHeaderVerbose(hash string) (*j.GetBlockHeaderVerboseResult, error)
func (*Client) GetBlockSimpleTx ¶
func (*Client) GetBlockTemplate ¶
func (*Client) GetBlockTemplateAsync ¶
func (c *Client) GetBlockTemplateAsync(capabilities []string, powType byte) FutureGetBlockTemplateResult
func (*Client) GetBlockTotal ¶
func (*Client) GetBlockTotalAsync ¶
func (c *Client) GetBlockTotalAsync() FutureGetBlockTotalResult
func (*Client) GetBlockV2 ¶
func (*Client) GetBlockV2Async ¶
func (*Client) GetBlockV2FullTx ¶
func (*Client) GetBlockV2Raw ¶
func (*Client) GetBlockV2SimpleTx ¶
func (*Client) GetBlockWeightAsync ¶
func (c *Client) GetBlockWeightAsync(h string) FutureGetBlockWeightResult
func (*Client) GetBlockhashByRange ¶
func (*Client) GetBlockhashByRangeAsync ¶
func (c *Client) GetBlockhashByRangeAsync(start uint, end uint) FutureGetBlockhashByRangeResult
func (*Client) GetCoinbase ¶
func (*Client) GetCoinbaseAsync ¶
func (c *Client) GetCoinbaseAsync() FutureGetCoinbaseResult
func (*Client) GetFeesAsync ¶
func (c *Client) GetFeesAsync(h string) FutureGetFeesResult
func (*Client) GetGetTimeInfoAsync ¶
func (c *Client) GetGetTimeInfoAsync() FutureGetTimeInfoResult
func (*Client) GetMainChainHeight ¶
func (*Client) GetMainChainHeightAsync ¶
func (c *Client) GetMainChainHeightAsync() FutureGetMainChainHeightResult
func (*Client) GetMempool ¶
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 (*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 (*Client) GetRawTransactionAsync ¶
func (c *Client) GetRawTransactionAsync(txHash string, verbose bool) FutureGetRawTransactionResult
func (*Client) GetRawTransactionRaw ¶
func (*Client) GetRawTransactionVerbose ¶
func (c *Client) GetRawTransactionVerbose(txHash string) (*j.TxRawResult, error)
func (*Client) GetRawTransactions ¶
func (*Client) GetRawTransactionsAsync ¶
func (*Client) GetRawTransactionsRaw ¶
func (*Client) GetRawTransactionsVerbose ¶
func (*Client) GetRemoteGBT ¶
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 (*Client) GetUtxoAsync ¶
func (c *Client) GetUtxoAsync(txHash string, vout uint32, includeMempool bool) FutureGetUtxoResult
func (*Client) IsBlueAsync ¶
func (c *Client) IsBlueAsync(h string) FutureIsBlueResult
func (*Client) IsCurrentAsync ¶
func (c *Client) IsCurrentAsync() FutureIsCurrentResult
func (*Client) IsOnMainChainAsync ¶
func (c *Client) IsOnMainChainAsync(h string) FutureIsOnMainChainResult
func (*Client) NotifyBlocks ¶
func (*Client) NotifyBlocksAsync ¶
func (c *Client) NotifyBlocksAsync() FutureNotifyBlocksResult
func (*Client) NotifyNewTransactions ¶
func (*Client) NotifyNewTransactionsAsync ¶
func (c *Client) NotifyNewTransactionsAsync(verbose bool) FutureNotifyNewTransactionsResult
func (*Client) NotifyReceivedAsync ¶
func (c *Client) NotifyReceivedAsync(addresses []types.Address) FutureNotifyReceivedResult
func (*Client) NotifyTxsByAddr ¶
func (*Client) NotifyTxsByAddrAsync ¶
func (*Client) NotifyTxsConfirmedAsync ¶
func (c *Client) NotifyTxsConfirmedAsync(txs []cmds.TxConfirm) FutureNotifyBlocksResult
func (*Client) RemoveBanAsync ¶
func (c *Client) RemoveBanAsync(id string) FutureRemoveBanResult
func (*Client) RemoveTxsConfirmedAsync ¶
func (c *Client) RemoveTxsConfirmedAsync(txs []cmds.TxConfirm) FutureNotifyBlocksResult
func (*Client) RescanAsync ¶
func (*Client) SendRawTransaction ¶
func (*Client) SendRawTransactionAsync ¶
func (c *Client) SendRawTransactionAsync(hexTx string, allowHighFees bool) FutureSendRawTransactionResult
func (*Client) SetLogLevelAsync ¶
func (c *Client) SetLogLevelAsync(level string) FutureSetLogLevelResult
func (*Client) SetRpcMaxClientsAsync ¶
func (c *Client) SetRpcMaxClientsAsync(max int) FutureSetRpcMaxClientsResult
func (*Client) StopAsync ¶
func (c *Client) StopAsync() FutureStopResult
func (*Client) StopNotifyBlocks ¶
func (*Client) StopNotifyBlocksAsync ¶
func (c *Client) StopNotifyBlocksAsync() FutureNotifyBlocksResult
func (*Client) StopNotifyNewTransactions ¶
func (*Client) StopNotifyNewTransactionsAsync ¶
func (c *Client) StopNotifyNewTransactionsAsync() FutureStopNotifyNewTransactionsResult
func (*Client) StopNotifyTxsByAddr ¶
func (*Client) StopNotifyTxsByAddrAsync ¶
func (c *Client) StopNotifyTxsByAddrAsync(addr []string) FutureNotifyBlocksResult
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) TipsAsync ¶
func (c *Client) TipsAsync() FutureTipsResult
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 ¶
func (r FutureCreateRawTransactionResult) Receive() (string, error)
type FutureDecodeRawTransactionResult ¶
type FutureDecodeRawTransactionResult chan *response
func (FutureDecodeRawTransactionResult) Receive ¶
func (r FutureDecodeRawTransactionResult) Receive() (*j.DecodeRawTransactionResult, error)
type FutureGenerateCmdResult ¶
type FutureGenerateCmdResult chan *response
func (FutureGenerateCmdResult) Receive ¶
func (r FutureGenerateCmdResult) Receive() ([]string, error)
type FutureGetBestBlockHashResult ¶
type FutureGetBestBlockHashResult chan *response
type FutureGetBlockByNumResult ¶
type FutureGetBlockByNumResult chan *response
type FutureGetBlockByOrderResult ¶
type FutureGetBlockByOrderResult chan *response
type FutureGetBlockCountResult ¶
type FutureGetBlockCountResult chan *response
func (FutureGetBlockCountResult) Receive ¶
func (r FutureGetBlockCountResult) Receive() (int64, error)
type FutureGetBlockHashResult ¶
type FutureGetBlockHashResult chan *response
type FutureGetBlockHeaderResult ¶
type FutureGetBlockHeaderResult chan *response
func (FutureGetBlockHeaderResult) Receive ¶
func (r FutureGetBlockHeaderResult) Receive(verbose bool) (interface{}, error)
type FutureGetBlockResult ¶
type FutureGetBlockResult chan *response
type FutureGetBlockTemplateResult ¶
type FutureGetBlockTemplateResult chan *response
func (FutureGetBlockTemplateResult) Receive ¶
func (r FutureGetBlockTemplateResult) Receive() (*j.GetBlockTemplateResult, error)
type FutureGetBlockTotalResult ¶
type FutureGetBlockTotalResult chan *response
func (FutureGetBlockTotalResult) Receive ¶
func (r FutureGetBlockTotalResult) Receive() (int64, error)
type FutureGetBlockV2Result ¶
type FutureGetBlockV2Result chan *response
type FutureGetBlockWeightResult ¶
type FutureGetBlockWeightResult chan *response
func (FutureGetBlockWeightResult) Receive ¶
func (r FutureGetBlockWeightResult) Receive() (int64, error)
type FutureGetBlockhashByRangeResult ¶
type FutureGetBlockhashByRangeResult chan *response
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 ¶
func (r FutureGetMainChainHeightResult) Receive() (int64, error)
type FutureGetMempoolResult ¶
type FutureGetMempoolResult chan *response
func (FutureGetMempoolResult) Receive ¶
func (r FutureGetMempoolResult) Receive() ([]string, error)
type FutureGetNodeInfoResult ¶
type FutureGetNodeInfoResult chan *response
func (FutureGetNodeInfoResult) Receive ¶
func (r FutureGetNodeInfoResult) Receive() (*j.InfoNodeResult, error)
type FutureGetOrphansTotalResult ¶
type FutureGetOrphansTotalResult chan *response
func (FutureGetOrphansTotalResult) Receive ¶
func (r FutureGetOrphansTotalResult) Receive() (int64, error)
type FutureGetPeerInfoResult ¶
type FutureGetPeerInfoResult chan *response
func (FutureGetPeerInfoResult) Receive ¶
func (r FutureGetPeerInfoResult) Receive() ([]j.GetPeerInfoResult, error)
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 ¶
func (r FutureGetRemoteGBTCmdResult) Receive() (*types.BlockHeader, error)
type FutureGetRpcInfoResult ¶
type FutureGetRpcInfoResult chan *response
func (FutureGetRpcInfoResult) Receive ¶
func (r FutureGetRpcInfoResult) Receive() (*cmds.JsonRequestStatus, error)
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 ¶
func (r FutureNotifyNewTransactionsResult) Receive() error
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
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 ¶
func (r FutureStopNotifyNewTransactionsResult) Receive() error
type FutureStopResult ¶
type FutureStopResult chan *response
func (FutureStopResult) Receive ¶
func (r FutureStopResult) Receive() (string, error)
type FutureSubmitBlockHeaderResult ¶
type FutureSubmitBlockHeaderResult chan *response
func (FutureSubmitBlockHeaderResult) Receive ¶
func (r FutureSubmitBlockHeaderResult) Receive() (*j.SubmitBlockResult, error)
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) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.