-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d3aaaf9
commit 88ce8bb
Showing
6 changed files
with
114 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# @totejs/walletkit | ||
|
||
## 1.0.5 | ||
|
||
### Patch Changes | ||
|
||
- d3aaaf9: Add chains type declaration for dev example | ||
- 12ebee8: Add Binance Web3 Wallet & Coinbase Wallet & OKX Wallet & MathWallet support. | ||
|
||
Add showQRCode & getQRCodeUri configuration items to support display a QR code when a wallet is | ||
not installed. | ||
|
||
UI adapted to mobile end and multiple wallets. | ||
|
||
Fixed the hover effect did not disappear after clicking button on the mobile end. | ||
|
||
Fixed walletConnect popup and QR code display being very slow issue. | ||
|
||
Disabled page scrolling when opening walletkit modal. | ||
|
||
For a smoother development experience, remove `examples/test` and create a dev demo in | ||
`packages/walletkit`. | ||
|
||
Update walletConnect `relayUrl` to `wss://relay.walletconnect.org`. | ||
|
||
- 4a88b07: Remove default `initialChainId` to support the case only connecting a wallet and not | ||
switching a network. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# WalletKit | ||
|
||
WalletKit is a React component library for easily connecting a wallet to your dApp. | ||
|
||
## Features | ||
|
||
- 💡 Typescript — Get types straight out of the box. | ||
- 🌱 Ecosystem Standards — Built on top of [wagmi](https://wagmi.sh) and [viem](https://viem.sh) | ||
- 🎨 Customization — Easily customizing wallets and themes | ||
|
||
## Documentation | ||
|
||
For full documentation, visit [here](https://node-real.github.io/walletkit/website/dist/#/index). | ||
|
||
## Examples | ||
|
||
The following examples are provided in the [examples](./examples/) folder of this repo. | ||
|
||
- [nextjs](https://github.com/node-real/walletkit/tree/main/examples/nextjs) | ||
- [vite](https://github.com/node-real/walletkit/tree/main/examples/vite) | ||
|
||
## Installation | ||
|
||
```bash | ||
npm i @totejs/walletkit wagmi viem | ||
|
||
``` | ||
|
||
## Usage | ||
|
||
```tsx | ||
import '@totejs/walletkit/styles.css'; | ||
import { WagmiConfig, createConfig } from 'wagmi'; | ||
import { chains } from './chains'; | ||
import { | ||
WalletKitButton, | ||
WalletKitProvider, | ||
getDefaultConfig, | ||
WalletKitOptions, | ||
SwitchNetworkModal, | ||
} from '@totejs/walletkit'; | ||
import { metaMask, trustWallet, walletConnect } from '@totejs/walletkit/wallets'; | ||
|
||
const config = createConfig( | ||
getDefaultConfig({ | ||
autoConnect: true, | ||
appName: 'WalletKit', | ||
|
||
// WalletConnect 2.0 requires a projectId which you can create quickly | ||
// and easily for free over at WalletConnect Cloud https://cloud.walletconnect.com/sign-in | ||
walletConnectProjectId: 'xxx', | ||
|
||
chains, | ||
connectors: [trustWallet(), metaMask(), walletConnect()], | ||
}), | ||
); | ||
|
||
const options: WalletKitOptions = { | ||
initialChainId: 56, | ||
}; | ||
|
||
export default function App() { | ||
return ( | ||
<WagmiConfig config={config}> | ||
<WalletKitProvider options={options} mode="light"> | ||
<WalletKitButton /> | ||
|
||
{/* | ||
👇 Here's the SwitchNetworkModal | ||
If the user switches to a network that is not supported by our dapp, | ||
this modal will be displayed to remind the user to switch to our supported networks. | ||
*/} | ||
<SwitchNetworkModal /> | ||
</WalletKitProvider> | ||
</WagmiConfig> | ||
); | ||
} | ||
``` | ||
|
||
## Contributing | ||
|
||
Please follow our [WalletKit Contribution Guide](./CONTRIBUTING.md). | ||
|
||
## License | ||
|
||
See [LICENSE](./LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters