rise-wallet 0.1.1 → 0.1.2
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 +37 -11
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,23 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rise-wallet-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Typescript SDK to integrate RISE wallet into your dApp.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. Install porto, wagmi and the RISE wallet SDK:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install
|
|
10
|
+
npm install porto wagmi rise-wallet
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
2. Use the rise config when instantiating porto:
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
|
|
15
|
+
```typescript
|
|
16
|
+
import { riseTestnetConfig, riseTestnet } from 'rise-wallet';
|
|
17
|
+
import { createConfig, http } from 'wagmi';
|
|
18
|
+
import { porto } from 'porto/wagmi';
|
|
19
|
+
|
|
20
|
+
export const config = createConfig({
|
|
21
|
+
chains: [riseTestnet],
|
|
22
|
+
connectors: [porto(riseTestnetConfig)],
|
|
23
|
+
transports: {
|
|
24
|
+
[riseTestnet.id]: http()
|
|
25
|
+
}
|
|
26
|
+
})
|
|
17
27
|
```
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
3. Use wagmi as usual
|
|
20
30
|
|
|
21
|
-
```
|
|
22
|
-
|
|
31
|
+
```typescript
|
|
32
|
+
import { useConnect, useConnectors } from 'wagmi'
|
|
33
|
+
|
|
34
|
+
function Connect() {
|
|
35
|
+
const connect = useConnect()
|
|
36
|
+
const connectors = useConnectors()
|
|
37
|
+
|
|
38
|
+
return connectors?.map((connector) => (
|
|
39
|
+
<button
|
|
40
|
+
key={connector.uid}
|
|
41
|
+
onClick={() => connect.connect({ connector })}
|
|
42
|
+
>
|
|
43
|
+
Connect
|
|
44
|
+
</button>
|
|
45
|
+
))
|
|
46
|
+
}
|
|
23
47
|
```
|
|
48
|
+
|
|
49
|
+
RISE wallet is powered by Porto under the hood. For more information on its usage, refer to the [Porto docs](https://porto.sh)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rise-wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Typescript SDK to integrate RISE wallet into your dApp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"release": "bumpp && npm publish"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^24.
|
|
37
|
-
"bumpp": "^10.2.
|
|
38
|
-
"tsdown": "^0.14.
|
|
36
|
+
"@types/node": "^24.3.0",
|
|
37
|
+
"bumpp": "^10.2.3",
|
|
38
|
+
"tsdown": "^0.14.1",
|
|
39
39
|
"typescript": "^5.9.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"porto": "^0.0.
|
|
42
|
+
"porto": "^0.0.77",
|
|
43
43
|
"viem": "^2.33.3"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|