{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://craigmerry.com/solidarity-levy/spec/solidarity.schema.json",
  "title": "solidarity extension info (draft 1)",
  "description": "The info object of the proposed x402 `solidarity` extension. A proposal, not part of x402. See https://craigmerry.com/solidarity-levy/spec/solidarity.md",
  "type": "object",
  "properties": {
    "version": { "const": 1 },
    "rate": { "type": "string", "pattern": "^0(\\.\\d{1,6})?$", "description": "Decimal fraction, at most 0.01" },
    "amount": { "type": "string", "pattern": "^[0-9]+$", "description": "Atomic units of the purchase asset" },
    "fund": { "type": "string", "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:[-.%a-zA-Z0-9]{1,128}$", "description": "CAIP-10 account of an allow-listed fund" },
    "policy": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
    "period": { "type": "string", "pattern": "^\\d{4}-(0[1-9]|1[0-2])$" },
    "authorization": { "type": "object", "required": ["scheme", "payload"], "properties": { "scheme": { "type": "string" }, "payload": { "type": "object" } } }
  },
  "required": ["version", "rate", "amount", "fund", "policy", "period", "authorization"],
  "additionalProperties": false
}
