Skip to content

Commit aa003aa

Browse files
Merge branch 'feat/multichain-wallet-gateway-improvements' of github.com:akelani-circle/arc-multichain-wallet into feat/multichain-wallet-gateway-improvements
2 parents 6d0f4b2 + c7200ea commit aa003aa

File tree

3 files changed

+82
-57
lines changed

3 files changed

+82
-57
lines changed

README.md

Lines changed: 79 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,76 @@
11
# Arc Multichain Wallet
22

3-
This sample app demonstrates how developers can build the best USDC interoperability UX for wallets using Arc and Gateway.
3+
A sample application demonstrating how to build optimal USDC interoperability UX for wallets using Arc and Circle Gateway. This app showcases unified balance management, deposits, and cross-chain transfers across multiple EVM chains using Next.js and Supabase.
44

5-
## Prerequisites
6-
7-
### Clone the Repository
8-
9-
```bash
10-
git clone https://github.com/circlefin/arc-multichain-wallet.git
11-
cd arc-multichain-wallet
12-
```
13-
14-
### Install Dependencies
5+
<img width="830" height="658" alt="Interface for depositing to and transfering from a Gateway balance" src="public/screenshot.png" />
156

16-
This project uses **npm** as the package manager. Make sure you have Node.js 18+ installed.
7+
## Prerequisites
178

