api

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChainFactsGetHandler

func NewChainFactsGetHandler(explorer *cfexplorer.Explorer) httprouter.Handle

NewChainFactsGetHandler creates a handler to handle the API calls to /explorer/custodyfees/metrics/chain.

func NewCoinOutputInfoGetHandler

func NewCoinOutputInfoGetHandler(cs modules.ConsensusSet, plugin *custodyfees.Plugin) httprouter.Handle

NewCoinOutputInfoGetHandler creates a handler to handle the API calls to /*/custodyfees/coinoutput/:id?time=0&height=0&compute=true.

func RegisterConsensusCustodyFeesHTTPHandlers

func RegisterConsensusCustodyFeesHTTPHandlers(router rapi.Router, cs modules.ConsensusSet, plugin *custodyfees.Plugin)

RegisterConsensusCustodyFeesHTTPHandlers registers the default consensus HTTP handlers specific to the custodyfees package.

func RegisterExplorerCustodyFeesHTTPHandlers

func RegisterExplorerCustodyFeesHTTPHandlers(router rapi.Router, cs modules.ConsensusSet, plugin *custodyfees.Plugin, explorer *cfexplorer.Explorer)

RegisterExplorerCustodyFeesHTTPHandlers registers the default explorer HTTP handlers specific to the custodyfees package.

Types

type ChainFactsGet

type ChainFactsGet struct {
	Height types.BlockHeight `json:"height"`
	Time   types.Timestamp   `json:"time"`

	SpendableTokens       types.Currency `json:"spendabletokens"`
	SpendableLockedTokens types.Currency `json:"spendablelockedtokens"`
	TotalCustodyFeeDebt   types.Currency `json:"totalcustodyfeedebt"`

	SpentTokens     types.Currency `json:"spenttokens"`
	PaidCustodyFees types.Currency `json:"paidcustodyfees"`
}

ChainFactsGet is the response of the chain metrics Get explorer endpoint

type CoinOutputInfoGet

type CoinOutputInfoGet struct {
	CreationTime       types.Timestamp `json:"creationtime"`
	CreationValue      types.Currency  `json:"creationvalue"`
	IsCustodyFee       bool            `json:"iscustodyfee"`
	Spent              bool            `json:"spent"`
	FeeComputationTime types.Timestamp `json:"feecomputationtime"`
	CustodyFee         *types.Currency `json:"custodyfee,omitempty"`
	SpendableValue     *types.Currency `json:"spendablevalue,omitempty"`
}

CoinOutputInfoGet is all coin output info that can be requested from the custody fees API about a known coin output.

Jump to

Keyboard shortcuts

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