EIPs Explained

ERC-5375 · Final · ERC · 2022-07-30

ERC-5375: NFT Author Information and Consent

Adds an authorInfo field to NFT metadata listing author addresses plus optional EIP-712 signatures proving each author agreed to be named, so minters cannot credit someone without consent.

What problem does it solve?

There is no standard way to say who created an NFT. Marketplaces usually assume the minter (msg.sender or tx.origin) is the author, which breaks for contract mints, lazy minting, and mints done by an intermediary on the artist's behalf. It also cannot express multiple authors. Custom fields fix that, but then anyone can name anyone as author without their agreement.

ERC-5375 lets the minter list authors in the metadata, and lets each author attach a signature showing they consented to being named.

How it works

The NFT's metadata JSON (from tokenURI for ERC-721 or uri for ERC-1155) gets a top-level authorInfo field:

  • authors: an array of { address, consent? }. Addresses use EIP-55 checksum casing. The array may be empty.
  • consentInfo: chainId, contractAddress and token id, required whenever any consent is present, so a proof can be checked from the JSON alone.
  • consent (optional, per author): consentData (version, issuer, metadataFields), the author's publicKey, and an EIP-712 signature.

The author signs a typed Author { address subject; uint256 tokenId; string metadata; } message, where subject is the NFT contract and metadata is a compact JSON string of the metadata fields the author certifies (listed in metadataFields, same order, no extra whitespace, non-ASCII escaped as uppercase \uXXXX). The domain is { name, version, chainId }.

A verifier checks the schema, that the listed fields still match the live metadata, and that the signature recovers to the author's address. Chain ID, contract and token ID together make the proof non-replayable, so no nonce is needed.

Sample code

Author signs consent, verifier recovers the address (ethers v6):

import { verifyTypedData } from "ethers";

const domain = { name: "ERC5375", version: "1", chainId: 1 }; // name/version as agreed by the minter
const types = {
  Author: [
    { name: "subject", type: "address" },
    { name: "tokenId", type: "uint256" },
    { name: "metadata", type: "string" },
  ],
};
const value = {
  subject: nftContract,
  tokenId: 42n,
  metadata: JSON.stringify({ name: "Sunrise #42", description: "Oil on canvas, scanned" }),
};

const signature = await authorWallet.signTypedData(domain, types, value);

// verifier side
const recovered = verifyTypedData(domain, types, value, signature);
const ok = recovered.toLowerCase() === claimedAuthor.toLowerCase();

Resulting metadata fragment:

{
  "name": "Sunrise #42",
  "authorInfo": {
    "consentInfo": { "chainId": 1, "id": "42", "contractAddress": "0x…" },
    "authors": [{
      "address": "0x…",
      "consent": {
        "consentData": { "version": "1", "issuer": "0x…", "metadataFields": ["name", "description"] },
        "publicKey": "0x…",
        "signature": "0x…"
      }
    }]
  }
}

Things to know

  • Status: Final.
  • A valid proof shows an address agreed to be named, not that it actually created the work. A missing proof, however, may be taken as evidence the address is not an author.
  • It ties consent to an address, not a person; linking an address to a real identity is out of scope. Free-text author names were deliberately dropped because they made spoofing easy.
  • Authors should check exactly what they sign. If important fields are left out of metadataFields, the minter can change them later without invalidating the signature.
  • The spec says the domain's name and version match fields in consentData, but consentData defines only version; agree on the domain name with your verifier.
  • Authors never need gas or to send a transaction, only to sign a message.
  • There is no revocation mechanism by design.

#nft #metadata #authorship #eip712 #signatures

Details

Authors
Samuele Marro (@samuelemarro), Luca Donno (@lucadonnoh)
Status
Final
Type
Standards Track / ERC
Created
2022-07-30
Requires

Machine-readable: Markdown · JSON