@embarkai/ui-kit 0.1.2 → 0.1.4
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 +1 -1
- package/dist/iframe/index.html +1 -1
- package/dist/iframe/kyc/sumsub.html +1 -1
- package/dist/iframe/main.js +493 -497
- package/dist/iframe/main.js.map +1 -1
- package/dist/iframe/oauth/telegram.html +1 -1
- package/dist/iframe/oauth/x.html +1 -1
- package/dist/index.cjs +117 -121
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -63
- package/dist/index.d.ts +59 -63
- package/dist/index.js +115 -120
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -207,10 +207,6 @@ interface ProviderConfig {
|
|
|
207
207
|
requireSignature: boolean;
|
|
208
208
|
walletConnectProjectId?: string;
|
|
209
209
|
};
|
|
210
|
-
development: {
|
|
211
|
-
enabled: boolean;
|
|
212
|
-
showOnProduction: boolean;
|
|
213
|
-
};
|
|
214
210
|
preferedColorMode?: 'light' | 'dark';
|
|
215
211
|
projectAssets?: {
|
|
216
212
|
assets: ProjectAsset[];
|
|
@@ -350,6 +346,8 @@ interface ConnectWalletButtonProps {
|
|
|
350
346
|
}
|
|
351
347
|
declare function ConnectWalletButton(props: ConnectWalletButtonProps): react_jsx_runtime.JSX.Element;
|
|
352
348
|
|
|
349
|
+
declare function RainbowKitProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
350
|
+
|
|
353
351
|
/**
|
|
354
352
|
* Account session containing wallet and smart account information.
|
|
355
353
|
* Shared across multiple modules (session, user-operations, signing, deployment).
|
|
@@ -915,7 +913,7 @@ interface SessionState {
|
|
|
915
913
|
setActiveChain: (chainParams: ChainParams) => void;
|
|
916
914
|
}
|
|
917
915
|
/**
|
|
918
|
-
* @function useSession is UNLIKELY to use outside
|
|
916
|
+
* @function useSession is UNLIKELY to use outside EmbarkAI, as it is INTERNAL zustand session store!
|
|
919
917
|
* Use it with caution, using zustand callback extraction. EX: const address = useSession((st) => st.address)
|
|
920
918
|
* @description refactor your app to NOT use this directly in your application, use set of new dedicated session hooks: useAccountSession, useAddress, etc.
|
|
921
919
|
*/
|
|
@@ -955,8 +953,6 @@ declare const useSession: zustand.UseBoundStore<Omit<zustand.StoreApi<SessionSta
|
|
|
955
953
|
declare const requireActiveChainId: () => number;
|
|
956
954
|
declare function SessionProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
957
955
|
|
|
958
|
-
declare function RainbowKitProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
959
|
-
|
|
960
956
|
declare const useIsMobileView: () => boolean;
|
|
961
957
|
declare const useBalance: () => {
|
|
962
958
|
walletBalance: {
|
|
@@ -1214,7 +1210,7 @@ interface UseLogoutReturn {
|
|
|
1214
1210
|
logout: () => Promise<void>;
|
|
1215
1211
|
}
|
|
1216
1212
|
/**
|
|
1217
|
-
* Hook for logging out and disconnecting from
|
|
1213
|
+
* Hook for logging out and disconnecting from EmbarkAI
|
|
1218
1214
|
* Clears session, tokens, and notifies callbacks
|
|
1219
1215
|
*
|
|
1220
1216
|
* @example
|
|
@@ -1655,10 +1651,10 @@ declare function useLinkedProfiles(): {
|
|
|
1655
1651
|
};
|
|
1656
1652
|
|
|
1657
1653
|
/**
|
|
1658
|
-
* Custom error types for
|
|
1654
|
+
* Custom error types for EmbarkAI operations
|
|
1659
1655
|
*/
|
|
1660
1656
|
/**
|
|
1661
|
-
* Base error class for all
|
|
1657
|
+
* Base error class for all EmbarkAI errors
|
|
1662
1658
|
* Local copy to avoid @embarkai/core dependency in iframe bundle
|
|
1663
1659
|
*/
|
|
1664
1660
|
declare class AccountAbstractionError extends Error {
|
|
@@ -1674,7 +1670,7 @@ declare class UserRejectedError extends AccountAbstractionError {
|
|
|
1674
1670
|
constructor(message?: string);
|
|
1675
1671
|
}
|
|
1676
1672
|
/**
|
|
1677
|
-
* Error codes for
|
|
1673
|
+
* Error codes for EmbarkAI operations
|
|
1678
1674
|
*/
|
|
1679
1675
|
declare const ErrorCodes: {
|
|
1680
1676
|
readonly MPC_SIGNING_ERROR: "MPC_SIGNING_ERROR";
|
|
@@ -2266,31 +2262,31 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2266
2262
|
backToSignIn: string;
|
|
2267
2263
|
orSeparator: string;
|
|
2268
2264
|
email: {
|
|
2269
|
-
placeholder:
|
|
2265
|
+
placeholder: string;
|
|
2270
2266
|
};
|
|
2271
2267
|
verification: {
|
|
2272
|
-
title:
|
|
2273
|
-
sentTo:
|
|
2274
|
-
codeExpires:
|
|
2275
|
-
didntReceive:
|
|
2276
|
-
resend:
|
|
2268
|
+
title: string;
|
|
2269
|
+
sentTo: string;
|
|
2270
|
+
codeExpires: string;
|
|
2271
|
+
didntReceive: string;
|
|
2272
|
+
resend: string;
|
|
2277
2273
|
};
|
|
2278
2274
|
social: {
|
|
2279
|
-
comingSoonMessage:
|
|
2275
|
+
comingSoonMessage: string;
|
|
2280
2276
|
};
|
|
2281
2277
|
wallet: {
|
|
2282
|
-
label:
|
|
2278
|
+
label: string;
|
|
2283
2279
|
};
|
|
2284
2280
|
passkey: {
|
|
2285
|
-
label:
|
|
2286
|
-
title:
|
|
2287
|
-
signInExisting:
|
|
2288
|
-
dontHave:
|
|
2289
|
-
create:
|
|
2281
|
+
label: string;
|
|
2282
|
+
title: string;
|
|
2283
|
+
signInExisting: string;
|
|
2284
|
+
dontHave: string;
|
|
2285
|
+
create: string;
|
|
2290
2286
|
};
|
|
2291
2287
|
terms: {
|
|
2292
|
-
text:
|
|
2293
|
-
action:
|
|
2288
|
+
text: string;
|
|
2289
|
+
action: string;
|
|
2294
2290
|
};
|
|
2295
2291
|
};
|
|
2296
2292
|
main: {
|
|
@@ -2345,38 +2341,38 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2345
2341
|
placeholder: string;
|
|
2346
2342
|
hint: string;
|
|
2347
2343
|
errors: {
|
|
2348
|
-
tooShort:
|
|
2349
|
-
tooLong:
|
|
2350
|
-
invalidChars:
|
|
2351
|
-
invalidUnderscore:
|
|
2352
|
-
invalidFormat:
|
|
2353
|
-
nicknameTaken:
|
|
2354
|
-
nicknameReserved:
|
|
2355
|
-
cooldownActive:
|
|
2356
|
-
nicknameNotFound:
|
|
2357
|
-
unknown:
|
|
2344
|
+
tooShort: string;
|
|
2345
|
+
tooLong: string;
|
|
2346
|
+
invalidChars: string;
|
|
2347
|
+
invalidUnderscore: string;
|
|
2348
|
+
invalidFormat: string;
|
|
2349
|
+
nicknameTaken: string;
|
|
2350
|
+
nicknameReserved: string;
|
|
2351
|
+
cooldownActive: string;
|
|
2352
|
+
nicknameNotFound: string;
|
|
2353
|
+
unknown: string;
|
|
2358
2354
|
};
|
|
2359
2355
|
availability: {
|
|
2360
|
-
alreadyYourNickname:
|
|
2361
|
-
checkingAvailability:
|
|
2362
|
-
nicknameAvailable:
|
|
2363
|
-
nicknameNotAvailable:
|
|
2356
|
+
alreadyYourNickname: string;
|
|
2357
|
+
checkingAvailability: string;
|
|
2358
|
+
nicknameAvailable: string;
|
|
2359
|
+
nicknameNotAvailable: string;
|
|
2364
2360
|
};
|
|
2365
2361
|
};
|
|
2366
2362
|
profilesMenu: {
|
|
2367
2363
|
title: string;
|
|
2368
2364
|
email: {
|
|
2369
|
-
placeholder:
|
|
2370
|
-
sentTo:
|
|
2371
|
-
warningTitle:
|
|
2372
|
-
warningMsg:
|
|
2365
|
+
placeholder: string;
|
|
2366
|
+
sentTo: string;
|
|
2367
|
+
warningTitle: string;
|
|
2368
|
+
warningMsg: string;
|
|
2373
2369
|
};
|
|
2374
2370
|
passkey: {
|
|
2375
|
-
message:
|
|
2376
|
-
message2:
|
|
2377
|
-
linking:
|
|
2378
|
-
createOnDevice:
|
|
2379
|
-
createOnSecurityKey:
|
|
2371
|
+
message: string;
|
|
2372
|
+
message2: string;
|
|
2373
|
+
linking: string;
|
|
2374
|
+
createOnDevice: string;
|
|
2375
|
+
createOnSecurityKey: string;
|
|
2380
2376
|
};
|
|
2381
2377
|
unlinkTitle: string;
|
|
2382
2378
|
unlinkConfirm: string;
|
|
@@ -2385,21 +2381,21 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2385
2381
|
securityMenu: {
|
|
2386
2382
|
title: string;
|
|
2387
2383
|
trustedApps: {
|
|
2388
|
-
trustedApp:
|
|
2389
|
-
trustedApps:
|
|
2390
|
-
noTrustedApps:
|
|
2391
|
-
removalNoteTitle:
|
|
2392
|
-
removalNoteMsg1:
|
|
2393
|
-
removalNoteMsg2:
|
|
2384
|
+
trustedApp: string;
|
|
2385
|
+
trustedApps: string;
|
|
2386
|
+
noTrustedApps: string;
|
|
2387
|
+
removalNoteTitle: string;
|
|
2388
|
+
removalNoteMsg1: string;
|
|
2389
|
+
removalNoteMsg2: string;
|
|
2394
2390
|
};
|
|
2395
2391
|
keyshareStatus: {
|
|
2396
|
-
title:
|
|
2397
|
-
serverReady:
|
|
2398
|
-
serverMissing:
|
|
2399
|
-
localReady:
|
|
2400
|
-
localMissing:
|
|
2401
|
-
valutBackupCreated:
|
|
2402
|
-
valutBackupMissing:
|
|
2392
|
+
title: string;
|
|
2393
|
+
serverReady: string;
|
|
2394
|
+
serverMissing: string;
|
|
2395
|
+
localReady: string;
|
|
2396
|
+
localMissing: string;
|
|
2397
|
+
valutBackupCreated: string;
|
|
2398
|
+
valutBackupMissing: string;
|
|
2403
2399
|
};
|
|
2404
2400
|
lastBackup: string;
|
|
2405
2401
|
lastBackupMeta: string;
|
|
@@ -2664,7 +2660,7 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2664
2660
|
};
|
|
2665
2661
|
};
|
|
2666
2662
|
};
|
|
2667
|
-
declare const LOCAL_STORAGE_I18N_KEY = "
|
|
2663
|
+
declare const LOCAL_STORAGE_I18N_KEY = "passport-language";
|
|
2668
2664
|
|
|
2669
2665
|
type TranslationResources = Record<string, Record<string, unknown>>;
|
|
2670
2666
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -207,10 +207,6 @@ interface ProviderConfig {
|
|
|
207
207
|
requireSignature: boolean;
|
|
208
208
|
walletConnectProjectId?: string;
|
|
209
209
|
};
|
|
210
|
-
development: {
|
|
211
|
-
enabled: boolean;
|
|
212
|
-
showOnProduction: boolean;
|
|
213
|
-
};
|
|
214
210
|
preferedColorMode?: 'light' | 'dark';
|
|
215
211
|
projectAssets?: {
|
|
216
212
|
assets: ProjectAsset[];
|
|
@@ -350,6 +346,8 @@ interface ConnectWalletButtonProps {
|
|
|
350
346
|
}
|
|
351
347
|
declare function ConnectWalletButton(props: ConnectWalletButtonProps): react_jsx_runtime.JSX.Element;
|
|
352
348
|
|
|
349
|
+
declare function RainbowKitProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
350
|
+
|
|
353
351
|
/**
|
|
354
352
|
* Account session containing wallet and smart account information.
|
|
355
353
|
* Shared across multiple modules (session, user-operations, signing, deployment).
|
|
@@ -915,7 +913,7 @@ interface SessionState {
|
|
|
915
913
|
setActiveChain: (chainParams: ChainParams) => void;
|
|
916
914
|
}
|
|
917
915
|
/**
|
|
918
|
-
* @function useSession is UNLIKELY to use outside
|
|
916
|
+
* @function useSession is UNLIKELY to use outside EmbarkAI, as it is INTERNAL zustand session store!
|
|
919
917
|
* Use it with caution, using zustand callback extraction. EX: const address = useSession((st) => st.address)
|
|
920
918
|
* @description refactor your app to NOT use this directly in your application, use set of new dedicated session hooks: useAccountSession, useAddress, etc.
|
|
921
919
|
*/
|
|
@@ -955,8 +953,6 @@ declare const useSession: zustand.UseBoundStore<Omit<zustand.StoreApi<SessionSta
|
|
|
955
953
|
declare const requireActiveChainId: () => number;
|
|
956
954
|
declare function SessionProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
957
955
|
|
|
958
|
-
declare function RainbowKitProvider({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
959
|
-
|
|
960
956
|
declare const useIsMobileView: () => boolean;
|
|
961
957
|
declare const useBalance: () => {
|
|
962
958
|
walletBalance: {
|
|
@@ -1214,7 +1210,7 @@ interface UseLogoutReturn {
|
|
|
1214
1210
|
logout: () => Promise<void>;
|
|
1215
1211
|
}
|
|
1216
1212
|
/**
|
|
1217
|
-
* Hook for logging out and disconnecting from
|
|
1213
|
+
* Hook for logging out and disconnecting from EmbarkAI
|
|
1218
1214
|
* Clears session, tokens, and notifies callbacks
|
|
1219
1215
|
*
|
|
1220
1216
|
* @example
|
|
@@ -1655,10 +1651,10 @@ declare function useLinkedProfiles(): {
|
|
|
1655
1651
|
};
|
|
1656
1652
|
|
|
1657
1653
|
/**
|
|
1658
|
-
* Custom error types for
|
|
1654
|
+
* Custom error types for EmbarkAI operations
|
|
1659
1655
|
*/
|
|
1660
1656
|
/**
|
|
1661
|
-
* Base error class for all
|
|
1657
|
+
* Base error class for all EmbarkAI errors
|
|
1662
1658
|
* Local copy to avoid @embarkai/core dependency in iframe bundle
|
|
1663
1659
|
*/
|
|
1664
1660
|
declare class AccountAbstractionError extends Error {
|
|
@@ -1674,7 +1670,7 @@ declare class UserRejectedError extends AccountAbstractionError {
|
|
|
1674
1670
|
constructor(message?: string);
|
|
1675
1671
|
}
|
|
1676
1672
|
/**
|
|
1677
|
-
* Error codes for
|
|
1673
|
+
* Error codes for EmbarkAI operations
|
|
1678
1674
|
*/
|
|
1679
1675
|
declare const ErrorCodes: {
|
|
1680
1676
|
readonly MPC_SIGNING_ERROR: "MPC_SIGNING_ERROR";
|
|
@@ -2266,31 +2262,31 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2266
2262
|
backToSignIn: string;
|
|
2267
2263
|
orSeparator: string;
|
|
2268
2264
|
email: {
|
|
2269
|
-
placeholder:
|
|
2265
|
+
placeholder: string;
|
|
2270
2266
|
};
|
|
2271
2267
|
verification: {
|
|
2272
|
-
title:
|
|
2273
|
-
sentTo:
|
|
2274
|
-
codeExpires:
|
|
2275
|
-
didntReceive:
|
|
2276
|
-
resend:
|
|
2268
|
+
title: string;
|
|
2269
|
+
sentTo: string;
|
|
2270
|
+
codeExpires: string;
|
|
2271
|
+
didntReceive: string;
|
|
2272
|
+
resend: string;
|
|
2277
2273
|
};
|
|
2278
2274
|
social: {
|
|
2279
|
-
comingSoonMessage:
|
|
2275
|
+
comingSoonMessage: string;
|
|
2280
2276
|
};
|
|
2281
2277
|
wallet: {
|
|
2282
|
-
label:
|
|
2278
|
+
label: string;
|
|
2283
2279
|
};
|
|
2284
2280
|
passkey: {
|
|
2285
|
-
label:
|
|
2286
|
-
title:
|
|
2287
|
-
signInExisting:
|
|
2288
|
-
dontHave:
|
|
2289
|
-
create:
|
|
2281
|
+
label: string;
|
|
2282
|
+
title: string;
|
|
2283
|
+
signInExisting: string;
|
|
2284
|
+
dontHave: string;
|
|
2285
|
+
create: string;
|
|
2290
2286
|
};
|
|
2291
2287
|
terms: {
|
|
2292
|
-
text:
|
|
2293
|
-
action:
|
|
2288
|
+
text: string;
|
|
2289
|
+
action: string;
|
|
2294
2290
|
};
|
|
2295
2291
|
};
|
|
2296
2292
|
main: {
|
|
@@ -2345,38 +2341,38 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2345
2341
|
placeholder: string;
|
|
2346
2342
|
hint: string;
|
|
2347
2343
|
errors: {
|
|
2348
|
-
tooShort:
|
|
2349
|
-
tooLong:
|
|
2350
|
-
invalidChars:
|
|
2351
|
-
invalidUnderscore:
|
|
2352
|
-
invalidFormat:
|
|
2353
|
-
nicknameTaken:
|
|
2354
|
-
nicknameReserved:
|
|
2355
|
-
cooldownActive:
|
|
2356
|
-
nicknameNotFound:
|
|
2357
|
-
unknown:
|
|
2344
|
+
tooShort: string;
|
|
2345
|
+
tooLong: string;
|
|
2346
|
+
invalidChars: string;
|
|
2347
|
+
invalidUnderscore: string;
|
|
2348
|
+
invalidFormat: string;
|
|
2349
|
+
nicknameTaken: string;
|
|
2350
|
+
nicknameReserved: string;
|
|
2351
|
+
cooldownActive: string;
|
|
2352
|
+
nicknameNotFound: string;
|
|
2353
|
+
unknown: string;
|
|
2358
2354
|
};
|
|
2359
2355
|
availability: {
|
|
2360
|
-
alreadyYourNickname:
|
|
2361
|
-
checkingAvailability:
|
|
2362
|
-
nicknameAvailable:
|
|
2363
|
-
nicknameNotAvailable:
|
|
2356
|
+
alreadyYourNickname: string;
|
|
2357
|
+
checkingAvailability: string;
|
|
2358
|
+
nicknameAvailable: string;
|
|
2359
|
+
nicknameNotAvailable: string;
|
|
2364
2360
|
};
|
|
2365
2361
|
};
|
|
2366
2362
|
profilesMenu: {
|
|
2367
2363
|
title: string;
|
|
2368
2364
|
email: {
|
|
2369
|
-
placeholder:
|
|
2370
|
-
sentTo:
|
|
2371
|
-
warningTitle:
|
|
2372
|
-
warningMsg:
|
|
2365
|
+
placeholder: string;
|
|
2366
|
+
sentTo: string;
|
|
2367
|
+
warningTitle: string;
|
|
2368
|
+
warningMsg: string;
|
|
2373
2369
|
};
|
|
2374
2370
|
passkey: {
|
|
2375
|
-
message:
|
|
2376
|
-
message2:
|
|
2377
|
-
linking:
|
|
2378
|
-
createOnDevice:
|
|
2379
|
-
createOnSecurityKey:
|
|
2371
|
+
message: string;
|
|
2372
|
+
message2: string;
|
|
2373
|
+
linking: string;
|
|
2374
|
+
createOnDevice: string;
|
|
2375
|
+
createOnSecurityKey: string;
|
|
2380
2376
|
};
|
|
2381
2377
|
unlinkTitle: string;
|
|
2382
2378
|
unlinkConfirm: string;
|
|
@@ -2385,21 +2381,21 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2385
2381
|
securityMenu: {
|
|
2386
2382
|
title: string;
|
|
2387
2383
|
trustedApps: {
|
|
2388
|
-
trustedApp:
|
|
2389
|
-
trustedApps:
|
|
2390
|
-
noTrustedApps:
|
|
2391
|
-
removalNoteTitle:
|
|
2392
|
-
removalNoteMsg1:
|
|
2393
|
-
removalNoteMsg2:
|
|
2384
|
+
trustedApp: string;
|
|
2385
|
+
trustedApps: string;
|
|
2386
|
+
noTrustedApps: string;
|
|
2387
|
+
removalNoteTitle: string;
|
|
2388
|
+
removalNoteMsg1: string;
|
|
2389
|
+
removalNoteMsg2: string;
|
|
2394
2390
|
};
|
|
2395
2391
|
keyshareStatus: {
|
|
2396
|
-
title:
|
|
2397
|
-
serverReady:
|
|
2398
|
-
serverMissing:
|
|
2399
|
-
localReady:
|
|
2400
|
-
localMissing:
|
|
2401
|
-
valutBackupCreated:
|
|
2402
|
-
valutBackupMissing:
|
|
2392
|
+
title: string;
|
|
2393
|
+
serverReady: string;
|
|
2394
|
+
serverMissing: string;
|
|
2395
|
+
localReady: string;
|
|
2396
|
+
localMissing: string;
|
|
2397
|
+
valutBackupCreated: string;
|
|
2398
|
+
valutBackupMissing: string;
|
|
2403
2399
|
};
|
|
2404
2400
|
lastBackup: string;
|
|
2405
2401
|
lastBackupMeta: string;
|
|
@@ -2664,7 +2660,7 @@ declare const PASSPORT_TRANSLATIONS: {
|
|
|
2664
2660
|
};
|
|
2665
2661
|
};
|
|
2666
2662
|
};
|
|
2667
|
-
declare const LOCAL_STORAGE_I18N_KEY = "
|
|
2663
|
+
declare const LOCAL_STORAGE_I18N_KEY = "passport-language";
|
|
2668
2664
|
|
|
2669
2665
|
type TranslationResources = Record<string, Record<string, unknown>>;
|
|
2670
2666
|
/**
|