@aere/sdk

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.

Languages
4 TS, Rust, Py, Go
Peer dep
ethers ^6.13.0 (TS)
PQC signing
live ML-DSA, SLH-DSA
License
MIT
What this SDK is: a thin, fully-typed layer over 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.

Four official SDKs

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.

TypeScript full

The reference client, documented on this page. Wraps every deployed contract on ethers v6, with signing and verification helpers.
  • full contract coverage
  • read + write via ethers v6
  • signing / verification helpers

Rust full

Full parity for backend and infrastructure use, including the post-quantum signing path.
  • full contract coverage
  • envelope + JSON-RPC client
  • PQC keygen / sign / verify

Python pqc

Contract client plus a real post-quantum signing path, keygen, sign, and verify for ML-DSA-44 and SLH-DSA-128s, live-proven on chain 2800.
  • envelope + JSON-RPC client
  • ML-DSA-44 keygen / sign / verify
  • SLH-DSA-128s keygen / sign / verify
  • Falcon signing not offered

Go client

Envelope, JSON-RPC client, and key generation. PQC signing is deferred because Go's standard post-quantum library does not expose the FIPS internal signer.
  • envelope + JSON-RPC client
  • key generation
  • PQC signing deferred
  • Falcon signing not offered

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.

Install

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.

Read-only client (no signer)

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);

With a signer (sends transactions)

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);

Browser wallet (MetaMask)

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.

Click Run to execute.

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.

aere.waere

Wrapped native AERE (ERC-20). Wrap/unwrap AERE for DEX use.
0x7e84d7d66d5da4cfE46Da67CDEeB05B323e1f5e8
  • balanceOf(addr)
  • deposit(amountWei)
  • withdraw(amountWei)
  • transfer(to, amount)

aere.staking

Liquidity-lock staking (AereLockedStaking). 4 tiers: 30/90/180/365 days at 10/15/22/30% APY.
0x21108c28A849b05aE6b7a3a5bc435C9Bc897E7Ad
  • lock(tier, {value})
  • lockTier30 / 90 / 180 / 365
  • withdraw(lockId), earlyExit(lockId)
  • getLocks(user)
  • pendingRewards(user, lockId)

aere.swap

V2-style AMM with router. Add/remove liquidity, swap tokens.
router 0x65d098d8733309785BaD058773C7EA919e0C3162
  • addLiquidityAERE(token, amt, …)
  • swapExactAEREForTokens(min, path, …)
  • swapExactTokensForAERE(amt, min, path, …)
  • getPair(t0, t1), reservesOf(pair)

aere.identity

DID / KYC attestation registry. Off-chain claim hashes pinned on-chain.
0x658dD2CD1F798AAb19fEc8FF69A270B2d192CaD1
  • addClaim(subject, type, hash, expires)
  • getClaim(claimId)
  • hasValidClaim(subject, type)

aere.bridge

Federated 2-of-N cross-chain bridge.
0x7eDa66cd93baAE19530839Bbb28ee36aC8aFAd68
  • lock(targetChain, recipient, amount)
  • unlock(srcChain, srcTx, amount, sigs)
  • threshold(), guardians()

aere.faucet

Public mainnet drip.
0xDdBe942aD9eB0F3E7C541BdCF7CC2cfA29d35aE4
  • drip()
  • dripAmount() / cooldown()

aere.oracle

Multi-reporter median price feed (8 decimals).
0xf0A13823A4bFa86358Fe30aaf1f44A36AcbCf399
  • getPrice(symbol)
  • submit(symbol, price), reporters only
  • reporterCount(), symbolCount()

Watch incoming AERE transfers (event stream)

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);
});

Build a portfolio summary

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: [...] }
// }

Reporter cron, submit oracle price

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.