@vechain/vechain-kit 1.2.1 → 1.2.3
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 +200 -117
- package/dist/{Constants-Q8PYUyoh.d.cts → Constants-Cu1LVhH4.d.cts} +1 -0
- package/dist/{Constants-Q8PYUyoh.d.ts → Constants-Cu1LVhH4.d.ts} +1 -0
- package/dist/index.cjs +241 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -59
- package/dist/index.d.ts +115 -59
- package/dist/index.js +230 -77
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -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.
|
|
4716
|
+
version: "1.2.3",
|
|
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:
|
|
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
|
{
|
|
@@ -6189,7 +6334,7 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6189
6334
|
const { t } = reactI18next.useTranslation();
|
|
6190
6335
|
const [showFullText, setShowFullText] = React9.useState(false);
|
|
6191
6336
|
const { connectedWallet } = useWallet();
|
|
6192
|
-
const { exportWallet
|
|
6337
|
+
const { exportWallet } = reactAuth.usePrivy();
|
|
6193
6338
|
const walletImage = chunkVUMG5BY2_cjs.getPicassoImage(connectedWallet?.address ?? "");
|
|
6194
6339
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
6195
6340
|
const { privy, darkMode: isDark } = useVeChainKitConfig();
|
|
@@ -6302,17 +6447,17 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6302
6447
|
rightIcon: md.MdOutlineNavigateNext
|
|
6303
6448
|
}
|
|
6304
6449
|
),
|
|
6305
|
-
connection.isConnectedWithSocialLogin &&
|
|
6450
|
+
connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6306
6451
|
ActionButton,
|
|
6307
6452
|
{
|
|
6308
|
-
title: t("
|
|
6453
|
+
title: t("Login methods"),
|
|
6309
6454
|
description: t(
|
|
6310
|
-
"
|
|
6455
|
+
"View and manage the login methods linked to your wallet."
|
|
6311
6456
|
),
|
|
6312
6457
|
onClick: () => {
|
|
6313
|
-
|
|
6458
|
+
setCurrentContent("privy-linked-accounts");
|
|
6314
6459
|
},
|
|
6315
|
-
leftIcon:
|
|
6460
|
+
leftIcon: md.MdManageAccounts,
|
|
6316
6461
|
rightIcon: md.MdOutlineNavigateNext
|
|
6317
6462
|
}
|
|
6318
6463
|
)
|
|
@@ -6378,7 +6523,7 @@ var WalletSettingsContent = ({
|
|
|
6378
6523
|
contentRef.current.scrollTop = 0;
|
|
6379
6524
|
}
|
|
6380
6525
|
}, []);
|
|
6381
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6526
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
6382
6527
|
/* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
|
|
6383
6528
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6384
6529
|
react.ModalHeader,
|
|
@@ -6406,6 +6551,20 @@ var WalletSettingsContent = ({
|
|
|
6406
6551
|
/* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: account })
|
|
6407
6552
|
] }),
|
|
6408
6553
|
/* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { mt: 10, w: "full", spacing: 3, children: [
|
|
6554
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6555
|
+
ActionButton,
|
|
6556
|
+
{
|
|
6557
|
+
title: t("Connection Details"),
|
|
6558
|
+
description: t(
|
|
6559
|
+
"View the details of your connection to this app."
|
|
6560
|
+
),
|
|
6561
|
+
onClick: () => {
|
|
6562
|
+
setCurrentContent("connection-details");
|
|
6563
|
+
},
|
|
6564
|
+
leftIcon: vsc.VscDebugDisconnect,
|
|
6565
|
+
rightIcon: md.MdOutlineNavigateNext
|
|
6566
|
+
}
|
|
6567
|
+
),
|
|
6409
6568
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6410
6569
|
ActionButton,
|
|
6411
6570
|
{
|
|
@@ -6430,20 +6589,6 @@ var WalletSettingsContent = ({
|
|
|
6430
6589
|
rightIcon: md.MdOutlineNavigateNext
|
|
6431
6590
|
}
|
|
6432
6591
|
),
|
|
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
6592
|
connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6448
6593
|
ActionButton,
|
|
6449
6594
|
{
|
|
@@ -6461,20 +6606,6 @@ var WalletSettingsContent = ({
|
|
|
6461
6606
|
rightIcon: md.MdOutlineNavigateNext
|
|
6462
6607
|
}
|
|
6463
6608
|
),
|
|
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
6609
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6479
6610
|
ActionButton,
|
|
6480
6611
|
{
|
|
@@ -9923,7 +10054,7 @@ var FAQContent = ({ onGoBack }) => {
|
|
|
9923
10054
|
react.Button,
|
|
9924
10055
|
{
|
|
9925
10056
|
as: react.Link,
|
|
9926
|
-
href: "https://vechain-
|
|
10057
|
+
href: "https://docs.vechain-kit.vechain.org/",
|
|
9927
10058
|
isExternal: true,
|
|
9928
10059
|
variant: "outline",
|
|
9929
10060
|
rightIcon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: fa.FaExternalLinkAlt }),
|
|
@@ -9939,7 +10070,7 @@ var FAQContent = ({ onGoBack }) => {
|
|
|
9939
10070
|
var NetworkInfo = () => {
|
|
9940
10071
|
const { t } = reactI18next.useTranslation();
|
|
9941
10072
|
const { darkMode: isDark, network } = useVeChainKitConfig();
|
|
9942
|
-
const { connection } = useWallet();
|
|
10073
|
+
const { connection, smartAccount } = useWallet();
|
|
9943
10074
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9944
10075
|
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
9945
10076
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
@@ -9962,12 +10093,25 @@ var NetworkInfo = () => {
|
|
|
9962
10093
|
] }),
|
|
9963
10094
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkVUMG5BY2_cjs.getConfig(network.type).nodeUrl })
|
|
9964
10095
|
] }),
|
|
10096
|
+
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10097
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10098
|
+
t("Smart Account"),
|
|
10099
|
+
":"
|
|
10100
|
+
] }),
|
|
10101
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
10102
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10103
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10104
|
+
t("Smart Account"),
|
|
10105
|
+
":"
|
|
10106
|
+
] }),
|
|
10107
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
10108
|
+
] }),
|
|
9965
10109
|
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
|
|
9966
10110
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
9967
|
-
t("
|
|
10111
|
+
t("VeChain Kit"),
|
|
9968
10112
|
":"
|
|
9969
10113
|
] }),
|
|
9970
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children:
|
|
10114
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
|
|
9971
10115
|
] })
|
|
9972
10116
|
] });
|
|
9973
10117
|
};
|
|
@@ -10913,14 +11057,14 @@ var SharedAppCard = ({
|
|
|
10913
11057
|
_hover: { opacity: 0.8 },
|
|
10914
11058
|
cursor: "pointer",
|
|
10915
11059
|
onClick,
|
|
10916
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { p: size === "sm" ? 2 : 4, alignItems: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3,
|
|
11060
|
+
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
11061
|
imageUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10918
11062
|
react.Image,
|
|
10919
11063
|
{
|
|
10920
11064
|
src: imageUrl,
|
|
10921
11065
|
fallbackSrc: chunkVUMG5BY2_cjs.notFoundImage,
|
|
10922
11066
|
alt: name,
|
|
10923
|
-
height: "
|
|
11067
|
+
height: "90px",
|
|
10924
11068
|
objectFit: "contain",
|
|
10925
11069
|
rounded: "full"
|
|
10926
11070
|
}
|
|
@@ -10928,13 +11072,11 @@ var SharedAppCard = ({
|
|
|
10928
11072
|
name && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10929
11073
|
react.Text,
|
|
10930
11074
|
{
|
|
10931
|
-
position: "absolute",
|
|
10932
|
-
bottom: "5px",
|
|
10933
11075
|
fontWeight: "medium",
|
|
10934
11076
|
wordBreak: "break-word",
|
|
10935
11077
|
noOfLines: 1,
|
|
10936
|
-
width: "90%",
|
|
10937
11078
|
textAlign: "center",
|
|
11079
|
+
w: "full",
|
|
10938
11080
|
children: name
|
|
10939
11081
|
}
|
|
10940
11082
|
)
|
|
@@ -10942,30 +11084,12 @@ var SharedAppCard = ({
|
|
|
10942
11084
|
}
|
|
10943
11085
|
);
|
|
10944
11086
|
};
|
|
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
11087
|
var AppComponent = ({ xApp, setCurrentContent }) => {
|
|
10961
11088
|
const { data: appMetadata, isLoading: appMetadataLoading } = useXAppMetadata(xApp.id);
|
|
10962
11089
|
const { data: logo, isLoading: isLogoLoading } = useIpfsImage(
|
|
10963
11090
|
appMetadata?.logo
|
|
10964
11091
|
);
|
|
10965
|
-
|
|
10966
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SkeletonAppCard, {});
|
|
10967
|
-
}
|
|
10968
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11092
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Skeleton, { isLoaded: !appMetadataLoading && !isLogoLoading, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10969
11093
|
SharedAppCard,
|
|
10970
11094
|
{
|
|
10971
11095
|
name: appMetadata?.name ?? "",
|
|
@@ -10983,7 +11107,7 @@ var AppComponent = ({ xApp, setCurrentContent }) => {
|
|
|
10983
11107
|
});
|
|
10984
11108
|
}
|
|
10985
11109
|
}
|
|
10986
|
-
);
|
|
11110
|
+
) });
|
|
10987
11111
|
};
|
|
10988
11112
|
var CustomAppComponent = ({
|
|
10989
11113
|
name,
|
|
@@ -11052,7 +11176,7 @@ var DEFAULT_APPS = [
|
|
|
11052
11176
|
}
|
|
11053
11177
|
},
|
|
11054
11178
|
{
|
|
11055
|
-
name: "
|
|
11179
|
+
name: "vet.domains",
|
|
11056
11180
|
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
11181
|
external_url: "https://vet.domains",
|
|
11058
11182
|
logo: "https://vet.domains/assets/walletconnect.png",
|
|
@@ -11064,6 +11188,20 @@ var DEFAULT_APPS = [
|
|
|
11064
11188
|
ve_world: {
|
|
11065
11189
|
banner: "https://vet.domains/assets/walletconnect.png"
|
|
11066
11190
|
}
|
|
11191
|
+
},
|
|
11192
|
+
{
|
|
11193
|
+
name: "VeChain Kit",
|
|
11194
|
+
description: "A all-in-one library for building VeChain applications.",
|
|
11195
|
+
external_url: "https://vechain-kit.vechain.org/",
|
|
11196
|
+
logo: "https://i.ibb.co/ncysMF9/vechain-kit-logo-transparent.png",
|
|
11197
|
+
banner: "",
|
|
11198
|
+
screenshots: [],
|
|
11199
|
+
social_urls: [],
|
|
11200
|
+
app_urls: [],
|
|
11201
|
+
tweets: [],
|
|
11202
|
+
ve_world: {
|
|
11203
|
+
banner: ""
|
|
11204
|
+
}
|
|
11067
11205
|
}
|
|
11068
11206
|
];
|
|
11069
11207
|
var ExploreEcosystemContent = ({ setCurrentContent }) => {
|
|
@@ -11289,15 +11427,19 @@ var DisconnectConfirmContent = ({ onDisconnect, onBack }) => {
|
|
|
11289
11427
|
/* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, {})
|
|
11290
11428
|
] });
|
|
11291
11429
|
};
|
|
11292
|
-
var AccountModal = ({
|
|
11430
|
+
var AccountModal = ({
|
|
11431
|
+
isOpen,
|
|
11432
|
+
onClose,
|
|
11433
|
+
initialContent = "main"
|
|
11434
|
+
}) => {
|
|
11293
11435
|
useNotificationAlerts();
|
|
11294
11436
|
const { account } = useWallet();
|
|
11295
|
-
const [currentContent, setCurrentContent] = React9.useState(
|
|
11437
|
+
const [currentContent, setCurrentContent] = React9.useState(initialContent);
|
|
11296
11438
|
React9.useEffect(() => {
|
|
11297
|
-
if (isOpen) {
|
|
11298
|
-
setCurrentContent(
|
|
11439
|
+
if (isOpen && initialContent) {
|
|
11440
|
+
setCurrentContent(initialContent);
|
|
11299
11441
|
}
|
|
11300
|
-
}, [isOpen]);
|
|
11442
|
+
}, [isOpen, initialContent]);
|
|
11301
11443
|
const renderContent = () => {
|
|
11302
11444
|
if (typeof currentContent === "object") {
|
|
11303
11445
|
switch (currentContent.type) {
|
|
@@ -11382,7 +11524,7 @@ var AccountModal = ({ isOpen, onClose }) => {
|
|
|
11382
11524
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11383
11525
|
PrivyLinkedAccounts,
|
|
11384
11526
|
{
|
|
11385
|
-
onBack: () => setCurrentContent("
|
|
11527
|
+
onBack: () => setCurrentContent("embedded-wallet")
|
|
11386
11528
|
}
|
|
11387
11529
|
);
|
|
11388
11530
|
case "ecosystem":
|
|
@@ -11634,7 +11776,15 @@ var WalletButton = ({
|
|
|
11634
11776
|
onOpen: accountModal.onOpen,
|
|
11635
11777
|
buttonStyle
|
|
11636
11778
|
}
|
|
11637
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11779
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11780
|
+
react.Button,
|
|
11781
|
+
{
|
|
11782
|
+
isLoading: connection.isLoading,
|
|
11783
|
+
onClick: handleConnect,
|
|
11784
|
+
...buttonStyle,
|
|
11785
|
+
children: t("Login")
|
|
11786
|
+
}
|
|
11787
|
+
),
|
|
11638
11788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11639
11789
|
ConnectModal,
|
|
11640
11790
|
{
|
|
@@ -12197,6 +12347,7 @@ var VeChainKitProvider = ({
|
|
|
12197
12347
|
() => setIsTransactionToastOpen(false),
|
|
12198
12348
|
[]
|
|
12199
12349
|
);
|
|
12350
|
+
const [accountModalContent, setAccountModalContent] = React9.useState("main");
|
|
12200
12351
|
const loginMethods = [
|
|
12201
12352
|
...privy?.loginMethods ?? [],
|
|
12202
12353
|
...(privyEcosystemAppIDS ?? []).map((appID) => `privy:${appID}`)
|
|
@@ -12248,6 +12399,7 @@ var VeChainKitProvider = ({
|
|
|
12248
12399
|
openAccountModal,
|
|
12249
12400
|
closeAccountModal,
|
|
12250
12401
|
isAccountModalOpen,
|
|
12402
|
+
setAccountModalContent,
|
|
12251
12403
|
openTransactionModal,
|
|
12252
12404
|
closeTransactionModal,
|
|
12253
12405
|
isTransactionModalOpen,
|
|
@@ -12327,7 +12479,8 @@ var VeChainKitProvider = ({
|
|
|
12327
12479
|
AccountModal,
|
|
12328
12480
|
{
|
|
12329
12481
|
isOpen: isAccountModalOpen,
|
|
12330
|
-
onClose: closeAccountModal
|
|
12482
|
+
onClose: closeAccountModal,
|
|
12483
|
+
initialContent: accountModalContent
|
|
12331
12484
|
}
|
|
12332
12485
|
)
|
|
12333
12486
|
]
|
|
@@ -12589,6 +12742,7 @@ exports.AssetsSection = AssetsSection;
|
|
|
12589
12742
|
exports.BalanceSection = BalanceSection;
|
|
12590
12743
|
exports.BaseModal = BaseModal;
|
|
12591
12744
|
exports.ChooseNameContent = ChooseNameContent;
|
|
12745
|
+
exports.ChooseNameModalProvider = ChooseNameModalProvider;
|
|
12592
12746
|
exports.ChooseNameSearchContent = ChooseNameSearchContent;
|
|
12593
12747
|
exports.ChooseNameSummaryContent = ChooseNameSummaryContent;
|
|
12594
12748
|
exports.ConnectModal = ConnectModal;
|
|
@@ -12599,7 +12753,10 @@ exports.EcosystemButton = EcosystemButton;
|
|
|
12599
12753
|
exports.EcosystemModal = EcosystemModal;
|
|
12600
12754
|
exports.EmailLoginButton = EmailLoginButton;
|
|
12601
12755
|
exports.EmbeddedWalletContent = EmbeddedWalletContent;
|
|
12756
|
+
exports.EmbeddedWalletSettingsModalProvider = EmbeddedWalletSettingsModalProvider;
|
|
12757
|
+
exports.ExploreEcosystemModalProvider = ExploreEcosystemModalProvider;
|
|
12602
12758
|
exports.FAQContent = FAQContent;
|
|
12759
|
+
exports.FAQModalProvider = FAQModalProvider;
|
|
12603
12760
|
exports.FadeInView = FadeInView;
|
|
12604
12761
|
exports.FadeInViewFromBottom = FadeInViewFromBottom;
|
|
12605
12762
|
exports.FadeInViewFromLeft = FadeInViewFromLeft;
|
|
@@ -12611,6 +12768,7 @@ exports.MainContent = MainContent;
|
|
|
12611
12768
|
exports.ModalBackButton = ModalBackButton;
|
|
12612
12769
|
exports.ModalFAQButton = ModalFAQButton;
|
|
12613
12770
|
exports.NFTMediaType = NFTMediaType;
|
|
12771
|
+
exports.NotificationsModalProvider = NotificationsModalProvider;
|
|
12614
12772
|
exports.PRICE_FEED_IDS = PRICE_FEED_IDS;
|
|
12615
12773
|
exports.PasskeyLoginButton = PasskeyLoginButton;
|
|
12616
12774
|
exports.PrivyButton = PrivyButton;
|
|
@@ -12621,6 +12779,7 @@ exports.ScrollToTopWrapper = ScrollToTopWrapper;
|
|
|
12621
12779
|
exports.SecurityLevel = SecurityLevel;
|
|
12622
12780
|
exports.SelectTokenContent = SelectTokenContent;
|
|
12623
12781
|
exports.SendTokenContent = SendTokenContent;
|
|
12782
|
+
exports.SendTokenModalProvider = SendTokenModalProvider;
|
|
12624
12783
|
exports.SendTokenSummaryContent = SendTokenSummaryContent;
|
|
12625
12784
|
exports.SocialLoginButtons = SocialLoginButtons;
|
|
12626
12785
|
exports.StickyFooterContainer = StickyFooterContainer;
|
|
@@ -12767,6 +12926,7 @@ exports.useB3trDonated = useB3trDonated;
|
|
|
12767
12926
|
exports.useB3trToUpgrade = useB3trToUpgrade;
|
|
12768
12927
|
exports.useBalances = useBalances;
|
|
12769
12928
|
exports.useCall = useCall;
|
|
12929
|
+
exports.useChooseNameModal = useChooseNameModal;
|
|
12770
12930
|
exports.useClaimVeWorldSubdomain = useClaimVeWorldSubdomain;
|
|
12771
12931
|
exports.useConnectModal = useConnectModal;
|
|
12772
12932
|
exports.useContractVersion = useContractVersion;
|
|
@@ -12774,7 +12934,10 @@ exports.useCrossAppConnectionCache = useCrossAppConnectionCache;
|
|
|
12774
12934
|
exports.useCurrentAllocationsRoundId = useCurrentAllocationsRoundId;
|
|
12775
12935
|
exports.useCurrentBlock = useCurrentBlock;
|
|
12776
12936
|
exports.useEcosystemShortcuts = useEcosystemShortcuts;
|
|
12937
|
+
exports.useEmbeddedWalletSettingsModal = useEmbeddedWalletSettingsModal;
|
|
12777
12938
|
exports.useEnsRecordExists = useEnsRecordExists;
|
|
12939
|
+
exports.useExploreEcosystemModal = useExploreEcosystemModal;
|
|
12940
|
+
exports.useFAQModal = useFAQModal;
|
|
12778
12941
|
exports.useFeatureAnnouncement = useFeatureAnnouncement;
|
|
12779
12942
|
exports.useFetchAppInfo = useFetchAppInfo;
|
|
12780
12943
|
exports.useGMBaseUri = useGMBaseUri;
|
|
@@ -12831,6 +12994,7 @@ exports.useNFTImage = useNFTImage;
|
|
|
12831
12994
|
exports.useNFTMetadataUri = useNFTMetadataUri;
|
|
12832
12995
|
exports.useNotificationAlerts = useNotificationAlerts;
|
|
12833
12996
|
exports.useNotifications = useNotifications;
|
|
12997
|
+
exports.useNotificationsModal = useNotificationsModal;
|
|
12834
12998
|
exports.useParticipatedInGovernance = useParticipatedInGovernance;
|
|
12835
12999
|
exports.useParticipationScoreThreshold = useParticipationScoreThreshold;
|
|
12836
13000
|
exports.usePassportChecks = usePassportChecks;
|
|
@@ -12842,6 +13006,7 @@ exports.useRoundXApps = useRoundXApps;
|
|
|
12842
13006
|
exports.useScrollToTop = useScrollToTop;
|
|
12843
13007
|
exports.useSecurityMultiplier = useSecurityMultiplier;
|
|
12844
13008
|
exports.useSelectedGmNft = useSelectedGmNft;
|
|
13009
|
+
exports.useSendTokenModal = useSendTokenModal;
|
|
12845
13010
|
exports.useSendTransaction = useSendTransaction;
|
|
12846
13011
|
exports.useSignMessage = useSignMessage2;
|
|
12847
13012
|
exports.useSignTypedData = useSignTypedData2;
|