<!-- Generated from the function registry (sdk/src/functions) by `cd sdk && npm run gen`. Do not edit. -->

# Gateway

> **Status:** Current (generated)

The gateway itself: health, the chain it serves.

| Function | Kind | Description |
|---|---|---|
| [`gateway.status`](#gatewaystatus) | read | The gateway's view: validators' health and regions, indexer progress, the faucet's address, amount and balance |
| [`gateway.chain`](#gatewaychain) | read | Which network this is: its chain id and genesis hash (the state root of the genesis state) |

## gateway.status

The gateway's view: validators' health and regions, indexer progress, the faucet's address, amount and balance.

- **Kind:** read
- **Runs:** `GET /status` on the gateway

**Input**

None.

**Output**

An object.

| Field | Type | Required | Description |
|---|---|---|---|
| `validators` | array of object |  |  |
| `indexer` | any |  | Any JSON value |
| `faucet` | object or null |  |  |

**Example**

```json
{
  "name": "gateway.status",
  "input": {}
}
```

## gateway.chain

Which network this is: its chain id and genesis hash (the state root of the genesis state). Wallets pin both on first contact; two devnets may share a chain id, never a genesis hash.

- **Kind:** read
- **Runs:** `GET /chain` on the gateway

**Input**

None.

**Output**

An object.

| Field | Type | Required | Description |
|---|---|---|---|
| `chain_id` | integer |  | Chain id |
| `genesis_hash` | hex or null |  |  |

**Example**

```json
{
  "name": "gateway.chain",
  "input": {}
}
```

```json
{
  "chain_id": 1337,
  "genesis_hash": "0x3b7d0f5c9e2a4b6c8d0e1f2a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e"
}
```
