Skip to content

Commit d90857e

Browse files
Version Packages (#5717)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8d2e2ad commit d90857e

File tree

3 files changed

+63
-58
lines changed

3 files changed

+63
-58
lines changed

.changeset/strong-panthers-notice.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

packages/wagmi-adapter/CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# @thirdweb-dev/wagmi-adapter
2+
3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- [#5644](https://github.com/thirdweb-dev/js/pull/5644) [`8d2e2ad`](https://github.com/thirdweb-dev/js/commit/8d2e2ad92db675315f6950b787fd6a5f426e249e) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Wagmi connector for in-app wallets
8+
9+
You can now connect to an in-app wallet in your wagmi applications.
10+
11+
Install the wagmi adapter:
12+
13+
```bash
14+
npm install @thirdweb-dev/wagmi-adapter
15+
```
16+
17+
Create a wagmi config with the in-app wallet connector:
18+
19+
```ts
20+
import { http, createConfig } from "wagmi";
21+
import { inAppWalletConnector } from "@thirdweb-dev/wagmi-adapter";
22+
import { createThirdwebClient, defineChain as thirdwebChain } from "thirdweb";
23+
24+
const client = createThirdwebClient({
25+
clientId: "...",
26+
});
27+
28+
export const config = createConfig({
29+
chains: [sepolia],
30+
connectors: [
31+
inAppWalletConnector({
32+
client,
33+
// optional: turn on smart accounts
34+
smartAccounts: {
35+
sponsorGas: true,
36+
chain: thirdwebChain(sepolia),
37+
},
38+
}),
39+
],
40+
transports: {
41+
[sepolia.id]: http(),
42+
},
43+
});
44+
```
45+
46+
Then in your app, you can use the connector to connect with any supported strategy:
47+
48+
```ts
49+
const { connect, connectors } = useConnect();
50+
51+
const onClick = () => {
52+
const inAppWallet = connectors.find((x) => x.id === "in-app-wallet");
53+
connect({
54+
connector: inAppWallet,
55+
strategy: "google",
56+
});
57+
};
58+
```

packages/wagmi-adapter/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@thirdweb-dev/wagmi-adapter",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -23,7 +23,10 @@
2323
},
2424
"./package.json": "./package.json"
2525
},
26-
"files": ["dist/*", "src/*"],
26+
"files": [
27+
"dist/*",
28+
"src/*"
29+
],
2730
"devDependencies": {
2831
"@wagmi/core": "2.16.0",
2932
"rimraf": "6.0.1",

0 commit comments

Comments
 (0)