ncbtcjson

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: 1 Imported by: 9

README

ncbtcjson

ncbtcjson is a companion package to Conformal's btcjson, 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 Encoding

type Encoding string

Encoding represents an encoding for name identifiers and values.

const (
	ASCII Encoding = "ascii"
	UTF8  Encoding = "utf8"
	Hex   Encoding = "hex"
)

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"`
	RegExp        *string  `json:"regexp,omitempty"`
	Prefix        string   `json:"prefix,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"`
	Address       string   `json:"address"`
	Vout          uint32   `json:"vout"`
	Height        int32    `json:"height"`
	ExpiresIn     int32    `json:"expires_in"`
	IsMine        bool     `json:"ismine"`
	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