Skip to main content

Documentation Index

Fetch the complete documentation index at: https://coinvoyage-3c99945b.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

WalletProvider manages wallet connections for the CoinVoyage PayKit SDK. It wraps PayKitProvider in your provider tree and is required to use PayButton and usePayStatus. Without it, the payment modal cannot connect to a user’s wallet. You configure it through a config prop that accepts per-chain settings — you only need to supply configuration for the chains your application uses.

Setup

Import WalletProvider from @coin-voyage/paykit and wrap it around PayKitProvider:
"use client";

import { PayKitProvider, WalletProvider } from "@coin-voyage/paykit";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

const queryClient = new QueryClient();

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <QueryClientProvider client={queryClient}>
      <WalletProvider
        config={{
          evm: {
            coinbase: {
              appName: "My App",
            },
            walletConnect: {
              projectId: "your-project-id",
            },
          },
          solana: {
            rpcUrl: "my-solana-rpc-url",
            walletConfiguration: {
              wallets: [customWalletAdapter()],
            },
          },
          utxo: {
            lazy: true,
          },
        }}
      >
        <PayKitProvider apiKey={process.env.NEXT_PUBLIC_COIN_VOYAGE_API_KEY!}>
          {children}
        </PayKitProvider>
      </WalletProvider>
    </QueryClientProvider>
  );
}
All config fields are optional. You can pass <WalletProvider> with no props and the SDK will use its default connector configuration.

Configuration options

config
object
Object containing chain-type-specific wallet configuration. Every sub-key is optional — include only the chains you need to customize.

config.evm

config.evm
object
Configuration for EVM-compatible chains (Ethereum, Polygon, Arbitrum, Base, etc.). Lets you configure the bundled wallet connectors and add custom ones.

config.solana

config.solana
object
Configuration for the Solana chain. Provide a custom RPC endpoint or extend the list of supported wallet adapters.

config.sui

config.sui
object
Configuration for the Sui chain.

config.utxo

config.utxo
object
Configuration for UTXO-based chains such as Bitcoin.

Examples

Use WalletProvider with no configuration when the SDK defaults are sufficient:
<WalletProvider>
  <PayKitProvider apiKey={process.env.NEXT_PUBLIC_COIN_VOYAGE_API_KEY!}>
    {children}
  </PayKitProvider>
</WalletProvider>