Compare commits

..

9 Commits

Author SHA1 Message Date
Liviu
7287d8ad11 Licence hygiene: Apache 2.0 section 4(b) change notices, and a LICENSE where there was none
Measured by the licence gate on 2026-08-11. Three separate defects, all real:

- the two patches modify files that are the work of Hyperledger Besu and did not
  say so. Section 4(b) of the Apache License requires modified files to carry a
  prominent notice. The notice now travels in the patch message, above the ---,
  so git am puts it in the tree.
- precompiles/Address.java and precompiles/MainnetPrecompiledContracts.java are
  copies of upstream files that the patches change. They kept the upstream
  copyright header, which 4(c) requires, but carried no notice that we changed
  them. They do now.
- grants had no LICENSE at all, and sdk-js had one that was never pushed. A
  public repository with no licence grants a reader nothing.
2026-08-11 23:40:39 +03:00
Liviu
e2eba2baff Add the MIT LICENSE file the package has always declared
package.json declares "license": "MIT" and three published pages call the SDK
"MIT licensed", but the public repository carried no LICENSE file at all. The
file existed locally and was simply never pushed, so anyone who checked the
claim found nothing behind it.

Measured 2026-08-11: LICENSE returned HTTP 404 on the public repository while
the claim was live on the site. This adds the file that was always meant to be
there rather than removing the claim.
2026-08-11 20:54:32 +03:00
Liviu
b45682d578 feat(corebook): CoreBookClient + AereCoreBookClient selector fixes + AERE_COREBOOK markets gate
- CoreBookClient: full read/write surface for AereCoreBookV0 (placeGTC/IOC/
  withSlippage/Protected, cancel, claim base+quote, flushFees; bestBid/bestAsk/
  marketInfo/depth/openOrdersOf via Lens), price math mirrors (_computeQuote,
  _lockBuyFunds incl. 256-wei buffer), orderId derivation (pre-incremented
  nonce keccak), event decode for OrderPlaced/Filled/OrderCancelled/Claimed.
  Verified 63/63 against ethers v6 ground truth.
- AereCoreBookClient (pre-existing): fixed 11 wrong read selectors (bestBid,
  bestAsk, pendingSinkFee, TAKER_FEE_BPS, PRICE_TICK, LOT_SIZE, decimals
  factors, PRICE_SCALE, cancel-delay constants) - every read would have
  thrown before.
- addresses.ts: AERE_COREBOOK = { markets: {} } - founder gate, no market
  listed until explicit approval.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:44:18 +03:00
Liviu
094688d1d1 feat(addresses): 21 audit-pass-stack contracts deployed 2026-06-09
sAERE, AereSink, BugBountyVault, Sanctions/TravelRule/Forensic/ZKScreen/
AIProof/Attestation/BestEx, SettlementHub, CoinbaseSplitterV2, Agent +
AERE402Facilitator (CREATE-predicted pair), Delegate7702 + DelegationRegistry,
InsuranceFund, NavOracle, StateChannels, RaaSFactory.

Deployed via Foundation MetaMask through aere.network/deploy.html (standalone
HTML deploy page after React AdminDeploy SPA had MetaMask-mobile issues).

Pending USDC.e bridge bootstrap: CoreBookV0, LendingMarket x 6,
CompliancePool, SpokePool, Hyperlane Warp Routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 21:22:33 +03:00
Liviu
fbc6d4f68a feat(sdk): R5+R6 surfaces — CoreBook client + sAERE drip + Compliance challenge bond
New & expanded clients reflecting all R4/R5/R6 contract hardening:

- corebook/AereCoreBookClient.ts (NEW):
  - Side+TimeInForce enums; pre-computed selectors for place/placeProtected/
    placeWithSlippage/placeWithSlippageProtected/iocFill/cancel/flushFees/
    sweepDust/claim
  - read* helpers for bestBid, bestAsk, pendingSinkFee, TAKER_FEE_BPS,
    PRICE_TICK, LOT_SIZE, QUOTE_DECIMALS_FACTOR, BASE_DECIMALS_FACTOR,
    PRICE_SCALE, totalClaimableQuote/Base, per-user claimable lookups
  - computeQuote(price, qty) helper mirrors on-chain formula
  - recommendedSlippage(side, limit, qty, bps) computes maxAvgPriceWei for
    real sandwich protection — discourages naive iocFill
  - Docstrings explicitly state which entrypoint to use for crossing vs
    resting orders (R6 HIGH-5/MED-9 enforcement)

- saere/sAEREClient.ts (R5/R6):
  - atomicState() — single-call snapshot of {bal, totalAssets, undist,
    totalSupply, rewardRate, periodFinish, lastObservedBalance} eliminating
    cross-block drift in fuzz/dashboard reads
  - readUndistributed(), readRewardRate(), readPeriodFinish()
  - encodeSync() — permissionless drip refresh

