api

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExplorerHashHandler added in v1.2.0

func NewExplorerHashHandler(explorer modules.Explorer, cs modules.ConsensusSet, tpool modules.TransactionPool, erc20Registry erc20types.ERC20Registry) httprouter.Handle

NewExplorerHashHandler creates a handler to handle GET requests to /explorer/hash/:hash.

func RegisterExplorerHTTPHandlers added in v1.2.0

func RegisterExplorerHTTPHandlers(router rapi.Router, cs modules.ConsensusSet, explorer modules.Explorer, tpool modules.TransactionPool, tbRegistry tbtypes.BotRecordReadRegistry, erc20Registry erc20types.ERC20Registry)

RegisterExplorerHTTPHandlers registers the (tfchain-specific) handlers for all Explorer HTTP endpoints.

Types

type ExplorerHashERC20Info added in v1.2.0

type ExplorerHashERC20Info struct {
	TFTAddress    rtypes.UnlockHash       `json:"tftaddress,omitempty"`
	ERC20Address  erc20types.ERC20Address `json:"erc20address,omitempty"`
	Confirmations uint64                  `json:"confirmations"`
}

ExplorerHashERC20Info contains all ERC20 related info as part of an UnlockHash-typed ExplorerHashGET request.

type ExplorerHashGET added in v1.2.0

type ExplorerHashGET struct {
	rapi.ExplorerHashGET
	ERC20Info *ExplorerHashERC20Info `json:"erc20info,omitempty"`
}

ExplorerHashGET wraps around the default rivine ExplorerHashGET type, as to add the optional ERC20 address to it, for UnlockHash requests, which have an ERC20 address attached to it.

Jump to

Keyboard shortcuts

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