@meshsdk/react 1.9.0-beta.4 → 1.9.0-beta.42
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 +352 -129
- package/dist/index.d.cts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +347 -120
- package/package.json +9 -7
package/dist/index.cjs
CHANGED
|
@@ -23457,7 +23457,7 @@ __export(index_exports, {
|
|
|
23457
23457
|
module.exports = __toCommonJS(index_exports);
|
|
23458
23458
|
|
|
23459
23459
|
// src/cardano-wallet/index.tsx
|
|
23460
|
-
var
|
|
23460
|
+
var import_react14 = require("react");
|
|
23461
23461
|
|
|
23462
23462
|
// src/common/button.tsx
|
|
23463
23463
|
var React = __toESM(require("react"), 1);
|
|
@@ -23638,6 +23638,7 @@ var import_react2 = require("react");
|
|
|
23638
23638
|
// src/contexts/WalletContext.ts
|
|
23639
23639
|
var import_react = require("react");
|
|
23640
23640
|
var import_wallet = require("@meshsdk/wallet");
|
|
23641
|
+
var import_web3_sdk = require("@meshsdk/web3-sdk");
|
|
23641
23642
|
var INITIAL_STATE = {
|
|
23642
23643
|
walletName: void 0,
|
|
23643
23644
|
walletInstance: {}
|
|
@@ -23651,11 +23652,16 @@ var useWalletStore = () => {
|
|
|
23651
23652
|
const [address, setAddress] = (0, import_react.useState)("");
|
|
23652
23653
|
const [connectedWalletInstance, setConnectedWalletInstance] = (0, import_react.useState)(INITIAL_STATE.walletInstance);
|
|
23653
23654
|
const [connectedWalletName, setConnectedWalletName] = (0, import_react.useState)(INITIAL_STATE.walletName);
|
|
23655
|
+
const [web3Services, setWeb3Services] = (0, import_react.useState)(void 0);
|
|
23656
|
+
const [web3UserData, setWeb3UserData] = (0, import_react.useState)(
|
|
23657
|
+
void 0
|
|
23658
|
+
);
|
|
23654
23659
|
const connectWallet = (0, import_react.useCallback)(
|
|
23655
|
-
async (walletName,
|
|
23660
|
+
async (walletName, persist) => {
|
|
23656
23661
|
setConnectingWallet(true);
|
|
23657
23662
|
setState("CONNECTING" /* CONNECTING */);
|
|
23658
23663
|
try {
|
|
23664
|
+
const extensions = import_wallet.BrowserWallet.getSupportedExtensions(walletName);
|
|
23659
23665
|
const walletInstance = await import_wallet.BrowserWallet.enable(
|
|
23660
23666
|
walletName,
|
|
23661
23667
|
extensions
|
|
@@ -23687,10 +23693,16 @@ var useWalletStore = () => {
|
|
|
23687
23693
|
localStorage.removeItem(localstoragePersist);
|
|
23688
23694
|
}, []);
|
|
23689
23695
|
const setWallet = (0, import_react.useCallback)(
|
|
23690
|
-
async (walletInstance, walletName) => {
|
|
23696
|
+
async (walletInstance, walletName, persist) => {
|
|
23691
23697
|
setConnectedWalletInstance(walletInstance);
|
|
23692
23698
|
setConnectedWalletName(walletName);
|
|
23693
23699
|
setState("CONNECTED" /* CONNECTED */);
|
|
23700
|
+
if (persist) {
|
|
23701
|
+
localStorage.setItem(
|
|
23702
|
+
localstoragePersist,
|
|
23703
|
+
JSON.stringify({ walletName, ...persist })
|
|
23704
|
+
);
|
|
23705
|
+
}
|
|
23694
23706
|
},
|
|
23695
23707
|
[]
|
|
23696
23708
|
);
|
|
@@ -23714,7 +23726,23 @@ var useWalletStore = () => {
|
|
|
23714
23726
|
const persist2 = JSON.parse(
|
|
23715
23727
|
localStorage.getItem(localstoragePersist) || ""
|
|
23716
23728
|
);
|
|
23717
|
-
|
|
23729
|
+
if (persist2.walletName == "Mesh Web3 Services" && web3Services) {
|
|
23730
|
+
import_web3_sdk.Web3Wallet.initWallet({
|
|
23731
|
+
networkId: web3Services.networkId,
|
|
23732
|
+
address: persist2.walletAddress,
|
|
23733
|
+
fetcher: web3Services.fetcher,
|
|
23734
|
+
submitter: web3Services.submitter,
|
|
23735
|
+
projectId: web3Services.projectId,
|
|
23736
|
+
appUrl: web3Services.appUrl
|
|
23737
|
+
}).then((wallet) => {
|
|
23738
|
+
setConnectedWalletInstance(wallet);
|
|
23739
|
+
setConnectedWalletName(persist2.walletName);
|
|
23740
|
+
setState("CONNECTED" /* CONNECTED */);
|
|
23741
|
+
});
|
|
23742
|
+
setWeb3UserData(persist2.user);
|
|
23743
|
+
} else {
|
|
23744
|
+
connectWallet(persist2.walletName);
|
|
23745
|
+
}
|
|
23718
23746
|
}
|
|
23719
23747
|
}, [persistSession]);
|
|
23720
23748
|
return {
|
|
@@ -23726,6 +23754,9 @@ var useWalletStore = () => {
|
|
|
23726
23754
|
disconnect,
|
|
23727
23755
|
setWallet,
|
|
23728
23756
|
setPersist,
|
|
23757
|
+
setWeb3Services,
|
|
23758
|
+
web3UserData,
|
|
23759
|
+
setWeb3UserData,
|
|
23729
23760
|
error,
|
|
23730
23761
|
address,
|
|
23731
23762
|
state
|
|
@@ -23744,6 +23775,11 @@ var WalletContext = (0, import_react.createContext)({
|
|
|
23744
23775
|
},
|
|
23745
23776
|
setPersist: () => {
|
|
23746
23777
|
},
|
|
23778
|
+
setWeb3Services: () => {
|
|
23779
|
+
},
|
|
23780
|
+
web3UserData: void 0,
|
|
23781
|
+
setWeb3UserData: () => {
|
|
23782
|
+
},
|
|
23747
23783
|
address: "",
|
|
23748
23784
|
state: "NOT_CONNECTED" /* NOT_CONNECTED */
|
|
23749
23785
|
});
|
|
@@ -23865,6 +23901,9 @@ var useWallet = () => {
|
|
|
23865
23901
|
disconnect,
|
|
23866
23902
|
setWallet,
|
|
23867
23903
|
setPersist,
|
|
23904
|
+
setWeb3Services,
|
|
23905
|
+
web3UserData,
|
|
23906
|
+
setWeb3UserData,
|
|
23868
23907
|
error,
|
|
23869
23908
|
address,
|
|
23870
23909
|
state
|
|
@@ -23883,6 +23922,9 @@ var useWallet = () => {
|
|
|
23883
23922
|
disconnect,
|
|
23884
23923
|
setWallet,
|
|
23885
23924
|
setPersist,
|
|
23925
|
+
setWeb3Services,
|
|
23926
|
+
web3UserData,
|
|
23927
|
+
setWeb3UserData,
|
|
23886
23928
|
error,
|
|
23887
23929
|
address,
|
|
23888
23930
|
state
|
|
@@ -24055,7 +24097,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
24055
24097
|
// src/cardano-wallet/connected-button.tsx
|
|
24056
24098
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
24057
24099
|
function ConnectedButton() {
|
|
24058
|
-
const {
|
|
24100
|
+
const { name, disconnect, address } = useWallet();
|
|
24059
24101
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DropdownMenu, { children: [
|
|
24060
24102
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Button, { variant: "outline", children: [
|
|
24061
24103
|
address.slice(0, 6),
|
|
@@ -24063,6 +24105,7 @@ function ConnectedButton() {
|
|
|
24063
24105
|
address.slice(-6)
|
|
24064
24106
|
] }) }),
|
|
24065
24107
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DropdownMenuContent, { children: [
|
|
24108
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuLabel, { children: "Wallet" }),
|
|
24066
24109
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24067
24110
|
DropdownMenuItem,
|
|
24068
24111
|
{
|
|
@@ -24072,6 +24115,16 @@ function ConnectedButton() {
|
|
|
24072
24115
|
children: "Copy Address"
|
|
24073
24116
|
}
|
|
24074
24117
|
),
|
|
24118
|
+
name == "Mesh Web3 Services" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24119
|
+
DropdownMenuItem,
|
|
24120
|
+
{
|
|
24121
|
+
onClick: () => {
|
|
24122
|
+
window.open("https://web3.meshjs.dev/dashboard", "_blank");
|
|
24123
|
+
},
|
|
24124
|
+
children: "Open Web3 Wallet"
|
|
24125
|
+
}
|
|
24126
|
+
),
|
|
24127
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuSeparator, {}),
|
|
24075
24128
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24076
24129
|
DropdownMenuItem,
|
|
24077
24130
|
{
|
|
@@ -24241,7 +24294,6 @@ function IconDownload() {
|
|
|
24241
24294
|
height: "24px",
|
|
24242
24295
|
strokeWidth: "1px"
|
|
24243
24296
|
},
|
|
24244
|
-
className: "hover:mesh-fill-white",
|
|
24245
24297
|
children: [
|
|
24246
24298
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
24247
24299
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "7 10 12 15 17 10" }),
|
|
@@ -24346,7 +24398,8 @@ function WalletIcon({
|
|
|
24346
24398
|
icon,
|
|
24347
24399
|
name,
|
|
24348
24400
|
action,
|
|
24349
|
-
iconReactNode
|
|
24401
|
+
iconReactNode,
|
|
24402
|
+
loading = false
|
|
24350
24403
|
}) {
|
|
24351
24404
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Tooltip, { delayDuration: 0, defaultOpen: false, children: [
|
|
24352
24405
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
@@ -24354,9 +24407,11 @@ function WalletIcon({
|
|
|
24354
24407
|
{
|
|
24355
24408
|
className: "mesh-flex mesh-items-center mesh-justify-center mesh-rounded-lg mesh-w-10 mesh-h-10 mesh-bg-neutral-50 mesh-border mesh-border-zinc-700 hover:mesh-border-zinc-200 mesh-cursor-pointer",
|
|
24356
24409
|
onClick: action,
|
|
24410
|
+
disabled: loading,
|
|
24357
24411
|
children: [
|
|
24358
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: icon, alt: name, className: "mesh-w-8 mesh-h-8" }),
|
|
24359
|
-
iconReactNode && iconReactNode
|
|
24412
|
+
icon && !loading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: icon, alt: name, className: "mesh-w-8 mesh-h-8" }),
|
|
24413
|
+
!loading && iconReactNode && iconReactNode,
|
|
24414
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-black", children: "..." })
|
|
24360
24415
|
]
|
|
24361
24416
|
}
|
|
24362
24417
|
) }),
|
|
@@ -24364,34 +24419,199 @@ function WalletIcon({
|
|
|
24364
24419
|
] });
|
|
24365
24420
|
}
|
|
24366
24421
|
|
|
24367
|
-
// src/cardano-wallet/
|
|
24422
|
+
// src/cardano-wallet/web3-services.tsx
|
|
24423
|
+
var import_react11 = require("react");
|
|
24424
|
+
var import_web3_sdk2 = require("@meshsdk/web3-sdk");
|
|
24425
|
+
|
|
24426
|
+
// src/common/icons/icon-discord.tsx
|
|
24368
24427
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
24428
|
+
function IconDiscord() {
|
|
24429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
24430
|
+
"svg",
|
|
24431
|
+
{
|
|
24432
|
+
viewBox: "0 0 20 20",
|
|
24433
|
+
"aria-hidden": "true",
|
|
24434
|
+
style: {
|
|
24435
|
+
width: "24px",
|
|
24436
|
+
height: "24px"
|
|
24437
|
+
},
|
|
24438
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
24439
|
+
"path",
|
|
24440
|
+
{
|
|
24441
|
+
d: "M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z",
|
|
24442
|
+
fill: "#5865F2"
|
|
24443
|
+
}
|
|
24444
|
+
)
|
|
24445
|
+
}
|
|
24446
|
+
);
|
|
24447
|
+
}
|
|
24448
|
+
|
|
24449
|
+
// src/common/icons/icon-google.tsx
|
|
24450
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
24451
|
+
function IconGoogle() {
|
|
24452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
24453
|
+
"svg",
|
|
24454
|
+
{
|
|
24455
|
+
viewBox: "0 0 262 262",
|
|
24456
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24457
|
+
preserveAspectRatio: "xMidYMid",
|
|
24458
|
+
style: {
|
|
24459
|
+
width: "24px",
|
|
24460
|
+
height: "24px"
|
|
24461
|
+
},
|
|
24462
|
+
children: [
|
|
24463
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24464
|
+
"path",
|
|
24465
|
+
{
|
|
24466
|
+
d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",
|
|
24467
|
+
fill: "#4285F4"
|
|
24468
|
+
}
|
|
24469
|
+
),
|
|
24470
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24471
|
+
"path",
|
|
24472
|
+
{
|
|
24473
|
+
d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",
|
|
24474
|
+
fill: "#34A853"
|
|
24475
|
+
}
|
|
24476
|
+
),
|
|
24477
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24478
|
+
"path",
|
|
24479
|
+
{
|
|
24480
|
+
d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",
|
|
24481
|
+
fill: "#FBBC05"
|
|
24482
|
+
}
|
|
24483
|
+
),
|
|
24484
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
24485
|
+
"path",
|
|
24486
|
+
{
|
|
24487
|
+
d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",
|
|
24488
|
+
fill: "#EB4335"
|
|
24489
|
+
}
|
|
24490
|
+
)
|
|
24491
|
+
]
|
|
24492
|
+
}
|
|
24493
|
+
);
|
|
24494
|
+
}
|
|
24495
|
+
|
|
24496
|
+
// src/common/icons/icon-twitter.tsx
|
|
24497
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
24498
|
+
function IconTwitter() {
|
|
24499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
24500
|
+
"svg",
|
|
24501
|
+
{
|
|
24502
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24503
|
+
version: "1.1",
|
|
24504
|
+
viewBox: "0 0 24 24",
|
|
24505
|
+
style: {
|
|
24506
|
+
width: "24px",
|
|
24507
|
+
height: "24px"
|
|
24508
|
+
},
|
|
24509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z" })
|
|
24510
|
+
}
|
|
24511
|
+
);
|
|
24512
|
+
}
|
|
24513
|
+
|
|
24514
|
+
// src/cardano-wallet/web3-services.tsx
|
|
24515
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
24516
|
+
function Web3Services({
|
|
24517
|
+
options,
|
|
24518
|
+
setOpen,
|
|
24519
|
+
persist
|
|
24520
|
+
}) {
|
|
24521
|
+
const { setWallet, setWeb3UserData } = useWallet();
|
|
24522
|
+
const [loading, setLoading] = (0, import_react11.useState)(false);
|
|
24523
|
+
async function loadWallet(directTo) {
|
|
24524
|
+
setLoading(true);
|
|
24525
|
+
const _options = {
|
|
24526
|
+
networkId: 0,
|
|
24527
|
+
fetcher: options.fetcher,
|
|
24528
|
+
submitter: options.submitter,
|
|
24529
|
+
appUrl: options.appUrl,
|
|
24530
|
+
projectId: options.projectId,
|
|
24531
|
+
directTo
|
|
24532
|
+
};
|
|
24533
|
+
const wallet = await import_web3_sdk2.Web3Wallet.enable(_options);
|
|
24534
|
+
const user = wallet.getUser();
|
|
24535
|
+
setWeb3UserData(user);
|
|
24536
|
+
setWallet(
|
|
24537
|
+
wallet,
|
|
24538
|
+
"Mesh Web3 Services",
|
|
24539
|
+
persist ? {
|
|
24540
|
+
walletAddress: await wallet.getChangeAddress(),
|
|
24541
|
+
user
|
|
24542
|
+
} : void 0
|
|
24543
|
+
);
|
|
24544
|
+
setLoading(false);
|
|
24545
|
+
setOpen(false);
|
|
24546
|
+
}
|
|
24547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
24548
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
24549
|
+
WalletIcon,
|
|
24550
|
+
{
|
|
24551
|
+
iconReactNode: IconGoogle(),
|
|
24552
|
+
name: `Google`,
|
|
24553
|
+
action: () => loadWallet("google"),
|
|
24554
|
+
loading
|
|
24555
|
+
}
|
|
24556
|
+
),
|
|
24557
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
24558
|
+
WalletIcon,
|
|
24559
|
+
{
|
|
24560
|
+
iconReactNode: IconDiscord(),
|
|
24561
|
+
name: `Discord`,
|
|
24562
|
+
action: () => loadWallet("discord"),
|
|
24563
|
+
loading
|
|
24564
|
+
}
|
|
24565
|
+
),
|
|
24566
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
24567
|
+
WalletIcon,
|
|
24568
|
+
{
|
|
24569
|
+
iconReactNode: IconTwitter(),
|
|
24570
|
+
name: `Twitter`,
|
|
24571
|
+
action: () => loadWallet("twitter"),
|
|
24572
|
+
loading
|
|
24573
|
+
}
|
|
24574
|
+
)
|
|
24575
|
+
] });
|
|
24576
|
+
}
|
|
24577
|
+
|
|
24578
|
+
// src/cardano-wallet/screen-main.tsx
|
|
24579
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
24369
24580
|
function ScreenMain({
|
|
24370
24581
|
injectFn,
|
|
24371
|
-
extensions,
|
|
24372
24582
|
setOpen,
|
|
24373
24583
|
setScreen,
|
|
24374
24584
|
persist,
|
|
24375
24585
|
cardanoPeerConnect,
|
|
24376
24586
|
burnerWallet,
|
|
24377
|
-
webauthn
|
|
24587
|
+
webauthn,
|
|
24588
|
+
showDownload,
|
|
24589
|
+
web3Services
|
|
24378
24590
|
}) {
|
|
24379
24591
|
const wallets = useWalletList({ injectFn });
|
|
24380
24592
|
const { connect: connect2 } = useWallet();
|
|
24381
|
-
return /* @__PURE__ */ (0,
|
|
24382
|
-
wallets.map((wallet, index) => /* @__PURE__ */ (0,
|
|
24593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-5 mesh-place-items-center mesh-gap-y-8", children: [
|
|
24594
|
+
wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24383
24595
|
WalletIcon,
|
|
24384
24596
|
{
|
|
24385
24597
|
icon: wallet.icon,
|
|
24386
24598
|
name: wallet.name,
|
|
24387
24599
|
action: () => {
|
|
24388
|
-
connect2(wallet.id,
|
|
24600
|
+
connect2(wallet.id, persist);
|
|
24389
24601
|
setOpen(false);
|
|
24390
24602
|
}
|
|
24391
24603
|
},
|
|
24392
24604
|
index
|
|
24393
24605
|
)),
|
|
24394
|
-
|
|
24606
|
+
web3Services && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24607
|
+
Web3Services,
|
|
24608
|
+
{
|
|
24609
|
+
options: web3Services,
|
|
24610
|
+
setOpen,
|
|
24611
|
+
persist
|
|
24612
|
+
}
|
|
24613
|
+
),
|
|
24614
|
+
webauthn && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24395
24615
|
WalletIcon,
|
|
24396
24616
|
{
|
|
24397
24617
|
iconReactNode: IconFingerprint(),
|
|
@@ -24401,7 +24621,7 @@ function ScreenMain({
|
|
|
24401
24621
|
}
|
|
24402
24622
|
}
|
|
24403
24623
|
),
|
|
24404
|
-
cardanoPeerConnect && /* @__PURE__ */ (0,
|
|
24624
|
+
cardanoPeerConnect && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24405
24625
|
WalletIcon,
|
|
24406
24626
|
{
|
|
24407
24627
|
iconReactNode: IconMonitorSmartphone(),
|
|
@@ -24411,7 +24631,7 @@ function ScreenMain({
|
|
|
24411
24631
|
}
|
|
24412
24632
|
}
|
|
24413
24633
|
),
|
|
24414
|
-
burnerWallet && /* @__PURE__ */ (0,
|
|
24634
|
+
burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24415
24635
|
WalletIcon,
|
|
24416
24636
|
{
|
|
24417
24637
|
iconReactNode: IconBookDashed(),
|
|
@@ -24421,7 +24641,7 @@ function ScreenMain({
|
|
|
24421
24641
|
}
|
|
24422
24642
|
}
|
|
24423
24643
|
),
|
|
24424
|
-
/* @__PURE__ */ (0,
|
|
24644
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24425
24645
|
WalletIcon,
|
|
24426
24646
|
{
|
|
24427
24647
|
iconReactNode: IconDownload(),
|
|
@@ -24438,19 +24658,19 @@ function ScreenMain({
|
|
|
24438
24658
|
}
|
|
24439
24659
|
|
|
24440
24660
|
// src/cardano-wallet/screen-p2p.tsx
|
|
24441
|
-
var
|
|
24661
|
+
var import_react12 = require("react");
|
|
24442
24662
|
var import_cardano_peer_connect = __toESM(require_dist(), 1);
|
|
24443
|
-
var
|
|
24663
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
24444
24664
|
function ScreenP2P({
|
|
24445
24665
|
cardanoPeerConnect,
|
|
24446
24666
|
setOpen
|
|
24447
24667
|
}) {
|
|
24448
|
-
const dAppConnect = (0,
|
|
24449
|
-
const qrCodeField = (0,
|
|
24450
|
-
const [address, setAddress] = (0,
|
|
24451
|
-
const [copied, setCopied] = (0,
|
|
24668
|
+
const dAppConnect = (0, import_react12.useRef)(null);
|
|
24669
|
+
const qrCodeField = (0, import_react12.useRef)(null);
|
|
24670
|
+
const [address, setAddress] = (0, import_react12.useState)("");
|
|
24671
|
+
const [copied, setCopied] = (0, import_react12.useState)(false);
|
|
24452
24672
|
const { connect: connect2 } = useWallet();
|
|
24453
|
-
(0,
|
|
24673
|
+
(0, import_react12.useEffect)(() => {
|
|
24454
24674
|
if (cardanoPeerConnect) {
|
|
24455
24675
|
if (dAppConnect.current === null) {
|
|
24456
24676
|
dAppConnect.current = new import_cardano_peer_connect.DAppPeerConnect({
|
|
@@ -24484,9 +24704,9 @@ function ScreenP2P({
|
|
|
24484
24704
|
}
|
|
24485
24705
|
}
|
|
24486
24706
|
}, []);
|
|
24487
|
-
return /* @__PURE__ */ (0,
|
|
24488
|
-
/* @__PURE__ */ (0,
|
|
24489
|
-
/* @__PURE__ */ (0,
|
|
24707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
|
|
24708
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
|
|
24709
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
24490
24710
|
Button,
|
|
24491
24711
|
{
|
|
24492
24712
|
variant: "outline",
|
|
@@ -24501,15 +24721,15 @@ function ScreenP2P({
|
|
|
24501
24721
|
}
|
|
24502
24722
|
|
|
24503
24723
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
24504
|
-
var
|
|
24724
|
+
var import_react13 = require("react");
|
|
24505
24725
|
var import_wallet4 = require("@meshsdk/wallet");
|
|
24506
24726
|
|
|
24507
24727
|
// src/common/input.tsx
|
|
24508
24728
|
var React5 = __toESM(require("react"), 1);
|
|
24509
|
-
var
|
|
24729
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
24510
24730
|
var Input = React5.forwardRef(
|
|
24511
24731
|
({ className, type, ...props }, ref) => {
|
|
24512
|
-
return /* @__PURE__ */ (0,
|
|
24732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
24513
24733
|
"input",
|
|
24514
24734
|
{
|
|
24515
24735
|
type,
|
|
@@ -24529,11 +24749,11 @@ Input.displayName = "Input";
|
|
|
24529
24749
|
var React6 = __toESM(require("react"), 1);
|
|
24530
24750
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
24531
24751
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
24532
|
-
var
|
|
24752
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
24533
24753
|
var labelVariants = (0, import_class_variance_authority2.cva)(
|
|
24534
24754
|
"mesh-text-sm mesh-font-medium mesh-leading-none peer-disabled:mesh-cursor-not-allowed peer-disabled:mesh-opacity-70"
|
|
24535
24755
|
);
|
|
24536
|
-
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
24756
|
+
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
24537
24757
|
LabelPrimitive.Root,
|
|
24538
24758
|
{
|
|
24539
24759
|
ref,
|
|
@@ -24544,16 +24764,16 @@ var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
24544
24764
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
24545
24765
|
|
|
24546
24766
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
24547
|
-
var
|
|
24767
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
24548
24768
|
function ScreenWebauthn({
|
|
24549
24769
|
url,
|
|
24550
24770
|
networkId,
|
|
24551
24771
|
provider,
|
|
24552
24772
|
setOpen
|
|
24553
24773
|
}) {
|
|
24554
|
-
const [loading, setLoading] = (0,
|
|
24555
|
-
const [userName, setUserName] = (0,
|
|
24556
|
-
const [password, setPassword] = (0,
|
|
24774
|
+
const [loading, setLoading] = (0, import_react13.useState)(false);
|
|
24775
|
+
const [userName, setUserName] = (0, import_react13.useState)("");
|
|
24776
|
+
const [password, setPassword] = (0, import_react13.useState)("");
|
|
24557
24777
|
const { setWallet } = useWallet();
|
|
24558
24778
|
function createWallet(root) {
|
|
24559
24779
|
setTimeout(() => {
|
|
@@ -24578,10 +24798,10 @@ function ScreenWebauthn({
|
|
|
24578
24798
|
createWallet(res.wallet.bech32PrivateKey);
|
|
24579
24799
|
}
|
|
24580
24800
|
}
|
|
24581
|
-
return /* @__PURE__ */ (0,
|
|
24582
|
-
/* @__PURE__ */ (0,
|
|
24583
|
-
/* @__PURE__ */ (0,
|
|
24584
|
-
/* @__PURE__ */ (0,
|
|
24801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mesh-flex mesh-flex-row mesh-flex-gap-4 mesh-items-center mesh-justify-center", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: "Connecting wallet..." }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-gap-6 mesh-w-full mesh-mx-8", children: [
|
|
24802
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
24803
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Label2, { htmlFor: "username", children: "Username" }),
|
|
24804
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
24585
24805
|
Input,
|
|
24586
24806
|
{
|
|
24587
24807
|
id: "username",
|
|
@@ -24591,11 +24811,11 @@ function ScreenWebauthn({
|
|
|
24591
24811
|
onChange: (e2) => setUserName(e2.target.value)
|
|
24592
24812
|
}
|
|
24593
24813
|
),
|
|
24594
|
-
/* @__PURE__ */ (0,
|
|
24814
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Unique to the application you are connecting." })
|
|
24595
24815
|
] }),
|
|
24596
|
-
/* @__PURE__ */ (0,
|
|
24597
|
-
/* @__PURE__ */ (0,
|
|
24598
|
-
/* @__PURE__ */ (0,
|
|
24816
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
24817
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mesh-flex mesh-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Label2, { htmlFor: "password", children: "Unique Code" }) }),
|
|
24818
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
24599
24819
|
Input,
|
|
24600
24820
|
{
|
|
24601
24821
|
id: "password",
|
|
@@ -24605,9 +24825,9 @@ function ScreenWebauthn({
|
|
|
24605
24825
|
onChange: (e2) => setPassword(e2.target.value)
|
|
24606
24826
|
}
|
|
24607
24827
|
),
|
|
24608
|
-
/* @__PURE__ */ (0,
|
|
24828
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Additional security to derive your wallet." })
|
|
24609
24829
|
] }),
|
|
24610
|
-
/* @__PURE__ */ (0,
|
|
24830
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
24611
24831
|
Button,
|
|
24612
24832
|
{
|
|
24613
24833
|
className: "mesh-w-full",
|
|
@@ -24620,59 +24840,62 @@ function ScreenWebauthn({
|
|
|
24620
24840
|
}
|
|
24621
24841
|
|
|
24622
24842
|
// src/cardano-wallet/index.tsx
|
|
24623
|
-
var
|
|
24843
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
24624
24844
|
var CardanoWallet = ({
|
|
24625
24845
|
label = "Connect Wallet",
|
|
24626
24846
|
onConnected = void 0,
|
|
24627
24847
|
isDark = false,
|
|
24628
24848
|
persist = false,
|
|
24629
|
-
extensions = [],
|
|
24630
24849
|
injectFn = void 0,
|
|
24631
24850
|
cardanoPeerConnect = void 0,
|
|
24632
24851
|
burnerWallet = void 0,
|
|
24633
|
-
webauthn = void 0
|
|
24852
|
+
webauthn = void 0,
|
|
24853
|
+
showDownload = true,
|
|
24854
|
+
web3Services = void 0
|
|
24634
24855
|
}) => {
|
|
24635
|
-
const [open, setOpen] = (0,
|
|
24636
|
-
const [screen, setScreen] = (0,
|
|
24637
|
-
const { wallet, connected, setPersist } = useWallet();
|
|
24638
|
-
(0,
|
|
24856
|
+
const [open, setOpen] = (0, import_react14.useState)(false);
|
|
24857
|
+
const [screen, setScreen] = (0, import_react14.useState)("main");
|
|
24858
|
+
const { wallet, connected, setPersist, setWeb3Services } = useWallet();
|
|
24859
|
+
(0, import_react14.useEffect)(() => {
|
|
24639
24860
|
setPersist(persist);
|
|
24640
|
-
|
|
24641
|
-
|
|
24861
|
+
if (web3Services) setWeb3Services(web3Services);
|
|
24862
|
+
}, []);
|
|
24863
|
+
(0, import_react14.useEffect)(() => {
|
|
24642
24864
|
if (connected) {
|
|
24643
24865
|
if (onConnected) onConnected();
|
|
24644
24866
|
}
|
|
24645
24867
|
}, [connected, wallet]);
|
|
24646
|
-
return /* @__PURE__ */ (0,
|
|
24647
|
-
/* @__PURE__ */ (0,
|
|
24648
|
-
/* @__PURE__ */ (0,
|
|
24868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
|
|
24869
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "outline", className: isDark ? "mesh-dark" : "", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ConnectedButton, {}) }),
|
|
24870
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
24649
24871
|
DialogContent,
|
|
24650
24872
|
{
|
|
24651
24873
|
className: "sm:mesh-max-w-[425px] mesh-dark",
|
|
24652
24874
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
24653
24875
|
children: [
|
|
24654
|
-
/* @__PURE__ */ (0,
|
|
24655
|
-
screen == "main" && /* @__PURE__ */ (0,
|
|
24876
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Header, { screen, setScreen }),
|
|
24877
|
+
screen == "main" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24656
24878
|
ScreenMain,
|
|
24657
24879
|
{
|
|
24658
24880
|
injectFn,
|
|
24659
|
-
extensions,
|
|
24660
24881
|
setOpen,
|
|
24661
24882
|
setScreen,
|
|
24662
24883
|
persist,
|
|
24663
24884
|
cardanoPeerConnect: cardanoPeerConnect != void 0,
|
|
24664
24885
|
burnerWallet: burnerWallet != void 0,
|
|
24665
|
-
webauthn: webauthn != void 0
|
|
24886
|
+
webauthn: webauthn != void 0,
|
|
24887
|
+
showDownload,
|
|
24888
|
+
web3Services
|
|
24666
24889
|
}
|
|
24667
24890
|
),
|
|
24668
|
-
screen == "p2p" && /* @__PURE__ */ (0,
|
|
24891
|
+
screen == "p2p" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24669
24892
|
ScreenP2P,
|
|
24670
24893
|
{
|
|
24671
24894
|
cardanoPeerConnect,
|
|
24672
24895
|
setOpen
|
|
24673
24896
|
}
|
|
24674
24897
|
),
|
|
24675
|
-
screen == "burner" && burnerWallet && /* @__PURE__ */ (0,
|
|
24898
|
+
screen == "burner" && burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24676
24899
|
ScreenBurner,
|
|
24677
24900
|
{
|
|
24678
24901
|
networkId: burnerWallet.networkId,
|
|
@@ -24680,7 +24903,7 @@ var CardanoWallet = ({
|
|
|
24680
24903
|
setOpen
|
|
24681
24904
|
}
|
|
24682
24905
|
),
|
|
24683
|
-
screen == "webauthn" && webauthn && /* @__PURE__ */ (0,
|
|
24906
|
+
screen == "webauthn" && webauthn && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24684
24907
|
ScreenWebauthn,
|
|
24685
24908
|
{
|
|
24686
24909
|
url: webauthn.url,
|
|
@@ -24689,7 +24912,7 @@ var CardanoWallet = ({
|
|
|
24689
24912
|
setOpen
|
|
24690
24913
|
}
|
|
24691
24914
|
),
|
|
24692
|
-
/* @__PURE__ */ (0,
|
|
24915
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Footer, {})
|
|
24693
24916
|
]
|
|
24694
24917
|
}
|
|
24695
24918
|
)
|
|
@@ -24699,25 +24922,25 @@ function Header({
|
|
|
24699
24922
|
screen,
|
|
24700
24923
|
setScreen
|
|
24701
24924
|
}) {
|
|
24702
|
-
return /* @__PURE__ */ (0,
|
|
24703
|
-
/* @__PURE__ */ (0,
|
|
24704
|
-
screen != "main" ? /* @__PURE__ */ (0,
|
|
24705
|
-
/* @__PURE__ */ (0,
|
|
24706
|
-
/* @__PURE__ */ (0,
|
|
24925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogHeader, { children: [
|
|
24926
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
|
|
24927
|
+
screen != "main" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { onClick: () => setScreen("main"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconChevronRight, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { width: "24px" } }),
|
|
24928
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: screens[screen].title }),
|
|
24929
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { width: "24px" } })
|
|
24707
24930
|
] }),
|
|
24708
|
-
/* @__PURE__ */ (0,
|
|
24931
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogDescription, { children: screens[screen].subtitle && screens[screen].subtitle })
|
|
24709
24932
|
] });
|
|
24710
24933
|
}
|
|
24711
24934
|
function Footer() {
|
|
24712
|
-
return /* @__PURE__ */ (0,
|
|
24935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
24713
24936
|
"a",
|
|
24714
24937
|
{
|
|
24715
24938
|
href: "https://meshjs.dev/",
|
|
24716
24939
|
target: "_blank",
|
|
24717
24940
|
className: "mesh-grow mesh-flex mesh-gap-1 mesh-items-center mesh-justify-center mesh-text-zinc-500 hover:mesh-text-white mesh-fill-zinc-500 hover:mesh-fill-white",
|
|
24718
24941
|
children: [
|
|
24719
|
-
/* @__PURE__ */ (0,
|
|
24720
|
-
/* @__PURE__ */ (0,
|
|
24942
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "", children: "Powered by" }),
|
|
24943
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
24721
24944
|
"svg",
|
|
24722
24945
|
{
|
|
24723
24946
|
width: 24,
|
|
@@ -24725,31 +24948,31 @@ function Footer() {
|
|
|
24725
24948
|
enableBackground: "new 0 0 300 200",
|
|
24726
24949
|
viewBox: "0 0 300 200",
|
|
24727
24950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24728
|
-
children: /* @__PURE__ */ (0,
|
|
24951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
|
|
24729
24952
|
}
|
|
24730
24953
|
),
|
|
24731
|
-
/* @__PURE__ */ (0,
|
|
24954
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "", children: "Mesh SDK" })
|
|
24732
24955
|
]
|
|
24733
24956
|
}
|
|
24734
24957
|
) });
|
|
24735
24958
|
}
|
|
24736
24959
|
|
|
24737
24960
|
// src/mesh-badge/mesh-logo.tsx
|
|
24738
|
-
var
|
|
24739
|
-
var MeshLogo = () => /* @__PURE__ */ (0,
|
|
24961
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
24962
|
+
var MeshLogo = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
24740
24963
|
"svg",
|
|
24741
24964
|
{
|
|
24742
24965
|
className: "mesh-h-16 mesh-p-2",
|
|
24743
24966
|
fill: "currentColor",
|
|
24744
24967
|
viewBox: "0 0 300 200",
|
|
24745
24968
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24746
|
-
children: /* @__PURE__ */ (0,
|
|
24969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
|
|
24747
24970
|
}
|
|
24748
24971
|
);
|
|
24749
24972
|
|
|
24750
24973
|
// src/mesh-badge/index.tsx
|
|
24751
|
-
var
|
|
24752
|
-
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0,
|
|
24974
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
24975
|
+
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
24753
24976
|
"a",
|
|
24754
24977
|
{
|
|
24755
24978
|
className: `mesh-flex mesh-max-w-fit mesh-flex-col mesh-items-center mesh-rounded-md mesh-border mesh-border-solid mesh-border-current mesh-p-1 mesh-text-xl mesh-font-semibold mesh-no-underline ${isDark ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
@@ -24761,21 +24984,21 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime21
|
|
|
24761
24984
|
rel: "noopener noreferrer",
|
|
24762
24985
|
target: "_blank",
|
|
24763
24986
|
children: [
|
|
24764
|
-
/* @__PURE__ */ (0,
|
|
24987
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MeshLogo, {}),
|
|
24765
24988
|
"Mesh"
|
|
24766
24989
|
]
|
|
24767
24990
|
}
|
|
24768
24991
|
);
|
|
24769
24992
|
|
|
24770
24993
|
// src/stake-button/index.tsx
|
|
24771
|
-
var
|
|
24994
|
+
var import_react16 = require("react");
|
|
24772
24995
|
var import_transaction = require("@meshsdk/transaction");
|
|
24773
24996
|
|
|
24774
24997
|
// src/cardano-wallet-dropdown/index.tsx
|
|
24775
|
-
var
|
|
24998
|
+
var import_react15 = require("react");
|
|
24776
24999
|
|
|
24777
25000
|
// src/common/button-dropdown.tsx
|
|
24778
|
-
var
|
|
25001
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
24779
25002
|
function ButtonDropdown({
|
|
24780
25003
|
children,
|
|
24781
25004
|
isDarkMode = false,
|
|
@@ -24784,7 +25007,7 @@ function ButtonDropdown({
|
|
|
24784
25007
|
onMouseEnter,
|
|
24785
25008
|
onMouseLeave
|
|
24786
25009
|
}) {
|
|
24787
|
-
return /* @__PURE__ */ (0,
|
|
25010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
24788
25011
|
"button",
|
|
24789
25012
|
{
|
|
24790
25013
|
className: `mesh-mr-menu-list mesh-flex mesh-w-60 mesh-items-center mesh-justify-center mesh-rounded-t-md mesh-border mesh-px-4 mesh-py-2 mesh-text-lg mesh-font-normal mesh-shadow-sm ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
@@ -24797,21 +25020,21 @@ function ButtonDropdown({
|
|
|
24797
25020
|
}
|
|
24798
25021
|
|
|
24799
25022
|
// src/cardano-wallet-dropdown/menu-item.tsx
|
|
24800
|
-
var
|
|
25023
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
24801
25024
|
function MenuItem({
|
|
24802
25025
|
icon,
|
|
24803
25026
|
label,
|
|
24804
25027
|
action,
|
|
24805
25028
|
active
|
|
24806
25029
|
}) {
|
|
24807
|
-
return /* @__PURE__ */ (0,
|
|
25030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
24808
25031
|
"div",
|
|
24809
25032
|
{
|
|
24810
25033
|
className: "mesh-flex mesh-cursor-pointer mesh-items-center mesh-px-4 mesh-py-2 mesh-opacity-80 hover:mesh-opacity-100 mesh-h-16",
|
|
24811
25034
|
onClick: action,
|
|
24812
25035
|
children: [
|
|
24813
|
-
icon && /* @__PURE__ */ (0,
|
|
24814
|
-
/* @__PURE__ */ (0,
|
|
25036
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { className: "mesh-pr-2 mesh-m-1 mesh-h-8", src: icon }),
|
|
25037
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "mesh-mr-menu-item mesh-text-xl mesh-font-normal mesh-text-neutral-700 hover:mesh-text-black", children: label.split(" ").map((word) => {
|
|
24815
25038
|
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
24816
25039
|
}).join(" ") })
|
|
24817
25040
|
]
|
|
@@ -24820,8 +25043,8 @@ function MenuItem({
|
|
|
24820
25043
|
}
|
|
24821
25044
|
|
|
24822
25045
|
// src/cardano-wallet-dropdown/chevron-down.tsx
|
|
24823
|
-
var
|
|
24824
|
-
var ChevronDown = () => /* @__PURE__ */ (0,
|
|
25046
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
25047
|
+
var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
24825
25048
|
"svg",
|
|
24826
25049
|
{
|
|
24827
25050
|
className: "mesh-m-2 mesh-h-6",
|
|
@@ -24830,7 +25053,7 @@ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
|
24830
25053
|
viewBox: "0 0 24 24",
|
|
24831
25054
|
stroke: "currentColor",
|
|
24832
25055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24833
|
-
children: /* @__PURE__ */ (0,
|
|
25056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
24834
25057
|
"path",
|
|
24835
25058
|
{
|
|
24836
25059
|
strokeLinecap: "round",
|
|
@@ -24843,7 +25066,7 @@ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
|
24843
25066
|
);
|
|
24844
25067
|
|
|
24845
25068
|
// src/cardano-wallet-dropdown/wallet-balance.tsx
|
|
24846
|
-
var
|
|
25069
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
24847
25070
|
var WalletBalance = ({
|
|
24848
25071
|
connected,
|
|
24849
25072
|
connecting,
|
|
@@ -24851,22 +25074,22 @@ var WalletBalance = ({
|
|
|
24851
25074
|
wallet
|
|
24852
25075
|
}) => {
|
|
24853
25076
|
const lovelace = useLovelace();
|
|
24854
|
-
return connected && lovelace && wallet?.icon ? /* @__PURE__ */ (0,
|
|
24855
|
-
/* @__PURE__ */ (0,
|
|
25077
|
+
return connected && lovelace && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
25078
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }),
|
|
24856
25079
|
"\u20B3",
|
|
24857
25080
|
" ",
|
|
24858
25081
|
parseInt((parseInt(lovelace, 10) / 1e6).toString(), 10),
|
|
24859
25082
|
".",
|
|
24860
|
-
/* @__PURE__ */ (0,
|
|
24861
|
-
] }) : connected && wallet?.icon ? /* @__PURE__ */ (0,
|
|
25083
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mesh-text-xs", children: lovelace.substring(lovelace.length - 6) })
|
|
25084
|
+
] }) : connected && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }) }) : connecting ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: "Connecting..." }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
24862
25085
|
label,
|
|
24863
25086
|
" ",
|
|
24864
|
-
/* @__PURE__ */ (0,
|
|
25087
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronDown, {})
|
|
24865
25088
|
] });
|
|
24866
25089
|
};
|
|
24867
25090
|
|
|
24868
25091
|
// src/cardano-wallet-dropdown/index.tsx
|
|
24869
|
-
var
|
|
25092
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
24870
25093
|
var CardanoWallet2 = ({
|
|
24871
25094
|
label = "Connect Wallet",
|
|
24872
25095
|
onConnected = void 0,
|
|
@@ -24874,32 +25097,32 @@ var CardanoWallet2 = ({
|
|
|
24874
25097
|
extensions = [],
|
|
24875
25098
|
cardanoPeerConnect = void 0
|
|
24876
25099
|
}) => {
|
|
24877
|
-
const [isDarkMode, setIsDarkMode] = (0,
|
|
24878
|
-
const [hideMenuList, setHideMenuList] = (0,
|
|
25100
|
+
const [isDarkMode, setIsDarkMode] = (0, import_react15.useState)(false);
|
|
25101
|
+
const [hideMenuList, setHideMenuList] = (0, import_react15.useState)(true);
|
|
24879
25102
|
const { connect: connect2, connecting, connected, disconnect, name } = useWallet();
|
|
24880
25103
|
const wallets = useWalletList();
|
|
24881
|
-
(0,
|
|
25104
|
+
(0, import_react15.useEffect)(() => {
|
|
24882
25105
|
if (connected && onConnected) {
|
|
24883
25106
|
onConnected();
|
|
24884
25107
|
}
|
|
24885
25108
|
}, [connected]);
|
|
24886
|
-
(0,
|
|
25109
|
+
(0, import_react15.useEffect)(() => {
|
|
24887
25110
|
setIsDarkMode(isDark);
|
|
24888
25111
|
}, [isDark]);
|
|
24889
|
-
return /* @__PURE__ */ (0,
|
|
25112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
24890
25113
|
"div",
|
|
24891
25114
|
{
|
|
24892
25115
|
onMouseEnter: () => setHideMenuList(false),
|
|
24893
25116
|
onMouseLeave: () => setHideMenuList(true),
|
|
24894
25117
|
style: { width: "min-content", zIndex: 50 },
|
|
24895
25118
|
children: [
|
|
24896
|
-
/* @__PURE__ */ (0,
|
|
25119
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
24897
25120
|
ButtonDropdown,
|
|
24898
25121
|
{
|
|
24899
25122
|
isDarkMode,
|
|
24900
25123
|
hideMenuList,
|
|
24901
25124
|
setHideMenuList,
|
|
24902
|
-
children: /* @__PURE__ */ (0,
|
|
25125
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
24903
25126
|
WalletBalance,
|
|
24904
25127
|
{
|
|
24905
25128
|
connected,
|
|
@@ -24910,12 +25133,12 @@ var CardanoWallet2 = ({
|
|
|
24910
25133
|
)
|
|
24911
25134
|
}
|
|
24912
25135
|
),
|
|
24913
|
-
/* @__PURE__ */ (0,
|
|
25136
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
24914
25137
|
"div",
|
|
24915
25138
|
{
|
|
24916
25139
|
className: `mesh-mr-menu-list mesh-absolute mesh-w-60 mesh-rounded-b-md mesh-border mesh-text-center mesh-shadow-sm mesh-backdrop-blur ${hideMenuList && "mesh-hidden"} ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
24917
25140
|
style: { zIndex: 50 },
|
|
24918
|
-
children: !connected && wallets.length > 0 ? /* @__PURE__ */ (0,
|
|
25141
|
+
children: !connected && wallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
24919
25142
|
MenuItem,
|
|
24920
25143
|
{
|
|
24921
25144
|
icon: wallet.icon,
|
|
@@ -24927,7 +25150,7 @@ var CardanoWallet2 = ({
|
|
|
24927
25150
|
active: name === wallet.id
|
|
24928
25151
|
},
|
|
24929
25152
|
index
|
|
24930
|
-
)) }) : wallets.length === 0 ? /* @__PURE__ */ (0,
|
|
25153
|
+
)) }) : wallets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "No Wallet Found" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
24931
25154
|
MenuItem,
|
|
24932
25155
|
{
|
|
24933
25156
|
active: false,
|
|
@@ -24944,7 +25167,7 @@ var CardanoWallet2 = ({
|
|
|
24944
25167
|
};
|
|
24945
25168
|
|
|
24946
25169
|
// src/stake-button/index.tsx
|
|
24947
|
-
var
|
|
25170
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
24948
25171
|
var StakeButton = ({
|
|
24949
25172
|
label = "Stake your ADA",
|
|
24950
25173
|
isDark = false,
|
|
@@ -24952,19 +25175,19 @@ var StakeButton = ({
|
|
|
24952
25175
|
onCheck,
|
|
24953
25176
|
onDelegated = void 0
|
|
24954
25177
|
}) => {
|
|
24955
|
-
const [isDarkMode, setIsDarkMode] = (0,
|
|
25178
|
+
const [isDarkMode, setIsDarkMode] = (0, import_react16.useState)(false);
|
|
24956
25179
|
const { connected } = useWallet();
|
|
24957
|
-
(0,
|
|
25180
|
+
(0, import_react16.useEffect)(() => {
|
|
24958
25181
|
setIsDarkMode(isDark);
|
|
24959
25182
|
}, [isDark]);
|
|
24960
|
-
return /* @__PURE__ */ (0,
|
|
25183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: connected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ButtonDropdown, { isDarkMode, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
24961
25184
|
Delegate,
|
|
24962
25185
|
{
|
|
24963
25186
|
poolId,
|
|
24964
25187
|
onCheck,
|
|
24965
25188
|
onDelegated
|
|
24966
25189
|
}
|
|
24967
|
-
) }) : /* @__PURE__ */ (0,
|
|
25190
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CardanoWallet2, { label, isDark }) });
|
|
24968
25191
|
};
|
|
24969
25192
|
var Delegate = ({
|
|
24970
25193
|
poolId,
|
|
@@ -24973,11 +25196,11 @@ var Delegate = ({
|
|
|
24973
25196
|
}) => {
|
|
24974
25197
|
const { wallet } = useWallet();
|
|
24975
25198
|
const rewardAddress = useRewardAddress();
|
|
24976
|
-
const [_, setError] = (0,
|
|
24977
|
-
const [checking, setChecking] = (0,
|
|
24978
|
-
const [accountInfo, setAccountInfo] = (0,
|
|
24979
|
-
const [processing, setProcessing] = (0,
|
|
24980
|
-
const [done, setDone] = (0,
|
|
25199
|
+
const [_, setError] = (0, import_react16.useState)();
|
|
25200
|
+
const [checking, setChecking] = (0, import_react16.useState)(false);
|
|
25201
|
+
const [accountInfo, setAccountInfo] = (0, import_react16.useState)();
|
|
25202
|
+
const [processing, setProcessing] = (0, import_react16.useState)(false);
|
|
25203
|
+
const [done, setDone] = (0, import_react16.useState)(false);
|
|
24981
25204
|
const checkAccountStatus = async () => {
|
|
24982
25205
|
try {
|
|
24983
25206
|
setChecking(true);
|
|
@@ -25028,22 +25251,22 @@ var Delegate = ({
|
|
|
25028
25251
|
}
|
|
25029
25252
|
setProcessing(false);
|
|
25030
25253
|
};
|
|
25031
|
-
(0,
|
|
25254
|
+
(0, import_react16.useEffect)(() => {
|
|
25032
25255
|
checkAccountStatus();
|
|
25033
25256
|
}, [rewardAddress]);
|
|
25034
25257
|
if (checking) {
|
|
25035
|
-
return /* @__PURE__ */ (0,
|
|
25258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Checking..." });
|
|
25036
25259
|
}
|
|
25037
25260
|
if (processing) {
|
|
25038
|
-
return /* @__PURE__ */ (0,
|
|
25261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Loading..." });
|
|
25039
25262
|
}
|
|
25040
25263
|
if (done) {
|
|
25041
|
-
return /* @__PURE__ */ (0,
|
|
25264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Stake Delegated" });
|
|
25042
25265
|
}
|
|
25043
25266
|
if (accountInfo?.active) {
|
|
25044
|
-
return accountInfo.poolId === poolId ? /* @__PURE__ */ (0,
|
|
25267
|
+
return accountInfo.poolId === poolId ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Stake Delegated" }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { onClick: delegateStake, children: "Begin Staking" });
|
|
25045
25268
|
}
|
|
25046
|
-
return /* @__PURE__ */ (0,
|
|
25269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { onClick: registerAddress, children: "Begin Staking" });
|
|
25047
25270
|
};
|
|
25048
25271
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25049
25272
|
0 && (module.exports = {
|