ncbtcjson

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: ISC Imports: 1 Imported by: 0

README

ncbtcjson

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

Documentation

Index

Constants

View Source
const (
	Ascii Encoding = "ascii"
	Utf8           = "utf8"
	Hex            = "hex"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoding

type Encoding string

Encoding represents an encoding for name identifiers and values.

type NameScanCmd

type NameScanCmd struct {
	Start   string
	Count   *uint32
	Options *NameScanOptions
}

NameScanCmd defines the name_scan JSON-RPC command.

func NewNameScanCmd

func NewNameScanCmd(start string, count *uint32, options *NameScanOptions) *NameScanCmd

NewNameScanCmd returns a new instance which can be used to issue a name_scan JSON-RPC command.

The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default value.

type NameScanOptions

type NameScanOptions struct {
	NameEncoding  Encoding `json:"nameEncoding,omitempty"`
	ValueEncoding Encoding `json:"valueEncoding,omitempty"`
	MinConf       *int32   `json:"minConf,omitempty"`
	MaxConf       *int32   `json:"maxConf,omitempty"`
	Prefix        string   `json:"prefix,omitempty"`
	RegExp        *string  `json:"regexp,omitempty"`
}

NameScanOptions represents the optional options struct provided with a NameScanCmd command.

type NameScanResult

type NameScanResult []NameShowResult

NameScanResult models the data from the name_scan command.

type NameShowCmd

type NameShowCmd struct {
	Name    string
	Options *NameShowOptions
}

NameShowCmd defines the name_show JSON-RPC command.

func NewNameShowCmd

func NewNameShowCmd(name string, options *NameShowOptions) *NameShowCmd

NewNameShowCmd returns a new instance which can be used to issue a name_show JSON-RPC command.

The parameters which are pointers indicate they are optional. Passing nil for optional parameters will use the default value.

type NameShowOptions

type NameShowOptions struct {
	NameEncoding  Encoding `json:"nameEncoding,omitempty"`
	ValueEncoding Encoding `json:"valueEncoding,omitempty"`
	StreamID      string   `json:"streamID,omitempty"`
}

NameShowOptions represents the optional options struct provided with a NameShowCmd command.

type NameShowResult

type NameShowResult struct {
	Name          string   `json:"name"`
	NameEncoding  Encoding `json:"name_encoding"`
	NameError     string   `json:"name_error"`
	Value         string   `json:"value"`
	ValueEncoding Encoding `json:"value_encoding"`
	ValueError    string   `json:"value_error"`
	TxID          string   `json:"txid"`
	Vout          uint32   `json:"vout"`
	Address       string   `json:"address"`
	IsMine        bool     `json:"ismine"`
	Height        int32    `json:"height"`
	ExpiresIn     int32    `json:"expires_in"`
	Expired       bool     `json:"expired"`
}

NameShowResult models the data from the name_show command.

Jump to

Keyboard shortcuts

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