@1llet.xyz/erc4337-gasless-sdk 0.1.4 → 0.1.6

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
@@ -138,12 +138,21 @@ const isDeployed = await aa.isAccountDeployed();
138
138
  // Get the Counterfactual Address (deterministic address based on owner)
139
139
  const address = await aa.getSmartAccountAddress(ownerAddress);
140
140
 
141
- // Manually deploy the account (if you don't want to bundle it with a tx)
142
- if (!isDeployed) {
143
- const deployOp = await aa.buildDeployUserOperation();
144
- const signed = await aa.signUserOperation(deployOp);
145
- await aa.sendUserOperation(signed);
146
- }
141
+ // Deploy the account (Abstracts build -> sign -> send -> wait)
142
+ // Returns the transaction receipt
143
+ const receipt = await aa.deployAccount();
144
+ ```
145
+
146
+ ### Simplified Approvals
147
+
148
+ ```typescript
149
+ // Approve a token for a spender (e.g. Smart Account)
150
+ // Automatically handles:
151
+ // 1. Checks if funding is needed (Gasless flow support)
152
+ // 2. Encodes function data
153
+ // 3. Sends transaction via Wallet
154
+ // Returns the txHash or "NOT_NEEDED"
155
+ const txHash = await aa.approveToken(usdcAddress, spenderAddress, amount);
147
156
  ```
148
157
 
149
158
  ### Utilities
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.4",
6
+ "version": "0.1.6",
7
7
  "description": "SDK for ERC-4337 Gasless Transfers",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./AccountAbstraction";
2
2
  export * from "./types";
3
3
  export * from "./constants";
4
+ export * from "./deployments";