x402-chainlink
    Preparing search index...

    Function createProvider

    • Create a public client for reading from the blockchain

      Parameters

      • networkOrOptions: string | ProviderOptions

        Network identifier (CAIP-2 format) or ProviderOptions object

      • Optionaloptions: Omit<ProviderOptions, "network">

        Optional provider options (only used if first argument is a network string)

      Returns {}

      Configured public client

      // Simple usage with default RPC
      const client = createPublicClient('eip155:8453');

      // With custom RPC URL
      const client = createPublicClient('eip155:1', {
      rpcUrl: 'https://your-rpc-endpoint.com',
      });

      // Using ProviderOptions object
      const client = createPublicClient({
      network: 'eip155:8453',
      rpcUrl: 'https://custom-rpc.com',
      timeout: 60000,
      });