@vechain/vechain-kit 1.2.2 → 1.2.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/dist/index.cjs CHANGED
@@ -31,11 +31,11 @@ var lu = require('react-icons/lu');
31
31
  var md = require('react-icons/md');
32
32
  var bi = require('react-icons/bi');
33
33
  var ri = require('react-icons/ri');
34
- var pi = require('react-icons/pi');
35
34
  var vsc = require('react-icons/vsc');
36
35
  var fa = require('react-icons/fa');
37
36
  var fi = require('react-icons/fi');
38
37
  var gi = require('react-icons/gi');
38
+ var pi = require('react-icons/pi');
39
39
  var reactQrcodeLogo = require('react-qrcode-logo');
40
40
  var go = require('react-icons/go');
41
41
  var fa6 = require('react-icons/fa6');
@@ -3025,6 +3025,9 @@ var useWallet = () => {
3025
3025
  const smartAccountDomain = useVechainDomain(smartAccount?.address ?? "").data?.domain;
3026
3026
  const embeddedWalletDomain = useVechainDomain(privyEmbeddedWallet ?? "").data?.domain;
3027
3027
  const crossAppAccountDomain = useVechainDomain(crossAppAddress ?? "").data?.domain;
3028
+ const { data: smartAccountVersion } = useContractVersion(
3029
+ smartAccount?.address ?? ""
3030
+ );
3028
3031
  const disconnect = React9.useCallback(async () => {
3029
3032
  try {
3030
3033
  setIsConnected(false);
@@ -3057,7 +3060,8 @@ var useWallet = () => {
3057
3060
  domain: smartAccountDomain,
3058
3061
  image: chunkVUMG5BY2_cjs.getPicassoImage(smartAccount?.address ?? ""),
3059
3062
  isDeployed: smartAccount?.isDeployed ?? false,
3060
- isActive: hasActiveSmartAccount
3063
+ isActive: hasActiveSmartAccount,
3064
+ version: smartAccountVersion ?? null
3061
3065
  },
3062
3066
  dappKitWallet: isConnectedWithDappKit ? {
3063
3067
  address: dappKitAccount,
@@ -3275,6 +3279,147 @@ var useWalletModal = () => {
3275
3279
  return { open, close, isOpen };
3276
3280
  };
3277
3281
  var WalletModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3282
+ var useChooseNameModal = () => {
3283
+ const {
3284
+ openAccountModal,
3285
+ closeAccountModal,
3286
+ isAccountModalOpen,
3287
+ setAccountModalContent
3288
+ } = useVeChainKitConfig();
3289
+ const open = () => {
3290
+ setAccountModalContent("choose-name");
3291
+ openAccountModal();
3292
+ };
3293
+ const close = () => {
3294
+ closeAccountModal();
3295
+ };
3296
+ return {
3297
+ open,
3298
+ close,
3299
+ isOpen: isAccountModalOpen
3300
+ };
3301
+ };
3302
+ var ChooseNameModalProvider = ({
3303
+ children
3304
+ }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3305
+ var useSendTokenModal = () => {
3306
+ const {
3307
+ openAccountModal,
3308
+ closeAccountModal,
3309
+ isAccountModalOpen,
3310
+ setAccountModalContent
3311
+ } = useVeChainKitConfig();
3312
+ const open = () => {
3313
+ setAccountModalContent({
3314
+ type: "send-token",
3315
+ props: {
3316
+ setCurrentContent: setAccountModalContent
3317
+ }
3318
+ });
3319
+ openAccountModal();
3320
+ };
3321
+ const close = () => {
3322
+ closeAccountModal();
3323
+ };
3324
+ return {
3325
+ open,
3326
+ close,
3327
+ isOpen: isAccountModalOpen
3328
+ };
3329
+ };
3330
+ var SendTokenModalProvider = ({
3331
+ children
3332
+ }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3333
+ var useEmbeddedWalletSettingsModal = () => {
3334
+ const {
3335
+ openAccountModal,
3336
+ closeAccountModal,
3337
+ isAccountModalOpen,
3338
+ setAccountModalContent
3339
+ } = useVeChainKitConfig();
3340
+ const open = () => {
3341
+ setAccountModalContent("embedded-wallet");
3342
+ openAccountModal();
3343
+ };
3344
+ const close = () => {
3345
+ closeAccountModal();
3346
+ };
3347
+ return {
3348
+ open,
3349
+ close,
3350
+ isOpen: isAccountModalOpen
3351
+ };
3352
+ };
3353
+ var EmbeddedWalletSettingsModalProvider = ({
3354
+ children
3355
+ }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3356
+ var useExploreEcosystemModal = () => {
3357
+ const {
3358
+ openAccountModal,
3359
+ closeAccountModal,
3360
+ isAccountModalOpen,
3361
+ setAccountModalContent
3362
+ } = useVeChainKitConfig();
3363
+ const open = () => {
3364
+ setAccountModalContent("ecosystem");
3365
+ openAccountModal();
3366
+ };
3367
+ const close = () => {
3368
+ closeAccountModal();
3369
+ };
3370
+ return {
3371
+ open,
3372
+ close,
3373
+ isOpen: isAccountModalOpen
3374
+ };
3375
+ };
3376
+ var ExploreEcosystemModalProvider = ({
3377
+ children
3378
+ }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3379
+ var useNotificationsModal = () => {
3380
+ const {
3381
+ openAccountModal,
3382
+ closeAccountModal,
3383
+ isAccountModalOpen,
3384
+ setAccountModalContent
3385
+ } = useVeChainKitConfig();
3386
+ const open = () => {
3387
+ setAccountModalContent("notifications");
3388
+ openAccountModal();
3389
+ };
3390
+ const close = () => {
3391
+ closeAccountModal();
3392
+ };
3393
+ return {
3394
+ open,
3395
+ close,
3396
+ isOpen: isAccountModalOpen
3397
+ };
3398
+ };
3399
+ var NotificationsModalProvider = ({
3400
+ children
3401
+ }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3402
+ var useFAQModal = () => {
3403
+ const {
3404
+ openAccountModal,
3405
+ closeAccountModal,
3406
+ isAccountModalOpen,
3407
+ setAccountModalContent
3408
+ } = useVeChainKitConfig();
3409
+ const open = () => {
3410
+ setAccountModalContent("faq");
3411
+ openAccountModal();
3412
+ };
3413
+ const close = () => {
3414
+ closeAccountModal();
3415
+ };
3416
+ return {
3417
+ open,
3418
+ close,
3419
+ isOpen: isAccountModalOpen
3420
+ };
3421
+ };
3422
+ var FAQModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3278
3423
  var estimateTxGasWithNext = async (clauses, caller, buffer = 1.25, nodeUrl) => {
3279
3424
  const response = await fetch(`${nodeUrl}/accounts/*?revision=next`, {
3280
3425
  method: "POST",
@@ -4568,7 +4713,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
4568
4713
  // package.json
4569
4714
  var package_default = {
4570
4715
  name: "@vechain/vechain-kit",
4571
- version: "1.2.2",
4716
+ version: "1.2.4",
4572
4717
  private: false,
4573
4718
  homepage: "https://github.com/vechain/vechain-kit",
4574
4719
  repository: "github:vechain/vechain-kit",
@@ -5931,7 +6076,7 @@ var AccountSelector = ({
5931
6076
  rounded: "full"
5932
6077
  }
5933
6078
  ),
5934
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkVUMG5BY2_cjs.humanDomain(wallet?.domain ?? "", 11, 4) || chunkVUMG5BY2_cjs.humanAddress(wallet?.address ?? "", 6, 4) }),
6079
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: wallet?.domain || chunkVUMG5BY2_cjs.humanAddress(wallet?.address ?? "", 6, 4) }),
5935
6080
  /* @__PURE__ */ jsxRuntime.jsx(
5936
6081
  react.Icon,
5937
6082
  {
@@ -6185,180 +6330,415 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
6185
6330
  )
6186
6331
  ] });
6187
6332
  };
6188
- var EmbeddedWalletContent = ({ setCurrentContent }) => {
6333
+ var NetworkInfo = () => {
6189
6334
  const { t } = reactI18next.useTranslation();
6190
- const [showFullText, setShowFullText] = React9.useState(false);
6191
- const { connectedWallet } = useWallet();
6192
- const { exportWallet, linkPasskey } = reactAuth.usePrivy();
6193
- const walletImage = chunkVUMG5BY2_cjs.getPicassoImage(connectedWallet?.address ?? "");
6194
- const { getConnectionCache } = useCrossAppConnectionCache();
6195
- const { privy, darkMode: isDark } = useVeChainKitConfig();
6196
- const { connection } = useWallet();
6197
- const connectionCache = getConnectionCache();
6198
- return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
6199
- /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
6200
- /* @__PURE__ */ jsxRuntime.jsx(
6201
- react.ModalHeader,
6335
+ const { darkMode: isDark, network } = useVeChainKitConfig();
6336
+ const { connection, smartAccount } = useWallet();
6337
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6338
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6339
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6340
+ t("Connection Type"),
6341
+ ":"
6342
+ ] }),
6343
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
6344
+ ] }),
6345
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6346
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6347
+ t("Network"),
6348
+ ":"
6349
+ ] }),
6350
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
6351
+ ] }),
6352
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6353
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6354
+ t("Node URL"),
6355
+ ":"
6356
+ ] }),
6357
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkVUMG5BY2_cjs.getConfig(network.type).nodeUrl })
6358
+ ] }),
6359
+ connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6360
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6361
+ t("Smart Account"),
6362
+ ":"
6363
+ ] }),
6364
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
6365
+ ] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6366
+ /* @__PURE__ */ jsxRuntime.jsxs(
6367
+ react.Text,
6202
6368
  {
6203
- fontSize: "md",
6204
- fontWeight: "500",
6205
- textAlign: "center",
6369
+ fontSize: "sm",
6206
6370
  color: isDark ? "#dfdfdd" : "#4d4d4d",
6207
- children: t("Embedded Wallet")
6371
+ children: [
6372
+ t("Smart Account"),
6373
+ ":"
6374
+ ]
6208
6375
  }
6209
6376
  ),
