{"id":41438616,"url":"https://github.com/circlefin/circle-bridge-kit-transfer","last_synced_at":"2026-01-23T14:51:59.605Z","repository":{"id":325551914,"uuid":"1080713869","full_name":"circlefin/circle-bridge-kit-transfer","owner":"circlefin","description":"A sample application that demonstrates how to use Bridge Kit to make cross chain USDC transfers with a wallet connect experience.","archived":false,"fork":false,"pushed_at":"2025-11-22T00:07:11.000Z","size":405,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-22T02:22:20.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/circlefin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-21T19:01:49.000Z","updated_at":"2025-11-22T00:06:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/circlefin/circle-bridge-kit-transfer","commit_stats":null,"previous_names":["circlefin/circle-bridge-kit-transfer"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/circlefin/circle-bridge-kit-transfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcircle-bridge-kit-transfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcircle-bridge-kit-transfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcircle-bridge-kit-transfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcircle-bridge-kit-transfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circlefin","download_url":"https://codeload.github.com/circlefin/circle-bridge-kit-transfer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcircle-bridge-kit-transfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T14:51:52.914Z","updated_at":"2026-01-23T14:51:59.589Z","avatar_url":"https://github.com/circlefin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Circle Bridge Kit Transfer\n\nThis sample app demonstrates how to use Circle's [Bridge Kit](https://www.npmjs.com/package/@circle-fin/bridge-kit) to transfer USDC across chains with a wallet-connect experience for both EVM and Solana testnets.\n\n\u003cimg width=\"830\" height=\"525\" alt=\"App interface showing Metamask approval for burn\" src=\"https://github.com/user-attachments/assets/bb216390-f37a-4141-b4c2-5111a8beecc6\" /\u003e\n\n## Prerequisites\n\n- Node.js 24+ (recommended LTS) and npm\n- An EVM wallet (e.g., MetaMask) and a Solana wallet (e.g., Phantom)\n- Testnet USDC on the relevant chains and native tokens for gas fees\n\n## Getting Started\n\n1. Install dependencies:\n\n    ```bash\n    npm install\n    ```\n\n2. Start the app in development:\n\n    ```bash\n    npm run dev\n    ```\n\nThis runs both:\n- Client (Vite) on `http://localhost:5173`\n- Preview server (Hono) on `http://localhost:8787`\n\nThe Vite dev server proxies `/api` to the preview server per `vite.config.ts`.\n\n3. Build for production:\n\n    ```bash\n    npm run build\n    ```\n\nOutputs static assets to `dist/` and type-checks the project.\n\n4. Preview the production build locally:\n\n    ```bash\n    npm run preview\n    ```\n\nServes `dist/` using the Hono server on `http://localhost:8787`.\n\n## How It Works\n\n- Supported chains are fetched from Bridge Kit at runtime and mapped to Wagmi in `src/lib/wagmiConfig.ts` and `src/lib/mapChains.ts`.\n- Wallet wiring:\n  - `useEvmAdapter` builds a Bridge Kit EVM adapter from the active Wagmi connector provider.\n  - `useSolanaWallet` connects to `window.solana` and builds a Solana adapter.\n- The main flow is in `src/App.tsx`:\n  - Pick source and destination chains (testnets), enter USDC amount, connect wallets.\n  - On submit, we optionally switch the EVM network, then call `useBridge().bridge(...)`.\n  - Bridge Kit emits events; the UI updates progress and logs.\n  - On success, balances refresh and success UI appears.\n- USDC balances are queried via Bridge Kit actions (`usdc.balanceOf`) in `src/hooks/useUsdcBalance.ts`.\n\n## File Highlights\n\n- `src/App.tsx`: Main UI and bridging flow\n- `src/lib/wagmiConfig.ts`: Dynamically builds Wagmi config from Bridge Kit chains\n- `src/lib/mapChains.ts`: Maps Bridge Kit chain metadata to Wagmi `Chain`\n- `src/hooks/useBridge.ts`: Thin wrapper around `BridgeKit().bridge(...)` with event handling\n- `src/hooks/useEvmAdapter.ts`: Creates EVM adapter from Wagmi provider\n- `src/hooks/useSolanaWallet.ts`: Connects Solana wallet and creates adapter\n- `src/hooks/useUsdcBalance.ts`: Reads USDC balances per chain\n- `api/server.ts`: Hono server to serve the built app (`dist/`)\n\n## Usage Notes\n\n- This sample is scoped to testnets (filters Bridge Kit chains by `isTestnet === true`).\n- If multiple EVM providers are present (e.g., Phantom EVM + MetaMask), the app attempts a sane default; you can switch via the wallet UI.\n- If wallet network switching is rejected, the bridging flow will skip and you can try again.\n- After use, disconnecting directly from your wallet UI can improve reliability between sessions.\n\n## Scripts\n\n- `npm run dev`: Run preview server and Vite dev server concurrently\n- `npm run dev:server`: Start the Hono preview server with live reload\n- `npm run dev:client`: Start Vite dev server\n- `npm run build`: Build static assets and run type-checking\n- `npm run preview`: Serve `dist/` via Hono server\n\n## Security \u0026 Usage Model\n\nThis sample application:\n- Assumes testnet or sandbox usage only\n- Does not store private keys in plaintext\n- Uses environment variables for secrets\n- Is not intended for production use without modification\n\nSee `SECURITY.md` for vulnerability reporting guidelines. Please report issues privately via Circle's bug bounty program.\n\n## License\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/circlefin/circle-bridge-kit-transfer/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fcircle-bridge-kit-transfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirclefin%2Fcircle-bridge-kit-transfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fcircle-bridge-kit-transfer/lists"}