-
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.
* Wenty/dev (#185) * feat: Split into four packages: ui, wagmi, solana and walletkit * feat: Split packages & support solana * feat: Split package into solana & wagmi * feat: Split package into solana & wagmi * feat: Update soft link * feat: Update soft link (#179) * feat: Split into four packages: ui, wagmi, solana and walletkit * feat: Split packages & support solana * feat: Split package into solana & wagmi * feat: Split package into solana & wagmi * feat: Update soft link * chore: update versions (alpha) (#180) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * refactor: Refactor walletkit * refactor: Refactor wallets * feat: Update pack config * feat: Add ConnectModal * refactor: Normalized names * refactor: solana and evm are unified into one package * refactor: Update configs * feat: Add EmbeddedConnectModal --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: update versions (alpha) (#186) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: Add log * chore: update versions (alpha) (#187) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: Add initialChainId to connectModal * fix: Add default `initialChainId` if it is ignored by onOpen * test: test release * refactor: Expose `evmConfig` and `solanaConfig` as wallet configurations * feat: Support connecting to a specified wallet * docs: Remove unused docs * docs: Update examples * docs: update version --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
fcf0e97
commit eea7645
Showing
273 changed files
with
19,684 additions
and
9,271 deletions.
There are no files selected for viewing
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Support connecting to a specified wallet |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
update version |
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
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
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 |
---|---|---|
@@ -1,62 +1,67 @@ | ||
import '@node-real/walletkit/styles.css'; | ||
import '@/styles/globals.css'; | ||
import { bsc, mainnet, opBNB } from 'wagmi/chains'; | ||
import { mainnet } from 'wagmi/chains'; | ||
|
||
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets'; | ||
import { trustWallet, metaMask, walletConnect, evmConfig } from '@node-real/walletkit/evm'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
import { | ||
defaultWagmiConfig, | ||
SwitchNetworkModal, | ||
WalletKitButton, | ||
WalletKitOptions, | ||
WalletKitProvider, | ||
ProfileModal, | ||
ConnectModal, | ||
useConnectModal, | ||
WalletKitConfig, | ||
} from '@node-real/walletkit'; | ||
import { WagmiProvider } from 'wagmi'; | ||
import { AppProps } from 'next/app'; | ||
|
||
const queryClient = new QueryClient(); | ||
|
||
const config = defaultWagmiConfig({ | ||
appName: 'WalletKit', | ||
chains: [bsc, mainnet, opBNB], | ||
connectors: [trustWallet(), metaMask(), walletConnect()], | ||
|
||
// 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: 'e68a1816d39726c2afabf05661a32767', | ||
}); | ||
|
||
const options: WalletKitOptions = { | ||
initialChainId: 1, | ||
const config: WalletKitConfig = { | ||
walletConfigs: [ | ||
evmConfig({ | ||
autoConnect: true, | ||
initialChainId: 1, | ||
wallets: [metaMask(), trustWallet(), walletConnect()], | ||
chains: [mainnet] as any[], | ||
}), | ||
], | ||
appearance: { | ||
mode: 'light', | ||
}, | ||
eventConfig: { | ||
closeModalOnEsc: false, | ||
closeModalOnOverlayClick: false, | ||
closeModalAfterConnected: true, | ||
}, | ||
}; | ||
|
||
export default function App({ Component, pageProps }: AppProps) { | ||
return ( | ||
<WagmiProvider config={config} reconnectOnMount={true}> | ||
<WalletKitProvider config={config}> | ||
<QueryClientProvider client={queryClient}> | ||
<WalletKitProvider options={options} mode="light"> | ||
<Component {...pageProps} /> | ||
|
||
<WalletKitButton /> | ||
<Component {...pageProps} /> | ||
|
||
<ConnectModal /> | ||
{/* <ConnectButton /> */} | ||
<ConnectButton /> | ||
<ConnectModal /> | ||
|
||
{/* | ||
{/* | ||
Profile modal shows some basic information about the current account, | ||
If you don't need this modal, you can remove it. | ||
*/} | ||
<ProfileModal /> | ||
{/* <ProfileModal /> */} | ||
|
||
{/* | ||
{/* | ||
👇 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> | ||
{/* <SwitchNetworkModal /> */} | ||
</QueryClientProvider> | ||
</WagmiProvider> | ||
</WalletKitProvider> | ||
); | ||
} | ||
|
||
function ConnectButton() { | ||
const { onOpen } = useConnectModal(); | ||
|
||
return <button onClick={() => onOpen()}>connect</button>; | ||
} |
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
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
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 |
---|---|---|
@@ -1,47 +1,49 @@ | ||
import '@node-real/walletkit/styles.css'; | ||
import './global.css'; | ||
import { bsc, mainnet, opBNB } from 'wagmi/chains'; | ||
|
||
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
import { | ||
ConnectModal, | ||
defaultWagmiConfig, | ||
ProfileModal, | ||
SwitchNetworkModal, | ||
WalletKitButton, | ||
WalletKitOptions, | ||
useConnectModal, | ||
WalletKitConfig, | ||
WalletKitProvider, | ||
} from '@node-real/walletkit'; | ||
import { WagmiProvider } from 'wagmi'; | ||
|
||
const queryClient = new QueryClient(); | ||
import VConsole from 'vconsole'; | ||
import { evmConfig, metaMask, trustWallet, walletConnect } from '@node-real/walletkit/evm'; | ||
import { mainnet } from 'viem/chains'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
|
||
const config = defaultWagmiConfig({ | ||
appName: 'WalletKit', | ||
chains: [mainnet, bsc, opBNB], | ||
connectors: [trustWallet(), metaMask(), walletConnect()], | ||
new VConsole(); | ||
|
||
// 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: 'e68a1816d39726c2afabf05661a32767', | ||
}); | ||
const queryClient = new QueryClient(); | ||
|
||
const options: WalletKitOptions = { | ||
initialChainId: 1, | ||
const config: WalletKitConfig = { | ||
walletConfigs: [ | ||
evmConfig({ | ||
autoConnect: true, | ||
initialChainId: 1, | ||
wallets: [metaMask(), trustWallet(), walletConnect()], | ||
chains: [mainnet] as any[], | ||
}), | ||
], | ||
appearance: { | ||
mode: 'auto', | ||
}, | ||
eventConfig: { | ||
closeModalOnEsc: false, | ||
closeModalOnOverlayClick: false, | ||
closeModalAfterConnected: true, | ||
}, | ||
}; | ||
|
||
export default function App() { | ||
return ( | ||
<WagmiProvider config={config} reconnectOnMount={false}> | ||
<WalletKitProvider config={config}> | ||
<QueryClientProvider client={queryClient}> | ||
<WalletKitProvider options={options} mode="light"> | ||
<WalletKitButton /> | ||
<ConnectModal /> | ||
<ProfileModal /> | ||
<SwitchNetworkModal /> | ||
</WalletKitProvider> | ||
<ConnectButton /> | ||
<ConnectModal /> | ||
</QueryClientProvider> | ||
</WagmiProvider> | ||
</WalletKitProvider> | ||
); | ||
} | ||
|
||
function ConnectButton() { | ||
const { onOpen } = useConnectModal(); | ||
return <button onClick={() => onOpen()}>connect</button>; | ||
} |
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
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 |
---|---|---|
@@ -1,40 +1,17 @@ | ||
# @node-real/walletkit | ||
|
||
## 2.0.3 | ||
## 2.3.0-alpha.1 | ||
|
||
### Patch Changes | ||
|
||
- 5b7f3f6: test: Add log | ||
- 5b7f3f6: fix: ssr no need to wait for the provider to be ready | ||
- decd1a4: feat: Add log | ||
|
||
## 2.0.3-alpha.0 | ||
## 2.3.0-alpha.0 | ||
|
||
### Patch Changes | ||
|
||
- d5437a7: test: Add log | ||
- 90846a4: fix: ssr no need to wait for the provider to be ready | ||
|
||
## 2.0.2 | ||
|
||
### Patch Changes | ||
|
||
- 1fed209: feat: Upgrade wagmi & viem to 2.x | ||
- 1fed209: fix: ssr no need to wait for the provider to be ready | ||
|
||
## 2.0.2-alpha.0 | ||
|
||
### Patch Changes | ||
|
||
- 90846a4: fix: ssr no need to wait for the provider to be ready | ||
|
||
## 2.0.1 | ||
|
||
### Patch Changes | ||
|
||
- 83c5001: feat: Upgrade wagmi & viem to 2.x | ||
### Minor Changes | ||
|
||
## 2.0.1-alpha.0 | ||
- 1ebabc3: refactor: solana and evm are unified into one package | ||
|
||
### Patch Changes | ||
|
||
- 919b9ba: feat: Upgrade wagmi & viem to 2.x | ||
- 1ebabc3: refactor: Update configuration items & Add EmbeddedConnectModal |
Oops, something went wrong.