6210
6377
  /* @__PURE__ */ jsxRuntime.jsx(
6211
- ModalBackButton,
6378
+ react.Text,
6212
6379
  {
6213
- onClick: () => setCurrentContent("settings")
6380
+ fontSize: "sm",
6381
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6382
+ children: smartAccount.version ? `v${smartAccount.version}` : "v1"
6214
6383
  }
6215
- ),
6216
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
6384
+ )
6217
6385
  ] }),
6218
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(
6219
- react.VStack,
6220
- {
6221
- justify: "center",
6222
- spacing: 5,
6223
- align: "flex-start",
6224
- w: "full",
6225
- children: [
6226
- /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { justify: "center", align: "center", w: "full", children: [
6227
- /* @__PURE__ */ jsxRuntime.jsx(
6228
- react.Image,
6229
- {
6230
- src: walletImage,
6231
- maxW: "100px",
6232
- borderRadius: "50%"
6233
- }
6234
- ),
6235
- /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: connectedWallet })
6236
- ] }),
6237
- connection.isConnectedWithCrossApp && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6238
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
6239
- "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.",
6240
- {
6241
- element: connectionCache?.ecosystemApp?.name
6242
- }
6243
- ) }),
6244
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, mt: 5, children: t(
6245
- "A smart account is being used as a gateway for blockchain interactions."
6246
- ) })
6247
- ] }),
6248
- connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6249
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
6250
- "You are using an Embedded Wallet secured by your social login method, ensuring a seamless VeChain experience."
6251
- ) }),
6252
- showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6253
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
6254
- t(
6255
- "We highly recommend exporting your private key to back up your wallet. This ensures you can restore it if needed or transfer it to self-custody using"
6256
- ),
6257
- /* @__PURE__ */ jsxRuntime.jsxs(
6258
- react.Link,
6259
- {
6260
- href: "https://www.veworld.net/",
6261
- isExternal: true,
6262
- color: "gray.500",
6263
- fontSize: "14px",
6264
- textDecoration: "underline",
6265
- children: [
6266
- " ",
6267
- t("VeWorld Wallet"),
6268
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { ml: 1, as: io5.IoOpenOutline })
6269
- ]
6270
- }
6271
- ),
6272
- "."
6273
- ] }),
6274
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, mt: 5, children: t(
6275
- "A smart account is being used as a gateway for blockchain interactions."
6276
- ) })
6277
- ] }),
6278
- /* @__PURE__ */ jsxRuntime.jsx(
6279
- react.Button,
6280
- {
6281
- mt: 0,
6282
- variant: "link",
6283
- size: "sm",
6284
- onClick: () => setShowFullText(!showFullText),
6285
- color: "blue.500",
6286
- textAlign: "left",
6287
- children: t(showFullText ? "Show Less" : "Read More")
6288
- }
6289
- )
6290
- ] }),
6291
- connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(
6292
- ActionButton,
6386
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6387
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6388
+ t("VeChain Kit"),
6389
+ ":"
6390
+ ] }),
6391
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
6392
+ ] })
6393
+ ] });
6394
+ };
6395
+ var CrossAppConnectionCard = ({ connectionCache }) => {
6396
+ const { t } = reactI18next.useTranslation();
6397
+ const { darkMode: isDark } = useVeChainKitConfig();
6398
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
6399
+ react.VStack,
6400
+ {
6401
+ p: 4,
6402
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
6403
+ borderRadius: "xl",
6404
+ spacing: 4,
6405
+ w: "full",
6406
+ children: [
6407
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6408
+ /* @__PURE__ */ jsxRuntime.jsxs(
6409
+ react.Text,
6293
6410
  {
6294
- title: t("Backup your wallet"),
6295
- description: t(
6296
- "Store your Recovery Phrase or Private Key in a secure location, avoid losing access to your assets."
6297
- ),
6298
- onClick: () => {
6299
- exportWallet();
6300
- },
6301
- leftIcon: gi.GiHouseKeys,
6302
- rightIcon: md.MdOutlineNavigateNext
6411
+ fontSize: "sm",
6412
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6413
+ children: [
6414
+ t("Logged in with"),
6415
+ ":"
6416
+ ]
6303
6417
  }
6304
6418
  ),
6305
- connection.isConnectedWithSocialLogin && privy?.allowPasskeyLinking && /* @__PURE__ */ jsxRuntime.jsx(
6306
- ActionButton,
6419
+ /* @__PURE__ */ jsxRuntime.jsx(
6420
+ react.Text,
6307
6421
  {
6308
- title: t("Add passkey"),
6309
- description: t(
6310
- "Enable one click login by adding a passkey to your account."
6311
- ),
6312
- onClick: () => {
6313
- linkPasskey();
6314
- },
6315
- leftIcon: io.IoIosFingerPrint,
6316
- rightIcon: md.MdOutlineNavigateNext
6317
- }
6318
- )
6319
- ]
6320
- }
6321
- ) }),
6322
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", align: "stretch", textAlign: "center", mt: 5, children: connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { mt: 2, opacity: 0.6, children: [
6422
+ fontSize: "sm",
6423
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6424
+ children: connectionCache.ecosystemApp.name
6425
+ }
6426
+ )
6427
+ ] }),
6428
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6429
+ /* @__PURE__ */ jsxRuntime.jsxs(
6430
+ react.Text,
6431
+ {
6432
+ fontSize: "sm",
6433
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6434
+ children: [
6435
+ t("Connected at"),
6436
+ ":"
6437
+ ]
6438
+ }
6439
+ ),
6440
+ /* @__PURE__ */ jsxRuntime.jsx(
6441
+ react.Text,
6442
+ {
6443
+ fontSize: "sm",
6444
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6445
+ children: new Date(
6446
+ connectionCache.timestamp
6447
+ ).toLocaleString()
6448
+ }
6449
+ )
6450
+ ] }),
6451
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
6452
+ ]
6453
+ }
6454
+ ) });
6455
+ };
6456
+ var DappKitConnectionCard = () => {
6457
+ const { t } = reactI18next.useTranslation();
6458
+ const { source } = dappKitReact.useWallet();
6459
+ const { darkMode: isDark } = useVeChainKitConfig();
6460
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: source && /* @__PURE__ */ jsxRuntime.jsxs(
6461
+ react.VStack,
6462
+ {
6463
+ p: 4,
6464
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
6465
+ borderRadius: "xl",
6466
+ spacing: 4,
6467
+ w: "full",
6468
+ justifyContent: "space-between",
6469
+ children: [
6470
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6471
+ /* @__PURE__ */ jsxRuntime.jsxs(
6472
+ react.Text,
6473
+ {
6474
+ fontSize: "sm",
6475
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6476
+ children: [
6477
+ t("Logged in with"),
6478
+ ":"
6479
+ ]
6480
+ }
6481
+ ),
6482
+ /* @__PURE__ */ jsxRuntime.jsx(
6483
+ react.Text,
6484
+ {
6485
+ fontSize: "sm",
6486
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6487
+ children: source
6488
+ }
6489
+ )
6490
+ ] }),
6491
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
6492
+ ]
6493
+ }
6494
+ ) });
6495
+ };
6496
+ var PrivyConnectionCard = () => {
6497
+ const { t } = reactI18next.useTranslation();
6498
+ const { privy, darkMode: isDark } = useVeChainKitConfig();
6499
+ const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
6500
+ if (isLoading)
6501
+ return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {}) });
6502
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: appInfo && /* @__PURE__ */ jsxRuntime.jsxs(
6503
+ react.VStack,
6504
+ {
6505
+ p: 4,
6506
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
6507
+ borderRadius: "xl",
6508
+ spacing: 4,
6509
+ w: "full",
6510
+ justifyContent: "space-between",
6511
+ children: [
6512
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6513
+ /* @__PURE__ */ jsxRuntime.jsxs(
6514
+ react.Text,
6515
+ {
6516
+ fontSize: "sm",
6517
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6518
+ children: [
6519
+ t("Logged in with"),
6520
+ ":"
6521
+ ]
6522
+ }
6523
+ ),
6524
+ /* @__PURE__ */ jsxRuntime.jsx(
6525
+ react.Text,
6526
+ {
6527
+ fontSize: "sm",
6528
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6529
+ children: Object.values(appInfo)[0].name
6530
+ }
6531
+ )
6532
+ ] }),
6533
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
6534
+ ]
6535
+ }
6536
+ ) });
6537
+ };
6538
+ var WalletSecuredBy = () => {
6539
+ const { connection } = useWallet();
6540
+ const { t } = reactI18next.useTranslation();
6541
+ const { darkMode: isDark, privy } = useVeChainKitConfig();
6542
+ const { getConnectionCache } = useCrossAppConnectionCache();
6543
+ const connectionCache = getConnectionCache();
6544
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6545
+ react.VStack,
6546
+ {
6547
+ w: "full",
6548
+ align: "stretch",
6549
+ textAlign: "center",
6550
+ mt: 5,
6551
+ p: 3,
6552
+ borderRadius: "lg",
6553
+ bg: isDark ? "whiteAlpha.100" : "blackAlpha.50",
6554
+ shadow: "sm",
6555
+ children: [
6556
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") }),
6557
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "center", children: [
6558
+ /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.PrivyLogo, { isDark, w: "50px" }),
6559
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: pi.PiLineVertical, ml: 2 }),
6560
+ connection.isConnectedWithVeChain ? /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.VechainLogoHorizontal, { isDark, w: "69px" }) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(
6561
+ react.Image,
6562
+ {
6563
+ src: connectionCache.ecosystemApp.logoUrl,
6564
+ alt: connectionCache.ecosystemApp.name,
6565
+ maxW: "40px",
6566
+ borderRadius: "md"
6567
+ }
6568
+ ),
6569
+ connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsxRuntime.jsx(
6570
+ react.Image,
6571
+ {
6572
+ src: privy?.appearance.logo,
6573
+ alt: privy?.appearance.logo,
6574
+ maxW: "40px",
6575
+ borderRadius: "md"
6576
+ }
6577
+ )
6578
+ ] })
6579
+ ]
6580
+ }
6581
+ );
6582
+ };
6583
+ var EmbeddedWalletContent = ({ setCurrentContent }) => {
6584
+ const { t } = reactI18next.useTranslation();
6585
+ const [showFullText, setShowFullText] = React9.useState(false);
6586
+ const { connectedWallet } = useWallet();
6587
+ const { exportWallet } = reactAuth.usePrivy();
6588
+ const walletImage = chunkVUMG5BY2_cjs.getPicassoImage(connectedWallet?.address ?? "");
6589
+ const { getConnectionCache } = useCrossAppConnectionCache();
6590
+ const { darkMode: isDark } = useVeChainKitConfig();
6591
+ const { connection } = useWallet();
6592
+ const connectionCache = getConnectionCache();
6593
+ return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
6594
+ /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
6323
6595
  /* @__PURE__ */ jsxRuntime.jsx(
6324
- react.HStack,
6596
+ react.ModalHeader,
6325
6597
  {
6598
+ fontSize: "md",
6599
+ fontWeight: "500",
6326
6600
  textAlign: "center",
6327
- alignItems: "center",
6328
- justify: "center",
6329
- w: "full",
6330
- children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") })
6601
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6602
+ children: t("Embedded Wallet")
6331
6603
  }
6332
6604
  ),
6333
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "center", children: [
6334
- /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.PrivyLogo, { isDark, w: "50px" }),
6335
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: pi.PiLineVertical, ml: 2 }),
6336
- connection.isConnectedWithVeChain ? /* @__PURE__ */ jsxRuntime.jsx(
6337
- chunkX4PAU76A_cjs.VechainLogoHorizontal,
6338
- {
6339
- isDark,
6340
- w: "69px"
6341
- }
6342
- ) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(
6343
- react.Image,
6344
- {
6345
- src: connectionCache.ecosystemApp.logoUrl,
6346
- alt: connectionCache.ecosystemApp.name,
6347
- maxW: "40px",
6348
- borderRadius: "md"
6349
- }
6350
- ),
6351
- connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsxRuntime.jsx(
6352
- react.Image,
6353
- {
6354
- src: privy?.appearance.logo,
6355
- alt: privy?.appearance.logo,
6356
- maxW: "40px",
6357
- borderRadius: "md"
6358
- }
6359
- )
6360
- ] })
6361
- ] }) }) })
6605
+ /* @__PURE__ */ jsxRuntime.jsx(
6606
+ ModalBackButton,
6607
+ {
6608
+ onClick: () => setCurrentContent("settings")
6609
+ }
6610
+ ),
6611
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
6612
+ ] }),
6613
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(
6614
+ react.VStack,
6615
+ {
6616
+ justify: "center",
6617
+ spacing: 5,
6618
+ align: "flex-start",
6619
+ w: "full",
6620
+ children: [
6621
+ /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { justify: "center", align: "center", w: "full", children: [
6622
+ /* @__PURE__ */ jsxRuntime.jsx(
6623
+ react.Image,
6624
+ {
6625
+ src: walletImage,
6626
+ maxW: "100px",
6627
+ borderRadius: "50%"
6628
+ }
6629
+ ),
6630
+ /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: connectedWallet })
6631
+ ] }),
6632
+ connection.isConnectedWithCrossApp && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6633
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
6634
+ "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.",
6635
+ {
6636
+ element: connectionCache?.ecosystemApp?.name
6637
+ }
6638
+ ) }),
6639
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, mt: 5, children: t(
6640
+ "A smart account is being used as a gateway for blockchain interactions."
6641
+ ) })
6642
+ ] }),
6643
+ connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6644
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
6645
+ "You are using an Embedded Wallet secured by your social login method, ensuring a seamless VeChain experience."
6646
+ ) }),
6647
+ showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6648
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
6649
+ t(
6650
+ "We highly recommend exporting your private key to back up your wallet. This ensures you can restore it if needed or transfer it to self-custody using"
6651
+ ),
6652
+ /* @__PURE__ */ jsxRuntime.jsxs(
6653
+ react.Link,
6654
+ {
6655
+ href: "https://www.veworld.net/",
6656
+ isExternal: true,
6657
+ color: "gray.500",
6658
+ fontSize: "14px",
6659
+ textDecoration: "underline",
6660
+ children: [
6661
+ " ",
6662
+ t("VeWorld Wallet"),
6663
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { ml: 1, as: io5.IoOpenOutline })
6664
+ ]
6665
+ }
6666
+ ),
6667
+ "."
6668
+ ] }),
6669
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
6670
+ t("Click"),
6671
+ " ",
6672
+ /* @__PURE__ */ jsxRuntime.jsx(
6673
+ react.Link,
6674
+ {
6675
+ href: "https://docs.vechain-kit.vechain.org/vechain-kit/embedded-wallets",
6676
+ isExternal: true,
6677
+ color: "gray.500",
6678
+ fontSize: "14px",
6679
+ textDecoration: "underline",
6680
+ children: t("here")
6681
+ }
6682
+ ),
6683
+ " ",
6684
+ t(
6685
+ "to learn more about embedded wallets."
6686
+ )
6687
+ ] }),
6688
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
6689
+ "A smart account is being used as a gateway for blockchain interactions."
6690
+ ) })
6691
+ ] }),
6692
+ /* @__PURE__ */ jsxRuntime.jsx(
6693
+ react.Button,
6694
+ {
6695
+ mt: 0,
6696
+ variant: "link",
6697
+ size: "sm",
6698
+ onClick: () => setShowFullText(!showFullText),
6699
+ color: "blue.500",
6700
+ textAlign: "left",
6701
+ children: t(showFullText ? "Show Less" : "Read More")
6702
+ }
6703
+ )
6704
+ ] }),
6705
+ /* @__PURE__ */ jsxRuntime.jsx(
6706
+ ActionButton,
6707
+ {
6708
+ title: t("Backup your wallet"),
6709
+ description: t(
6710
+ connection.isConnectedWithSocialLogin ? "Store your Recovery Phrase or Private Key in a secure location, avoid losing access to your assets." : "Backup can be done only in the app securing your wallet."
6711
+ ),
6712
+ onClick: () => {
6713
+ exportWallet();
6714
+ },
6715
+ isDisabled: !connection.isConnectedWithSocialLogin,
6716
+ leftIcon: gi.GiHouseKeys,
6717
+ rightIcon: md.MdOutlineNavigateNext
6718
+ }
6719
+ ),
6720
+ /* @__PURE__ */ jsxRuntime.jsx(
6721
+ ActionButton,
6722
+ {
6723
+ title: t("Login methods"),
6724
+ description: t(
6725
+ connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
6726
+ ),
6727
+ onClick: () => {
6728
+ setCurrentContent("privy-linked-accounts");
6729
+ },
6730
+ isDisabled: !connection.isConnectedWithSocialLogin,
6731
+ leftIcon: md.MdManageAccounts,
6732
+ rightIcon: md.MdOutlineNavigateNext
6733
+ }
6734
+ )
6735
+ ]
6736
+ }
6737
+ ) }),
6738
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", children: [
6739
+ /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
6740
+ connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
6741
+ ] }) })
6362
6742
  ] });
