42 lines
966 B
TypeScript
42 lines
966 B
TypeScript
declare module "@x402/core" {
|
|
export interface PaymentRequirements {
|
|
scheme: string;
|
|
network: string;
|
|
maxAmountRequired: string;
|
|
resource: string;
|
|
description: string;
|
|
mimeType?: string;
|
|
payTo: string;
|
|
maxTimeoutSeconds?: number;
|
|
outputSchema?: unknown;
|
|
extra?: Record<string, unknown>;
|
|
}
|
|
|
|
export function exact(
|
|
payTo: string,
|
|
amount: string | number,
|
|
extra?: Record<string, unknown>
|
|
): PaymentRequirements;
|
|
}
|
|
|
|
declare module "@x402/core/types" {
|
|
export interface PaymentPayload {
|
|
x402Version: number;
|
|
scheme: string;
|
|
network: string;
|
|
payload: unknown;
|
|
}
|
|
}
|
|
|
|
declare module "@x402/core/verify" {
|
|
export function verifyPayment(
|
|
payment: string,
|
|
requirements: import("@x402/core").PaymentRequirements,
|
|
opts?: { facilitatorUrl?: string }
|
|
): Promise<{ valid: boolean; error?: string }>;
|
|
}
|
|
|
|
declare module "@x402/evm" {
|
|
export function getEvmPaymentSchemes(): unknown[];
|
|
}
|