x402-chainlink
    Preparing search index...

    Class DiscoveryClient

    HTTP client for communicating with x402 discovery/bazaar services

    const client = new DiscoveryClient({
    baseUrl: 'https://bazaar.example.com',
    });

    // Discover resources
    const resources = await client.discover({
    type: 'http',
    network: 'base:sepolia',
    limit: 10,
    });

    // Register a resource (for providers)
    const result = await client.register({
    resource: 'https://api.myservice.com/data',
    type: 'http',
    accepts: [paymentRequirements],
    metadata: { category: 'data', provider: 'MyService' },
    });

    Implements

    Index

    Constructors

    Methods

    • Unregister a resource from the bazaar

      Parameters

      • resourceId: string

      Returns Promise<{ error?: string; success: boolean }>