validateDescriptor
validateDescriptor(
input):ValidationResult
Defined in: packages/sdk/src/schema/validate.ts:182
Validate an ERC-7730 descriptor against the official JSON Schema.
Version is taken from $schema when present. If $schema is omitted, v2 is
tried first and a valid v1 document is accepted as version: "1".
Returns { ok: false, errors } for a rejected document. Does not throw.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Example
Section titled “Example”import { validateDescriptor } from '@erc7730/sdk';
const result = validateDescriptor({ $schema: 'https://eips.ethereum.org/assets/eip-7730/erc7730-v2.schema.json',});