18-
```bash
19-
npm install
20-
```
9+
- Node.js 20.x or newer
10+
- npm (automatically installed when Node.js is installed)
11+
- Docker (for running Supabase locally)
12+
- Circle Developer Controlled Wallets [API key](https://console.circle.com/signin) and [Entity Secret](https://developers.circle.com/wallets/dev-controlled/register-entity-secret)
2113

22-
### Configure Environment Variables
14+
## Getting Started
2315

24-
```bash
25-
cp .env.example .env
26-
```
16+
1. Clone the repository and install dependencies:
2717

28-
Update `.env` with your credentials:
18+
```bash
19+
git clone git@github.com:circlefin/arc-multichain-wallet.git
20+
cd arc-multichain-wallet
21+
npm install
22+
```
23+
24+
2. Create a `.env.local` file in the project root:
2925

30-
```ini
31-
# Supabase
32-
NEXT_PUBLIC_SUPABASE_URL=your-project-url
33-
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-publishable-or-anon-key
26+
```bash
27+
cp .env.example .env.local
28+
```
3429

35-
# Circle
36-
CIRCLE_API_KEY=your-circle-api-key
37-
CIRCLE_ENTITY_SECRET=your-circle-entity-secret
38-
```
30+
Required variables:
3931

40-
### Set Up Supabase (Local)
32+
```bash
33+
# Supabase
34+
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
35+
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your_publishable_or_anon_key
4136

42-
This project uses **local Supabase** via Docker for development:
37+
# Circle
38+
CIRCLE_API_KEY=your_circle_api_key
39+
CIRCLE_ENTITY_SECRET=your_entity_secret
40+
```
4341

44-
```bash
45-
# Start local Supabase (requires Docker)
46-
npx supabase start
42+
3. Set up Supabase (Local)
43+
This project uses **local Supabase** via Docker for development:
4744

48-
# Push database migrations
49-
npx supabase db push
50-
```
45+
```bash
46+
# Start local Supabase (requires Docker)
47+
npx supabase start
5148

52-
**Note:** If you prefer cloud-hosted Supabase, you can use:
53-
```bash
54-
npx supabase link
55-
npx supabase db push
56-
```
49+
# Push database migrations
50+
npx supabase db push
51+
```
52+
**Note:** If you prefer cloud-hosted Supabase, you can use:
53+
54+
```bash
55+
npx supabase link
56+
npx supabase db push
57+
```
5758

58-
### Run Development Server
59+
4. Start the development server:
5960

60-
```bash
61-
npm run dev
62-
```
61+
```bash
62+
npm run dev
63+
```
6364

64-
Visit [http://localhost:3000/wallet](http://localhost:3000/wallet)
65+
The app will be available at `http://localhost:3000`.
6566

6667
## How It Works
6768

69+
- Built with [Next.js](https://nextjs.org/) and [Supabase](https://supabase.com/)
70+
- Uses [Circle Gateway](https://developers.circle.com/gateway) for unified USDC balance and cross-chain transfers
71+
- Integrates [Circle Developer Controlled Wallets](https://developers.circle.com/wallets/dev-controlled) for server-side wallet operations
72+
- Demonstrates wallet connectivity with [Wagmi](https://wagmi.sh/) and [Viem](https://viem.sh/)
73+
6874
### Unified Balance
6975

7076
When you deposit USDC to the Gateway Wallet, it becomes part of your unified balance accessible from any supported chain. The Gateway Wallet uses the same address on all chains: `0x0077777d7EBA4688BDeF3E311b846F25870A19B9`
@@ -82,13 +88,36 @@ When you deposit USDC to the Gateway Wallet, it becomes part of your unified bal
8288
3. Call `gatewayMint()` on destination chain
8389
4. USDC minted on destination
8490

85-
## Security Notes
91+
## Environment Variables
92+
93+
| Variable | Scope | Purpose |
94+
| ------------------------------------- | ----------- | ------------------------------------------------------------------------ |
95+
| `NEXT_PUBLIC_SUPABASE_URL` | Public | Supabase project URL |
96+
| `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` | Public | Supabase anonymous/public key |
97+
| `CIRCLE_API_KEY` | Server-side | Circle API key for Gateway operations |
98+
| `CIRCLE_ENTITY_SECRET` | Server-side | Circle entity secret for wallet operations |
8699

87-
- This is a **testnet demonstration** only
100+
## Usage Notes
101+
102+
- Designed for testnet only
103+
- Requires valid Circle API credentials and Supabase configuration
88104
- Private keys are processed server-side and never stored
89105
- Never use mainnet private keys with this application
90-
- Always use HTTPS in production
91-
- Consider hardware wallet integration for production use
106+
107+
## Scripts
108+
109+
- `npm run dev`: Start Next.js development server with auto-reload
110+
- `npx supabase start`: Start local Supabase instance
111+
112+
## Security & Usage Model
113+
114+
This sample application:
115+
- Assumes testnet usage only
116+
- Handles secrets via environment variables
117+
- Processes private keys server-side without storage
118+
- Is not intended for production use without modification
119+
120+
See `SECURITY.md` for vulnerability reporting guidelines. Please report issues privately via Circle's bug bounty program.
92121

93122
## Getting Testnet USDC
94123

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"lint": "eslint ."
88
},
99
"dependencies": {
10-
"@circle-fin/circle-sdk": "^2.9.0",
11-
"@circle-fin/developer-controlled-wallets": "^9.2.1",
12-
"@circle-fin/smart-contract-platform": "^9.2.1",
10+
"@circle-fin/developer-controlled-wallets": "^10.0.1",
1311
"@radix-ui/react-checkbox": "^1.3.3",
1412
"@radix-ui/react-dialog": "^1.1.15",
1513
"@radix-ui/react-dropdown-menu": "^2.1.16",
@@ -26,17 +24,15 @@
2624
"@wagmi/core": "^2.22.1",
2725
"class-variance-authority": "^0.7.1",
2826
"clsx": "^2.1.1",
29-
"dotenv": "^17.2.3",
3027
"lucide-react": "^0.548.0",
3128
"next": "latest",
3229
"next-themes": "^0.4.6",
3330
"react": "^19.2.0",
3431
"react-dom": "^19.2.0",
3532
"sonner": "^2.0.7",
3633
"tailwind-merge": "^3.3.1",
37-
"uuid": "^13.0.0",
38-
"viem": "^2.38.5",
39-
"wagmi": "^2.19.1"
34+
"viem": "^2.44.4",
35+
"wagmi": "^2.19.5"
4036
},
4137
"devDependencies": {
4238
"@eslint/eslintrc": "^3.3.1",

public/screenshot.png

24.5 KB
Loading

0 commit comments

Comments
 (0)