ERC Metadata
Serves EIP-721/EIP-1155-compatible token metadata JSON for tokenized products over HTTP. This is the endpoint that token URIs generated by the ETH Minter adapter point to.
This is a routes-only plugin — it registers no adapter, just the HTTP endpoint.
Included in Base Preset
Registered automatically by registerBasePlugins() / registerAllPlugins().
Registration
import { pluginRegistry } from '@unchainedshop/core';
import { ERCMetadataPlugin } from '@unchainedshop/plugins/warehousing/erc-metadata';
pluginRegistry.register(ERCMetadataPlugin);
Endpoint
GET /erc-metadata/:productId/:localeOrTokenFilename{/:tokenFileName}
Two URL forms — the filename must end in .json:
/erc-metadata/{productId}/{tokenFileName}.json # locale resolved from request context
/erc-metadata/{productId}/{locale}/{tokenFileName}.json # explicit locale, e.g. de-CH
The handler loads the product, looks up the token (for ERC721 products by contract address only; for other contract standards the token serial number is parsed from the filename), and returns the metadata built by the services.warehousing.ercMetadata service. Responds 404 if no metadata exists, 503 on errors.
See ETH Minter for the shape of the returned metadata document.
Environment Variables
| Variable | Default | Description |
|---|---|---|
ERC_METADATA_API_PATH | /erc-metadata | Path prefix the route is mounted at |
ROOT_URL | http://localhost:4010 | Base URL used to parse the request URL |
Plugin Details
| Property | Value |
|---|---|
| Key | shop.unchained.warehousing.erc-metadata |
| Version | 1.0.0 |
| Source | warehousing/erc-metadata |
Related
- ETH Minter - Creates the tokens and metadata this endpoint serves