- compliance/NewComplianceClients.ts (R5/R6):
  - proposeAssociationRoot + challengeAssociationRoot (bond required) +
    dismissChallenge entrypoints
  - challengeBond(), maxDismissalsPerRoot(), dismissCount(root),
    challenger(root), isKnownRoot(root), getLastRoot(), nextLeafIndex()
  - removed publishDepositRoot (R5: roots are on-chain Merkle, not pushed)
  - static computeActualLeaf helper note: leaf = keccak256(commitment, sender)
    so SDK consumers build ZK proofs against the bound leaf

- index.ts: export corebook surface

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 12:56:44 +03:00
Liviu
99abfff98a feat(sdk): SDK clients for the 2026-06-08 ship batch
Six new clients (dependency-free EIP-1193 wrappers, precomputed
4-byte selectors, ABI tuple/string encoders inline):

- AereAgentBondClient        — bondOf, isBonded, postBond, requestWithdraw,
                               withdraw, slash; oracle-only on slash
- AereAIReputationClient     — scoreOf, statsOf, attest (delta -1/0/+1)
- AereInferNetClient         — modelEpochCount, registerModel, commitEpoch;
                               EU AI Act Article 12 provider surface
- AereAgentMemoryVaultClient — grant, revoke, write, canReadNow,
                               permissionOf; user-owned namespace
- AereAttestationGatewayClient — publishSchema, setAttestor, attest,
                                 revoke, isValidNow, subjectCurrentlyAttested
- AereCompliancePoolClient   — deposit, withdraw, publishAssociationRoot,
                               setComplianceProvider; Privacy Pools surface

All exported from the package barrel. Zero TS errors.
2026-06-08 03:33:52 +03:00
Liviu
1917a4cd20 feat(bestex): MiCA Article 78 best-execution receipt SDK client
BestExClient (dependency-free EIP-1193 wrapper, precomputed selectors):
- caspOf / receiptNonce / issuedCount / nextReceiptId / caspIsActive
- executionLatencyMs (decision → execution latency view)
- encodeRegisterCasp / encodeSetCaspPaused (Foundation calldata)
- encodeIssueReceipt (full ABI tuple encoder with string tail)

Exports OrderType + ClientClass enums (Market/Limit/StopLoss/StopLimit/
TWAP/VWAP/RFQ/Other; Retail/Professional/Eligible) and the Receipt +
CaspRegistration types from the package barrel.

Matches the contract shipped 2026-06-08 (172/172 tests). Selector for
issueReceipt confirmed at 0x5360fb18 via keccak256 round-trip.
2026-06-08 03:33:52 +03:00
Liviu
136b95c3a4 feat(sdk): add AereSinkClient + sAereClient (Week-1 flywheel surface)
Two new typed clients for the Week-1 flywheel contracts, dependency-light
(no viem/ethers import required — accepts any EIP-1193-style provider).

src/sink/AereSinkClient.ts
  - readConfig(): all 8 immutable parameters in one batched eth_call sequence
    (AERE token, BURN_VAULT, SAERE_VAULT, DEX_ROUTER, 4 bps values, slippage cap).
  - readSplitPercentages(): convenience that returns burn/buyback/staker
    as human-readable percentages.
  - encodeFlush(token, amount): calldata for the integrator-side flush call.
  - encodeSweepDust(token): calldata for the permissionless dust-sweep.

src/saere/sAEREClient.ts
  - readVaultState(): live snapshot — underlying address, totalAssets,
    totalSupply, pricePerShare, decimals.
  - balanceOf(user): per-user sAERE share balance.
  - convertToAssets / convertToShares: round-trip conversion helpers.
  - encodeDeposit / encodeWithdraw / encodeRedeem: ERC-4626 write calldata.

Both clients precompute 4-byte function selectors at module load so the
SDK doesn't depend on a keccak helper. ABI-encoded address and uint
arguments built manually so consumers can use this with either a
high-level library (viem, ethers) or raw fetch against rpc.aere.network.

Re-exported from src/index.ts under 'export * from sink/saere' so the
SDK keeps a single import path.
2026-06-08 03:33:52 +03:00
AERE Foundation
88626e43ae v0.16.1 — Tier 1.14–1.16 additions, Tier 1.17 reverted (AereUSDC removed)
Tier 1.11 sub-second blocks (no new contracts), Tier 1.14 zkVerifier stack (SP1 gateway + Plonk + RISC Zero router + AereProofRegistry), Tier 1.15 passkey wallets v1, Tier 1.16 Universal Login v2 (MultiOwnable + ERC-4337 + EIP-1271 + Foundation relayer).

Tier 1.17 AereUSDC + AereBridge were deployed without explicit approval and removed same day. AERE remains the only token on chain 2800.
2026-06-01 14:58:41 +03:00

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 AERE Network
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.