@gasfree-kit/evm-4337 0.2.0 → 0.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 +12 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,17 +43,6 @@ This package gives you:
|
|
|
43
43
|
└──────────────────────┘
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
```mermaid
|
|
47
|
-
flowchart TD
|
|
48
|
-
A["Your app"] --> B["@gasfree-kit/evm-4337"]
|
|
49
|
-
B --> C["WDK wallet manager"]
|
|
50
|
-
C --> D["Safe smart account"]
|
|
51
|
-
D --> E["ERC-4337 UserOperation"]
|
|
52
|
-
F["Paymaster"] -.->|sponsors or charges USDT| E
|
|
53
|
-
E --> G["Bundler"]
|
|
54
|
-
G --> H["EVM chain"]
|
|
55
|
-
```
|
|
56
|
-
|
|
57
46
|
## Supported Chains
|
|
58
47
|
|
|
59
48
|
| Chain | Chain ID | Typical fallback fee estimate |
|
|
@@ -66,10 +55,21 @@ flowchart TD
|
|
|
66
55
|
| Celo | 42220 | `0.05` USDT |
|
|
67
56
|
| Plasma | 9745 | `0.05` USDT |
|
|
68
57
|
|
|
58
|
+
## Prerequisites
|
|
59
|
+
|
|
60
|
+
This package depends on [`@gasfree-kit/core`](../core/README.md) for:
|
|
61
|
+
|
|
62
|
+
- **Seed phrase generation** — `generateSeedPhrase()` creates the mnemonic used to set up wallets
|
|
63
|
+
- **Chain metadata** — `EVM_CHAINS` provides chain IDs, USDT addresses, and explorer URLs
|
|
64
|
+
- **Address validation** — `validateEvmAddress()` catches malformed addresses before sending
|
|
65
|
+
- **Error classes** — `GasfreeError`, `InsufficientBalanceError`, etc. for consistent error handling
|
|
66
|
+
|
|
67
|
+
`@gasfree-kit/core` is installed automatically as a dependency.
|
|
68
|
+
|
|
69
69
|
## Installation
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
npm install @gasfree-kit/evm-4337
|
|
72
|
+
npm install @gasfree-kit/evm-4337 @gasfree-kit/core
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Required peer dependency:
|
|
@@ -237,15 +237,6 @@ Important:
|
|
|
237
237
|
└──────────────────────┘
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
```mermaid
|
|
241
|
-
flowchart TD
|
|
242
|
-
A["Seed phrase owner"] --> C["Safe smart account"]
|
|
243
|
-
B["Passkey (WebAuthn)"] --> C
|
|
244
|
-
C --> D["Signed UserOperation"]
|
|
245
|
-
D --> E["Bundler + Paymaster"]
|
|
246
|
-
E --> F["EVM chain"]
|
|
247
|
-
```
|
|
248
|
-
|
|
249
240
|
### Link a passkey to an existing Safe
|
|
250
241
|
|
|
251
242
|
```ts
|