Skip to content

Commit

Permalink
Version Packages (#5717)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jnsdls and github-actions[bot] authored Dec 13, 2024
1 parent 8d2e2ad commit d90857e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 58 deletions.
56 changes: 0 additions & 56 deletions .changeset/strong-panthers-notice.md

This file was deleted.

58 changes: 58 additions & 0 deletions packages/wagmi-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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",
});
};
```
7 changes: 5 additions & 2 deletions packages/wagmi-adapter/package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -23,7 +23,10 @@
},
"./package.json": "./package.json"
},
"files": ["dist/*", "src/*"],
"files": [
"dist/*",
"src/*"
],
"devDependencies": {
"@wagmi/core": "2.16.0",
"rimraf": "6.0.1",
Expand Down

0 comments on commit d90857e

Please sign in to comment.