4 documents
Standard
The normative specification, the generated interface and metadata references, and the versioning rules. CC0.
The standard is the part of A-REX that other people implement. It is small on purpose: five interfaces, a batch metadata schema and one specification document, all under CC0. Nothing in this section depends on the reference implementation.
Documents in this section
| Document | Status | Use it to |
|---|---|---|
| A-REX Core specification | normative | know exactly what a conformant token and a conformant hook MUST, SHOULD and MAY do |
| Interface reference | generated from contracts/standard/ | look up any function, event, error, struct field or constant with its NatSpec |
| Batch metadata schema | generated from the JSON Schema | build and validate the off-chain document that metadataHash commits to |
| Interfaces and versioning | normative | find interface ids, the layer model, the versioning rules and how to propose a change |
Conformance at a glance
| A token is conformant when it | Interface id |
|---|---|
| implements ERC-1155 and ERC-165 | 0xd9b67a26 |
| implements the ERC-7943 multi-token interface | 0x41c4fbad |
implements IARexBatch | 0xe22639e0 |
exposes its pipeline through IARexHookManager.getHooks() | 0x964f4861 |
provides IARexAttest itself or through a companion (SHOULD) | 0xad603a6c |
A hook is conformant when it implements IARexHook (0x332afcbb) and ERC-165. npm run interface-ids prints every id from the compiled code.
Documents
A-REX Core — Agricultural Batch Token Standard
A minimal extension of ERC-1155 and ERC-7943 for tokenized agricultural batches — batch identity, lineage, an ordered hook pipeline and open attestations.
Interface reference
Every function, event, error and type of the five normative interfaces, generated from contracts/standard/ and its NatSpec on each build. For the normative prose, read the specification.
Batch metadata schema
The off-chain document every batch commits to with metadataHash and points to with uri, generated from standard/schema/batch-metadata.schema.json on each build.
Interfaces and versioning
Interface ids, the layer model, the versioning rules and how to propose a change to the standard.