#!/usr/bin/env node /** * @name OobeX402FacilitatorServer * @description Self-hosted OOBE x402 SVM facilitator compatible with @x402/core HTTPFacilitatorClient. */ import type { Network, PaymentRequirements } from '@x402/core/types'; /** * @name OobeFacilitatorConfig * @description Runtime configuration for the self-hosted OOBE x402 facilitator. */ export interface OobeFacilitatorConfig { host: string; port: number; pathPrefix: string; networks: Network[]; signerPath: string; rpcUrl?: string; rpcFallbackUrls: string[]; authToken?: string; } /** * @name OobeX402FacilitatorServer * @description HTTP server exposing `/supported`, `/verify`, and `/settle` for x402 facilitator clients. */ export declare class OobeX402FacilitatorServer { private readonly config; private readonly facilitator; private httpServer?; private constructor(); /** * @name create * @description Creates a facilitator server with an SVM exact scheme registered for configured Solana networks. */ static create(config?: OobeFacilitatorConfig): Promise; /** * @name start * @description Starts the OOBE x402 facilitator HTTP server. */ start(): Promise; /** * @name stop * @description Stops the facilitator HTTP listener. */ stop(): Promise; private handleRequest; private isAuthorized; } /** * @name loadOobeFacilitatorConfig * @description Loads OOBE facilitator config from process environment. */ export declare function loadOobeFacilitatorConfig(): OobeFacilitatorConfig; /** * @name createFacilitatorSigner * @description Creates a dedicated 64-byte Solana keypair JSON for the x402 facilitator fee-payer role. */ export declare function createFacilitatorSigner(path?: string): { path: string; publicKey: string; created: boolean; }; /** * @name getFacilitatorSignerPublicKey * @description Reads the facilitator signer file only to derive the public key and never returns secret bytes. */ export declare function getFacilitatorSignerPublicKey(path?: string): string; /** * @name validateFacilitatorConfig * @description Fails fast on unsafe public facilitator configuration before loading signer material. */ export declare function validateFacilitatorConfig(config: OobeFacilitatorConfig): void; /** * @name buildFacilitatorRpcUrls * @description Resolves primary, configured fallback, and network-default RPC URLs for facilitator failover. */ export declare function buildFacilitatorRpcUrls(config: Pick): string[]; /** * @name normalizeLegacySvmPaymentRequirements * @description Adds the x402 V1 SVM amount alias expected by older exact-SVM verifier paths. */ export declare function normalizeLegacySvmPaymentRequirements(requirements: PaymentRequirements): PaymentRequirements; //# sourceMappingURL=oobe-facilitator-server.d.ts.map