handlers

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

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

Handlers provides a web api to the account.

func NewHandlers

func NewHandlers(
	handleFunc func(string, func(*http.Request) (interface{}, error)) *mux.Route, log *logrus.Entry) *Handlers

NewHandlers creates a new Handlers instance.

func (*Handlers) Init

func (handlers *Handlers) Init(account btc.Interface)

Init installs a account as a base for the web api. This needs to be called before any requests are made.

func (*Handlers) Uninit

func (handlers *Handlers) Uninit()

Uninit removes the account. After this, no requests should be made.

type Transaction

type Transaction struct {
	ID               string               `json:"id"`
	VSize            int64                `json:"vsize"`
	Size             int64                `json:"size"`
	Weight           int64                `json:"weight"`
	NumConfirmations int                  `json:"numConfirmations"`
	Height           int                  `json:"height"`
	Type             string               `json:"type"`
	Amount           coin.FormattedAmount `json:"amount"`
	Fee              coin.FormattedAmount `json:"fee"`
	FeeRatePerKb     coin.FormattedAmount `json:"feeRatePerKb"`
	Time             *string              `json:"time"`
	Addresses        []string             `json:"addresses"`
}

Transaction is the info returned per transaction by the /transactions endpoint.

Jump to

Keyboard shortcuts

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