Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Private payments on Solana using zero-knowledge proofs.
## Features

- **Private Transfers** - Hide transaction amounts using Bulletproofs
- **Multi-Token Support** - SOL, USDC, ORE, BONK, JIM, GODL
- **Multi-Token Support** - SOL, USDC, ORE, BONK, JIM, GODL, HUSTLE
- **Multiple Wallets** - Phantom, Solflare, Torus, Ledger
- **Deposit & Withdraw** - Seamlessly manage your ShadowWire balance
- **Fast & Secure** - Built on Solana with audited smart contracts
Expand Down Expand Up @@ -74,14 +74,15 @@ Click "Select Wallet" and choose your preferred Solana wallet (Phantom, Solflare

## Supported Tokens

| Token | Decimals |
|-------|----------|
| SOL | 9 |
| USDC | 6 |
| ORE | 11 |
| BONK | 5 |
| JIM | 9 |
| GODL | 11 |
| Token | Decimals |
|--------|----------|
| SOL | 9 |
| USDC | 6 |
| ORE | 11 |
| BONK | 5 |
| JIM | 9 |
| GODL | 11 |
| HUSTLE | 9 |

## Tech Stack

Expand All @@ -95,7 +96,7 @@ Click "Select Wallet" and choose your preferred Solana wallet (Phantom, Solflare

### Supporting Only Specific Tokens

By default, the app supports all ShadowWire tokens (SOL, USDC, ORE, BONK, JIM, GODL). To limit to specific tokens:
By default, the app supports all ShadowWire tokens (SOL, USDC, ORE, BONK, JIM, GODL, HUSTLE). To limit to specific tokens:

1. Open `components/Dashboard.tsx`
2. Modify the `SUPPORTED_TOKENS` array:
Expand Down
1 change: 1 addition & 0 deletions components/BalanceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function BalanceCard({ token, balance, loading, error, onRefresh }: Balan
BONK: 5,
JIM: 9,
GODL: 11,
Hustle: 9,
}
return decimals[token] || 9
}
Expand Down
4 changes: 2 additions & 2 deletions components/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BalanceCard } from './BalanceCard'
import { DepositForm } from './DepositForm'
import { WithdrawForm } from './WithdrawForm'

const SUPPORTED_TOKENS = ['SOL', 'USDC', 'ORE', 'BONK', 'JIM', 'GODL'] as const
const SUPPORTED_TOKENS = ['SOL', 'USDC', 'ORE', 'BONK', 'JIM', 'GODL', 'HUSTLE'] as const
type Token = typeof SUPPORTED_TOKENS[number]
type ActiveTab = 'deposit' | 'withdraw' | 'transfer'

Expand Down Expand Up @@ -64,7 +64,7 @@ export function Dashboard() {
<label className="block text-sm font-medium text-gray-400 mb-3">
Select Token
</label>
<div className="grid grid-cols-2 md:grid-cols-6 gap-3">
<div className="grid grid-cols-2 md:grid-cols-7 gap-3">
{SUPPORTED_TOKENS.map((token) => (
<button
key={token}
Expand Down
5 changes: 3 additions & 2 deletions components/DepositForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useState } from 'react'
import { ShadowWireClient } from '@radr/shadowwire'
import { ShadowWireClient, TokenUtils, TokenSymbol } from '@radr/shadowwire'
import { useWallet, useConnection } from '@solana/wallet-adapter-react'
import { Transaction, VersionedTransaction } from '@solana/web3.js'

Expand Down Expand Up @@ -33,6 +33,7 @@ export function DepositForm({
BONK: 5,
JIM: 9,
GODL: 11,
HUSTLE: 9,
}
return decimals[token] || 9
}
Expand Down Expand Up @@ -69,7 +70,7 @@ export function DepositForm({
const response = await client.deposit({
wallet: walletAddress,
amount: amountInSmallestUnit,
token: selectedToken,
token_mint: TokenUtils.getTokenMint(selectedToken as TokenSymbol),
})

console.log('Deposit response:', response)
Expand Down
2 changes: 1 addition & 1 deletion components/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function LandingPage() {
</div>
<h3 className="text-xl font-bold mb-2">Multi-Token Support</h3>
<p className="text-gray-400">
Send SOL, USDC, ORE, BONK, JIM, and GODL with complete privacy.
Send SOL, USDC, ORE, BONK, JIM, GODL, and Hustle with complete privacy.
</p>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions components/TransferForm.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use client'

import { useState } from 'react'
import { ShadowWireClient, RecipientNotFoundError, InsufficientBalanceError } from '@radr/shadowwire'
import { ShadowWireClient, RecipientNotFoundError, InsufficientBalanceError, TokenSymbol } from '@radr/shadowwire'
import { useWallet } from '@solana/wallet-adapter-react'

interface TransferFormProps {
client: ShadowWireClient
senderWallet: string
selectedToken: string
selectedToken: TokenSymbol
currentBalance: number
onTransferComplete: () => void
}
Expand Down Expand Up @@ -37,6 +37,7 @@ export function TransferForm({
BONK: 5,
JIM: 9,
GODL: 11,
HUSTLE: 9,
}
return decimals[token] || 9
}
Expand Down
5 changes: 3 additions & 2 deletions components/WithdrawForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useState } from 'react'
import { ShadowWireClient } from '@radr/shadowwire'
import { ShadowWireClient, TokenUtils, TokenSymbol } from '@radr/shadowwire'
import { useWallet, useConnection } from '@solana/wallet-adapter-react'
import { Transaction, VersionedTransaction } from '@solana/web3.js'

Expand Down Expand Up @@ -35,6 +35,7 @@ export function WithdrawForm({
BONK: 5,
JIM: 9,
GODL: 11,
HUSTLE: 9,
}
return decimals[token] || 9
}
Expand Down Expand Up @@ -75,7 +76,7 @@ export function WithdrawForm({
const response = await client.withdraw({
wallet: walletAddress,
amount: amountInSmallestUnit,
token: selectedToken,
token_mint: TokenUtils.getTokenMint(selectedToken as TokenSymbol),
})

console.log('Withdraw response:', response)
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@
"typescript": "^5.3.3"
}
}