explorePkg

package
v6.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 20 Imported by: 0

README

chifra explore

chifra explore opens Etherscan (and other explorers -- including our own) to the block identifier, transaction identifier, or address you specify. It's a handy (configurable) way to open an explorer from the command line, nothing more.

Purpose:
  Open a local or remote explorer for one or more addresses, blocks, or transactions.

Usage:
  chifra explore [flags] [terms...]

Arguments:
  terms - one or more address, name, block, or transaction identifier

Flags:
  -n, --no_open   return the URL without opening it
  -l, --local     open the local TrueBlocks explorer
  -g, --google    search google excluding popular blockchain explorers
  -h, --help      display this help screen

Data models produced by this tool:

Other Options

All tools accept the following additional flags, although in some cases, they have no meaning.

  -v, --version         display the current version of the tool
      --output string   write the results to file 'fn' and return the filename
      --append          for --output command only append to instead of replace contents of file
      --file string     specify multiple sets of command line options in a file

Note: For the --file string option, you may place a series of valid command lines in a file using any valid flags. In some cases, this may significantly improve performance. A semi-colon at the start of any line makes it a comment.

Note: If you use --output --append option and at the same time the --file option, you may not switch export formats in the command file. For example, a command file with two different commands, one with --fmt csv and the other with --fmt json will produce both invalid CSV and invalid JSON.

Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.

Documentation

Overview

explorePkg implements the chifra explore command.

chifra explore opens Etherscan (and other explorers -- including our own) to the block identifier, transaction identifier, or address you specify. It's a handy (configurable) way to open an explorer from the command line, nothing more.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetOptions

func ResetOptions(testMode bool)

func RunExplore

func RunExplore(cmd *cobra.Command, args []string) error

RunExplore handles the explore command for the command line. Returns error only as per cobra.

func ServeExplore

func ServeExplore(w http.ResponseWriter, r *http.Request) error

ServeExplore handles the explore command for the API. Returns an error.

Types

type ExploreOptions

type ExploreOptions struct {
	Terms   []string              `json:"terms,omitempty"`   // One or more address, name, block, or transaction identifier
	NoOpen  bool                  `json:"noOpen,omitempty"`  // Return the URL without opening it
	Local   bool                  `json:"local,omitempty"`   // Open the local TrueBlocks explorer
	Google  bool                  `json:"google,omitempty"`  // Search google excluding popular blockchain explorers
	Dalle   bool                  `json:"dalle,omitempty"`   // Open the address to the DalleDress explorer
	Globals globals.GlobalOptions `json:"globals,omitempty"` // The global options
	Conn    *rpc.Connection       `json:"conn,omitempty"`    // The connection to the RPC server
	BadFlag error                 `json:"badFlag,omitempty"` // An error flag if needed
	// EXISTING_CODE
	Destinations []types.Destination
}

ExploreOptions provides all command options for the chifra explore command.

func ExploreFinishParseInternal

func ExploreFinishParseInternal(w io.Writer, values url.Values) *ExploreOptions

func GetExploreOptions

func GetExploreOptions(args []string, g *globals.GlobalOptions) *ExploreOptions

GetExploreOptions returns the options for this tool so other tools may use it.

func GetOptions

func GetOptions() *ExploreOptions

func (*ExploreOptions) ExploreInternal

func (opts *ExploreOptions) ExploreInternal(rCtx *output.RenderCtx) error

ExploreInternal handles the internal workings of the explore command. Returns an error.

func (*ExploreOptions) HandleShow

func (opts *ExploreOptions) HandleShow(rCtx *output.RenderCtx) error

func (*ExploreOptions) String

func (opts *ExploreOptions) String() string

String implements the Stringer interface

Jump to

Keyboard shortcuts

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