@1llet.xyz/erc4337-gasless-sdk 0.4.31 → 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/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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
|
*/
|