Skip to main contentA-REX Core

标准

接口与版本管理

Interface ids, the layer model, the versioning rules and how to propose a change to the standard.

仅提供英文版
本文档以英文发布。白皮书章节和示意图已翻译;规范性标准、系统设计指南和决策记录保持英文,以确保只有一个权威文本。

This repository holds the normative material of A-REX. Everything outside it (the reference token, the hooks, the extensions, the whitepaper) is an implementation or a demonstration and may change without changing the standard.

Where things live

A-REX is published in three repositories. The specification and the decision records cite paths of the whole project (contracts/standard/…, contracts/reference/…, test/standard/…); this table says where each one is.

Path citedRepositoryFolder there
standard/…, contracts/standard/…, docs/adr/…arex-standard (this one, CC0)/, contracts/, adr/
contracts/reference/…, contracts/examples/…, test/…, scripts/…, ignition/…, docs/*.mdarex-contracts (MIT)same paths; this repository is mounted at lib/arex-standard
whitepaper/ui/…arex-sitethe repository root
FileWhat it is
AREX-CORE.mdThe specification, written in ERC format (Abstract, Motivation, Specification with RFC 2119 keywords, Rationale, Security). CC0.
contracts/The Solidity interfaces the specification refers to: IARexBatch, IARexHook, IARexHookManager, IARexAttest, IERC7943MultiToken (verbatim from ERC-7943), plus ARexCodes and ARexInterfaceIds. CC0.
schema/batch-metadata.schema.jsonJSON Schema for the off-chain metadata document committed by metadataHash. Aligned with GS1 EPCIS 2.0 and FSMA 204 key data elements.
examples/Example documents.

Interface ids

InterfaceERC-165 idRequired
IERC11550xd9b67a26MUST
IERC7943MultiToken0x41c4fbadMUST
IARexBatch0xe22639e0MUST
IARexHookManager0x964f4861MUST (getHooks)
IARexAttest0xad603a6cSHOULD (token or companion)
IARexHook0x332afcbbMUST for hooks

Reproduce with npm run interface-ids.

Layers

flowchart TB
    L3["Layer 3 · IARexAttest<br/>attestations per batch and topic, trusted issuers per topic"]
    L2["Layer 2 · IARexHook + IARexHookManager<br/>ordered rule pipeline, bytes32 rejection codes"]
    L1["Layer 1 · IARexBatch<br/>batch identity, status, metadata commitment, lineage"]
    L0["Layer 0 · ERC-1155 + ERC-165 + ERC-7943<br/>balances, freeze, forced transfer, eligibility"]
    L3 --- L2 --- L1 --- L0
    classDef l3 fill:#edf5ff,stroke:#0f62fe,color:#161616
    classDef l2 fill:#d0e2ff,stroke:#0f62fe,color:#161616
    classDef l1 fill:#a6c8ff,stroke:#0f62fe,color:#161616
    classDef l0 fill:#78a9ff,stroke:#0043ce,color:#161616
    class L3 l3
    class L2 l2
    class L1 l1
    class L0 l0

Each layer builds on the one below. The reference implementation (ARexToken, ARexAttestations) implements all four; the hooks and extensions only depend on the interfaces and are not part of the standard.

LayerInterfaceWhat it standardizesRequired
0ERC-1155, ERC-165, IERC7943MultiTokenbalances and batch transfers; freeze, forced transfer, eligibility, canTransferMUST
1IARexBatchthe batch record with open codes, role-only status with a terminal RETIRED, transform lineageMUST
2IARexHook, IARexHookManagerone hook interface, ordered evaluation, bytes32 rejection codesMUST (getHooks); hooks implement IARexHook
3IARexAttestattestations per (batch, topic), trusted issuers per topicSHOULD, in the token or a companion

Versioning

The interfaces are versioned with the repository (package.json). A change to any function signature, event or normative MUST is a major version and comes with a migration note in docs/. Additive, optional material (new recommended codes, schema fields) is a minor version.

How to propose a change

Open a discussion in the repository describing the use case, the proposed interface change and at least one implementation. Changes are accepted when two independent implementers confirm they can adopt them. This mirrors how ERC-3643 and ERC-7943 evolved before becoming Final.