gonero

package module
v0.0.0-...-fdba41f Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 15 Imported by: 0

README

gonero

Golang Monero RPC client

WORK IN PROGRESS

Build Status Linter Status Coverage Status Go Report Card MIT licensed Godoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// contains filtered or unexported fields
}

Address is a Monero address

func NewAddress

func NewAddress(addr string) *Address

NewAddress creates a new Address struct from a hex address string

func (*Address) CheckPrivateSpendKey

func (a *Address) CheckPrivateSpendKey(key string) bool

CheckPrivateSpendKey checks if private spend key matches this address.

func (*Address) CheckPrivateViewKey

func (a *Address) CheckPrivateViewKey(key string) bool

CheckPrivateViewKey checks if private view key matches this address.

func (*Address) IsMainnet

func (b *Address) IsMainnet() bool

func (*Address) IsStagenet

func (b *Address) IsStagenet() bool

func (*Address) IsTestnet

func (b *Address) IsTestnet() bool

func (*Address) Net

func (b *Address) Net() string

func (*Address) SpendKey

func (b *Address) SpendKey() string

func (*Address) Valid

func (b *Address) Valid() bool

func (*Address) ViewKey

func (b *Address) ViewKey() string

func (*Address) WithPaymentID

func (a *Address) WithPaymentID(paymentID string) *IntegratedAddress

WithPaymentID creates a new integrated address with the given hex string payment ID

type AtomicXMR

type AtomicXMR uint64

AtomicXMR is XMR currency units

func (AtomicXMR) Decimal

func (a AtomicXMR) Decimal() string

Decimal converts XMR amount in atomic units to decimal string

func (AtomicXMR) Float

func (a AtomicXMR) Float() FloatXMR

Float converts XMR amount in atomic units to float format of XMR

type FloatXMR

type FloatXMR float64

FloatXMR is

func (FloatXMR) Atomic

func (f FloatXMR) Atomic() AtomicXMR

Atomic converts XMR amount in float units to atomic units

func (FloatXMR) Decimal

func (f FloatXMR) Decimal() string

Decimal converts XMR amount in float units to decimal string

type IntegratedAddress

type IntegratedAddress struct {
	// contains filtered or unexported fields
}

IntegratedAddress is a Monero integrated address. A master address integrated with payment id (short one, max 64 bit). TODO check length of payment ID

func NewIntegratedAddress

func NewIntegratedAddress(addr string) *IntegratedAddress

NewIntegratedAddress creates a new integrated address struct

func (*IntegratedAddress) BaseAddress

func (ia *IntegratedAddress) BaseAddress() *Address

BaseAddress returns the base address without payment id.

func (*IntegratedAddress) IsMainnet

func (b *IntegratedAddress) IsMainnet() bool

func (*IntegratedAddress) IsStagenet

func (b *IntegratedAddress) IsStagenet() bool

func (*IntegratedAddress) IsTestnet

func (b *IntegratedAddress) IsTestnet() bool

func (*IntegratedAddress) Net

func (b *IntegratedAddress) Net() string

func (*IntegratedAddress) PaymentID

func (ia *IntegratedAddress) PaymentID() string

PaymentID returns the integrated payment id.

func (*IntegratedAddress) SpendKey

func (b *IntegratedAddress) SpendKey() string

func (*IntegratedAddress) Valid

func (b *IntegratedAddress) Valid() bool

func (*IntegratedAddress) ViewKey

func (b *IntegratedAddress) ViewKey() string

type RPCConfig

type RPCConfig struct {
	Protocol      string
	Host          string
	Port          uint
	CustomHeaders map[string]string
	Transport     http.RoundTripper
}

RPCConfig holds the configuration of a monero RPC client.

func NewRPCConfig

func NewRPCConfig(protocol, host string, port uint, username, password, caFile string) (*RPCConfig, error)

NewRPCConfig creates a new RPCConfig struct with a Transport for authentication if needed

func (RPCConfig) Address

func (cfg RPCConfig) Address() string

Address returns a formatted address string for the RPC server

type SubAddress

type SubAddress struct {
	// contains filtered or unexported fields
}

SubAddress is a Monero subaddress

func NewSubAddress

func NewSubAddress(addr string) *SubAddress

NewSubAddress creates a new subaddress struct

func (*SubAddress) IsMainnet

func (b *SubAddress) IsMainnet() bool

func (*SubAddress) IsStagenet

func (b *SubAddress) IsStagenet() bool

func (*SubAddress) IsTestnet

func (b *SubAddress) IsTestnet() bool

func (*SubAddress) Net

func (b *SubAddress) Net() string

func (*SubAddress) SpendKey

func (b *SubAddress) SpendKey() string

func (*SubAddress) Valid

func (b *SubAddress) Valid() bool

func (*SubAddress) ViewKey

func (b *SubAddress) ViewKey() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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