https://github.com/vkcom/useweb3
https://github.com/vkcom/useweb3
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vkcom/useweb3
- Owner: VKCOM
- License: mit
- Archived: true
- Created: 2022-07-21T13:11:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T10:09:04.000Z (over 3 years ago)
- Last Synced: 2025-01-17T17:43:09.834Z (over 1 year ago)
- Language: JavaScript
- Size: 2.72 MB
- Stars: 8
- Watchers: 9
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# useWeb3
Set of hooks to work with web3 wallets
#tdd #fp
- Metamask (EVM) ✅
- WalletConnect (EVM) ✅
- Phantom (Solana) ✅
We recommend not to use Phantom deeplinks on the web app (due to bad UX)
or generate dappEncryptionPublicKey on the server (for security reasons)
- Near
- Ton
Кошелёк Рекомендасьон:
(десктоп) - метамаск - валлетконнект - фантом
(мобайл) - валлентконнект - фантом - метамаск
### TODO
- move test to **tests** folder
- support network/account change
- deeplinks for mobile (phantom)
- support context (or redux/etc.)
- add the _chain ID_ of the network the current wallet is connected to
- add metadata about the network the current wallet is connected to and switching networks
- minimal size for npm package
- example
- magick and gnosis wallets?
- binance smart chain wallet?
#### BACKLOG
- get balance
- get networks with balance
- ethereum.\_metamask.isUnlocked()
This method returns a Promise that resolves to a boolean indicating if MetaMask is unlocked by the user. MetaMask must be unlocked in order to perform any operation involving user accounts. Note that this method does not indicate if the user has exposed any accounts to the caller.
- Phantom Account change
https://docs.phantom.app/integrating/extension-and-in-app-browser-web-apps/establishing-a-connection#changing-accounts