@farcaster/frame-wagmi-connector 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
# Frame Wagmi Connector
|
|
2
2
|
|
|
3
|
-
A [Wagmi connector](https://wagmi.sh/) for Farcaster
|
|
3
|
+
A [Wagmi connector](https://wagmi.sh/) for interacting with wallets in Farcaster Frames.
|
|
4
4
|
|
|
5
|
-
Not yet stable. [Learn more](https://github.com/farcasterxyz/frames/wiki/frames-v2-developer-playground-preview).
|
|
6
5
|
|
|
7
6
|
## Install
|
|
8
7
|
|
|
9
|
-
Install
|
|
8
|
+
[Install and setup wagmi](https://wagmi.sh/react/getting-started#manual-installation).
|
|
10
9
|
|
|
10
|
+
Install the connector:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
npm install wagmi @farcaster/frame-wagmi-connector
|
|
11
14
|
```
|
|
12
|
-
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
Connect to users wallet:
|
|
19
|
+
|
|
13
20
|
```
|
|
21
|
+
import { useConnect } from 'wagmi'
|
|
22
|
+
import { farcasterFrame } from "@farcaster/frame-wagmi-connector";
|
|
23
|
+
|
|
24
|
+
function App() {
|
|
25
|
+
const { connect } = useConnect()
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<button onClick={() => connect({ connector: farcasterFrame() })}>
|
|
29
|
+
Connect
|
|
30
|
+
</button>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You can now interact with the users connected wallet via Wagmi.
|