@lumiapassport/ui-kit 1.8.1 → 1.9.0
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 +56 -0
- package/dist/iframe/index.html +1 -1
- package/dist/iframe/main.js +35 -8
- package/dist/iframe/main.js.map +1 -1
- package/dist/index.cjs +32 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -5626,6 +5626,34 @@ async function signTypedData(session, params) {
|
|
|
5626
5626
|
}
|
|
5627
5627
|
return signature;
|
|
5628
5628
|
}
|
|
5629
|
+
async function deployAccount(session, feeType = "economy", options) {
|
|
5630
|
+
if (!options?.force) {
|
|
5631
|
+
try {
|
|
5632
|
+
const code = await publicClient.getCode({
|
|
5633
|
+
address: session.smartAccountAddress
|
|
5634
|
+
});
|
|
5635
|
+
const isDeployed = code && code !== "0x" && code.length > 2;
|
|
5636
|
+
if (isDeployed) {
|
|
5637
|
+
console.log("[deployAccount] Account already deployed, skipping deployment");
|
|
5638
|
+
return null;
|
|
5639
|
+
}
|
|
5640
|
+
console.log("[deployAccount] Account not deployed, initiating deployment");
|
|
5641
|
+
} catch (error) {
|
|
5642
|
+
console.warn("[deployAccount] Failed to check deployment status, proceeding with deployment:", error);
|
|
5643
|
+
}
|
|
5644
|
+
}
|
|
5645
|
+
return sendUserOperation(
|
|
5646
|
+
session,
|
|
5647
|
+
"0x0000000000000000000000000000000000000000",
|
|
5648
|
+
// to: burn address
|
|
5649
|
+
"0",
|
|
5650
|
+
// value: 0 (no funds)
|
|
5651
|
+
"0x",
|
|
5652
|
+
// data: empty (no contract call)
|
|
5653
|
+
feeType,
|
|
5654
|
+
"v0.7"
|
|
5655
|
+
);
|
|
5656
|
+
}
|
|
5629
5657
|
var import_viem3, import_account_abstraction2, import_accounts, import_bundler, import_meta, PAYMASTER_VERIFICATION_GAS_LIMIT, PAYMASTER_POSTOP_GAS_LIMIT, MAX_BUNDLER_VERIFICATION_GAS, PAYMASTER_VERIFICATION_GAS, executeAbi;
|
|
5630
5658
|
var init_account = __esm({
|
|
5631
5659
|
"src/internal/clients/account.ts"() {
|
|
@@ -5706,6 +5734,7 @@ __export(clients_exports, {
|
|
|
5706
5734
|
createAccountSession: () => createAccountSession,
|
|
5707
5735
|
createAkClient: () => createAkClient,
|
|
5708
5736
|
createLumiaClient: () => createLumiaClient,
|
|
5737
|
+
deployAccount: () => deployAccount,
|
|
5709
5738
|
depositForLumiaAccount: () => depositForLumiaAccount,
|
|
5710
5739
|
depositForSmartAccount: () => depositForSmartAccount,
|
|
5711
5740
|
getBundlerClient: () => getBundlerClient,
|
|
@@ -5751,6 +5780,7 @@ __export(index_exports, {
|
|
|
5751
5780
|
ThemeToggle: () => ThemeToggle,
|
|
5752
5781
|
TransactionsList: () => TransactionsList,
|
|
5753
5782
|
UserOpStatus: () => UserOpStatus,
|
|
5783
|
+
deployAccount: () => deployAccount,
|
|
5754
5784
|
getUserProfile: () => getUserProfile,
|
|
5755
5785
|
lumiaBeam: () => lumiaBeam,
|
|
5756
5786
|
prepareUserOperation: () => prepareUserOperation,
|
|
@@ -7908,7 +7938,6 @@ var UserOpStatus = ({
|
|
|
7908
7938
|
const res = await fetch(getBundlerUrl(), {
|
|
7909
7939
|
method: "POST",
|
|
7910
7940
|
headers: { "content-type": "application/json" },
|
|
7911
|
-
credentials: "include",
|
|
7912
7941
|
body: JSON.stringify(body)
|
|
7913
7942
|
});
|
|
7914
7943
|
const json = await res.json();
|
|
@@ -8674,7 +8703,7 @@ function useLumiaPassportLinkedProfiles() {
|
|
|
8674
8703
|
// package.json
|
|
8675
8704
|
var package_default = {
|
|
8676
8705
|
name: "@lumiapassport/ui-kit",
|
|
8677
|
-
version: "1.
|
|
8706
|
+
version: "1.9.0",
|
|
8678
8707
|
description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
|
|
8679
8708
|
type: "module",
|
|
8680
8709
|
main: "./dist/index.cjs",
|
|
@@ -9936,7 +9965,6 @@ function useUserOpStatus(options = {}) {
|
|
|
9936
9965
|
const res = await fetch(getBundlerUrl(), {
|
|
9937
9966
|
method: "POST",
|
|
9938
9967
|
headers: { "content-type": "application/json" },
|
|
9939
|
-
credentials: "include",
|
|
9940
9968
|
body: JSON.stringify(body)
|
|
9941
9969
|
});
|
|
9942
9970
|
const json = await res.json();
|
|
@@ -10239,6 +10267,7 @@ function useSmartAccountTransactions() {
|
|
|
10239
10267
|
ThemeToggle,
|
|
10240
10268
|
TransactionsList,
|
|
10241
10269
|
UserOpStatus,
|
|
10270
|
+
deployAccount,
|
|
10242
10271
|
getUserProfile,
|
|
10243
10272
|
lumiaBeam,
|
|
10244
10273
|
prepareUserOperation,
|