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.