This project is a Solana wallet web application that allows users to:
- Connect to their Phantom wallet
- View their SOL balance
- View SPL token balances (with token names and symbols)
- Fetch real-time USD prices for SOL and SPL tokens
- Send SOL transactions
- Send SPL token(USDC) transaction
- Connect Wallet: Connects to a Solana wallet using Phantom.
- View Balances: Fetches and displays the user's SOL and SPL token balances.
- Real-time Prices: Uses CoinGecko API to fetch real-time USD prices for SOL and SPL tokens.
- Send Transactions: Allows users to send SOL and SPL tokens to other addresses.
- Node.js (Latest LTS recommended)
- Angular CLI (If not installed, run
npm install -g @angular/cli
)
cd solana-wallet-webpage
npm install
ng serve
This project uses the CoinGecko API to fetch token prices. You can configure it in solana-wallet.service.ts
if needed.
For better realtime token prices(in USD) check Jupiter V6 API https://portal.jup.ag/onboard
The project uses a public Solana RPC (https://solana-rpc.publicnode.com
). If you have a private RPC endpoint, update it in solana-wallet.service.ts
:
this.connection = new Connection("YOUR_RPC_URL", "confirmed");
- Open the application in your browser.
- Click Connect Wallet to connect to your Phantom wallet.
- Your SOL and token balances will be displayed along with their USD values.
- Use the Send SOL form to send SOL to another address.
- Use the Send Token form to transfer SPL tokens to another address.
To build the project for production:
ng build --configuration=production
The built files will be in the dist/
folder. You can deploy them to any static hosting service like Vercel, Netlify, or Firebase Hosting.