@embarkai/ui-kit 0.4.79 → 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 +16737 -16886
- package/dist/index.d.cts +55 -13
- package/dist/index.d.ts +55 -13
- package/dist/index.js +17036 -17191
- 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,10 +229,14 @@ 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';
|
|
236
|
+
/**
|
|
237
|
+
* Display header balance as asset supposed to be used by projects' dApp.
|
|
238
|
+
* Unprovided means 'native' for selected chain.
|
|
239
|
+
*/
|
|
237
240
|
showBalanceAs?: Asset['symbol'];
|
|
238
241
|
projectAssets?: {
|
|
239
242
|
assets: ProjectAsset[];
|
|
@@ -310,7 +313,13 @@ interface ProviderConfig {
|
|
|
310
313
|
requestDeduplication: boolean;
|
|
311
314
|
kycNeeded?: boolean;
|
|
312
315
|
displayNameNeeded?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Display header balance asset as USD(T) representation via current asset rate from Binance.
|
|
318
|
+
* - Asset can be set by "showBalanceAs" prop & has to be supported by Binance if "showActiveBalanceAsFiat" true.
|
|
319
|
+
*/
|
|
313
320
|
showActiveBalanceAsFiat?: boolean;
|
|
321
|
+
/** Enable/disable asset bridging, default - false */
|
|
322
|
+
showAssetBridge?: boolean;
|
|
314
323
|
};
|
|
315
324
|
warnings: {
|
|
316
325
|
backupWarning: boolean;
|
|
@@ -1059,7 +1068,8 @@ declare enum PageKey {
|
|
|
1059
1068
|
DEVICES = "devices",
|
|
1060
1069
|
DEVICE_LINK = "device-link",
|
|
1061
1070
|
DEVICE_MANAGE = "device-manage",
|
|
1062
|
-
DEVICE_RESTORE = "device-restore"
|
|
1071
|
+
DEVICE_RESTORE = "device-restore",
|
|
1072
|
+
CONNECT_EXTERNAL_WALLET = "connect-external-wallet"
|
|
1063
1073
|
}
|
|
1064
1074
|
interface PageOpenParams {
|
|
1065
1075
|
[option: string]: unknown;
|
|
@@ -1527,13 +1537,19 @@ interface UseDirectWalletReturn {
|
|
|
1527
1537
|
isConnected: boolean;
|
|
1528
1538
|
/** Wallet connector name (e.g. 'MetaMask') */
|
|
1529
1539
|
connectorName: string | null;
|
|
1530
|
-
/**
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
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;
|
|
1534
1549
|
/** Disconnect the external wallet */
|
|
1535
1550
|
disconnect: () => void;
|
|
1536
1551
|
}
|
|
1552
|
+
type ConnectFlowType = 'link' | 'connect' | 'auth';
|
|
1537
1553
|
declare function useDirectWallet(): UseDirectWalletReturn;
|
|
1538
1554
|
|
|
1539
1555
|
interface DirectTransactionParams {
|
|
@@ -2434,6 +2450,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2434
2450
|
close: string;
|
|
2435
2451
|
copy: string;
|
|
2436
2452
|
back: string;
|
|
2453
|
+
connect: string;
|
|
2454
|
+
disconnect: string;
|
|
2437
2455
|
language: string;
|
|
2438
2456
|
account: string;
|
|
2439
2457
|
asset: string;
|
|
@@ -2553,6 +2571,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2553
2571
|
};
|
|
2554
2572
|
};
|
|
2555
2573
|
};
|
|
2574
|
+
connectMenu: {
|
|
2575
|
+
connectWallet: string;
|
|
2576
|
+
noWallets: string;
|
|
2577
|
+
instructions: {
|
|
2578
|
+
follow: string;
|
|
2579
|
+
confirm: string;
|
|
2580
|
+
sign: string;
|
|
2581
|
+
};
|
|
2582
|
+
};
|
|
2556
2583
|
sendMenu: {
|
|
2557
2584
|
title: string;
|
|
2558
2585
|
selectAsset: string;
|
|
@@ -2665,9 +2692,13 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2665
2692
|
};
|
|
2666
2693
|
receiveMenu: {
|
|
2667
2694
|
title: string;
|
|
2668
|
-
|
|
2695
|
+
scanQR: string;
|
|
2696
|
+
share: {
|
|
2697
|
+
nickname: string;
|
|
2698
|
+
address: string;
|
|
2699
|
+
identity: string;
|
|
2700
|
+
};
|
|
2669
2701
|
warning: string;
|
|
2670
|
-
share: string;
|
|
2671
2702
|
onboarding: {
|
|
2672
2703
|
receiveMenu: {
|
|
2673
2704
|
title: string;
|
|
@@ -2808,6 +2839,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2808
2839
|
createOnDevice: string;
|
|
2809
2840
|
createOnSecurityKey: string;
|
|
2810
2841
|
};
|
|
2842
|
+
wallet: {
|
|
2843
|
+
connected: string;
|
|
2844
|
+
};
|
|
2811
2845
|
unlinkTitle: string;
|
|
2812
2846
|
unlinkConfirm: string;
|
|
2813
2847
|
unlinkPlaceholder: string;
|
|
@@ -3204,9 +3238,13 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3204
3238
|
};
|
|
3205
3239
|
receiveMenu: {
|
|
3206
3240
|
title: string;
|
|
3207
|
-
|
|
3241
|
+
scanQR: string;
|
|
3242
|
+
share: {
|
|
3243
|
+
nickname: string;
|
|
3244
|
+
address: string;
|
|
3245
|
+
identity: string;
|
|
3246
|
+
};
|
|
3208
3247
|
warning: string;
|
|
3209
|
-
share: string;
|
|
3210
3248
|
onboarding: {
|
|
3211
3249
|
receiveMenu: {
|
|
3212
3250
|
title: string;
|
|
@@ -3743,9 +3781,13 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3743
3781
|
};
|
|
3744
3782
|
receiveMenu: {
|
|
3745
3783
|
title: string;
|
|
3746
|
-
|
|
3784
|
+
scanQR: string;
|
|
3785
|
+
share: {
|
|
3786
|
+
nickname: string;
|
|
3787
|
+
address: string;
|
|
3788
|
+
identity: string;
|
|
3789
|
+
};
|
|
3747
3790
|
warning: string;
|
|
3748
|
-
share: string;
|
|
3749
3791
|
onboarding: {
|
|
3750
3792
|
receiveMenu: {
|
|
3751
3793
|
title: 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,10 +229,14 @@ 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';
|
|
236
|
+
/**
|
|
237
|
+
* Display header balance as asset supposed to be used by projects' dApp.
|
|
238
|
+
* Unprovided means 'native' for selected chain.
|
|
239
|
+
*/
|
|
237
240
|
showBalanceAs?: Asset['symbol'];
|
|
238
241
|
projectAssets?: {
|
|
239
242
|
assets: ProjectAsset[];
|
|
@@ -310,7 +313,13 @@ interface ProviderConfig {
|
|
|
310
313
|
requestDeduplication: boolean;
|
|
311
314
|
kycNeeded?: boolean;
|
|
312
315
|
displayNameNeeded?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Display header balance asset as USD(T) representation via current asset rate from Binance.
|
|
318
|
+
* - Asset can be set by "showBalanceAs" prop & has to be supported by Binance if "showActiveBalanceAsFiat" true.
|
|
319
|
+
*/
|
|
313
320
|
showActiveBalanceAsFiat?: boolean;
|
|
321
|
+
/** Enable/disable asset bridging, default - false */
|
|
322
|
+
showAssetBridge?: boolean;
|
|
314
323
|
};
|
|
315
324
|
warnings: {
|
|
316
325
|
backupWarning: boolean;
|
|
@@ -1059,7 +1068,8 @@ declare enum PageKey {
|
|
|
1059
1068
|
DEVICES = "devices",
|
|
1060
1069
|
DEVICE_LINK = "device-link",
|
|
1061
1070
|
DEVICE_MANAGE = "device-manage",
|
|
1062
|
-
DEVICE_RESTORE = "device-restore"
|
|
1071
|
+
DEVICE_RESTORE = "device-restore",
|
|
1072
|
+
CONNECT_EXTERNAL_WALLET = "connect-external-wallet"
|
|
1063
1073
|
}
|
|
1064
1074
|
interface PageOpenParams {
|
|
1065
1075
|
[option: string]: unknown;
|
|
@@ -1527,13 +1537,19 @@ interface UseDirectWalletReturn {
|
|
|
1527
1537
|
isConnected: boolean;
|
|
1528
1538
|
/** Wallet connector name (e.g. 'MetaMask') */
|
|
1529
1539
|
connectorName: string | null;
|
|
1530
|
-
/**
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
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;
|
|
1534
1549
|
/** Disconnect the external wallet */
|
|
1535
1550
|
disconnect: () => void;
|
|
1536
1551
|
}
|
|
1552
|
+
type ConnectFlowType = 'link' | 'connect' | 'auth';
|
|
1537
1553
|
declare function useDirectWallet(): UseDirectWalletReturn;
|
|
1538
1554
|
|
|
1539
1555
|
interface DirectTransactionParams {
|
|
@@ -2434,6 +2450,8 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2434
2450
|
close: string;
|
|
2435
2451
|
copy: string;
|
|
2436
2452
|
back: string;
|
|
2453
|
+
connect: string;
|
|
2454
|
+
disconnect: string;
|
|
2437
2455
|
language: string;
|
|
2438
2456
|
account: string;
|
|
2439
2457
|
asset: string;
|
|
@@ -2553,6 +2571,15 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2553
2571
|
};
|
|
2554
2572
|
};
|
|
2555
2573
|
};
|
|
2574
|
+
connectMenu: {
|
|
2575
|
+
connectWallet: string;
|
|
2576
|
+
noWallets: string;
|
|
2577
|
+
instructions: {
|
|
2578
|
+
follow: string;
|
|
2579
|
+
confirm: string;
|
|
2580
|
+
sign: string;
|
|
2581
|
+
};
|
|
2582
|
+
};
|
|
2556
2583
|
sendMenu: {
|
|
2557
2584
|
title: string;
|
|
2558
2585
|
selectAsset: string;
|
|
@@ -2665,9 +2692,13 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2665
2692
|
};
|
|
2666
2693
|
receiveMenu: {
|
|
2667
2694
|
title: string;
|
|
2668
|
-
|
|
2695
|
+
scanQR: string;
|
|
2696
|
+
share: {
|
|
2697
|
+
nickname: string;
|
|
2698
|
+
address: string;
|
|
2699
|
+
identity: string;
|
|
2700
|
+
};
|
|
2669
2701
|
warning: string;
|
|
2670
|
-
share: string;
|
|
2671
2702
|
onboarding: {
|
|
2672
2703
|
receiveMenu: {
|
|
2673
2704
|
title: string;
|
|
@@ -2808,6 +2839,9 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2808
2839
|
createOnDevice: string;
|
|
2809
2840
|
createOnSecurityKey: string;
|
|
2810
2841
|
};
|
|
2842
|
+
wallet: {
|
|
2843
|
+
connected: string;
|
|
2844
|
+
};
|
|
2811
2845
|
unlinkTitle: string;
|
|
2812
2846
|
unlinkConfirm: string;
|
|
2813
2847
|
unlinkPlaceholder: string;
|
|
@@ -3204,9 +3238,13 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3204
3238
|
};
|
|
3205
3239
|
receiveMenu: {
|
|
3206
3240
|
title: string;
|
|
3207
|
-
|
|
3241
|
+
scanQR: string;
|
|
3242
|
+
share: {
|
|
3243
|
+
nickname: string;
|
|
3244
|
+
address: string;
|
|
3245
|
+
identity: string;
|
|
3246
|
+
};
|
|
3208
3247
|
warning: string;
|
|
3209
|
-
share: string;
|
|
3210
3248
|
onboarding: {
|
|
3211
3249
|
receiveMenu: {
|
|
3212
3250
|
title: string;
|
|
@@ -3743,9 +3781,13 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
3743
3781
|
};
|
|
3744
3782
|
receiveMenu: {
|
|
3745
3783
|
title: string;
|
|
3746
|
-
|
|
3784
|
+
scanQR: string;
|
|
3785
|
+
share: {
|
|
3786
|
+
nickname: string;
|
|
3787
|
+
address: string;
|
|
3788
|
+
identity: string;
|
|
3789
|
+
};
|
|
3747
3790
|
warning: string;
|
|
3748
|
-
share: string;
|
|
3749
3791
|
onboarding: {
|
|
3750
3792
|
receiveMenu: {
|
|
3751
3793
|
title: string;
|