@embarkai/ui-kit 0.4.80 → 0.4.81
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 +16676 -16889
- package/dist/index.d.cts +27 -7
- package/dist/index.d.ts +27 -7
- package/dist/index.js +16730 -16948
- 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;
|
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;
|