@1llet.xyz/erc4337-gasless-sdk 0.4.30 → 0.4.32
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 +79 -195
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -564,6 +564,20 @@ var AccountAbstraction = class {
|
|
|
564
564
|
smartAccount: this.smartAccountAddress
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
+
// --- Account Management ---
|
|
568
|
+
async isAccountDeployed() {
|
|
569
|
+
if (!this.smartAccountAddress) return false;
|
|
570
|
+
const code = await this.publicClient.getBytecode({ address: this.smartAccountAddress });
|
|
571
|
+
return code !== void 0;
|
|
572
|
+
}
|
|
573
|
+
async deployAccount() {
|
|
574
|
+
if (!this.owner || !this.smartAccountAddress) throw new Error("Not connected");
|
|
575
|
+
return this.sendTransaction({
|
|
576
|
+
target: this.smartAccountAddress,
|
|
577
|
+
value: 0n,
|
|
578
|
+
data: "0x"
|
|
579
|
+
});
|
|
580
|
+
}
|
|
567
581
|
/**
|
|
568
582
|
* Get the Smart Account address for an owner
|
|
569
583
|
*/
|
|
@@ -680,12 +694,6 @@ var AccountAbstraction = class {
|
|
|
680
694
|
return "NOT_NEEDED";
|
|
681
695
|
}
|
|
682
696
|
// --- Core Bridge to Bundler/UserOp ---
|
|
683
|
-
// Deprecated/Legacy but kept for compatibility or advanced usage?
|
|
684
|
-
// buildUserOperationBatch moved to internal usage mostly, but maybe exposed?
|
|
685
|
-
// If I remove them from public API, that is a BREAKING change if user used them.
|
|
686
|
-
// User requested "modularize", but usually expects same public API.
|
|
687
|
-
// I will expose them as simple delegates if needed, or assume they primarily use sendBatchTransaction.
|
|
688
|
-
// The previous implementation exposed `buildUserOperationBatch`.
|
|
689
697
|
async signUserOperation(userOp) {
|
|
690
698
|
if (!this.owner) throw new Error("Not connected");
|
|
691
699
|
const userOpHash = this.userOpBuilder.getUserOpHash(userOp);
|