@embarkai/ui-kit 0.4.80 → 0.4.82
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +24 -24
- package/dist/index.cjs +16727 -16913
- package/dist/index.d.cts +55 -7
- package/dist/index.d.ts +55 -7
- package/dist/index.js +16756 -16947
- package/dist/styles.css +1 -1
- package/package.json +4 -5
package/dist/index.d.cts
CHANGED
|
@@ -97,7 +97,6 @@ interface Asset extends NormalizedAsset {
|
|
|
97
97
|
declare function useAssets(address?: `0x${string}`): {
|
|
98
98
|
nativeBalance: {
|
|
99
99
|
decimals: number;
|
|
100
|
-
formatted: string;
|
|
101
100
|
symbol: string;
|
|
102
101
|
value: bigint;
|
|
103
102
|
};
|
|
@@ -230,7 +229,7 @@ interface ProviderConfig {
|
|
|
230
229
|
walletConnectProjectId?: string;
|
|
231
230
|
/** Operating mode: 'linked' = AA (current), 'direct' = external wallet signs, 'both' = user choice */
|
|
232
231
|
mode?: WalletMode;
|
|
233
|
-
/** Filter
|
|
232
|
+
/** Filter the wallet connector list shown in ConnectExternalWalletMenu. undefined = show all wallets */
|
|
234
233
|
allowedWallets?: string[];
|
|
235
234
|
};
|
|
236
235
|
preferedColorMode?: 'light' | 'dark';
|
|
@@ -1069,7 +1068,8 @@ declare enum PageKey {
|
|
|
1069
1068
|
DEVICES = "devices",
|
|
1070
1069
|
DEVICE_LINK = "device-link",
|
|
1071
1070
|
DEVICE_MANAGE = "device-manage",
|
|
1072
|
-
DEVICE_RESTORE = "device-restore"
|
|
1071
|
+
DEVICE_RESTORE = "device-restore",
|
|
1072
|
+
CONNECT_EXTERNAL_WALLET = "connect-external-wallet"
|
|
1073
1073
|
}
|
|
1074
1074
|
interface PageOpenParams {
|
|
1075
1075
|
[option: string]: unknown;
|
|
@@ -1537,13 +1537,19 @@ interface UseDirectWalletReturn {
|
|
|
1537
1537
|
isConnected: boolean;
|
|
1538
1538
|
/** Wallet connector name (e.g. 'MetaMask') */
|
|
1539
1539
|
connectorName: string | null;
|
|
1540
|
-
/**
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1540
|
+
/** opens ConnectExternalWalletMenu
|
|
1541
|
+
* @param connectFlowType - optional, defaults to 'connect', can be 'link' or 'auth'
|
|
1542
|
+
* - auth: use to open ConnectExternalWalletMenu in auth mode, when embarkAI is not logged in, results in auth UI flow
|
|
1543
|
+
* - link: use to open ConnectExternalWalletMenu in link mode, when embarkAI is logged in, results in link UI flow
|
|
1544
|
+
* - connect: use to open ConnectExternalWalletMenu in connect mode, no link or auth flow occur
|
|
1545
|
+
* */
|
|
1546
|
+
connect: (connectFlowType?: ConnectFlowType) => void;
|
|
1547
|
+
/** duplicates connect for legacy compatibility */
|
|
1548
|
+
reconnect: (connectFlowType?: ConnectFlowType) => void;
|
|
1544
1549
|
/** Disconnect the external wallet */
|
|
1545
1550
|
disconnect: () => void;
|
|
1546
1551
|
}
|
|
1552
|
+
type ConnectFlowType = 'link' | 'connect' | 'auth';
|
|
1547
1553
|
declare function useDirectWallet(): UseDirectWalletReturn;
|
|
1548
1554
|
|
|
1549
1555
|
interface DirectTransactionParams {
|
|
@@ -2444,6 +2450,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2444
2450
|
close: string;
|
|
2445
2451
|
copy: string;
|
|
2446
2452
|
back: string;
|
|
2453
|
+
connect: string;
|
|
2454
|
+
disconnect: string;
|
|
2447
2455
|
language: string;
|
|
2448
2456
|
account: string;
|
|
2449
2457
|
asset: string;
|
|
@@ -2563,6 +2571,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2563
2571
|
};
|
|
2564
2572
|
};
|
|
2565
2573
|
};
|
|
2574
|
+
connectMenu: {
|
|
2575
|
+
connectWallet: string;
|
|
2576
|
+
noWallets: string;
|
|
2577
|
+
instructions: {
|
|
2578
|
+
follow: string;
|
|
2579
|
+
confirm: string;
|
|
2580
|
+
sign: string;
|
|
2581
|
+
};
|
|
2582
|
+
};
|
|
2566
2583
|
sendMenu: {
|
|
2567
2584
|
title: string;
|
|
2568
2585
|
selectAsset: string;
|
|
@@ -2822,6 +2839,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2822
2839
|
createOnDevice: string;
|
|
2823
2840
|
createOnSecurityKey: string;
|
|
2824
2841
|
};
|
|
2842
|
+
wallet: {
|
|
2843
|
+
connected: string;
|
|
2844
|
+
};
|
|
2825
2845
|
unlinkTitle: string;
|
|
2826
2846
|
unlinkConfirm: string;
|
|
2827
2847
|
unlinkPlaceholder: string;
|
|
@@ -2987,6 +3007,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2987
3007
|
close: string;
|
|
2988
3008
|
copy: string;
|
|
2989
3009
|
back: string;
|
|
3010
|
+
connect: string;
|
|
3011
|
+
disconnect: string;
|
|
2990
3012
|
language: string;
|
|
2991
3013
|
account: string;
|
|
2992
3014
|
asset: string;
|
|
@@ -3106,6 +3128,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3106
3128
|
};
|
|
3107
3129
|
};
|
|
3108
3130
|
};
|
|
3131
|
+
connectMenu: {
|
|
3132
|
+
connectWallet: string;
|
|
3133
|
+
noWallets: string;
|
|
3134
|
+
instructions: {
|
|
3135
|
+
follow: string;
|
|
3136
|
+
confirm: string;
|
|
3137
|
+
sign: string;
|
|
3138
|
+
};
|
|
3139
|
+
};
|
|
3109
3140
|
sendMenu: {
|
|
3110
3141
|
title: string;
|
|
3111
3142
|
selectAsset: string;
|
|
@@ -3365,6 +3396,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3365
3396
|
createOnDevice: string;
|
|
3366
3397
|
createOnSecurityKey: string;
|
|
3367
3398
|
};
|
|
3399
|
+
wallet: {
|
|
3400
|
+
connected: string;
|
|
3401
|
+
};
|
|
3368
3402
|
unlinkTitle: string;
|
|
3369
3403
|
unlinkConfirm: string;
|
|
3370
3404
|
unlinkPlaceholder: string;
|
|
@@ -3530,6 +3564,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3530
3564
|
close: string;
|
|
3531
3565
|
copy: string;
|
|
3532
3566
|
back: string;
|
|
3567
|
+
connect: string;
|
|
3568
|
+
disconnect: string;
|
|
3533
3569
|
language: string;
|
|
3534
3570
|
account: string;
|
|
3535
3571
|
asset: string;
|
|
@@ -3649,6 +3685,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3649
3685
|
};
|
|
3650
3686
|
};
|
|
3651
3687
|
};
|
|
3688
|
+
connectMenu: {
|
|
3689
|
+
connectWallet: string;
|
|
3690
|
+
noWallets: string;
|
|
3691
|
+
instructions: {
|
|
3692
|
+
follow: string;
|
|
3693
|
+
confirm: string;
|
|
3694
|
+
sign: string;
|
|
3695
|
+
};
|
|
3696
|
+
};
|
|
3652
3697
|
sendMenu: {
|
|
3653
3698
|
title: string;
|
|
3654
3699
|
selectAsset: string;
|
|
@@ -3908,6 +3953,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3908
3953
|
createOnDevice: string;
|
|
3909
3954
|
createOnSecurityKey: string;
|
|
3910
3955
|
};
|
|
3956
|
+
wallet: {
|
|
3957
|
+
connected: string;
|
|
3958
|
+
};
|
|
3911
3959
|
unlinkTitle: string;
|
|
3912
3960
|
unlinkConfirm: string;
|
|
3913
3961
|
unlinkPlaceholder: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,7 +97,6 @@ interface Asset extends NormalizedAsset {
|
|
|
97
97
|
declare function useAssets(address?: `0x${string}`): {
|
|
98
98
|
nativeBalance: {
|
|
99
99
|
decimals: number;
|
|
100
|
-
formatted: string;
|
|
101
100
|
symbol: string;
|
|
102
101
|
value: bigint;
|
|
103
102
|
};
|
|
@@ -230,7 +229,7 @@ interface ProviderConfig {
|
|
|
230
229
|
walletConnectProjectId?: string;
|
|
231
230
|
/** Operating mode: 'linked' = AA (current), 'direct' = external wallet signs, 'both' = user choice */
|
|
232
231
|
mode?: WalletMode;
|
|
233
|
-
/** Filter
|
|
232
|
+
/** Filter the wallet connector list shown in ConnectExternalWalletMenu. undefined = show all wallets */
|
|
234
233
|
allowedWallets?: string[];
|
|
235
234
|
};
|
|
236
235
|
preferedColorMode?: 'light' | 'dark';
|
|
@@ -1069,7 +1068,8 @@ declare enum PageKey {
|
|
|
1069
1068
|
DEVICES = "devices",
|
|
1070
1069
|
DEVICE_LINK = "device-link",
|
|
1071
1070
|
DEVICE_MANAGE = "device-manage",
|
|
1072
|
-
DEVICE_RESTORE = "device-restore"
|
|
1071
|
+
DEVICE_RESTORE = "device-restore",
|
|
1072
|
+
CONNECT_EXTERNAL_WALLET = "connect-external-wallet"
|
|
1073
1073
|
}
|
|
1074
1074
|
interface PageOpenParams {
|
|
1075
1075
|
[option: string]: unknown;
|
|
@@ -1537,13 +1537,19 @@ interface UseDirectWalletReturn {
|
|
|
1537
1537
|
isConnected: boolean;
|
|
1538
1538
|
/** Wallet connector name (e.g. 'MetaMask') */
|
|
1539
1539
|
connectorName: string | null;
|
|
1540
|
-
/**
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1540
|
+
/** opens ConnectExternalWalletMenu
|
|
1541
|
+
* @param connectFlowType - optional, defaults to 'connect', can be 'link' or 'auth'
|
|
1542
|
+
* - auth: use to open ConnectExternalWalletMenu in auth mode, when embarkAI is not logged in, results in auth UI flow
|
|
1543
|
+
* - link: use to open ConnectExternalWalletMenu in link mode, when embarkAI is logged in, results in link UI flow
|
|
1544
|
+
* - connect: use to open ConnectExternalWalletMenu in connect mode, no link or auth flow occur
|
|
1545
|
+
* */
|
|
1546
|
+
connect: (connectFlowType?: ConnectFlowType) => void;
|
|
1547
|
+
/** duplicates connect for legacy compatibility */
|
|
1548
|
+
reconnect: (connectFlowType?: ConnectFlowType) => void;
|
|
1544
1549
|
/** Disconnect the external wallet */
|
|
1545
1550
|
disconnect: () => void;
|
|
1546
1551
|
}
|
|
1552
|
+
type ConnectFlowType = 'link' | 'connect' | 'auth';
|
|
1547
1553
|
declare function useDirectWallet(): UseDirectWalletReturn;
|
|
1548
1554
|
|
|
1549
1555
|
interface DirectTransactionParams {
|
|
@@ -2444,6 +2450,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2444
2450
|
close: string;
|
|
2445
2451
|
copy: string;
|
|
2446
2452
|
back: string;
|
|
2453
|
+
connect: string;
|
|
2454
|
+
disconnect: string;
|
|
2447
2455
|
language: string;
|
|
2448
2456
|
account: string;
|
|
2449
2457
|
asset: string;
|
|
@@ -2563,6 +2571,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2563
2571
|
};
|
|
2564
2572
|
};
|
|
2565
2573
|
};
|
|
2574
|
+
connectMenu: {
|
|
2575
|
+
connectWallet: string;
|
|
2576
|
+
noWallets: string;
|
|
2577
|
+
instructions: {
|
|
2578
|
+
follow: string;
|
|
2579
|
+
confirm: string;
|
|
2580
|
+
sign: string;
|
|
2581
|
+
};
|
|
2582
|
+
};
|
|
2566
2583
|
sendMenu: {
|
|
2567
2584
|
title: string;
|
|
2568
2585
|
selectAsset: string;
|
|
@@ -2822,6 +2839,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2822
2839
|
createOnDevice: string;
|
|
2823
2840
|
createOnSecurityKey: string;
|
|
2824
2841
|
};
|
|
2842
|
+
wallet: {
|
|
2843
|
+
connected: string;
|
|
2844
|
+
};
|
|
2825
2845
|
unlinkTitle: string;
|
|
2826
2846
|
unlinkConfirm: string;
|
|
2827
2847
|
unlinkPlaceholder: string;
|
|
@@ -2987,6 +3007,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2987
3007
|
close: string;
|
|
2988
3008
|
copy: string;
|
|
2989
3009
|
back: string;
|
|
3010
|
+
connect: string;
|
|
3011
|
+
disconnect: string;
|
|
2990
3012
|
language: string;
|
|
2991
3013
|
account: string;
|
|
2992
3014
|
asset: string;
|
|
@@ -3106,6 +3128,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3106
3128
|
};
|
|
3107
3129
|
};
|
|
3108
3130
|
};
|
|
3131
|
+
connectMenu: {
|
|
3132
|
+
connectWallet: string;
|
|
3133
|
+
noWallets: string;
|
|
3134
|
+
instructions: {
|
|
3135
|
+
follow: string;
|
|
3136
|
+
confirm: string;
|
|
3137
|
+
sign: string;
|
|
3138
|
+
};
|
|
3139
|
+
};
|
|
3109
3140
|
sendMenu: {
|
|
3110
3141
|
title: string;
|
|
3111
3142
|
selectAsset: string;
|
|
@@ -3365,6 +3396,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3365
3396
|
createOnDevice: string;
|
|
3366
3397
|
createOnSecurityKey: string;
|
|
3367
3398
|
};
|
|
3399
|
+
wallet: {
|
|
3400
|
+
connected: string;
|
|
3401
|
+
};
|
|
3368
3402
|
unlinkTitle: string;
|
|
3369
3403
|
unlinkConfirm: string;
|
|
3370
3404
|
unlinkPlaceholder: string;
|
|
@@ -3530,6 +3564,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3530
3564
|
close: string;
|
|
3531
3565
|
copy: string;
|
|
3532
3566
|
back: string;
|
|
3567
|
+
connect: string;
|
|
3568
|
+
disconnect: string;
|
|
3533
3569
|
language: string;
|
|
3534
3570
|
account: string;
|
|
3535
3571
|
asset: string;
|
|
@@ -3649,6 +3685,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3649
3685
|
};
|
|
3650
3686
|
};
|
|
3651
3687
|
};
|
|
3688
|
+
connectMenu: {
|
|
3689
|
+
connectWallet: string;
|
|
3690
|
+
noWallets: string;
|
|
3691
|
+
instructions: {
|
|
3692
|
+
follow: string;
|
|
3693
|
+
confirm: string;
|
|
3694
|
+
sign: string;
|
|
3695
|
+
};
|
|
3696
|
+
};
|
|
3652
3697
|
sendMenu: {
|
|
3653
3698
|
title: string;
|
|
3654
3699
|
selectAsset: string;
|
|
@@ -3908,6 +3953,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3908
3953
|
createOnDevice: string;
|
|
3909
3954
|
createOnSecurityKey: string;
|
|
3910
3955
|
};
|
|
3956
|
+
wallet: {
|
|
3957
|
+
connected: string;
|
|
3958
|
+
};
|
|
3911
3959
|
unlinkTitle: string;
|
|
3912
3960
|
unlinkConfirm: string;
|
|
3913
3961
|
unlinkPlaceholder: string;
|