The official TypeScript client wrapping every deployed AERE Network contract, built on ethers v6, MIT licensed. It is one of four official AERE SDKs, TypeScript, Rust, Python, and Go, described below. Source at git.aere.network/aere-network/sdk-js.
ethers v6 with the deployed mainnet addresses, ABIs, and ergonomic helpers for every protocol, staking, lending, stablecoin, swap, identity, bridge, Lightning, ZK rollup, faucet. What it is NOT: a wallet or a custodial platform. It signs only with keys you provide.
AERE ships four client libraries. All four speak the chain's JSON-RPC and contract ABIs. They differ in how much of the post-quantum signing path each language can offer today, and we state that honestly rather than implying parity.
Honest capability note: Falcon signing is not offered in the Python or Go SDKs, because no maintained library in either language emits the Bouncy-Castle-compatible compressed Falcon signature body that AERE's on-chain verifier expects. There is no Java SDK.
The package is not yet on public npm. Install it straight from the source repository on GitHub:
$npm install github:aerenetwork/aere-sdk ethers
$yarn add github:aerenetwork/aere-sdk ethers
$pnpm add github:aerenetwork/aere-sdk ethers
Or use ethers directly with the addresses + ABIs from addresses.ts if you don't want the wrapper.
import { AereClient } from '@aere/sdk'; const aere = new AereClient(); // defaults to https://rpc.aere.network const head = await aere.getBlockNumber(); const bal = await aere.getNativeBalance('0x0243A4f47D44b40b65D33f20329dE20D00c6f3C3'); const validators = await aere.getValidators(); console.log('head:', head, 'foundation:', bal, 'validators:', validators.length);
import { AereClient } from '@aere/sdk'; import { parseEther } from 'ethers'; const aere = new AereClient({ privateKey: process.env.PK }); // Lock 100 AERE for 30 days at 10% APY (Tier 0) const tx = await aere.staking.lockTier30(parseEther('100')); await tx.wait(); // Write KYC attestation on-chain (attestor-only) const oneYear = Math.floor(Date.now() / 1000) + 365 * 86400; await aere.identity.addClaim(userAddr, 'kyc-tier-1', reportHash, oneYear);
import { BrowserProvider } from 'ethers'; import { AereClient } from '@aere/sdk'; const provider = new BrowserProvider(window.ethereum); await provider.send('eth_requestAccounts', []); const signer = await provider.getSigner(); const aere = new AereClient({ signer }); const tx = await aere.staking.lockTier90(parseEther('500'));
Pick an example and click Run. Code executes against https://rpc.aere.network from your browser using ethers v6 (the same calls the SDK wraps). Edit freely, output shows below.
Sandbox: code runs in your browser tab via new Function against an injected ethers namespace. No keys are sent anywhere. Switch examples to repopulate the editor.
Each handle is a typed wrapper around an ethers Contract. Use .contract to access the underlying ethers instance for advanced operations.
Subscribe to native and ERC-20 transfers to a given address, useful for deposit detection in fintech and neobank integrations.
const aere = new AereClient(); await aere.watchTransfersTo('0xUser…', (event) => { console.log('incoming', event.amount, 'from', event.from, 'tx', event.txHash); });
Aggregate all balances + active locks for an address in one call.
const p = await aere.getPortfolio('0xUser…'); // { // nativeAere: bigint, // waere: bigint, // aereUSD: bigint, // stakingLocks: [...], // lending: { supplied, borrowed, ltv }, // identity: { hasKYC, claims: [...] } // }
import { encodeBytes32String, parseUnits } from 'ethers'; const aere = new AereClient({ privateKey: process.env.REPORTER_KEY }); setInterval(async () => { const price = await fetchExternalPrice(); // your data source const tx = await aere.oracle.submit( encodeBytes32String('AERE/USD'), parseUnits(price.toString(), 8) ); console.log('submitted', tx.hash); }, 60_000);
All mainnet addresses bundled in AERE_MAINNET from @aere/sdk/addresses. Chain ID 2800.