ncrpcclient

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: ISC Imports: 5 Imported by: 4

README

ncrpcclient

ncrpcclient is a companion package to Conformal's rpcclient, which adds Namecoin-specific RPC methods.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rpcclient.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) NameScan

func (c *Client) NameScan(start string, count uint32) (ncbtcjson.NameScanResult, error)

NameScan returns detailed information about a list of names.

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

type FutureNameScanResult chan *rpcclient.Response

FutureNameScanResult is a future promise to deliver the result of a NameScanAsync RPC invocation (or an applicable error).

func (FutureNameScanResult) Receive

Receive waits for the Response promised by the future and returns detailed information about a list of names.

type FutureNameShowResult

type FutureNameShowResult chan *rpcclient.Response

FutureNameShowResult is a future promise to deliver the result of a NameShowAsync RPC invocation (or an applicable error).

func (FutureNameShowResult) Receive

Receive waits for the Response promised by the future and returns detailed information about a name.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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