> For the complete documentation index, see [llms.txt](https://ellcrys.gitbook.io/ellcrys/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ellcrys.gitbook.io/ellcrys/elld/console.md).

# Console Mode

## Overview

`Elld` comes with a Javascript environment designed to allow users interact with the client, blockchain state and the network. With the console, you will be able to write and execute complex scripts in Javascript.&#x20;

## Start the Console

Starting the `Elld` in console mode is simple. You only need to use the `console` command instead of the `start` command.

```bash
elld console -a "0.0.0.0:9000"
```

The command above will start the client and immediately present you with a prompt to type arbitrary Javascript expressions expressions and call in-built functions.

## Attach To A Running Client

`Elld` provides the ability to start a console that attaches to a remote node. Using `attach` command instead of `console` starts the console in attach mode.&#x20;

In attach mode, only the console and a RPC client is enabled. You can call most functions that are available in the un-attached mode.

```bash
elld attach 
```

The command above will attach to the local `Elld` instance running on the default RPC address `127.0.0.1:8999`. Use `--rpcaddress` to specify a different address. &#x20;

## Console APIs

The console environment includes in-built, helper methods for interacting with the client, blockchain state and the network. These methods are categorized into namespaces according to their functions and similarities.&#x20;

| Namespace | Description                                                                     |
| --------- | ------------------------------------------------------------------------------- |
| global    | Includes convenience methods that are commonly used.                            |
| admin     | Perform administrative functions.                                               |
| personal  | Includes methods that access or interact with node's accounts.                  |
| ell       | Includes methods that access and interact with an accounts balance.             |
| rpc       | Includes methods that starts, stops and checks the status of the RPC server.    |
| \_system  | Includes non-user friendly methods that are directly bound to native functions. |

### RPC Namespaces&#x20;

RPC namespaces provides access to services offered by the RPC server. They are not available in the console until the RPC server starts to run. These are the namespaces:

| Namespace | Description                                                                  |
| --------- | ---------------------------------------------------------------------------- |
| state     | Access the blockchain state (e.g blocks, branches etc)                       |
| ell       | Access account balance and send balance.                                     |
| node      | Includes methods to access client information (e.g configs, sync state etc). |
| pool      | Access the transaction pool.                                                 |
| miner     | Manage the CPU miner.                                                        |
| personal  | Includes methods that access or interact with node's accounts.               |
| admin     | Perform administrative functions                                             |
| net       | Manage and access the clients peers and network functions.                   |
| logger    | Update log level (useful for debugging)                                      |

## Start RPC Service

By default, RPC namespaces will not be accessible in the console when the RPC server is not turned on. To turn on the RPC server within the console, call the `rpc.start` method:

```javascript
> rpc.start()
```

Which should produce the log output below:&#x20;

```
> INFO[0008] RPC service started                           Address="127.0.0.1:8999"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ellcrys.gitbook.io/ellcrys/elld/console.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
