rise-wallet 0.1.1 → 0.1.3

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 CHANGED
@@ -1,23 +1,49 @@
1
- # tsdown-starter
1
+ # rise-wallet-sdk
2
2
 
3
- A starter for creating a TypeScript package.
3
+ Typescript SDK to integrate RISE wallet into your dApp.
4
4
 
5
- ## Development
5
+ ## Usage
6
6
 
7
- - Install dependencies:
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
- - Run the unit tests:
13
+ 2. Use the rise config when instantiating porto:
14
14
 
15
- ```bash
16
- npm run test
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
- - Build the library:
29
+ 3. Use wagmi as usual
20
30
 
21
- ```bash
22
- npm run build
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/dist/index.d.ts CHANGED
@@ -7,18 +7,12 @@ declare function define<const chain extends Chain>(chain: chain): chain;
7
7
  declare const riseTestnet: {
8
8
  readonly contracts: {
9
9
  readonly portoAccount: {
10
- readonly address: "0x912a428b1a7e7cb7bb2709a2799a01c020c5acd9";
10
+ readonly address: "0xc58C2A1Ce5cE4D7Fc7f997B983d9a859dbD2e507";
11
11
  };
12
12
  readonly multicall3: {
13
13
  readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
14
14
  };
15
15
  };
16
- readonly rpcUrls: {
17
- readonly default: {
18
- readonly http: readonly ["https://rise-testnet-porto.fly.dev", "https://testnet.riselabs.xyz"];
19
- readonly webSocket: readonly ["wss://testnet.riselabs.xyz/ws"];
20
- };
21
- };
22
16
  readonly blockExplorers: {
23
17
  readonly default: {
24
18
  readonly name: "Blockscout";
@@ -36,6 +30,12 @@ declare const riseTestnet: {
36
30
  readonly decimals: 18;
37
31
  };
38
32
  readonly experimental_preconfirmationTime?: number | undefined | undefined;
33
+ readonly rpcUrls: {
34
+ readonly default: {
35
+ readonly http: readonly ["https://testnet.riselabs.xyz"];
36
+ readonly webSocket: readonly ["wss://testnet.riselabs.xyz/ws"];
37
+ };
38
+ };
39
39
  readonly sourceId?: number | undefined | undefined;
40
40
  readonly testnet: true;
41
41
  readonly custom?: Record<string, unknown> | undefined;
package/dist/index.js CHANGED
@@ -11,12 +11,8 @@ const riseTestnet = /* @__PURE__ */ define({
11
11
  ...riseTestnet$1,
12
12
  contracts: {
13
13
  ...riseTestnet$1.contracts,
14
- portoAccount: { address: "0x912a428b1a7e7cb7bb2709a2799a01c020c5acd9" }
15
- },
16
- rpcUrls: { default: {
17
- ...riseTestnet$1.rpcUrls.default,
18
- http: ["https://rise-testnet-porto.fly.dev", ...riseTestnet$1.rpcUrls.default.http]
19
- } }
14
+ portoAccount: { address: "0xc58C2A1Ce5cE4D7Fc7f997B983d9a859dbD2e507" }
15
+ }
20
16
  });
21
17
 
22
18
  //#endregion
@@ -25,6 +21,8 @@ const riseTestnetConfig = {
25
21
  ...defaultConfig,
26
22
  chains: [riseTestnet],
27
23
  mode: Mode.dialog({ host: "https://rise-wallet-testnet.vercel.app/dialog" }),
24
+ relay: http("https://rise-testnet-porto.fly.dev"),
25
+ feeToken: "ETH",
28
26
  transports: { [riseTestnet.id]: http() }
29
27
  };
30
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rise-wallet",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Typescript SDK to integrate RISE wallet into your dApp.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,16 +30,16 @@
30
30
  "build": "tsdown",
31
31
  "dev": "tsdown --watch",
32
32
  "typecheck": "tsc --noEmit",
33
- "release": "bumpp && npm publish"
33
+ "prepublishOnly": "bun run typecheck && bun run build && bumpp"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/node": "^24.2.1",
37
- "bumpp": "^10.2.2",
38
- "tsdown": "^0.14.0",
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.63",
42
+ "porto": "^0.0.77",
43
43
  "viem": "^2.33.3"
44
44
  }
45
- }
45
+ }