testnet 28001 constants: rpc, faucet, x402 facilitator, tUSD (EIP-3009) and a paymentRequirements helper
This commit is contained in:
parent
bc0edfe70e
commit
0e4339632b
@ -171,3 +171,6 @@ export {
|
||||
type Leg,
|
||||
type MemberKey,
|
||||
} from './mpc/AereThresholdAccountClient.js';
|
||||
|
||||
// public testnet 28001: addresses, faucet, x402 facilitator, test dollar (2026-09-02)
|
||||
export * from "./testnet";
|
||||
|
||||
46
src/testnet.ts
Normal file
46
src/testnet.ts
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* AERE public testnet (chain 28001), live since 2026-09-02. Same node software as mainnet 2800 with the
|
||||
* post-quantum consensus message enforcement switched ON, a native-coin faucet, a test dollar with EIP-3009
|
||||
* for x402 "exact" payments, and an x402 v2 facilitator. Nothing here has value; keys and coins are free.
|
||||
*
|
||||
* Every constant below is a public address or URL that a client needs; none is a secret. The test dollar
|
||||
* and facilitator were measured end to end on 2026-09-02 (real payment, on-chain settlement, replay refused);
|
||||
* the same probe runs every six hours and its result is public at `x402ProbeUrl`.
|
||||
*/
|
||||
export const TESTNET_28001 = {
|
||||
chainId: 28001,
|
||||
caip2: "eip155:28001",
|
||||
name: "AERE Testnet",
|
||||
currency: { name: "Test AERE", symbol: "tAERE", decimals: 18 },
|
||||
rpc: "https://testnet-rpc.aere.network",
|
||||
ws: "wss://testnet-rpc.aere.network/ws",
|
||||
/** POST { address } -> a drip of tAERE after a short browser proof of work (see /testnet.html) */
|
||||
faucetApi: "https://testnet-faucet-api.aere.network",
|
||||
/** public genesis of the testnet, byte-for-byte what the validators run */
|
||||
genesisUrl: "https://aere.network/testnet-genesis.json",
|
||||
/** live load-bench and x402 probe results, JSON */
|
||||
loadBenchUrl: "https://testnet-rpc.aere.network/sarcina/ultima.json",
|
||||
x402ProbeUrl: "https://testnet-rpc.aere.network/sarcina/x402-proba.json",
|
||||
/** x402 v2 facilitator for this chain: GET /supported, POST /verify, POST /settle */
|
||||
x402Facilitator: "https://testnet-rpc.aere.network/x402",
|
||||
/** Aere Test USD: ERC-20 + EIP-3009 (transferWithAuthorization), 6 decimals, `faucet()` mints 100 tUSD per address per hour */
|
||||
tUSD: {
|
||||
address: "0x8215bA247a3574af8EBC36606eB437811E318FBd",
|
||||
decimals: 6,
|
||||
/** EIP-712 domain fields x402 clients put in `extra` */
|
||||
eip712: { name: "AereTestUSD", version: "2" },
|
||||
},
|
||||
} as const;
|
||||
|
||||
/** A ready-made x402 `paymentRequirements` object for the testnet test dollar. */
|
||||
export function testnetPaymentRequirements(payTo: string, amountAtomic: string, maxTimeoutSeconds = 300) {
|
||||
return {
|
||||
scheme: "exact" as const,
|
||||
network: TESTNET_28001.caip2,
|
||||
amount: amountAtomic,
|
||||
asset: TESTNET_28001.tUSD.address,
|
||||
payTo,
|
||||
maxTimeoutSeconds,
|
||||
extra: { ...TESTNET_28001.tUSD.eip712 },
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user