> 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/api/rpc.md).

# RPC

## rpc.start

Start the JSON-RPC service. Only available in console mode.&#x20;

**Parameters:** None

#### Console Example

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

## rpc\_stop

Stop the JSON-RPC service. Available in console and attach mode.&#x20;

{% hint style="info" %}
**Private**: Requires authentication.
{% endhint %}

**Parameters:** None

**Curl Example:**&#x20;

```bash
curl -X POST --data '{"jsonrpc":"2.0",  "method":"rpc_stop", "id":21 }'
```

#### Console Example

```javascript
> rpc.stop()
```

#### Returns:

`Boolean`&#x20;

#### Output:

```javascript
{
  "id": 21,
  "jsonrpc": "2.0",
  "result": true
}
```

## rpc\_methods

Get all JSON-RPC methods.

**Parameters:** None

**Curl Example:**&#x20;

```bash
curl -X POST --data '{"jsonrpc":"2.0",  "method":"rpc_methods", "id":21 }'
```

#### Console Example

```javascript
> rpc.methods()
```

#### Returns:

`Array<Object>`&#x20;

| Field       | Type    | Description                                                     |
| ----------- | ------- | --------------------------------------------------------------- |
| name        | String  | The name of the method. (format: \<namespace>\_\<method\_name>) |
| description | String  | A brief description of the method.                              |
| private     | Boolean | Indicate that the method is private or not.                     |

#### Output:

```javascript
{
  "id": 21,
  "jsonrpc": "2.0",
  "result": [
    {
      "description": "Add a peer address",
      "name": "net_addPeer",
      "private": true
    }
  ]
}
```

## rpc\_echo

Send a value to the server and have it resent back. Used for testing.&#x20;

**Parameters:**&#x20;

| Argument | Type | Description                      |
| -------- | ---- | -------------------------------- |
| value    | Any  | The value to be sent and echoed. |

**Curl Example:**&#x20;

```bash
curl -X POST --data '{"jsonrpc":"2.0",  "method":"rpc_echo", "params": "Hello, world!", "id":21 }'
```

#### Console Example

```javascript
> rpc.echo("Hello, world!")
```

#### Returns:

`Any`&#x20;

#### Output:

```javascript
{
  "id": 21,
  "jsonrpc": "2.0",
  "result": "Hello, world!"
}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://ellcrys.gitbook.io/ellcrys/api/rpc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
