@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 CHANGED
@@ -75,6 +75,8 @@ declare class AccountAbstraction {
75
75
  owner: Address;
76
76
  smartAccount: Address;
77
77
  }>;
78
+ isAccountDeployed(): Promise<boolean>;
79
+ deployAccount(): Promise<UserOpReceipt>;
78
80
  /**
79
81
  * Get the Smart Account address for an owner
80
82
  */
package/dist/index.d.ts CHANGED
@@ -75,6 +75,8 @@ declare class AccountAbstraction {
75
75
  owner: Address;
76
76
  smartAccount: Address;
77
77
  }>;
78
+ isAccountDeployed(): Promise<boolean>;
79
+ deployAccount(): Promise<UserOpReceipt>;
78
80
  /**
79
81
  * Get the Smart Account address for an owner
80
82
  */
package/dist/index.js CHANGED
@@ -570,6 +570,20 @@ var AccountAbstraction = class {
570
570
  smartAccount: this.smartAccountAddress
571
571
  };
572
572
  }
573
+ // --- Account Management ---
574
+ async isAccountDeployed() {
575
+ if (!this.smartAccountAddress) return false;
576
+ const code = await this.publicClient.getBytecode({ address: this.smartAccountAddress });
577
+ return code !== void 0;
578
+ }
579
+ async deployAccount() {
580
+ if (!this.owner || !this.smartAccountAddress) throw new Error("Not connected");
581
+ return this.sendTransaction({
582
+ target: this.smartAccountAddress,
583
+ value: 0n,
584
+ data: "0x"
585
+ });
586
+ }
573
587
  /**
574
588
  * Get the Smart Account address for an owner
575
589
  */