Minimal structural shape of the signer x402 needs: an EVM address and an EIP-712 typed-data
signer. A viem account (e.g. privateKeyToAccount(pk)) satisfies this — the method syntax keeps
viem's account assignable. Declared structurally so the public ./x402 types do not depend on
viem (an optional peer), which otherwise breaks moduleResolution: node16 type-checking for
consumers with skipLibCheck: false.
Sign EIP-712 typed data; returns a 0x-prefixed signature. unknown (with method syntax, which
is bivariant) keeps viem's narrower signTypedData assignable while remaining callable by
anyone implementing a custom signer or test double.
Minimal structural shape of the signer x402 needs: an EVM address and an EIP-712 typed-data signer. A viem account (e.g.
privateKeyToAccount(pk)) satisfies this — the method syntax keeps viem's account assignable. Declared structurally so the public./x402types do not depend onviem(an optional peer), which otherwise breaksmoduleResolution: node16type-checking for consumers withskipLibCheck: false.