@1llet.xyz/erc4337-gasless-sdk 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.
Files changed (2) hide show
  1. package/README.md +43 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -114,6 +114,48 @@ npm install
114
114
  npm run build
115
115
  ```
116
116
 
117
- ## 📄 License
117
+ ## API Reference
118
+
119
+ ### Balances & Allowances
120
+
121
+ ```typescript
122
+ // Get Smart Account USDC Balance
123
+ const balance = await aa.getUsdcBalance();
124
+
125
+ // Get EOA (Wallet) USDC Balance
126
+ const eoaBalance = await aa.getEoaUsdcBalance();
127
+
128
+ // Check how much USDC the Smart Account is allowed to spend from EOA
129
+ const allowance = await aa.getAllowance();
130
+ ```
131
+
132
+ ### Account Management
133
+
134
+ ```typescript
135
+ // Check if the Smart Account is already deployed on-chain
136
+ const isDeployed = await aa.isAccountDeployed();
137
+
138
+ // Get the Counterfactual Address (deterministic address based on owner)
139
+ const address = await aa.getSmartAccountAddress(ownerAddress);
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
+ }
147
+ ```
148
+
149
+ ### Utilities
150
+
151
+ ```typescript
152
+ // Get current Nonce
153
+ const nonce = await aa.getNonce();
154
+
155
+ // Get UserOp Hash (for manual signing or verification)
156
+ const hash = aa.getUserOpHash(userOp);
157
+ ```
158
+
159
+ ## �📄 License
118
160
 
119
161
  MIT
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.1",
6
+ "version": "0.1.2",
7
7
  "description": "SDK for ERC-4337 Gasless Transfers",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",