zano_web3 6.2.0 → 6.3.0
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 +21 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,6 +66,27 @@ const zanoWallet = new ZanoWallet({
|
|
|
66
66
|
});
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
### React / Next.js
|
|
70
|
+
|
|
71
|
+
For React or Next.js projects, you can use the `useZanoWallet` hook to create a `ZanoWallet` instance:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
|
|
75
|
+
import { useZanoWallet } from 'zano_web3/web';
|
|
76
|
+
|
|
77
|
+
const MyComponent = () => {
|
|
78
|
+
const zanoWallet = useZanoWallet({
|
|
79
|
+
// same options as for ZanoWallet constructor
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<div>
|
|
84
|
+
<button onClick={() => zanoWallet.connect()}>Connect to ZanoWallet</button>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
```
|
|
89
|
+
|
|
69
90
|
### Connecting to ZanoWallet
|
|
70
91
|
|
|
71
92
|
To initiate the connection process, call the `connect` method:
|