Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

EIP-712 Types

All signatures use the same domain:

domain: {
  name: "Objekt",
  version: "1"
}

Upload (Storage Gateway)

primaryType: "Upload"
types: {
  Upload: [
    { name: "upload", type: "string" },   // Upload type / key
    { name: "expiry", type: "string" },   // Timestamp ms
    { name: "name", type: "string" },     // ENS name or address
    { name: "hash", type: "string" },     // SHA-256 of file bytes
  ]
}

RevealDeposit

primaryType: "RevealDeposit"
types: {
  RevealDeposit: [
    { name: "action", type: "string" },      // "deposit"
    { name: "ensName", type: "string" },     // Namespace (ENS name or 0x address)
    { name: "keyName", type: "string" },     // Key name (e.g. "phone")
    { name: "commitment", type: "string" },  // sha256(viewKey)
    { name: "price", type: "string" },       // USD price (e.g. "5.00")
    { name: "expiry", type: "string" },      // Timestamp ms
  ]
}

RevealRemove

primaryType: "RevealRemove"
types: {
  RevealRemove: [
    { name: "action", type: "string" },    // "remove"
    { name: "ensName", type: "string" },   // Namespace
    { name: "keyName", type: "string" },   // Key name
    { name: "expiry", type: "string" },    // Timestamp ms
  ]
}

Verification

Server-side verification uses viem's verifyTypedData:

import { verifyTypedData } from "viem/actions";
 
const valid = await verifyTypedData(client, {
  ...typedDataParameters,
  address: unverifiedAddress,
  signature: sig,
  message: { ... },
});

After signature verification, the server checks that the recovered address owns the ENS name (via ensjs getOwner) or matches the 0x namespace directly.