diff --git a/.changeset/strong-panthers-notice.md b/.changeset/strong-panthers-notice.md deleted file mode 100644 index b393a5d878e..00000000000 --- a/.changeset/strong-panthers-notice.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -"@thirdweb-dev/wagmi-adapter": minor ---- - -Wagmi connector for in-app wallets - -You can now connect to an in-app wallet in your wagmi applications. - -Install the wagmi adapter: - -```bash -npm install @thirdweb-dev/wagmi-adapter -``` - -Create a wagmi config with the in-app wallet connector: - -```ts -import { http, createConfig } from "wagmi"; -import { inAppWalletConnector } from "@thirdweb-dev/wagmi-adapter"; -import { createThirdwebClient, defineChain as thirdwebChain } from "thirdweb"; - -const client = createThirdwebClient({ - clientId: "...", -}); - -export const config = createConfig({ - chains: [sepolia], - connectors: [ - inAppWalletConnector({ - client, - // optional: turn on smart accounts - smartAccounts: { - sponsorGas: true, - chain: thirdwebChain(sepolia), - }, - }), - ], - transports: { - [sepolia.id]: http(), - }, -}); -``` - -Then in your app, you can use the connector to connect with any supported strategy: - -```ts -const { connect, connectors } = useConnect(); - -const onClick = () => { - const inAppWallet = connectors.find((x) => x.id === "in-app-wallet"); - connect({ - connector: inAppWallet, - strategy: "google", - }); -}; -``` diff --git a/packages/wagmi-adapter/CHANGELOG.md b/packages/wagmi-adapter/CHANGELOG.md new file mode 100644 index 00000000000..ce67991ce2c --- /dev/null +++ b/packages/wagmi-adapter/CHANGELOG.md @@ -0,0 +1,58 @@ +# @thirdweb-dev/wagmi-adapter + +## 0.1.0 + +### Minor Changes + +- [#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 + + You can now connect to an in-app wallet in your wagmi applications. + + Install the wagmi adapter: + + ```bash + npm install @thirdweb-dev/wagmi-adapter + ``` + + Create a wagmi config with the in-app wallet connector: + + ```ts + import { http, createConfig } from "wagmi"; + import { inAppWalletConnector } from "@thirdweb-dev/wagmi-adapter"; + import { createThirdwebClient, defineChain as thirdwebChain } from "thirdweb"; + + const client = createThirdwebClient({ + clientId: "...", + }); + + export const config = createConfig({ + chains: [sepolia], + connectors: [ + inAppWalletConnector({ + client, + // optional: turn on smart accounts + smartAccounts: { + sponsorGas: true, + chain: thirdwebChain(sepolia), + }, + }), + ], + transports: { + [sepolia.id]: http(), + }, + }); + ``` + + Then in your app, you can use the connector to connect with any supported strategy: + + ```ts + const { connect, connectors } = useConnect(); + + const onClick = () => { + const inAppWallet = connectors.find((x) => x.id === "in-app-wallet"); + connect({ + connector: inAppWallet, + strategy: "google", + }); + }; + ``` diff --git a/packages/wagmi-adapter/package.json b/packages/wagmi-adapter/package.json index 6372f9cd406..6d857a66ed0 100644 --- a/packages/wagmi-adapter/package.json +++ b/packages/wagmi-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@thirdweb-dev/wagmi-adapter", - "version": "0.0.1", + "version": "0.1.0", "repository": { "type": "git", "url": "git+https://github.com/thirdweb-dev/js.git#main" @@ -23,7 +23,10 @@ }, "./package.json": "./package.json" }, - "files": ["dist/*", "src/*"], + "files": [ + "dist/*", + "src/*" + ], "devDependencies": { "@wagmi/core": "2.16.0", "rimraf": "6.0.1",