npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cfxdevkit/wallet-connect

v2.0.9

Published

Browser wallet connectors and headless UI.

Readme

@cfxdevkit/wallet-connect

Scope: Opinionated wallet-connection bundle for web apps targeting Conflux networks (Core & eSpace), built on top of Wagmi v2 and Viem.

Responsibilities

  • Pre-configured Wagmi connectors for Conflux chains (Core & eSpace)
  • ConnectKit-style UI wiring (via ./ui)
  • SIWE (Sign-In With Ethereum) flow helpers (via ./siwe and ./auth)
  • FluentCore provider detection and integration

Depends on: @cfxdevkit/cdk, optionally react, wagmi, viem.


Install

npm install @cfxdevkit/wallet-connect
# or
yarn add @cfxdevkit/wallet-connect
# or
pnpm add @cfxdevkit/wallet-connect

Sub-paths

| Sub-path | Exports | |----------|---------| | . | 57 symbols | | ./config | 11 symbols | | ./hooks | 3 symbols | | ./siwe | 9 symbols | | ./ui | 4 symbols | | ./auth | 5 symbols |


.

Chains & Config

export declare const espaceMainnet: Chain;
export declare const espaceTestnet: Chain;
export declare const espaceLocal: Chain;
export declare const SUPPORTED_ESPACE_CHAINS: readonly Chain[];
export declare const CORE_CHAIN_CONFIGS: Record<number, CoreChainConfig>;

export declare function createSupportedEspaceChains(
  options?: CreateSupportedEspaceChainsOptions
): readonly Chain[];

export declare function createConfluxWagmiConfig(
  options?: CreateConfluxWagmiConfigOptions
): wagmi.Config;

Providers & Connectors

export declare function ConfluxWagmiProviders({
  children,
  config,
  configOptions,
  queryClient,
  queryClientConfig,
}: ConfluxWagmiProvidersProps): React.JSX.Element;

export declare function useEspaceConnectors(): UseEspaceConnectorsReturn;

export declare function getFluentCoreProvider(): FluentProvider | null;
export declare function detectFluentCore(maxMs?: number): Promise<FluentProvider | null>;
export declare function isFluentProvider(provider: unknown): boolean;

Chain Interaction

export declare function switchEspaceChain(
  provider: Eip1193Provider,
  chain: Chain,
  options?: SwitchChainOptions
): Promise<void>;

export declare function switchConfluxChain(
  provider: FluentProvider,
  chainId: string,
  addParams: ConfluxAddChainParams
): Promise<void>;

export declare function buildAddChainParams(
  target: CoreChainConfig,
  rpcUrl?: string
): ConfluxAddChainParams;

export declare function rpcCoreChainId(provider: FluentProvider): Promise<string | null>;
export declare function rpcCoreAccounts(provider: FluentProvider): Promise<string[]>;

State Helpers

export declare function deriveCoreState(
  status: string,
  chainId: string | undefined,
  targetHex: string
): CorePillState;

export declare function deriveESpaceState(
  isConnected: boolean,
  chainId: number,
  targetChainId: number
): ESpacePillState;

export declare function needsESpaceSwitch(
  isConnected: boolean,
  connectedChainId: number,
  targetChainId: number
): boolean;

export declare function coreChainLabel(chainId: string | undefined): string;
export declare function espaceChainLabel(chainId: number): string;

Utilities

export declare function normalizeCoreChainId(raw: string): string;
export declare function getCoreChainConfig(chainIdHex: string): CoreChainConfig | null;
export declare function formatProviderError(error: unknown): string;
export declare function errMsg(error: unknown): string;

./ui

Exports React components for wallet connection UI (e.g., ConnectButton, WalletPickerModal).

export declare function ConnectButton(props?: ConnectButtonProps): React.JSX.Element;
export declare function WalletPickerModal(props: WalletPickerModalProps): React.JSX.Element;

./siwe

SIWE message generation, parsing, and verification helpers.

export declare function generateSiweNonce(options?: GenerateSiweNonceOptions): string;
export declare function parseSiweMessage(message: string): ParsedSiweMessage;
export declare function verifySiweMessage(input: VerifySiweMessageInput): Promise<VerifySiweMessageResult>;

./auth

Authentication helpers (e.g., SIWE integration with wallet connectors).

export declare function useAuth(): {
  login: () => Promise<void>;
  logout: () => void;
  isAuthenticated: boolean;
  user: string | null;
};

./hooks

Custom React hooks for wallet state and chain switching.

export declare function useCoreWallet(): {
  provider: FluentProvider | null;
  accounts: string[];
  chainId: string | null;
};

./config

Chain configuration types and defaults.

export interface CoreChainConfig {
  chainId: number;
  chainName: string;
  rpcUrls: string[];
  nativeCurrency: { name: string; symbol: string; decimals: number };
  blockExplorerUrls?: string[];
}

Usage

import { createConfluxWagmiConfig, ConfluxWagmiProviders } from '@cfxdevkit/wallet-connect';

const config = createConfluxWagmiConfig();

function App() {
  return (
    <ConfluxWagmiProviders config={config}>
      <YourApp />
    </ConfluxWagmiProviders>
  );
}

API Reference

See API.md for the full public surface.

Tier

Tier 0 — framework — Must not runtime-import from any higher tier.