@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.js
CHANGED
|
@@ -3021,6 +3021,9 @@ var useWallet = () => {
|
|
|
3021
3021
|
const smartAccountDomain = useVechainDomain(smartAccount?.address ?? "").data?.domain;
|
|
3022
3022
|
const embeddedWalletDomain = useVechainDomain(privyEmbeddedWallet ?? "").data?.domain;
|
|
3023
3023
|
const crossAppAccountDomain = useVechainDomain(crossAppAddress ?? "").data?.domain;
|
|
3024
|
+
const { data: smartAccountVersion } = useContractVersion(
|
|
3025
|
+
smartAccount?.address ?? ""
|
|
3026
|
+
);
|
|
3024
3027
|
const disconnect = useCallback(async () => {
|
|
3025
3028
|
try {
|
|
3026
3029
|
setIsConnected(false);
|
|
@@ -3053,7 +3056,8 @@ var useWallet = () => {
|
|
|
3053
3056
|
domain: smartAccountDomain,
|
|
3054
3057
|
image: getPicassoImage(smartAccount?.address ?? ""),
|
|
3055
3058
|
isDeployed: smartAccount?.isDeployed ?? false,
|
|
3056
|
-
isActive: hasActiveSmartAccount
|
|
3059
|
+
isActive: hasActiveSmartAccount,
|
|
3060
|
+
version: smartAccountVersion ?? null
|
|
3057
3061
|
},
|
|
3058
3062
|
dappKitWallet: isConnectedWithDappKit ? {
|
|
3059
3063
|
address: dappKitAccount,
|
|
@@ -3271,6 +3275,147 @@ var useWalletModal = () => {
|
|
|
3271
3275
|
return { open, close, isOpen };
|
|
3272
3276
|
};
|
|
3273
3277
|
var WalletModalProvider = ({ children }) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3278
|
+
var useChooseNameModal = () => {
|
|
3279
|
+
const {
|
|
3280
|
+
openAccountModal,
|
|
3281
|
+
closeAccountModal,
|
|
3282
|
+
isAccountModalOpen,
|
|
3283
|
+
setAccountModalContent
|
|
3284
|
+
} = useVeChainKitConfig();
|
|
3285
|
+
const open = () => {
|
|
3286
|
+
setAccountModalContent("choose-name");
|
|
3287
|
+
openAccountModal();
|
|
3288
|
+
};
|
|
3289
|
+
const close = () => {
|
|
3290
|
+
closeAccountModal();
|
|
3291
|
+
};
|
|
3292
|
+
return {
|
|
3293
|
+
open,
|
|
3294
|
+
close,
|
|
3295
|
+
isOpen: isAccountModalOpen
|
|
3296
|
+
};
|
|
3297
|
+
};
|
|
3298
|
+
var ChooseNameModalProvider = ({
|
|
3299
|
+
children
|
|
3300
|
+
}) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3301
|
+
var useSendTokenModal = () => {
|
|
3302
|
+
const {
|
|
3303
|
+
openAccountModal,
|
|
3304
|
+
closeAccountModal,
|
|
3305
|
+
isAccountModalOpen,
|
|
3306
|
+
setAccountModalContent
|
|
3307
|
+
} = useVeChainKitConfig();
|
|
3308
|
+
const open = () => {
|
|
3309
|
+
setAccountModalContent({
|
|
3310
|
+
type: "send-token",
|
|
3311
|
+
props: {
|
|
3312
|
+
setCurrentContent: setAccountModalContent
|
|
3313
|
+
}
|
|
3314
|
+
});
|
|
3315
|
+
openAccountModal();
|
|
3316
|
+
};
|
|
3317
|
+
const close = () => {
|
|
3318
|
+
closeAccountModal();
|
|
3319
|
+
};
|
|
3320
|
+
return {
|
|
3321
|
+
open,
|
|
3322
|
+
close,
|
|
3323
|
+
isOpen: isAccountModalOpen
|
|
3324
|
+
};
|
|
3325
|
+
};
|
|
3326
|
+
var SendTokenModalProvider = ({
|
|
3327
|
+
children
|
|
3328
|
+
}) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3329
|
+
var useEmbeddedWalletSettingsModal = () => {
|
|
3330
|
+
const {
|
|
3331
|
+
openAccountModal,
|
|
3332
|
+
closeAccountModal,
|
|
3333
|
+
isAccountModalOpen,
|
|
3334
|
+
setAccountModalContent
|
|
3335
|
+
} = useVeChainKitConfig();
|
|
3336
|
+
const open = () => {
|
|
3337
|
+
setAccountModalContent("embedded-wallet");
|
|
3338
|
+
openAccountModal();
|
|
3339
|
+
};
|
|
3340
|
+
const close = () => {
|
|
3341
|
+
closeAccountModal();
|
|
3342
|
+
};
|
|
3343
|
+
return {
|
|
3344
|
+
open,
|
|
3345
|
+
close,
|
|
3346
|
+
isOpen: isAccountModalOpen
|
|
3347
|
+
};
|
|
3348
|
+
};
|
|
3349
|
+
var EmbeddedWalletSettingsModalProvider = ({
|
|
3350
|
+
children
|
|
3351
|
+
}) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3352
|
+
var useExploreEcosystemModal = () => {
|
|
3353
|
+
const {
|
|
3354
|
+
openAccountModal,
|
|
3355
|
+
closeAccountModal,
|
|
3356
|
+
isAccountModalOpen,
|
|
3357
|
+
setAccountModalContent
|
|
3358
|
+
} = useVeChainKitConfig();
|
|
3359
|
+
const open = () => {
|
|
3360
|
+
setAccountModalContent("ecosystem");
|
|
3361
|
+
openAccountModal();
|
|
3362
|
+
};
|
|
3363
|
+
const close = () => {
|
|
3364
|
+
closeAccountModal();
|
|
3365
|
+
};
|
|
3366
|
+
return {
|
|
3367
|
+
open,
|
|
3368
|
+
close,
|
|
3369
|
+
isOpen: isAccountModalOpen
|
|
3370
|
+
};
|
|
3371
|
+
};
|
|
3372
|
+
var ExploreEcosystemModalProvider = ({
|
|
3373
|
+
children
|
|
3374
|
+
}) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3375
|
+
var useNotificationsModal = () => {
|
|
3376
|
+
const {
|
|
3377
|
+
openAccountModal,
|
|
3378
|
+
closeAccountModal,
|
|
3379
|
+
isAccountModalOpen,
|
|
3380
|
+
setAccountModalContent
|
|
3381
|
+
} = useVeChainKitConfig();
|
|
3382
|
+
const open = () => {
|
|
3383
|
+
setAccountModalContent("notifications");
|
|
3384
|
+
openAccountModal();
|
|
3385
|
+
};
|
|
3386
|
+
const close = () => {
|
|
3387
|
+
closeAccountModal();
|
|
3388
|
+
};
|
|
3389
|
+
return {
|
|
3390
|
+
open,
|
|
3391
|
+
close,
|
|
3392
|
+
isOpen: isAccountModalOpen
|
|
3393
|
+
};
|
|
3394
|
+
};
|
|
3395
|
+
var NotificationsModalProvider = ({
|
|
3396
|
+
children
|
|
3397
|
+
}) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3398
|
+
var useFAQModal = () => {
|
|
3399
|
+
const {
|
|
3400
|
+
openAccountModal,
|
|
3401
|
+
closeAccountModal,
|
|
3402
|
+
isAccountModalOpen,
|
|
3403
|
+
setAccountModalContent
|
|
3404
|
+
} = useVeChainKitConfig();
|
|
3405
|
+
const open = () => {
|
|
3406
|
+
setAccountModalContent("faq");
|
|
3407
|
+
openAccountModal();
|
|
3408
|
+
};
|
|
3409
|
+
const close = () => {
|
|
3410
|
+
closeAccountModal();
|
|
3411
|
+
};
|
|
3412
|
+
return {
|
|
3413
|
+
open,
|
|
3414
|
+
close,
|
|
3415
|
+
isOpen: isAccountModalOpen
|
|
3416
|
+
};
|
|
3417
|
+
};
|
|
3418
|
+
var FAQModalProvider = ({ children }) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
3274
3419
|
var estimateTxGasWithNext = async (clauses, caller, buffer = 1.25, nodeUrl) => {
|
|
3275
3420
|
const response = await fetch(`${nodeUrl}/accounts/*?revision=next`, {
|
|
3276
3421
|
method: "POST",
|
|
@@ -4564,7 +4709,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
|
|
|
4564
4709
|
// package.json
|
|
4565
4710
|
var package_default = {
|
|
4566
4711
|
name: "@vechain/vechain-kit",
|
|
4567
|
-
version: "1.2.
|
|
4712
|
+
version: "1.2.3",
|
|
4568
4713
|
private: false,
|
|
4569
4714
|
homepage: "https://github.com/vechain/vechain-kit",
|
|
4570
4715
|
repository: "github:vechain/vechain-kit",
|
|
@@ -5927,7 +6072,7 @@ var AccountSelector = ({
|
|
|
5927
6072
|
rounded: "full"
|
|
5928
6073
|
}
|
|
5929
6074
|
),
|
|
5930
|
-
/* @__PURE__ */ jsx(Text, { fontSize: size, fontWeight: "500", children:
|
|
6075
|
+
/* @__PURE__ */ jsx(Text, { fontSize: size, fontWeight: "500", children: wallet?.domain || humanAddress(wallet?.address ?? "", 6, 4) }),
|
|
5931
6076
|
/* @__PURE__ */ jsx(
|
|
5932
6077
|
Icon,
|
|
5933
6078
|
{
|
|
@@ -6185,7 +6330,7 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6185
6330
|
const { t } = useTranslation();
|
|
6186
6331
|
const [showFullText, setShowFullText] = useState(false);
|
|
6187
6332
|
const { connectedWallet } = useWallet();
|
|
6188
|
-
const { exportWallet
|
|
6333
|
+
const { exportWallet } = usePrivy();
|
|
6189
6334
|
const walletImage = getPicassoImage(connectedWallet?.address ?? "");
|
|
6190
6335
|
const { getConnectionCache } = useCrossAppConnectionCache();
|
|
6191
6336
|
const { privy, darkMode: isDark } = useVeChainKitConfig();
|
|
@@ -6298,17 +6443,17 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
|
|
|
6298
6443
|
rightIcon: MdOutlineNavigateNext
|
|
6299
6444
|
}
|
|
6300
6445
|
),
|
|
6301
|
-
connection.isConnectedWithSocialLogin &&
|
|
6446
|
+
connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsx(
|
|
6302
6447
|
ActionButton,
|
|
6303
6448
|
{
|
|
6304
|
-
title: t("
|
|
6449
|
+
title: t("Login methods"),
|
|
6305
6450
|
description: t(
|
|
6306
|
-
"
|
|
6451
|
+
"View and manage the login methods linked to your wallet."
|
|
6307
6452
|
),
|
|
6308
6453
|
onClick: () => {
|
|
6309
|
-
|
|
6454
|
+
setCurrentContent("privy-linked-accounts");
|
|
6310
6455
|
},
|
|
6311
|
-
leftIcon:
|
|
6456
|
+
leftIcon: MdManageAccounts,
|
|
6312
6457
|
rightIcon: MdOutlineNavigateNext
|
|
6313
6458
|
}
|
|
6314
6459
|
)
|
|
@@ -6374,7 +6519,7 @@ var WalletSettingsContent = ({
|
|
|
6374
6519
|
contentRef.current.scrollTop = 0;
|
|
6375
6520
|
}
|
|
6376
6521
|
}, []);
|
|
6377
|
-
return /* @__PURE__ */ jsxs(
|
|
6522
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
6378
6523
|
/* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
|
|
6379
6524
|
/* @__PURE__ */ jsx(
|
|
6380
6525
|
ModalHeader,
|
|
@@ -6402,6 +6547,20 @@ var WalletSettingsContent = ({
|
|
|
6402
6547
|
/* @__PURE__ */ jsx(AddressDisplay, { wallet: account })
|
|
6403
6548
|
] }),
|
|
6404
6549
|
/* @__PURE__ */ jsxs(VStack, { mt: 10, w: "full", spacing: 3, children: [
|
|
6550
|
+
/* @__PURE__ */ jsx(
|
|
6551
|
+
ActionButton,
|
|
6552
|
+
{
|
|
6553
|
+
title: t("Connection Details"),
|
|
6554
|
+
description: t(
|
|
6555
|
+
"View the details of your connection to this app."
|
|
6556
|
+
),
|
|
6557
|
+
onClick: () => {
|
|
6558
|
+
setCurrentContent("connection-details");
|
|
6559
|
+
},
|
|
6560
|
+
leftIcon: VscDebugDisconnect,
|
|
6561
|
+
rightIcon: MdOutlineNavigateNext
|
|
6562
|
+
}
|
|
6563
|
+
),
|
|
6405
6564
|
/* @__PURE__ */ jsx(
|
|
6406
6565
|
ActionButton,
|
|
6407
6566
|
{
|
|
@@ -6426,20 +6585,6 @@ var WalletSettingsContent = ({
|
|
|
6426
6585
|
rightIcon: MdOutlineNavigateNext
|
|
6427
6586
|
}
|
|
6428
6587
|
),
|
|
6429
|
-
connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsx(
|
|
6430
|
-
ActionButton,
|
|
6431
|
-
{
|
|
6432
|
-
title: t("Login methods"),
|
|
6433
|
-
description: t(
|
|
6434
|
-
"View and manage the login methods linked to your wallet."
|
|
6435
|
-
),
|
|
6436
|
-
onClick: () => {
|
|
6437
|
-
setCurrentContent("privy-linked-accounts");
|
|
6438
|
-
},
|
|
6439
|
-
leftIcon: MdManageAccounts,
|
|
6440
|
-
rightIcon: MdOutlineNavigateNext
|
|
6441
|
-
}
|
|
6442
|
-
),
|
|
6443
6588
|
connection.isConnectedWithPrivy && /* @__PURE__ */ jsx(
|
|
6444
6589
|
ActionButton,
|
|
6445
6590
|
{
|
|
@@ -6457,20 +6602,6 @@ var WalletSettingsContent = ({
|
|
|
6457
6602
|
rightIcon: MdOutlineNavigateNext
|
|
6458
6603
|
}
|
|
6459
6604
|
),
|
|
6460
|
-
/* @__PURE__ */ jsx(
|
|
6461
|
-
ActionButton,
|
|
6462
|
-
{
|
|
6463
|
-
title: t("Connection Details"),
|
|
6464
|
-
description: t(
|
|
6465
|
-
"View the details of your connection to this app."
|
|
6466
|
-
),
|
|
6467
|
-
onClick: () => {
|
|
6468
|
-
setCurrentContent("connection-details");
|
|
6469
|
-
},
|
|
6470
|
-
leftIcon: VscDebugDisconnect,
|
|
6471
|
-
rightIcon: MdOutlineNavigateNext
|
|
6472
|
-
}
|
|
6473
|
-
),
|
|
6474
6605
|
/* @__PURE__ */ jsx(
|
|
6475
6606
|
ActionButton,
|
|
6476
6607
|
{
|
|
@@ -9919,7 +10050,7 @@ var FAQContent = ({ onGoBack }) => {
|
|
|
9919
10050
|
Button,
|
|
9920
10051
|
{
|
|
9921
10052
|
as: Link,
|
|
9922
|
-
href: "https://vechain-
|
|
10053
|
+
href: "https://docs.vechain-kit.vechain.org/",
|
|
9923
10054
|
isExternal: true,
|
|
9924
10055
|
variant: "outline",
|
|
9925
10056
|
rightIcon: /* @__PURE__ */ jsx(Icon, { as: FaExternalLinkAlt }),
|
|
@@ -9935,7 +10066,7 @@ var FAQContent = ({ onGoBack }) => {
|
|
|
9935
10066
|
var NetworkInfo = () => {
|
|
9936
10067
|
const { t } = useTranslation();
|
|
9937
10068
|
const { darkMode: isDark, network } = useVeChainKitConfig();
|
|
9938
|
-
const { connection } = useWallet();
|
|
10069
|
+
const { connection, smartAccount } = useWallet();
|
|
9939
10070
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9940
10071
|
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
9941
10072
|
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
@@ -9958,12 +10089,25 @@ var NetworkInfo = () => {
|
|
|
9958
10089
|
] }),
|
|
9959
10090
|
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || getConfig(network.type).nodeUrl })
|
|
9960
10091
|
] }),
|
|
10092
|
+
connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10093
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10094
|
+
t("Smart Account"),
|
|
10095
|
+
":"
|
|
10096
|
+
] }),
|
|
10097
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
10098
|
+
] }) : /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
10099
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
10100
|
+
t("Smart Account"),
|
|
10101
|
+
":"
|
|
10102
|
+
] }),
|
|
10103
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
|
|
10104
|
+
] }),
|
|
9961
10105
|
/* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
|
|
9962
10106
|
/* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
|
|
9963
|
-
t("
|
|
10107
|
+
t("VeChain Kit"),
|
|
9964
10108
|
":"
|
|
9965
10109
|
] }),
|
|
9966
|
-
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children:
|
|
10110
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
|
|
9967
10111
|
] })
|
|
9968
10112
|
] });
|
|
9969
10113
|
};
|
|
@@ -10909,14 +11053,14 @@ var SharedAppCard = ({
|
|
|
10909
11053
|
_hover: { opacity: 0.8 },
|
|
10910
11054
|
cursor: "pointer",
|
|
10911
11055
|
onClick,
|
|
10912
|
-
children: /* @__PURE__ */ jsx(CardBody, { p: size === "sm" ? 2 : 4, alignItems: "center", children: /* @__PURE__ */ jsxs(VStack, { spacing: 3,
|
|
11056
|
+
children: /* @__PURE__ */ jsx(CardBody, { p: size === "sm" ? 2 : 4, alignItems: "center", children: /* @__PURE__ */ jsxs(VStack, { spacing: 3, alignItems: "center", justifyContent: "center", children: [
|
|
10913
11057
|
imageUrl && /* @__PURE__ */ jsx(
|
|
10914
11058
|
Image,
|
|
10915
11059
|
{
|
|
10916
11060
|
src: imageUrl,
|
|
10917
11061
|
fallbackSrc: notFoundImage,
|
|
10918
11062
|
alt: name,
|
|
10919
|
-
height: "
|
|
11063
|
+
height: "90px",
|
|
10920
11064
|
objectFit: "contain",
|
|
10921
11065
|
rounded: "full"
|
|
10922
11066
|
}
|
|
@@ -10924,13 +11068,11 @@ var SharedAppCard = ({
|
|
|
10924
11068
|
name && /* @__PURE__ */ jsx(
|
|
10925
11069
|
Text,
|
|
10926
11070
|
{
|
|
10927
|
-
position: "absolute",
|
|
10928
|
-
bottom: "5px",
|
|
10929
11071
|
fontWeight: "medium",
|
|
10930
11072
|
wordBreak: "break-word",
|
|
10931
11073
|
noOfLines: 1,
|
|
10932
|
-
width: "90%",
|
|
10933
11074
|
textAlign: "center",
|
|
11075
|
+
w: "full",
|
|
10934
11076
|
children: name
|
|
10935
11077
|
}
|
|
10936
11078
|
)
|
|
@@ -10938,30 +11080,12 @@ var SharedAppCard = ({
|
|
|
10938
11080
|
}
|
|
10939
11081
|
);
|
|
10940
11082
|
};
|
|
10941
|
-
var SkeletonAppCard = () => {
|
|
10942
|
-
return /* @__PURE__ */ jsx(Card, { variant: "vechainKitAppCard", children: /* @__PURE__ */ jsx(CardBody, { p: 4, alignItems: "center", children: /* @__PURE__ */ jsxs(
|
|
10943
|
-
VStack,
|
|
10944
|
-
{
|
|
10945
|
-
spacing: 3,
|
|
10946
|
-
align: "center",
|
|
10947
|
-
justify: "center",
|
|
10948
|
-
width: "100%",
|
|
10949
|
-
children: [
|
|
10950
|
-
/* @__PURE__ */ jsx(Skeleton, { height: "100px", width: "100%", rounded: "12px" }),
|
|
10951
|
-
/* @__PURE__ */ jsx(Skeleton, { height: "20px", width: "80%", rounded: "md" })
|
|
10952
|
-
]
|
|
10953
|
-
}
|
|
10954
|
-
) }) });
|
|
10955
|
-
};
|
|
10956
11083
|
var AppComponent = ({ xApp, setCurrentContent }) => {
|
|
10957
11084
|
const { data: appMetadata, isLoading: appMetadataLoading } = useXAppMetadata(xApp.id);
|
|
10958
11085
|
const { data: logo, isLoading: isLogoLoading } = useIpfsImage(
|
|
10959
11086
|
appMetadata?.logo
|
|
10960
11087
|
);
|
|
10961
|
-
|
|
10962
|
-
return /* @__PURE__ */ jsx(SkeletonAppCard, {});
|
|
10963
|
-
}
|
|
10964
|
-
return /* @__PURE__ */ jsx(
|
|
11088
|
+
return /* @__PURE__ */ jsx(Skeleton, { isLoaded: !appMetadataLoading && !isLogoLoading, children: /* @__PURE__ */ jsx(
|
|
10965
11089
|
SharedAppCard,
|
|
10966
11090
|
{
|
|
10967
11091
|
name: appMetadata?.name ?? "",
|
|
@@ -10979,7 +11103,7 @@ var AppComponent = ({ xApp, setCurrentContent }) => {
|
|
|
10979
11103
|
});
|
|
10980
11104
|
}
|
|
10981
11105
|
}
|
|
10982
|
-
);
|
|
11106
|
+
) });
|
|
10983
11107
|
};
|
|
10984
11108
|
var CustomAppComponent = ({
|
|
10985
11109
|
name,
|
|
@@ -11048,7 +11172,7 @@ var DEFAULT_APPS = [
|
|
|
11048
11172
|
}
|
|
11049
11173
|
},
|
|
11050
11174
|
{
|
|
11051
|
-
name: "
|
|
11175
|
+
name: "vet.domains",
|
|
11052
11176
|
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.",
|
|
11053
11177
|
external_url: "https://vet.domains",
|
|
11054
11178
|
logo: "https://vet.domains/assets/walletconnect.png",
|
|
@@ -11060,6 +11184,20 @@ var DEFAULT_APPS = [
|
|
|
11060
11184
|
ve_world: {
|
|
11061
11185
|
banner: "https://vet.domains/assets/walletconnect.png"
|
|
11062
11186
|
}
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
name: "VeChain Kit",
|
|
11190
|
+
description: "A all-in-one library for building VeChain applications.",
|
|
11191
|
+
external_url: "https://vechain-kit.vechain.org/",
|
|
11192
|
+
logo: "https://i.ibb.co/ncysMF9/vechain-kit-logo-transparent.png",
|
|
11193
|
+
banner: "",
|
|
11194
|
+
screenshots: [],
|
|
11195
|
+
social_urls: [],
|
|
11196
|
+
app_urls: [],
|
|
11197
|
+
tweets: [],
|
|
11198
|
+
ve_world: {
|
|
11199
|
+
banner: ""
|
|
11200
|
+
}
|
|
11063
11201
|
}
|
|
11064
11202
|
];
|
|
11065
11203
|
var ExploreEcosystemContent = ({ setCurrentContent }) => {
|
|
@@ -11285,15 +11423,19 @@ var DisconnectConfirmContent = ({ onDisconnect, onBack }) => {
|
|
|
11285
11423
|
/* @__PURE__ */ jsx(ModalFooter, {})
|
|
11286
11424
|
] });
|
|
11287
11425
|
};
|
|
11288
|
-
var AccountModal = ({
|
|
11426
|
+
var AccountModal = ({
|
|
11427
|
+
isOpen,
|
|
11428
|
+
onClose,
|
|
11429
|
+
initialContent = "main"
|
|
11430
|
+
}) => {
|
|
11289
11431
|
useNotificationAlerts();
|
|
11290
11432
|
const { account } = useWallet();
|
|
11291
|
-
const [currentContent, setCurrentContent] = useState(
|
|
11433
|
+
const [currentContent, setCurrentContent] = useState(initialContent);
|
|
11292
11434
|
useEffect(() => {
|
|
11293
|
-
if (isOpen) {
|
|
11294
|
-
setCurrentContent(
|
|
11435
|
+
if (isOpen && initialContent) {
|
|
11436
|
+
setCurrentContent(initialContent);
|
|
11295
11437
|
}
|
|
11296
|
-
}, [isOpen]);
|
|
11438
|
+
}, [isOpen, initialContent]);
|
|
11297
11439
|
const renderContent = () => {
|
|
11298
11440
|
if (typeof currentContent === "object") {
|
|
11299
11441
|
switch (currentContent.type) {
|
|
@@ -11378,7 +11520,7 @@ var AccountModal = ({ isOpen, onClose }) => {
|
|
|
11378
11520
|
return /* @__PURE__ */ jsx(
|
|
11379
11521
|
PrivyLinkedAccounts,
|
|
11380
11522
|
{
|
|
11381
|
-
onBack: () => setCurrentContent("
|
|
11523
|
+
onBack: () => setCurrentContent("embedded-wallet")
|
|
11382
11524
|
}
|
|
11383
11525
|
);
|
|
11384
11526
|
case "ecosystem":
|
|
@@ -11630,7 +11772,15 @@ var WalletButton = ({
|
|
|
11630
11772
|
onOpen: accountModal.onOpen,
|
|
11631
11773
|
buttonStyle
|
|
11632
11774
|
}
|
|
11633
|
-
) : /* @__PURE__ */ jsx(
|
|
11775
|
+
) : /* @__PURE__ */ jsx(
|
|
11776
|
+
Button,
|
|
11777
|
+
{
|
|
11778
|
+
isLoading: connection.isLoading,
|
|
11779
|
+
onClick: handleConnect,
|
|
11780
|
+
...buttonStyle,
|
|
11781
|
+
children: t("Login")
|
|
11782
|
+
}
|
|
11783
|
+
),
|
|
11634
11784
|
/* @__PURE__ */ jsx(
|
|
11635
11785
|
ConnectModal,
|
|
11636
11786
|
{
|
|
@@ -12193,6 +12343,7 @@ var VeChainKitProvider = ({
|
|
|
12193
12343
|
() => setIsTransactionToastOpen(false),
|
|
12194
12344
|
[]
|
|
12195
12345
|
);
|
|
12346
|
+
const [accountModalContent, setAccountModalContent] = useState("main");
|
|
12196
12347
|
const loginMethods = [
|
|
12197
12348
|
...privy?.loginMethods ?? [],
|
|
12198
12349
|
...(privyEcosystemAppIDS ?? []).map((appID) => `privy:${appID}`)
|
|
@@ -12244,6 +12395,7 @@ var VeChainKitProvider = ({
|
|
|
12244
12395
|
openAccountModal,
|
|
12245
12396
|
closeAccountModal,
|
|
12246
12397
|
isAccountModalOpen,
|
|
12398
|
+
setAccountModalContent,
|
|
12247
12399
|
openTransactionModal,
|
|
12248
12400
|
closeTransactionModal,
|
|
12249
12401
|
isTransactionModalOpen,
|
|
@@ -12323,7 +12475,8 @@ var VeChainKitProvider = ({
|
|
|
12323
12475
|
AccountModal,
|
|
12324
12476
|
{
|
|
12325
12477
|
isOpen: isAccountModalOpen,
|
|
12326
|
-
onClose: closeAccountModal
|
|
12478
|
+
onClose: closeAccountModal,
|
|
12479
|
+
initialContent: accountModalContent
|
|
12327
12480
|
}
|
|
12328
12481
|
)
|
|
12329
12482
|
]
|
|
@@ -12559,6 +12712,6 @@ var VechainKitThemeProvider = ({
|
|
|
12559
12712
|
] });
|
|
12560
12713
|
};
|
|
12561
12714
|
|
|
12562
|
-
export { APP_SECURITY_LEVELS, AccountDetailsButton, AccountMainContent, AccountModal, AccountModalProvider, AccountSelector, ActionButton, AddressDisplay, AddressDisplayCard, AssetButton, AssetsSection, BalanceSection, BaseModal, ChooseNameContent, ChooseNameSearchContent, ChooseNameSummaryContent, ConnectModal, ConnectModalProvider, ConnectionButton, DappKitButton, EcosystemButton, EcosystemModal, EmailLoginButton, EmbeddedWalletContent, FAQContent, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, FeatureAnnouncementCard, LoginLoadingModal, MAX_IMAGE_SIZE, MainContent, ModalBackButton, ModalFAQButton, NFTMediaType, PRICE_FEED_IDS, PasskeyLoginButton, PrivyButton, PrivyWalletProvider, QuickActionsSection, ReceiveTokenContent, ScrollToTopWrapper, SecurityLevel, SelectTokenContent, SendTokenContent, SendTokenSummaryContent, SocialLoginButtons, StickyFooterContainer, StickyHeaderContainer, SwapTokenContent, TransactionModal, TransactionModalProvider, TransactionToast, TransactionToastProvider, VeChainKitContext, VeChainKitProvider, VeChainLoginButton, VeChainWithPrivyLoginButton, VePassportUserStatus, VechainKitThemeProvider, VersionFooter, WalletButton, WalletModalProvider, WalletSettingsContent, buildClaimRewardsTx, buildClaimRoundReward, currentBlockQueryKey, fetchPrivyAppInfo, fetchVechainDomain, getAccountBalance, getAccountBalanceQueryKey, getAllEvents, getAllocationAmount, getAllocationAmountQueryKey, getAppAdmin, getAppAdminQueryKey, getAppBalance, getAppBalanceQueryKey, getAppExistsQueryKey, getAppSecurityLevelQueryKey, getAppsEligibleInNextRound, getAppsEligibleInNextRoundQueryKey, getAppsShareClauses, getB3trBalance, getB3trBalanceQueryKey, getB3trDonatedQueryKey, getB3trToUpgradeQueryKey, getBalanceOf, getCallKey, getChainId, getChainIdQueryKey, getCurrentAllocationsRoundId, getCurrentAllocationsRoundIdQueryKey, getDelegateeQueryKey, getDelegatorQueryKey, getEnsRecordExistsQueryKey, getEntitiesLinkedToPassportQueryKey, getEvents, getGMBaseUriQueryKey, getGMLevel, getGMbalanceQueryKey, getGetCumulativeScoreWithDecayQueryKey, getHasVotedInRound, getHasVotedInRoundQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsBlacklistedQueryKey, getIsDomainProtectedQueryKey, getIsEntityQueryKey, getIsNodeHolder, getIsNodeHolderQueryKey, getIsPassportQueryKey, getIsPersonAtTimepointQueryKey, getIsPersonQueryKey, getIsWhitelistedQueryKey, getLevelGradient, getLevelMultiplierQueryKey, getLevelOfTokenQueryKey, getNFTMetadataUri, getNFTMetadataUriQueryKey, getNodeCheckCooldownQueryKey, getNodeManagerQueryKey, getParticipatedInGovernance, getParticipatedInGovernanceQueryKey, getParticipationScoreThresholdQueryKey, getPassportForEntityQueryKey, getPassportToggleQueryKey, getPendingDelegationsQueryKeyDelegateePOV, getPendingDelegationsQueryKeyDelegatorPOV, getPendingLinkingsQueryKey, getPrivyAppInfoQueryKey, getRoundReward, getRoundRewardQueryKey, getRoundXApps, getRoundXAppsQueryKey, getSecurityMultiplierQueryKey, getSmartAccount, getSmartAccountQueryKey, getThresholdParticipationScoreAtTimepointQueryKey, getThresholdParticipationScoreQueryKey, getTokenIdByAccount, getTokenIdByAccountQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getTokensInfoByOwnerQueryKey, getUserBotSignalsQueryKey, getUserNodesQueryKey, getUserRoundScoreQueryKey, getUserVotesInRound, getUserVotesInRoundQueryKey, getUserXNodes, getUserXNodesQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVechainDomainQueryKey, getVersion, getVersionQueryKey, getVot3Balance, getVot3BalanceQueryKey, getVotesInRoundQueryKey, getXAppMetadata, getXAppMetadataQueryKey, getXAppRoundEarnings, getXAppRoundEarningsQueryKey, getXAppTotalEarningsClauses, getXAppTotalEarningsQueryKey, getXAppVotes, getXAppVotesQf, getXAppVotesQfQueryKey, getXAppVotesQueryKey, getXApps, getXAppsMetadataBaseUri, getXAppsMetadataBaseUriQueryKey, getXAppsQueryKey, getXAppsSharesQueryKey, pollForReceipt, useAccountBalance, useAccountLinking, useAccountModal, useAllocationAmount, useAppAdmin, useAppBalance, useAppExists, useAppSecurityLevel, useAppsEligibleInNextRound, useB3trDonated, useB3trToUpgrade, useBalances, useCall, useClaimVeWorldSubdomain, useConnectModal, useContractVersion, useCrossAppConnectionCache, useCurrentAllocationsRoundId, useCurrentBlock, useEcosystemShortcuts, useEnsRecordExists, useFeatureAnnouncement, useFetchAppInfo, useGMBaseUri, useGMbalance, useGetB3trBalance, useGetChainId, useGetCumulativeScoreWithDecay, useGetDelegatee, useGetDelegator, useGetEntitiesLinkedToPassport, useGetNodeManager, useGetNodeUrl, useGetPassportForEntity, useGetPendingDelegationsDelegateePOV, useGetPendingDelegationsDelegatorPOV, useGetPendingLinkings, useGetTokenUsdPrice, useGetTokensInfoByOwner, useGetUserEntitiesLinkedToPassport, useGetUserNode, useGetUserNodes, useGetUserPassportForEntity, useGetUserPendingLinkings, useGetVeDelegateBalance, useGetVot3Balance, useHasVotedInRound, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsBlacklisted, useIsDomainProtected, useIsEntity, useIsGMclaimable, useIsNodeHolder, useIsPWA, useIsPassport, useIsPassportCheckEnabled, useIsPerson, useIsPersonAtTimepoint, useIsUserEntity, useIsUserPassport, useIsUserPerson, useIsWhitelisted, useLevelMultiplier, useLevelOfToken, useLocalStorage, useLoginWithOAuth2 as useLoginWithOAuth, useLoginWithPasskey, useLoginWithVeChain, useMostVotedAppsInRound, useMultipleXAppRoundEarnings, useNFTImage, useNFTMetadataUri, useNotificationAlerts, useNotifications, useParticipatedInGovernance, useParticipationScoreThreshold, usePassportChecks, usePrivyWalletProvider, useRefreshBalances, useRoundEarnings, useRoundReward, useRoundXApps, useScrollToTop, useSecurityMultiplier, useSelectedGmNft, useSendTransaction, useSignMessage2 as useSignMessage, useSignTypedData2 as useSignTypedData, useSmartAccount, useThresholdParticipationScore, useThresholdParticipationScoreAtTimepoint, useTokenIdByAccount, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUserBotSignals, useUserDelegation, useUserRoundScore, useUserStatus, useUserTopVotedApps, useUserVotesInAllRounds, useUserVotesInRound, useVeChainKitConfig, useVechainDomain, useVotesInRound, useVotingRewards, useWallet, useWalletModal, useXApp, useXAppMetadata, useXAppRoundEarnings, useXAppTotalEarnings, useXAppVotes, useXAppVotesQf, useXApps, useXAppsMetadataBaseUri, useXAppsShares, useXNode, useXNodeCheckCooldown, useXNodes };
|
|
12715
|
+
export { APP_SECURITY_LEVELS, AccountDetailsButton, AccountMainContent, AccountModal, AccountModalProvider, AccountSelector, ActionButton, AddressDisplay, AddressDisplayCard, AssetButton, AssetsSection, BalanceSection, BaseModal, ChooseNameContent, ChooseNameModalProvider, ChooseNameSearchContent, ChooseNameSummaryContent, ConnectModal, ConnectModalProvider, ConnectionButton, DappKitButton, EcosystemButton, EcosystemModal, EmailLoginButton, EmbeddedWalletContent, EmbeddedWalletSettingsModalProvider, ExploreEcosystemModalProvider, FAQContent, FAQModalProvider, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, FeatureAnnouncementCard, LoginLoadingModal, MAX_IMAGE_SIZE, MainContent, ModalBackButton, ModalFAQButton, NFTMediaType, NotificationsModalProvider, PRICE_FEED_IDS, PasskeyLoginButton, PrivyButton, PrivyWalletProvider, QuickActionsSection, ReceiveTokenContent, ScrollToTopWrapper, SecurityLevel, SelectTokenContent, SendTokenContent, SendTokenModalProvider, SendTokenSummaryContent, SocialLoginButtons, StickyFooterContainer, StickyHeaderContainer, SwapTokenContent, TransactionModal, TransactionModalProvider, TransactionToast, TransactionToastProvider, VeChainKitContext, VeChainKitProvider, VeChainLoginButton, VeChainWithPrivyLoginButton, VePassportUserStatus, VechainKitThemeProvider, VersionFooter, WalletButton, WalletModalProvider, WalletSettingsContent, buildClaimRewardsTx, buildClaimRoundReward, currentBlockQueryKey, fetchPrivyAppInfo, fetchVechainDomain, getAccountBalance, getAccountBalanceQueryKey, getAllEvents, getAllocationAmount, getAllocationAmountQueryKey, getAppAdmin, getAppAdminQueryKey, getAppBalance, getAppBalanceQueryKey, getAppExistsQueryKey, getAppSecurityLevelQueryKey, getAppsEligibleInNextRound, getAppsEligibleInNextRoundQueryKey, getAppsShareClauses, getB3trBalance, getB3trBalanceQueryKey, getB3trDonatedQueryKey, getB3trToUpgradeQueryKey, getBalanceOf, getCallKey, getChainId, getChainIdQueryKey, getCurrentAllocationsRoundId, getCurrentAllocationsRoundIdQueryKey, getDelegateeQueryKey, getDelegatorQueryKey, getEnsRecordExistsQueryKey, getEntitiesLinkedToPassportQueryKey, getEvents, getGMBaseUriQueryKey, getGMLevel, getGMbalanceQueryKey, getGetCumulativeScoreWithDecayQueryKey, getHasVotedInRound, getHasVotedInRoundQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsBlacklistedQueryKey, getIsDomainProtectedQueryKey, getIsEntityQueryKey, getIsNodeHolder, getIsNodeHolderQueryKey, getIsPassportQueryKey, getIsPersonAtTimepointQueryKey, getIsPersonQueryKey, getIsWhitelistedQueryKey, getLevelGradient, getLevelMultiplierQueryKey, getLevelOfTokenQueryKey, getNFTMetadataUri, getNFTMetadataUriQueryKey, getNodeCheckCooldownQueryKey, getNodeManagerQueryKey, getParticipatedInGovernance, getParticipatedInGovernanceQueryKey, getParticipationScoreThresholdQueryKey, getPassportForEntityQueryKey, getPassportToggleQueryKey, getPendingDelegationsQueryKeyDelegateePOV, getPendingDelegationsQueryKeyDelegatorPOV, getPendingLinkingsQueryKey, getPrivyAppInfoQueryKey, getRoundReward, getRoundRewardQueryKey, getRoundXApps, getRoundXAppsQueryKey, getSecurityMultiplierQueryKey, getSmartAccount, getSmartAccountQueryKey, getThresholdParticipationScoreAtTimepointQueryKey, getThresholdParticipationScoreQueryKey, getTokenIdByAccount, getTokenIdByAccountQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getTokensInfoByOwnerQueryKey, getUserBotSignalsQueryKey, getUserNodesQueryKey, getUserRoundScoreQueryKey, getUserVotesInRound, getUserVotesInRoundQueryKey, getUserXNodes, getUserXNodesQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVechainDomainQueryKey, getVersion, getVersionQueryKey, getVot3Balance, getVot3BalanceQueryKey, getVotesInRoundQueryKey, getXAppMetadata, getXAppMetadataQueryKey, getXAppRoundEarnings, getXAppRoundEarningsQueryKey, getXAppTotalEarningsClauses, getXAppTotalEarningsQueryKey, getXAppVotes, getXAppVotesQf, getXAppVotesQfQueryKey, getXAppVotesQueryKey, getXApps, getXAppsMetadataBaseUri, getXAppsMetadataBaseUriQueryKey, getXAppsQueryKey, getXAppsSharesQueryKey, pollForReceipt, useAccountBalance, useAccountLinking, useAccountModal, useAllocationAmount, useAppAdmin, useAppBalance, useAppExists, useAppSecurityLevel, useAppsEligibleInNextRound, useB3trDonated, useB3trToUpgrade, useBalances, useCall, useChooseNameModal, useClaimVeWorldSubdomain, useConnectModal, useContractVersion, useCrossAppConnectionCache, useCurrentAllocationsRoundId, useCurrentBlock, useEcosystemShortcuts, useEmbeddedWalletSettingsModal, useEnsRecordExists, useExploreEcosystemModal, useFAQModal, useFeatureAnnouncement, useFetchAppInfo, useGMBaseUri, useGMbalance, useGetB3trBalance, useGetChainId, useGetCumulativeScoreWithDecay, useGetDelegatee, useGetDelegator, useGetEntitiesLinkedToPassport, useGetNodeManager, useGetNodeUrl, useGetPassportForEntity, useGetPendingDelegationsDelegateePOV, useGetPendingDelegationsDelegatorPOV, useGetPendingLinkings, useGetTokenUsdPrice, useGetTokensInfoByOwner, useGetUserEntitiesLinkedToPassport, useGetUserNode, useGetUserNodes, useGetUserPassportForEntity, useGetUserPendingLinkings, useGetVeDelegateBalance, useGetVot3Balance, useHasVotedInRound, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsBlacklisted, useIsDomainProtected, useIsEntity, useIsGMclaimable, useIsNodeHolder, useIsPWA, useIsPassport, useIsPassportCheckEnabled, useIsPerson, useIsPersonAtTimepoint, useIsUserEntity, useIsUserPassport, useIsUserPerson, useIsWhitelisted, useLevelMultiplier, useLevelOfToken, useLocalStorage, useLoginWithOAuth2 as useLoginWithOAuth, useLoginWithPasskey, useLoginWithVeChain, useMostVotedAppsInRound, useMultipleXAppRoundEarnings, useNFTImage, useNFTMetadataUri, useNotificationAlerts, useNotifications, useNotificationsModal, useParticipatedInGovernance, useParticipationScoreThreshold, usePassportChecks, usePrivyWalletProvider, useRefreshBalances, useRoundEarnings, useRoundReward, useRoundXApps, useScrollToTop, useSecurityMultiplier, useSelectedGmNft, useSendTokenModal, useSendTransaction, useSignMessage2 as useSignMessage, useSignTypedData2 as useSignTypedData, useSmartAccount, useThresholdParticipationScore, useThresholdParticipationScoreAtTimepoint, useTokenIdByAccount, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUserBotSignals, useUserDelegation, useUserRoundScore, useUserStatus, useUserTopVotedApps, useUserVotesInAllRounds, useUserVotesInRound, useVeChainKitConfig, useVechainDomain, useVotesInRound, useVotingRewards, useWallet, useWalletModal, useXApp, useXAppMetadata, useXAppRoundEarnings, useXAppTotalEarnings, useXAppVotes, useXAppVotesQf, useXApps, useXAppsMetadataBaseUri, useXAppsShares, useXNode, useXNodeCheckCooldown, useXNodes };
|
|
12563
12716
|
//# sourceMappingURL=index.js.map
|
|
12564
12717
|
//# sourceMappingURL=index.js.map
|