6363
6743
  };
6364
6744
  var WalletSettingsContent = ({
@@ -6378,7 +6758,7 @@ var WalletSettingsContent = ({
6378
6758
  contentRef.current.scrollTop = 0;
6379
6759
  }
6380
6760
  }, []);
6381
- return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
6761
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
6382
6762
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
6383
6763
  /* @__PURE__ */ jsxRuntime.jsx(
6384
6764
  react.ModalHeader,
@@ -6406,6 +6786,20 @@ var WalletSettingsContent = ({
6406
6786
  /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: account })
6407
6787
  ] }),
6408
6788
  /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { mt: 10, w: "full", spacing: 3, children: [
6789
+ /* @__PURE__ */ jsxRuntime.jsx(
6790
+ ActionButton,
6791
+ {
6792
+ title: t("Connection Details"),
6793
+ description: t(
6794
+ "View the details of your connection to this app."
6795
+ ),
6796
+ onClick: () => {
6797
+ setCurrentContent("connection-details");
6798
+ },
6799
+ leftIcon: vsc.VscDebugDisconnect,
6800
+ rightIcon: md.MdOutlineNavigateNext
6801
+ }
6802
+ ),
6409
6803
  /* @__PURE__ */ jsxRuntime.jsx(
6410
6804
  ActionButton,
6411
6805
  {
@@ -6430,29 +6824,12 @@ var WalletSettingsContent = ({
6430
6824
  rightIcon: md.MdOutlineNavigateNext
6431
6825
  }
6432
6826
  ),
6433
- connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(
6434
- ActionButton,
6435
- {
6436
- title: t("Login methods"),
6437
- description: t(
6438
- "View and manage the login methods linked to your wallet."
6439
- ),
6440
- onClick: () => {
6441
- setCurrentContent("privy-linked-accounts");
6442
- },
6443
- leftIcon: md.MdManageAccounts,
6444
- rightIcon: md.MdOutlineNavigateNext
6445
- }
6446
- ),
6447
6827
  connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(
6448
6828
  ActionButton,
6449
6829
  {
6450
6830
  title: t("Embedded Wallet"),
6451
6831
  description: t(
6452
- "View details of your embedded wallet created and secured by {{appName}}.",
6453
- {
6454
- appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
6455
- }
6832
+ "Manage your embedded wallet security settings or back it up to a new device."
6456
6833
  ),
6457
6834
  onClick: () => {
6458
6835
  setCurrentContent("embedded-wallet");
@@ -6461,20 +6838,6 @@ var WalletSettingsContent = ({
6461
6838
  rightIcon: md.MdOutlineNavigateNext
6462
6839
  }
6463
6840
  ),
6464
- /* @__PURE__ */ jsxRuntime.jsx(
6465
- ActionButton,
6466
- {
6467
- title: t("Connection Details"),
6468
- description: t(
6469
- "View the details of your connection to this app."
6470
- ),
6471
- onClick: () => {
6472
- setCurrentContent("connection-details");
6473
- },
6474
- leftIcon: vsc.VscDebugDisconnect,
6475
- rightIcon: md.MdOutlineNavigateNext
6476
- }
6477
- ),
6478
6841
  /* @__PURE__ */ jsxRuntime.jsx(
6479
6842
  ActionButton,
6480
6843
  {
@@ -9923,7 +10286,7 @@ var FAQContent = ({ onGoBack }) => {
9923
10286
  react.Button,
9924
10287
  {
9925
10288
  as: react.Link,
9926
- href: "https://vechain-foundation-san-marino.gitbook.io/vechain-kit",
10289
+ href: "https://docs.vechain-kit.vechain.org/",
9927
10290
  isExternal: true,
9928
10291
  variant: "outline",
9929
10292
  rightIcon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: fa.FaExternalLinkAlt }),
@@ -9936,184 +10299,6 @@ var FAQContent = ({ onGoBack }) => {
9936
10299
  ] }) })
9937
10300
  ] });
9938
10301
  };
9939
- var NetworkInfo = () => {
9940
- const { t } = reactI18next.useTranslation();
9941
- const { darkMode: isDark, network } = useVeChainKitConfig();
9942
- const { connection } = useWallet();
9943
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9944
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
9945
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9946
- t("Connection Type"),
9947
- ":"
9948
- ] }),
9949
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
9950
- ] }),
9951
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
9952
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9953
- t("Network"),
9954
- ":"
9955
- ] }),
9956
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
9957
- ] }),
9958
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
9959
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9960
- t("Node"),
9961
- ":"
9962
- ] }),
9963
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkVUMG5BY2_cjs.getConfig(network.type).nodeUrl })
9964
- ] }),
9965
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
9966
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9967
- t("Active Smart Account"),
9968
- ":"
9969
- ] }),
9970
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.isConnectedWithPrivy ? "Yes" : "No" })
9971
- ] })
9972
- ] });
9973
- };
9974
- var CrossAppConnectionCard = ({ connectionCache }) => {
9975
- const { t } = reactI18next.useTranslation();
9976
- const { darkMode: isDark } = useVeChainKitConfig();
9977
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
9978
- react.VStack,
9979
- {
9980
- p: 4,
9981
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
9982
- borderRadius: "xl",
9983
- spacing: 4,
9984
- w: "full",
9985
- children: [
9986
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
9987
- /* @__PURE__ */ jsxRuntime.jsxs(
9988
- react.Text,
9989
- {
9990
- fontSize: "sm",
9991
- color: isDark ? "#dfdfdd" : "#4d4d4d",
9992
- children: [
9993
- t("Connected through"),
9994
- ":"
9995
- ]
9996
- }
9997
- ),
9998
- /* @__PURE__ */ jsxRuntime.jsx(
9999
- react.Text,
10000
- {
10001
- fontSize: "sm",
10002
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10003
- children: connectionCache.ecosystemApp.name
10004
- }
10005
- )
10006
- ] }),
10007
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10008
- /* @__PURE__ */ jsxRuntime.jsxs(
10009
- react.Text,
10010
- {
10011
- fontSize: "sm",
10012
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10013
- children: [
10014
- t("Connected at"),
10015
- ":"
10016
- ]
10017
- }
10018
- ),
10019
- /* @__PURE__ */ jsxRuntime.jsx(
10020
- react.Text,
10021
- {
10022
- fontSize: "sm",
10023
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10024
- children: new Date(
10025
- connectionCache.timestamp
10026
- ).toLocaleString()
10027
- }
10028
- )
10029
- ] }),
10030
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
10031
- ]
10032
- }
10033
- ) });
10034
- };
10035
- var DappKitConnectionCard = () => {
10036
- const { t } = reactI18next.useTranslation();
10037
- const { source } = dappKitReact.useWallet();
10038
- const { darkMode: isDark } = useVeChainKitConfig();
10039
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: source && /* @__PURE__ */ jsxRuntime.jsxs(
10040
- react.VStack,
10041
- {
10042
- p: 4,
10043
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
10044
- borderRadius: "xl",
10045
- spacing: 4,
10046
- w: "full",
10047
- justifyContent: "space-between",
10048
- children: [
10049
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10050
- /* @__PURE__ */ jsxRuntime.jsxs(
10051
- react.Text,
10052
- {
10053
- fontSize: "sm",
10054
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10055
- children: [
10056
- t("Connected through"),
10057
- ":"
10058
- ]
10059
- }
10060
- ),
10061
- /* @__PURE__ */ jsxRuntime.jsx(
10062
- react.Text,
10063
- {
10064
- fontSize: "sm",
10065
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10066
- children: source
10067
- }
10068
- )
10069
- ] }),
10070
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
10071
- ]
10072
- }
10073
- ) });
10074
- };
10075
- var PrivyConnectionCard = () => {
10076
- const { t } = reactI18next.useTranslation();
10077
- const { privy, darkMode: isDark } = useVeChainKitConfig();
10078
- const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
10079
- if (isLoading)
10080
- return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {}) });
10081
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: appInfo && /* @__PURE__ */ jsxRuntime.jsxs(
10082
- react.VStack,
10083
- {
10084
- p: 4,
10085
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
10086
- borderRadius: "xl",
10087
- spacing: 4,
10088
- w: "full",
10089
- justifyContent: "space-between",
10090
- children: [
10091
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10092
- /* @__PURE__ */ jsxRuntime.jsxs(
10093
- react.Text,
10094
- {
10095
- fontSize: "sm",
10096
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10097
- children: [
10098
- t("Connected through"),
10099
- ":"
10100
- ]
10101
- }
10102
- ),
10103
- /* @__PURE__ */ jsxRuntime.jsx(
10104
- react.Text,
10105
- {
10106
- fontSize: "sm",
10107
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10108
- children: Object.values(appInfo)[0].name
10109
- }
10110
- )
10111
- ] }),
10112
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
10113
- ]
10114
- }
10115
- ) });
10116
- };
10117
10302
  var ConnectionDetailsContent = ({ onGoBack }) => {
10118
10303
  const { t } = reactI18next.useTranslation();
10119
10304
  const { getConnectionCache } = useCrossAppConnectionCache();
@@ -10214,7 +10399,8 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
10214
10399
  ]
