{"modulePath":"github.com/Evolution404/simcore","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package console\n\n## Constants\n\n```go\nconst DefaultPrompt = \"\u003e \"\n```\nDefaultPrompt is the default prompt line prefix to use for user input querying.\n\n```go\nconst HistoryFile = \"history\"\n```\nHistoryFile is the file within the data directory to store input scrollback.\n\n## Types\n\n```go\ntype Config struct {\n\tDataDir  string              // Data directory to store the console history at\n\tDocRoot  string              // Filesystem path from where to load JavaScript files from\n\tClient   *rpc.Client         // RPC client to execute Ethereum requests through\n\tPrompt   string              // Input prompt prefix string (defaults to DefaultPrompt)\n\tPrompter prompt.UserPrompter // Input prompter to allow interactive user feedback (defaults to TerminalPrompter)\n\tPrinter  io.Writer           // Output writer to serialize any display strings to (defaults to os.Stdout)\n\tPreload  []string            // Absolute paths to JavaScript files to preload\n}\n```\nConfig is the collection of configurations to fine tune the behavior of the JavaScript console.\n\n```go\ntype Console struct {\n\t// contains filtered or unexported fields\n}\n```\nConsole is a JavaScript interpreted runtime environment. It is a fully fledged JavaScript console attached to a running node via an external or in-process RPC client.\n\n```go\nfunc New(config Config) (*Console, error)\n```\nNew initializes a JavaScript interpreted runtime environment and sets defaults with the config struct.\n\n```go\nfunc (c *Console) AutoCompleteInput(line string, pos int) (string, []string, string)\n```\nAutoCompleteInput is a pre-assembled word completer to be used by the user input prompter to provide hints to the user about the methods available.\n\n```go\nfunc (c *Console) Evaluate(statement string)\n```\nEvaluate executes code and pretty prints the result to the specified output stream.\n\n```go\nfunc (c *Console) Execute(path string) error\n```\nExecute runs the JavaScript file specified as the argument.\n\n```go\nfunc (c *Console) Interactive()\n```\nInteractive starts an interactive user session, where in.put is propted from the configured user prompter.\n\n```go\nfunc (c *Console) Stop(graceful bool) error\n```\nStop cleans up the console and terminates the runtime environment.\n\n```go\nfunc (c *Console) StopInteractive()\n```\nStopInteractive causes Interactive to return as soon as possible.\n\n```go\nfunc (c *Console) Welcome()\n```\nWelcome show summary of current Geth instance and some metadata about the console's available modules.\n\n","path":"github.com/Evolution404/simcore/console","name":"console","synopsis":"","isRedistributable":true}
