Your first transaction

Send AERE from a script with ethers or viem, and read the receipt.

Docs / Getting started / Your first transaction

Send AERE from a script, and read the receipt. Nothing here is AERE-specific except the chain ID and the endpoint.

With ethers v6

import { JsonRpcProvider, Wallet, parseEther } from 'ethers';

const provider = new JsonRpcProvider('https://rpc.aere.network', { name: 'aere', chainId: 2800 });
const wallet = new Wallet(process.env.PRIVATE_KEY, provider);

const tx = await wallet.sendTransaction({
  to: '0x0000000000000000000000000000000000000001',
  value: parseEther('0.001'),
});

console.log('sent', tx.hash);
const receipt = await tx.wait();
console.log('block', receipt.blockNumber, 'status', receipt.status, 'gas', receipt.gasUsed.toString());

tx.wait() returns after one confirmation. For a validator one confirmation is final: QBFT commits a block or it does not, and a committed block is not reorganised. From block 25,080,000 (AIP-22 stage 5) a node that does not take part in consensus, such as the public RPC endpoints, admits a header between anchors on the Falcon-512 seal of its proposer alone, so until the next anchor the blocks above its finalized block, including blocks it has already shown, can be replaced by a branch that the key of a single validator builds (such a node keeps the total-difficulty fork choice of the upstream client; the rule that never leaves a decided block runs on the validators only); for settlement, read the finalized or safe block, which moves only on an anchor certificate that the key of one validator cannot produce (derived from the code; measured on the rehearsal network 28099 with a classical-only fork, AIP-22 record of 2026-09-27: such a node followed the fork up to the block before the next anchor and moved to the anchored chain once linked to an honest validator; not measured: the same with a post-quantum key from stage 5, and whether a node started from the published package, with its seal ceiling at 1, answers these tags the same way); a count of additional confirmations is not what makes a transfer settled.

With viem

import { createWalletClient, createPublicClient, http, parseEther, defineChain } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';

const aere = defineChain({
  id: 2800,
  name: 'AERE Network',
  nativeCurrency: { name: 'AERE', symbol: 'AERE', decimals: 18 },
  rpcUrls: { default: { http: ['https://rpc.aere.network'] } },
  blockExplorers: { default: { name: 'AERE Explorer', url: 'https://explorer.aere.network' } },
});

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: aere, transport: http() });
const publicClient = createPublicClient({ chain: aere, transport: http() });

const hash = await wallet.sendTransaction({
  to: '0x0000000000000000000000000000000000000001',
  value: parseEther('0.001'),
});
const receipt = await publicClient.waitForTransactionReceipt({ hash });
console.log(receipt.blockNumber, receipt.status);

Fees

A plain transfer costs 21,000 gas. The base fee has a floor of 1 Gwei, so the minimum cost of a transfer is 21,000 x 1 Gwei = 0.000021 AERE. Both libraries read the fee data from the chain and will do the right thing without help.

Keys

Never paste a private key into a shell, into a config file that gets committed, or into a page. Read it from the environment, as above. Note also that a key with a stray whitespace character can be printed whole inside a library's error message, so trim what you read and never log a raw error object that may contain key material.

Then look at it

Every transaction is on the explorer. Paste the hash into the search field, or go straight to https://explorer.aere.network/tx/<hash>.