Interface: VerifierRegistry
Defined in: packages/x402-core/src/verify/registry.ts:15
Methods
find()
find(scheme, network): SchemeVerifier<unknown> | undefined;Defined in: packages/x402-core/src/verify/registry.ts:17
The verifier registered for this exact (scheme, network), or undefined.
Parameters
scheme
string
network
string
Returns
SchemeVerifier<unknown> | undefined
verify()
verify(
payload,
requirements,
context
): Promise<
| {
extensions?: {
[key: string]: unknown;
};
extra?: {
[key: string]: unknown;
};
isValid: true;
payer?: string;
}
| {
extensions?: {
[key: string]: unknown;
};
extra?: {
[key: string]: unknown;
};
invalidMessage?: string;
invalidReason: | "invalid_exact_canton_missing_proof"
| "invalid_exact_canton_malformed_payload"
| "invalid_exact_canton_signature_invalid"
| "invalid_exact_canton_amount_mismatch"
| "invalid_exact_canton_merchant_mismatch"
| "invalid_exact_canton_instrument_id_mismatch"
| "invalid_exact_canton_preapproval_missing"
| "invalid_exact_canton_fee_payer_mismatch"
| "invalid_exact_canton_expired"
| "invalid_exact_canton_execute_before_too_far"
| "invalid_exact_canton_insufficient_inputs"
| "invalid_exact_canton_memo_mismatch"
| "invalid_exact_canton_merchant_not_registered"
| "invalid_exact_canton_self_payment"
| "invalid_exact_canton_execute_failed"
| "unexpected_canton_ledger_error"
| "settlement_pending"
| "invalid_network"
| "unsupported_scheme"
| "insufficient_funds"
| "invalid_payload"
| "invalid_payment_requirements"
| "invalid_scheme"
| "invalid_x402_version"
| "invalid_transaction_state"
| "unexpected_verify_error"
| "unexpected_settle_error"
| "invalid_exact_canton_synchronizer_mismatch";
isValid: false;
payer?: string;
}>;Defined in: packages/x402-core/src/verify/registry.ts:25
Dispatch a payment to the verifier for its requirements; unsupported_scheme or invalid_network if none. context is passed through untouched — see SchemeVerifier.verify, which says what a scheme expects in it. The registry is heterogeneous, so it cannot know the shape; the caller builds the one the requirements' scheme asks for.
Parameters
payload
X402PaymentPayload<unknown, unknown>
requirements
X402PaymentRequirements<unknown>
context
unknown
Returns
Promise< | { extensions?: { [key: string]: unknown; }; extra?: { [key: string]: unknown; }; isValid: true; payer?: string; } | { extensions?: { [key: string]: unknown; }; extra?: { [key: string]: unknown; }; invalidMessage?: string; invalidReason: | "invalid_exact_canton_missing_proof" | "invalid_exact_canton_malformed_payload" | "invalid_exact_canton_signature_invalid" | "invalid_exact_canton_amount_mismatch" | "invalid_exact_canton_merchant_mismatch" | "invalid_exact_canton_instrument_id_mismatch" | "invalid_exact_canton_preapproval_missing" | "invalid_exact_canton_fee_payer_mismatch" | "invalid_exact_canton_expired" | "invalid_exact_canton_execute_before_too_far" | "invalid_exact_canton_insufficient_inputs" | "invalid_exact_canton_memo_mismatch" | "invalid_exact_canton_merchant_not_registered" | "invalid_exact_canton_self_payment" | "invalid_exact_canton_execute_failed" | "unexpected_canton_ledger_error" | "settlement_pending" | "invalid_network" | "unsupported_scheme" | "insufficient_funds" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "unexpected_verify_error" | "unexpected_settle_error" | "invalid_exact_canton_synchronizer_mismatch"; isValid: false; payer?: string; }>