{"_id":"@arthur2079/sdfjkhdfkjg","name":"@arthur2079/sdfjkhdfkjg","dist-tags":{"next":"0.0.4-next.0","latest":"0.0.4-next.0"},"versions":{"0.0.4-next.0":{"name":"@arthur2079/sdfjkhdfkjg","type":"module","version":"0.0.4-next.0","license":"MIT","private":false,"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc -p ./tsconfig.json","dev":"tsc -p ./tsconfig.json --watch"},"devDependencies":{"@privy-io/react-auth":"^2.24.0","@rango-dev/signer-evm":"^0.40.0","@rango-dev/signer-solana":"^0.46.1","@rango-dev/wallets-shared":"^0.58.0","@rango-dev/widget-embedded":"^0.58.0","@solana/spl-token":"^0.4.14","@solana/web3.js":"^1.91.4","@types/node":"^14.14.31","@types/react":"^18.0.26","@types/react-dom":"^18.0.10","bs58":"^5.0.0","rango-types":"*","react":"^18.2.0"},"peerDependencies":{"@privy-io/react-auth":"^2.24.0","@rango-dev/signer-evm":"^0.40.0","@rango-dev/signer-solana":"^0.46.1","@rango-dev/wallets-shared":"^0.58.0","@rango-dev/widget-embedded":"^0.58.0","@solana/kit":"^3.0.3","@solana/spl-token":"^0.4.14","@solana/web3.js":"^1.91.4","bs58":"^5.0.0","rango-types":"*","react":"^18.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"description":"React utilities that bridge Privy’s embedded wallets with Rango’s wallet-core stack. Drop in the provider, wire up config, and you get social login, multi-chain wallet providers, and signer helpers that feel native to your React app.","_id":"@arthur2079/sdfjkhdfkjg@0.0.4-next.0","dist":{"shasum":"8286a5c2829c20e07cb6a18e1b639681b5a7b354","integrity":"sha512-PXpVRPWWQibhvE3Dn7lp3W22mQ31OUeQcrDkurC4tJ3t1MH+v1KQbUU6D574CYeEzqMXH61l5f6d/6tsd8RdoA==","tarball":"https://registry.npmjs.org/@arthur2079/sdfjkhdfkjg/-/sdfjkhdfkjg-0.0.4-next.0.tgz","fileCount":76,"unpackedSize":50356,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDDKfuxyQxiXgvDLis5DLfwmOQq30gZ36sIRSLOrTQDCwIhAM+h1sga3TTmZ246il5NjQLmUa2UMPuA/ow5Hw6hpT2Q"}]},"_npmUser":{"name":"arthur2079","email":"arthoor.200079@gmail.com"},"directories":{},"maintainers":[{"name":"arthur2079","email":"arthoor.200079@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdfjkhdfkjg_0.0.4-next.0_1777380420150_0.8937399410906322"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T12:47:00.020Z","0.0.4-next.0":"2026-04-28T12:47:00.363Z","modified":"2026-04-28T12:47:00.652Z"},"maintainers":[{"name":"arthur2079","email":"arthoor.200079@gmail.com"}],"description":"React utilities that bridge Privy’s embedded wallets with Rango’s wallet-core stack. Drop in the provider, wire up config, and you get social login, multi-chain wallet providers, and signer helpers that feel native to your React app.","license":"MIT","readme":"# @arthur2079/sdfjkhdfkjg\n\nReact utilities that bridge Privy’s embedded wallets with Rango’s wallet-core stack. Drop in the provider, wire up config, and you get social login, multi-chain wallet providers, and signer helpers that feel native to your React app.\n\n---\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Installation](#installation)\n3. [Peer Dependencies](#peer-dependencies)\n4. [API Surface](#api-surface)\n5. [Getting Started](#getting-started)\n6. [Configuration & Environment](#configuration--environment)\n7. [Development](#development)\n8. [Testing Ideas](#testing-ideas)\n9. [Known Gaps](#known-gaps)\n10. [FAQ](#faq)\n\n---\n\n## Features\n\n- **Drop-in provider** – `SocialWalletProvider` wraps Privy, exposes supported chain state via React context, and includes sane defaults for embedded EVM + Solana wallets.\n- **Multi-namespace hook** – `useSocialWallet` returns a provider map (`evm`, `solana`) backed by `@rango-dev/wallets-core`, handling Privy login, auto-connect, signer instantiation, and error surfacing.\n- **Config hook** – `useSocialWalletConfig` allows any component to read/update the supported chains without prop drilling.\n- **Helper utilities** – Solana signer wrappers, Privy chain converters, and validation helpers keep chain metadata consistent between Privy and Rango.\n\n---\n\n## Installation\n\n```bash\npnpm add @arthur2079/sdfjkhdfkjg\n# or\nyarn add @arthur2079/sdfjkhdfkjg\n```\n\nUse your workspace package manager if different (`npm`, `bun`, etc.).\n\n---\n\n## Peer Dependencies\n\nEnsure these packages already exist in your app (matching versions to your stack):\n\n- `react`, `react-dom`\n- `@privy-io/react-auth`\n- `@rango-dev/wallets-core`, `@rango-dev/wallets-shared`\n- `@rango-dev/signer-evm`, `@rango-dev/signer-solana`\n- `@solana/web3.js`, `@solana/kit`, `bs58`, `rango-types`\n\n---\n\n## API Surface\n\n```ts\nimport {\n  SocialWalletProvider,\n  useSocialWallet,\n  useSocialWalletConfig,\n} from '@arthur2079/sdfjkhdfkjg';\n```\n\n- `SocialWalletProvider` – wraps your tree, configures Privy with sane defaults, and accepts a required `appId` prop.\n- `useSocialWallet` – returns `{ provider, exportEvmWallet, exportSolanaWallet }`.\n- `useSocialWalletConfig` – exposes `{ supportedChains, setSupportedChains }`.\n\nRefer to the source if you need additional helper exports (signers, constants).\n\n---\n\n## Getting Started\n\n### 1. Wrap your app\n\n```tsx\nimport { SocialWalletProvider } from '@arthur2079/sdfjkhdfkjg';\n\nfunction App() {\n  return (\n    <SocialWalletProvider appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID!}>\n      <YourRouter />\n    </SocialWalletProvider>\n  );\n}\n```\n\n### 2. Configure supported chains\n\n```tsx\nimport { useEffect } from 'react';\nimport { useSocialWalletConfig } from '@arthur2079/sdfjkhdfkjg';\nimport type { BlockchainMeta } from 'rango-types';\n\nconst chains: BlockchainMeta[] = [\n  /* fetched from backend */\n];\n\nfunction ChainBootstrap() {\n  const { setSupportedChains } = useSocialWalletConfig();\n\n  useEffect(() => {\n    setSupportedChains(chains);\n  }, [chains, setSupportedChains]);\n\n  return null;\n}\n```\n\n### 3. Consume the wallet provider\n\n```tsx\nimport { useSocialWallet } from '@arthur2079/sdfjkhdfkjg';\n\nfunction ConnectButton() {\n  const { provider, status } = useSocialWallet();\n\n  const connect = async () => {\n    await provider.get('evm')?.connect();\n  };\n\n  return (\n    <button disabled={status === 'connecting'} onClick={connect}>\n      Connect Social Wallet\n    </button>\n  );\n}\n```\n\n### 4. Optional: customize Privy config\n\n```tsx\n<SocialWalletProvider appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID!} />\n```\n\n---\n\n## Configuration & Environment\n\n- `CustomPrivyProvider` defines default Solana RPC URLs in `CustomPrivyProvider.constants.ts`. Override through env variables or inject custom RPCs via props before production.\n- Privy login methods currently default to `email`, `google`, `twitter`. To change them, update `providers/customPrivyProvider/CustomPrivyProvider.tsx` (props-based configuration is not yet wired).\n- When deploying to multiple environments, align `NEXT_PUBLIC_PRIVY_APP_ID`, RPC URLs, and supported chain metadata so Privy and Rango stay in sync.\n\n---\n\n## Development\n\n```bash\npnpm --filter @arthur2079/sdfjkhdfkjg dev   # tsc --watch\npnpm --filter @arthur2079/sdfjkhdfkjg build # emits dist/\n```\n\nBefore publishing:\n\n- Verify `package.json` exports target `dist/index.*`.\n- Run `pnpm --filter @arthur2079/sdfjkhdfkjg build` to regenerate `dist/`.\n- Smoke test the provider in a sandbox app to ensure Privy embeds load correctly.\n\n---\n\n## Testing Ideas\n\nNo automated tests ship with this package yet. Suggested coverage:\n\n- `useSocialWallet` connect/disconnect flows (mock Privy, assert provider map).\n- `useSocialWalletConfig` state updates propagate to consumers.\n- Solana signer wrapper – verifies transaction signing + serialization.\n- Error boundaries and fallback UI when Privy is unavailable.\n\n---\n\n## Known Gaps\n\n- `exportEvmWallet` / `exportSolanaWallet` functions are placeholders.\n- RPC URLs are hardcoded; externalize them for production.\n- First embedded wallet is automatically selected; multi-wallet UX is out of scope for now.\n\n---\n\n## FAQ\n\n**Q: Does this replace traditional wallet adapters?**  \nA: No. It complements them by giving Privy-powered embedded wallets that conform to the same wallet-core interface.\n\n**Q: How do I add a new chain?**  \nA: Update your backend/source of `BlockchainMeta`, call `setSupportedChains`, and ensure Privy supports the chain ID + namespace.\n\n**Q: Why can’t I connect on Solana?**  \nA: Double-check Solana RPC URLs, make sure `@solana/web3.js` is available, and confirm the Privy app has Solana enabled.\n","readmeFilename":"README.md","_rev":"1-cfa3bf4ba89746cee7f88d48b857076b"}