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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@cyphr/sdk

v1.0.0

Published

SDK for integrating Cyph Wallet with React, Chakra UI, and Wagmi.

Readme

@cyphr/sdk 🛠️

SDK for integrating Cyph Wallet with React, Chakra UI, and Wagmi. Provides reusable UI components and utilities for wallet auth, social login, API key management, and Web3 balance queries.

✨ Features

🔐 Social, email, phone, and wallet login UI

🔑 API key generation modal

💳 Wallet balances, NFTs, transactions

🧱 Built with Chakra UI + Wagmi

📦 ESM/CJS exports with full TypeScript support

📦 Installation npm install @cyphr/sdk

Peer Dependencies:

npm install react wagmi @chakra-ui/react

🧱 Components

  1. UnauthenticatedContent

UI for users to connect with wallet, phone, email, social login, or passkey.

✅ Usage: import UnauthenticatedContent from '@cyphr/sdk'

<UnauthenticatedContent chainId={1} rpcUrl="https://mainnet.infura.io/v3/YOUR_KEY" showWallets showSocialLogins showEmailLogin showPhoneLogin showPasskeyLogin={false} onClose={() => console.log('modal closed')} />

Props Prop Type Description chainId number Target chain (e.g. 1 for Ethereum Mainnet) rpcUrl string? Optional RPC provider URL showWallets boolean Show wallet connector section showSocialLogins boolean Show social login buttons (Twitter, etc.) showEmailLogin boolean Show email login UI showPhoneLogin boolean Show phone login UI showPasskeyLogin boolean Enable passkey login (not yet implemented) onClose () => void Called on successful login or close 2. CreateApiKeyModal

A modal to securely generate and configure API keys.

✅ Usage: import { CreateApiKeyModal } from '@cyphr/sdk' import { useDisclosure } from '@chakra-ui/react'

const { isOpen, onOpen, onClose } = useDisclosure()

<CreateApiKeyModal isOpen={isOpen} onClose={onClose} onCreated={() => alert('API key created')} />

Props Prop Type Description isOpen boolean Modal visibility onClose () => void Close handler onCreated () => void Callback after API key is created

⚠️ The secret key is shown only once — instruct users to save it!

  1. WalletApps

Displays a styled wallet button (with icon, spinner, disabled state).

✅ Usage: import WalletApps from '@cyphr/sdk'

<WalletApps connector={{ id: 'metamask', name: 'MetaMask' }} onClick={() => connectWallet()} isLoading={false} disabled={false} />

Props Prop Type Description connector any Wallet info (id, name) onClick () => void Click handler isLoading boolean Show spinner disabled boolean Disable interaction iconId string? Optional override for icon lookup name string? Optional name override 4. AuthenticatedContent

Used after login to show links and logout options.

✅ Usage: import AuthenticatedContent from '@cyphr/sdk' import { FaHome, FaUser } from 'react-icons/fa'

<AuthenticatedContent navLinks={[ { label: 'Home', href: '/home', icon: FaHome }, { label: 'Profile', href: '/profile', icon: FaUser }, ]} onLogout={() => console.log('Logging out')} onClose={() => console.log('Closing nav')} currentPath="/home" logoutRedirectPath="/login" />

Props Prop Type Description navLinks NavLink[] Links to show (label, href, icon) onLogout () => void Logout handler onClose () => void Close the nav menu currentPath string Current route path (for active link state) logoutRedirectPath string? Redirect after logout (default: /login) 🧪 API Utilities

All fetches use built-in authFetch (with credentials: include).

  1. src/api/users.ts setClientId(clientId?: string) fetchUserProfile(): Promise

  2. sdk/src/api/wallets.ts setClientId(clientId?: string) getWalletTransactions(address: string, opts?): Promise<WalletTransaction[]> getNativeBalance(address: string): Promise getTokenBalances(address: string): Promise<TokenBalance[]> getWalletNFTs(address: string): Promise<NFT[]>

🧰 Build Setup npm run build

Uses tsup to bundle into:

CommonJS (dist/index.cjs.js)

ESM (dist/index.esm.js)

Type declarations (dist/index.d.ts)

The build outputs are available via exports in package.json.

📁 Package Exports "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.esm.js", "require": "./dist/index.cjs.js" }, "./utils": { "import": "./dist/utils/index.esm.js", "require": "./dist/utils/index.cjs.js", "types": "./dist/utils/index.d.ts" } }

📚 Repository

🔗 GitHub: CypherVerseLabs/cyph-wallet-sdk

📜 License

MIT © CypherVerseLabs