Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xcaptain/solana-wallet-demo
https://github.com/xcaptain/solana-wallet-demo
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/xcaptain/solana-wallet-demo
- Owner: xcaptain
- Created: 2024-10-18T14:29:51.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-22T14:01:55.000Z (about 2 months ago)
- Last Synced: 2024-10-23T02:06:38.912Z (about 2 months ago)
- Language: Svelte
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - xcaptain/solana-wallet-demo - (Svelte)
README
# Solana wallet demo
Interact solana wallet using `web3.js` v2
## Background
The recommended way to connect a solana wallet in frontend code is using `@solana/wallet-adapter-base` and concrete adapter like `@solana/wallet-adapter-phantom`
But these package has some limitations:1. Outdated, hasn't been updated for years
2. Depends on `web3.js` V1, This library depends on legacy version of bs58 which depends on node:buffer which would cause my cloudflare pages app crash## The new one
This is just a demo project for me to learn the new `web3.js` V2 api, Most code is copied from https://github.com/solana-labs/solana-web3.js/tree/master/examples/react-app
The official supported framework is react, but I don't like it, so I rewrite in sveltekitHow to run locally:
```shell
bun i
bun run dev # http://localhost:5173
```## Gallery
![connected](./static/connected.png)