types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: BSD-3-Clause Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressFunds

type AddressFunds struct {
	WatchOnly     bool    `json:"involvesWatchonly"`
	Address       string  `json:"address"`
	Amount        Amount  `json:"amount"`
	Confirmations int     `json:"confirmations"`
	Label         string  `json:"label"`
	TxIDs         []Bytes `json:"txids"`
}

type Amount

type Amount string

func NewAmount

func NewAmount(a uint64, p uint64) Amount

func ParseAmount

func ParseAmount(amt string) (Amount, error)

func (Amount) MarshalJSON

func (a Amount) MarshalJSON() ([]byte, error)

func (Amount) Prec

func (a Amount) Prec() uint64

func (Amount) String

func (a Amount) String() string

func (Amount) UInt64

func (a Amount) UInt64(p int) uint64

func (*Amount) UnmarshalJSON

func (a *Amount) UnmarshalJSON(b []byte) error

func (Amount) Valid

func (a Amount) Valid() bool

func (Amount) WithPrec

func (a Amount) WithPrec(n int) Amount

type Bytes

type Bytes []byte

Bytes represents a yaml marshalable []byte

func ParseBytesBase64

func ParseBytesBase64(b64 string) (Bytes, error)

ParseBytesBase64 parses a base64 string

func ParseBytesHex

func ParseBytesHex(h string) (Bytes, error)

ParseBytesHex parses an hex string

func (Bytes) Base64

func (b Bytes) Base64() string

Base64 returns a base64 string

func (Bytes) Hex

func (b Bytes) Hex() string

Hex returns an hex string

func (Bytes) MarshalJSON

func (b Bytes) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (Bytes) MarshalYAML

func (b Bytes) MarshalYAML() (interface{}, error)

func (*Bytes) UnmarshalJSON

func (b *Bytes) UnmarshalJSON(bb []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*Bytes) UnmarshalYAML

func (b *Bytes) UnmarshalYAML(unmarshal func(interface{}) error) error

type InvalidAmountError

type InvalidAmountError string

func (InvalidAmountError) Error

func (e InvalidAmountError) Error() string

type UnixTime

type UnixTime int

func NewUnixTime

func NewUnixTime(t time.Time) UnixTime

func (UnixTime) MarshalJSON

func (ut UnixTime) MarshalJSON() ([]byte, error)

func (UnixTime) String

func (ut UnixTime) String() string

func (UnixTime) Time

func (ut UnixTime) Time() time.Time

func (*UnixTime) UnmarshalJSON

func (ut *UnixTime) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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