# Quickstart

Five minutes from zero to reading the chain and sending a transaction. Pick the language that matches your stack.

## 1. Read the chain (curl)

```bash
# Current block height
curl -X POST https://rpc.aeredium.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

# Account balance (in wei)
curl -X POST https://rpc.aeredium.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x742d35Cc6634C0532925a3b844Bc9e7595f3bA21","latest"],"id":1}'

# Chain ID (should return "0x3e8" → 1000)
curl -X POST https://rpc.aeredium.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
```

## 2. Read the chain (viem)

```ts
import { createPublicClient, http, defineChain } from "viem";

export const aeredium = defineChain({
  id: 1000,
  name: "AEREDIUM",
  nativeCurrency: { name: "AER", symbol: "AER", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://rpc.aeredium.io"], webSocket: ["wss://rpc.aeredium.io"] },
  },
});

const client = createPublicClient({ chain: aeredium, transport: http() });

const block = await client.getBlockNumber();
const balance = await client.getBalance({ address: "0x742d35Cc6634C0532925a3b844Bc9e7595f3bA21" });
console.log({ block, balance });
```

## 3. Read the chain (ethers v6)

```ts
import { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider("https://rpc.aeredium.io", {
  chainId: 1000,
  name: "aeredium",
});

const block = await provider.getBlockNumber();
const balance = await provider.getBalance("0x742d35Cc6634C0532925a3b844Bc9e7595f3bA21");
console.log({ block, balance: balance.toString() });
```

## 4. Read the chain (web3.py)

```python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://rpc.aeredium.io"))
print("connected:", w3.is_connected())
print("block:", w3.eth.block_number)
print("balance:", w3.eth.get_balance("0x742d35Cc6634C0532925a3b844Bc9e7595f3bA21"))
```

## 5. Send your first transaction (viem)

```ts
import { createWalletClient, http, parseEther } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { aeredium } from "./chain"; // from step 2

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);

const wallet = createWalletClient({
  account,
  chain: aeredium,
  transport: http(),
});

const hash = await wallet.sendTransaction({
  to: "0x742d35Cc6634C0532925a3b844Bc9e7595f3bA21",
  value: parseEther("0.01"),
});

console.log("tx hash:", hash);
```

Because AEREDIUM has 1-block (2-second) finality, you can call `eth_getTransactionReceipt` once and trust the result — no need to wait for N confirmations like on Ethereum mainnet.

## What's next

* [Connect MetaMask](/developer.aeredium.io/network/metamask.md) for browser-based testing
* [Deploy a smart contract](/developer.aeredium.io/examples/deploy-contract.md) with Hardhat or Foundry
* [Browse the JSON-RPC reference](/developer.aeredium.io/json-rpc-api/json-rpc.md) for every supported method


---

# Agent Instructions: 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://aeredium.gitbook.io/developer.aeredium.io/network/quickstart.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.
