Function createBicoPaymasterClient

  • Creates a Bico Paymaster Client.

    This function sets up a client for interacting with Biconomy's paymaster service. It can be configured with a custom transport, a specific paymaster URL, or with a chain ID and API key.

    Parameters

    • parameters: BicoPaymasterClientConfig

      Configuration options for the client.

    Returns BicoPaymasterClient

    A configured Paymaster Client instance.

    Example

    // Create a client with a custom transport
    const client1 = createBicoPaymasterClient({ transport: customTransport })

    Example

    // Create a client with a specific paymaster URL
    const client2 = createBicoPaymasterClient({ paymasterUrl: 'https://example.com/paymaster' })

    Example

    // Create a client with chain ID and API key
    const client3 = createBicoPaymasterClient({ chainId: 1, apiKey: 'your-api-key' })

    Example

    // Create a Token Paymaster Client
    const tokenPaymasterClient = createBicoPaymasterClient({
    paymasterUrl: 'https://example.com/paymaster',
    paymasterContext: {
    mode: "ERC20",
    tokenInfo: {
    feeTokenAddress: "0x..."
    }
    },
    })