Documentation ¶
Index ¶
- type Client
- func (c *Client) NameScan(start string, count uint32) (ncbtcjson.NameScanResult, error)
- func (c *Client) NameScanAsync(start string, count uint32) FutureNameScanResult
- func (c *Client) NameShow(name string, options *ncbtcjson.NameShowOptions) (*ncbtcjson.NameShowResult, error)
- func (c *Client) NameShowAsync(name string, options *ncbtcjson.NameShowOptions) FutureNameShowResult
- type FutureNameScanResult
- type FutureNameShowResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a Namecoin RPC client which allows easy access to the various RPC methods available on a Namecoin RPC server. Each of the wrapper functions handle the details of converting the passed and return types to and from the underlying JSON types which are required for the JSON-RPC invocations
The client provides each RPC in both synchronous (blocking) and asynchronous (non-blocking) forms. The asynchronous forms are based on the concept of futures where they return an instance of a type that promises to deliver the result of the invocation at some future time. Invoking the Receive method on the returned future will block until the result is available if it's not already.
func New ¶
func New(config *rpcclient.ConnConfig, ntfnHandlers *rpcclient.NotificationHandlers) (*Client, error)
New creates a new RPC client based on the provided connection configuration details. The notification handlers parameter may be nil if you are not interested in receiving notifications and will be ignored if the configuration is set to run in HTTP POST mode.
func (*Client) NameScanAsync ¶
func (c *Client) NameScanAsync(start string, count uint32) FutureNameScanResult
NameScanAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.
See NameScan for the blocking version and more details.
func (*Client) NameShow ¶
func (c *Client) NameShow(name string, options *ncbtcjson.NameShowOptions) (*ncbtcjson.NameShowResult, error)
NameShow returns detailed information about a name.
func (*Client) NameShowAsync ¶
func (c *Client) NameShowAsync(name string, options *ncbtcjson.NameShowOptions) FutureNameShowResult
NameShowAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.
See NameShow for the blocking version and more details.
type FutureNameScanResult ¶
FutureNameScanResult is a future promise to deliver the result of a NameScanAsync RPC invocation (or an applicable error).
func (FutureNameScanResult) Receive ¶
func (r FutureNameScanResult) Receive() (ncbtcjson.NameScanResult, error)
Receive waits for the Response promised by the future and returns detailed information about a list of names.
type FutureNameShowResult ¶
FutureNameShowResult is a future promise to deliver the result of a NameShowAsync RPC invocation (or an applicable error).
func (FutureNameShowResult) Receive ¶
func (r FutureNameShowResult) Receive() (*ncbtcjson.NameShowResult, error)
Receive waits for the Response promised by the future and returns detailed information about a name.