10215
10400
  }
10216
10401
  )
10217
- ] })
10402
+ ] }),
10403
+ connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
10218
10404
  ] }),
10219
10405
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, {})
10220
10406
  ] });
@@ -10913,14 +11099,14 @@ var SharedAppCard = ({
10913
11099
  _hover: { opacity: 0.8 },
10914
11100
  cursor: "pointer",
10915
11101
  onClick,
10916
- children: /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { p: size === "sm" ? 2 : 4, alignItems: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "center", justify: "center", children: [
11102
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { p: size === "sm" ? 2 : 4, alignItems: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, alignItems: "center", justifyContent: "center", children: [
10917
11103
  imageUrl && /* @__PURE__ */ jsxRuntime.jsx(
10918
11104
  react.Image,
10919
11105
  {
10920
11106
  src: imageUrl,
10921
11107
  fallbackSrc: chunkVUMG5BY2_cjs.notFoundImage,
10922
11108
  alt: name,
10923
- height: "100px",
11109
+ height: "90px",
10924
11110
  objectFit: "contain",
10925
11111
  rounded: "full"
10926
11112
  }
@@ -10928,13 +11114,11 @@ var SharedAppCard = ({
10928
11114
  name && /* @__PURE__ */ jsxRuntime.jsx(
10929
11115
  react.Text,
10930
11116
  {
10931
- position: "absolute",
10932
- bottom: "5px",
10933
11117
  fontWeight: "medium",
10934
11118
  wordBreak: "break-word",
10935
11119
  noOfLines: 1,
10936
- width: "90%",
10937
11120
  textAlign: "center",
11121
+ w: "full",
10938
11122
  children: name
10939
11123
  }
10940
11124
  )
@@ -10942,30 +11126,12 @@ var SharedAppCard = ({
10942
11126
  }
10943
11127
  );
10944
11128
  };
10945
- var SkeletonAppCard = () => {
10946
- return /* @__PURE__ */ jsxRuntime.jsx(react.Card, { variant: "vechainKitAppCard", children: /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { p: 4, alignItems: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(
10947
- react.VStack,
10948
- {
10949
- spacing: 3,
10950
- align: "center",
10951
- justify: "center",
10952
- width: "100%",
10953
- children: [
10954
- /* @__PURE__ */ jsxRuntime.jsx(react.Skeleton, { height: "100px", width: "100%", rounded: "12px" }),
10955
- /* @__PURE__ */ jsxRuntime.jsx(react.Skeleton, { height: "20px", width: "80%", rounded: "md" })
10956
- ]
10957
- }
10958
- ) }) });
10959
- };
10960
11129
  var AppComponent = ({ xApp, setCurrentContent }) => {
10961
11130
  const { data: appMetadata, isLoading: appMetadataLoading } = useXAppMetadata(xApp.id);
10962
11131
  const { data: logo, isLoading: isLogoLoading } = useIpfsImage(
10963
11132
  appMetadata?.logo
10964
11133
  );
10965
- if (appMetadataLoading || isLogoLoading) {
10966
- return /* @__PURE__ */ jsxRuntime.jsx(SkeletonAppCard, {});
10967
- }
10968
- return /* @__PURE__ */ jsxRuntime.jsx(
11134
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Skeleton, { isLoaded: !appMetadataLoading && !isLogoLoading, children: /* @__PURE__ */ jsxRuntime.jsx(
10969
11135
  SharedAppCard,
10970
11136
  {
10971
11137
  name: appMetadata?.name ?? "",
@@ -10983,7 +11149,7 @@ var AppComponent = ({ xApp, setCurrentContent }) => {
10983
11149
  });
10984
11150
  }
10985
11151
  }
10986
- );
11152
+ ) });
10987
11153
  };
10988
11154
  var CustomAppComponent = ({
10989
11155
  name,
@@ -11052,7 +11218,7 @@ var DEFAULT_APPS = [
11052
11218
  }
11053
11219
  },
11054
11220
  {
11055
- name: "vetDomains",
11221
+ name: "vet.domains",
11056
11222
  description: ".vet.domains provides a unique and unchangeable identity for Vechain users by linking information to their wallet addresses. It becomes easier for people to use the blockchain by replacing complicated wallet addresses with easy-to-remember names.",
11057
11223
  external_url: "https://vet.domains",
11058
11224
  logo: "https://vet.domains/assets/walletconnect.png",
@@ -11064,6 +11230,20 @@ var DEFAULT_APPS = [
11064
11230
  ve_world: {
11065
11231
  banner: "https://vet.domains/assets/walletconnect.png"
11066
11232
  }
11233
+ },
11234
+ {
11235
+ name: "VeChain Kit",
11236
+ description: "A all-in-one library for building VeChain applications.",
11237
+ external_url: "https://vechain-kit.vechain.org/",
11238
+ logo: "https://i.ibb.co/ncysMF9/vechain-kit-logo-transparent.png",
11239
+ banner: "",
11240
+ screenshots: [],
11241
+ social_urls: [],
11242
+ app_urls: [],
11243
+ tweets: [],
11244
+ ve_world: {
11245
+ banner: ""
11246
+ }
11067
11247
  }
11068
11248
  ];
11069
11249
  var ExploreEcosystemContent = ({ setCurrentContent }) => {
@@ -11289,15 +11469,19 @@ var DisconnectConfirmContent = ({ onDisconnect, onBack }) => {
11289
11469
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, {})
11290
11470
  ] });
11291
11471
  };
11292
- var AccountModal = ({ isOpen, onClose }) => {
11472
+ var AccountModal = ({
11473
+ isOpen,
11474
+ onClose,
11475
+ initialContent = "main"
11476
+ }) => {
11293
11477
  useNotificationAlerts();
11294
11478
  const { account } = useWallet();
11295
- const [currentContent, setCurrentContent] = React9.useState("main");
11479
+ const [currentContent, setCurrentContent] = React9.useState(initialContent);
11296
11480
  React9.useEffect(() => {
11297
- if (isOpen) {
11298
- setCurrentContent("main");
11481
+ if (isOpen && initialContent) {
11482
+ setCurrentContent(initialContent);
11299
11483
  }
11300
- }, [isOpen]);
11484
+ }, [isOpen, initialContent]);
11301
11485
  const renderContent = () => {
11302
11486
  if (typeof currentContent === "object") {
11303
11487
  switch (currentContent.type) {
@@ -11382,7 +11566,7 @@ var AccountModal = ({ isOpen, onClose }) => {
11382
11566
  return /* @__PURE__ */ jsxRuntime.jsx(
11383
11567
  PrivyLinkedAccounts,
11384
11568
  {
11385
- onBack: () => setCurrentContent("settings")
11569
+ onBack: () => setCurrentContent("embedded-wallet")
11386
11570
  }
11387
11571
  );
11388
11572
  case "ecosystem":
@@ -11634,7 +11818,15 @@ var WalletButton = ({
11634
11818
  onOpen: accountModal.onOpen,
11635
11819
  buttonStyle
11636
11820
  }
11637
- ) : /* @__PURE__ */ jsxRuntime.jsx(react.Button, { onClick: handleConnect, ...buttonStyle, children: t("Login") }),
11821
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
11822
+ react.Button,
11823
+ {
11824
+ isLoading: connection.isLoading,
11825
+ onClick: handleConnect,
11826
+ ...buttonStyle,
11827
+ children: t("Login")
11828
+ }
11829
+ ),
11638
11830
  /* @__PURE__ */ jsxRuntime.jsx(
11639
11831
  ConnectModal,
11640
11832
  {
@@ -12197,6 +12389,7 @@ var VeChainKitProvider = ({
12197
12389
  () => setIsTransactionToastOpen(false),
12198
12390
  []
12199
12391
  );
12392
+ const [accountModalContent, setAccountModalContent] = React9.useState("main");
12200
12393
  const loginMethods = [
12201
12394
  ...privy?.loginMethods ?? [],
12202
12395
  ...(privyEcosystemAppIDS ?? []).map((appID) => `privy:${appID}`)
@@ -12248,6 +12441,7 @@ var VeChainKitProvider = ({
12248
12441
  openAccountModal,
12249
12442
  closeAccountModal,
12250
12443
  isAccountModalOpen,
12444
+ setAccountModalContent,
12251
12445
  openTransactionModal,
12252
12446
  closeTransactionModal,
12253
12447
  isTransactionModalOpen,
@@ -12327,7 +12521,8 @@ var VeChainKitProvider = ({
12327
12521
  AccountModal,
12328
12522
  {
12329
12523
  isOpen: isAccountModalOpen,
12330
- onClose: closeAccountModal
12524
+ onClose: closeAccountModal,
12525
+ initialContent: accountModalContent
12331
12526
  }
12332
12527
  )
12333
12528
  ]
@@ -12589,6 +12784,7 @@ exports.AssetsSection = AssetsSection;
12589
12784
  exports.BalanceSection = BalanceSection;
12590
12785
  exports.BaseModal = BaseModal;
12591
12786
  exports.ChooseNameContent = ChooseNameContent;
12787
+ exports.ChooseNameModalProvider = ChooseNameModalProvider;
12592
12788
  exports.ChooseNameSearchContent = ChooseNameSearchContent;
12593
12789
  exports.ChooseNameSummaryContent = ChooseNameSummaryContent;
12594
12790
  exports.ConnectModal = ConnectModal;
@@ -12599,7 +12795,10 @@ exports.EcosystemButton = EcosystemButton;
12599
12795
  exports.EcosystemModal = EcosystemModal;
12600
12796
  exports.EmailLoginButton = EmailLoginButton;
12601
12797
  exports.EmbeddedWalletContent = EmbeddedWalletContent;
12798
+ exports.EmbeddedWalletSettingsModalProvider = EmbeddedWalletSettingsModalProvider;
12799
+ exports.ExploreEcosystemModalProvider = ExploreEcosystemModalProvider;
12602
12800
  exports.FAQContent = FAQContent;
12801
+ exports.FAQModalProvider = FAQModalProvider;
12603
12802
  exports.FadeInView = FadeInView;
12604
12803
  exports.FadeInViewFromBottom = FadeInViewFromBottom;
12605
12804
  exports.FadeInViewFromLeft = FadeInViewFromLeft;
@@ -12611,6 +12810,7 @@ exports.MainContent = MainContent;
12611
12810
  exports.ModalBackButton = ModalBackButton;
12612
12811
  exports.ModalFAQButton = ModalFAQButton;
12613
12812
  exports.NFTMediaType = NFTMediaType;
12813
+ exports.NotificationsModalProvider = NotificationsModalProvider;
12614
12814
  exports.PRICE_FEED_IDS = PRICE_FEED_IDS;
12615
12815
  exports.PasskeyLoginButton = PasskeyLoginButton;
12616
12816
  exports.PrivyButton = PrivyButton;
@@ -12621,6 +12821,7 @@ exports.ScrollToTopWrapper = ScrollToTopWrapper;
12621
12821
  exports.SecurityLevel = SecurityLevel;
12622
12822
  exports.SelectTokenContent = SelectTokenContent;
12623
12823
  exports.SendTokenContent = SendTokenContent;
12824
+ exports.SendTokenModalProvider = SendTokenModalProvider;
12624
12825
  exports.SendTokenSummaryContent = SendTokenSummaryContent;
12625
12826
  exports.SocialLoginButtons = SocialLoginButtons;
12626
12827
  exports.StickyFooterContainer = StickyFooterContainer;
@@ -12767,6 +12968,7 @@ exports.useB3trDonated = useB3trDonated;
12767
12968
  exports.useB3trToUpgrade = useB3trToUpgrade;
12768
12969
  exports.useBalances = useBalances;
12769
12970
  exports.useCall = useCall;
12971
+ exports.useChooseNameModal = useChooseNameModal;
12770
12972
  exports.useClaimVeWorldSubdomain = useClaimVeWorldSubdomain;
12771
12973
  exports.useConnectModal = useConnectModal;
12772
12974
  exports.useContractVersion = useContractVersion;
@@ -12774,7 +12976,10 @@ exports.useCrossAppConnectionCache = useCrossAppConnectionCache;
12774
12976
  exports.useCurrentAllocationsRoundId = useCurrentAllocationsRoundId;
12775
12977
  exports.useCurrentBlock = useCurrentBlock;
12776
12978
  exports.useEcosystemShortcuts = useEcosystemShortcuts;
12979
+ exports.useEmbeddedWalletSettingsModal = useEmbeddedWalletSettingsModal;
12777
12980
  exports.useEnsRecordExists = useEnsRecordExists;
12981
+ exports.useExploreEcosystemModal = useExploreEcosystemModal;
12982
+ exports.useFAQModal = useFAQModal;
12778
12983
  exports.useFeatureAnnouncement = useFeatureAnnouncement;
12779
12984
  exports.useFetchAppInfo = useFetchAppInfo;
12780
12985
  exports.useGMBaseUri = useGMBaseUri;
@@ -12831,6 +13036,7 @@ exports.useNFTImage = useNFTImage;
12831
13036
  exports.useNFTMetadataUri = useNFTMetadataUri;
12832
13037
  exports.useNotificationAlerts = useNotificationAlerts;
12833
13038
  exports.useNotifications = useNotifications;
13039
+ exports.useNotificationsModal = useNotificationsModal;
12834
13040
  exports.useParticipatedInGovernance = useParticipatedInGovernance;
12835
13041
  exports.useParticipationScoreThreshold = useParticipationScoreThreshold;
12836
13042
  exports.usePassportChecks = usePassportChecks;
@@ -12842,6 +13048,7 @@ exports.useRoundXApps = useRoundXApps;
12842
13048
  exports.useScrollToTop = useScrollToTop;
12843
13049
  exports.useSecurityMultiplier = useSecurityMultiplier;
12844
13050
  exports.useSelectedGmNft = useSelectedGmNft;
13051
+ exports.useSendTokenModal = useSendTokenModal;
12845
13052
  exports.useSendTransaction = useSendTransaction;
12846
13053
  exports.useSignMessage = useSignMessage2;
12847
13054
  exports.useSignTypedData = useSignTypedData2;