@xyo-network/react-wallet 7.5.6 → 7.5.8
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/browser/components/SeedPhrase/DefaultSeedPhrase.d.ts.map +1 -1
- package/dist/browser/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.d.ts.map +1 -1
- package/dist/browser/components/WalletAccountSelect/Select.d.ts.map +1 -1
- package/dist/browser/contexts/SeedPhrase/Provider.d.ts.map +1 -1
- package/dist/browser/index.mjs +36 -53
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +6 -4
- package/dist/browser/components/SeedPhrase/DefaultSeedPhrase.stories.d.ts +0 -8
- package/dist/browser/components/SeedPhrase/DefaultSeedPhrase.stories.d.ts.map +0 -1
- package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.stories.d.ts +0 -6
- package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.stories.d.ts.map +0 -1
- package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.stories.d.ts +0 -8
- package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.stories.d.ts.map +0 -1
- package/dist/browser/components/SeedPhrase/settings/SeedPhraseTableRow.stories.d.ts +0 -7
- package/dist/browser/components/SeedPhrase/settings/SeedPhraseTableRow.stories.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountDetails/WalletAccountDetails.stories.d.ts +0 -7
- package/dist/browser/components/WalletAccountDetails/WalletAccountDetails.stories.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.d.ts +0 -7
- package/dist/browser/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountSelect/WalletAccountSelect.stories.d.ts +0 -8
- package/dist/browser/components/WalletAccountSelect/WalletAccountSelect.stories.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountSelect/WalletAccountSelectBar.stories.d.ts +0 -11
- package/dist/browser/components/WalletAccountSelect/WalletAccountSelectBar.stories.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.d.ts +0 -12
- package/dist/browser/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountSelect/stories/WalletProviderDecorator.d.ts +0 -3
- package/dist/browser/components/WalletAccountSelect/stories/WalletProviderDecorator.d.ts.map +0 -1
- package/dist/browser/components/WalletAccountSelect/stories/index.d.ts +0 -2
- package/dist/browser/components/WalletAccountSelect/stories/index.d.ts.map +0 -1
- package/dist/browser/contexts/Wallet/usePromise.d.ts +0 -14
- package/dist/browser/contexts/Wallet/usePromise.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSeedPhrase.d.ts","sourceRoot":"","sources":["../../../../src/components/SeedPhrase/DefaultSeedPhrase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultSeedPhrase.d.ts","sourceRoot":"","sources":["../../../../src/components/SeedPhrase/DefaultSeedPhrase.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,cAAc;AACd,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,cAAc;AACd,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkC9D,CAAA"}
|
package/dist/browser/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavedPhraseTextField.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAO3D,OAAO,
|
|
1
|
+
{"version":3,"file":"SavedPhraseTextField.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAO3D,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,cAAc;AACd,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,cAAc;AACd,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA0FpE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountSelect/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAGhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountSelect/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAGhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AACjF,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,KAAK,8BAA8B,GAAG,IAAI,CAAC,wBAAwB,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC,CAAA;AAExH,cAAc;AACd,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,GACjE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,GACpC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAMH,cAAc;AACd,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA2DlE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/SeedPhrase/Provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAEN,MAAM,OAAO,CAAA;AAKd,cAAc;AACd,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AASD,cAAc;AACd,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/SeedPhrase/Provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAEN,MAAM,OAAO,CAAA;AAKd,cAAc;AACd,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AASD,cAAc;AACd,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0EhE,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -103,19 +103,19 @@ var SeedPhraseIconButton = /* @__PURE__ */ __name((props) => {
|
|
|
103
103
|
import { Alert as Alert2, AlertTitle as AlertTitle2, Snackbar as Snackbar2 } from "@mui/material";
|
|
104
104
|
import { generateMnemonic } from "@scure/bip39";
|
|
105
105
|
import { wordlist } from "@scure/bip39/wordlists/english.js";
|
|
106
|
-
import
|
|
106
|
+
import { isUndefinedOrNull } from "@xylabs/sdk-js";
|
|
107
|
+
import React4, { useState as useState3 } from "react";
|
|
107
108
|
var DefaultSeedPhrase = /* @__PURE__ */ __name(({ changeSeedPhrase, children, hideDefaultSeedPhraseMessage, seedPhrase }) => {
|
|
108
109
|
const [showSnackBar, setShowSnackBar] = useState3(false);
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
const [previousSeedPhrase, setPreviousSeedPhrase] = useState3();
|
|
111
|
+
if (seedPhrase !== previousSeedPhrase) {
|
|
112
|
+
setPreviousSeedPhrase(seedPhrase);
|
|
113
|
+
if (isUndefinedOrNull(previousSeedPhrase) && !isUndefinedOrNull(seedPhrase)) {
|
|
111
114
|
const mnemonic = generateMnemonic(wordlist, 256);
|
|
112
115
|
changeSeedPhrase?.(mnemonic);
|
|
113
116
|
setShowSnackBar(true);
|
|
114
117
|
}
|
|
115
|
-
}
|
|
116
|
-
changeSeedPhrase,
|
|
117
|
-
seedPhrase
|
|
118
|
-
]);
|
|
118
|
+
}
|
|
119
119
|
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, hideDefaultSeedPhraseMessage ? null : /* @__PURE__ */ React4.createElement(Snackbar2, {
|
|
120
120
|
open: showSnackBar,
|
|
121
121
|
autoHideDuration: 5e3,
|
|
@@ -141,7 +141,7 @@ var SeedPhraseContext = createContextEx();
|
|
|
141
141
|
import { generateMnemonic as generateMnemonic2, validateMnemonic } from "@scure/bip39";
|
|
142
142
|
import { wordlist as wordlist2 } from "@scure/bip39/wordlists/english.js";
|
|
143
143
|
import { useResetState } from "@xylabs/react-hooks";
|
|
144
|
-
import React5, { useCallback, useEffect, useMemo
|
|
144
|
+
import React5, { useCallback, useEffect, useMemo, useState as useState4 } from "react";
|
|
145
145
|
var validate = /* @__PURE__ */ __name((passedPhrase) => {
|
|
146
146
|
if (!passedPhrase) {
|
|
147
147
|
return null;
|
|
@@ -164,7 +164,9 @@ var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, hand
|
|
|
164
164
|
const mnemonic = generateMnemonic2(wordlist2, 256);
|
|
165
165
|
setPhrase?.(mnemonic);
|
|
166
166
|
setOverwriteWarning?.(false);
|
|
167
|
-
}, [
|
|
167
|
+
}, [
|
|
168
|
+
setPhrase
|
|
169
|
+
]);
|
|
168
170
|
const handleCancelOverwrite = useCallback(() => {
|
|
169
171
|
setOverwriteWarning(false);
|
|
170
172
|
}, [
|
|
@@ -199,13 +201,13 @@ var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, hand
|
|
|
199
201
|
handleCancelOverwrite,
|
|
200
202
|
open
|
|
201
203
|
]);
|
|
202
|
-
const validSeedPhrase =
|
|
204
|
+
const validSeedPhrase = useMemo(() => validate?.(seedPhrase), [
|
|
203
205
|
seedPhrase
|
|
204
206
|
]);
|
|
205
|
-
const validPhrase =
|
|
207
|
+
const validPhrase = useMemo(() => validate?.(phrase), [
|
|
206
208
|
phrase
|
|
207
209
|
]);
|
|
208
|
-
const value =
|
|
210
|
+
const value = useMemo(() => ({
|
|
209
211
|
handleCancelOverwrite,
|
|
210
212
|
handleChangeSeedPhrase,
|
|
211
213
|
handleClear,
|
|
@@ -232,8 +234,7 @@ var SeedPhraseProvider = /* @__PURE__ */ __name(({ children, defaultPhrase, hand
|
|
|
232
234
|
setOverwriteWarning,
|
|
233
235
|
setPhrase,
|
|
234
236
|
validPhrase,
|
|
235
|
-
validSeedPhrase
|
|
236
|
-
validate
|
|
237
|
+
validSeedPhrase
|
|
237
238
|
]);
|
|
238
239
|
return /* @__PURE__ */ React5.createElement(SeedPhraseContext, {
|
|
239
240
|
value
|
|
@@ -251,14 +252,14 @@ var WalletContext = createContextEx2();
|
|
|
251
252
|
// src/contexts/Wallet/Provider.tsx
|
|
252
253
|
import { useResetState as useResetState2 } from "@xylabs/react-hooks";
|
|
253
254
|
import { usePromise } from "@xylabs/react-promise";
|
|
254
|
-
import React6, { useMemo as
|
|
255
|
+
import React6, { useMemo as useMemo2 } from "react";
|
|
255
256
|
var WalletProvider = /* @__PURE__ */ __name(({ children, defaultActiveAccountIndex = 0, rootWallet = null, ...props }) => {
|
|
256
257
|
const [activeAccountIndex, setActiveAccountIndex] = useResetState2(defaultActiveAccountIndex);
|
|
257
258
|
const [activeAccount = null] = usePromise(async () => await rootWallet?.derivePath(activeAccountIndex.toString()), [
|
|
258
259
|
activeAccountIndex,
|
|
259
260
|
rootWallet
|
|
260
261
|
]);
|
|
261
|
-
const value =
|
|
262
|
+
const value = useMemo2(() => ({
|
|
262
263
|
activeAccount,
|
|
263
264
|
activeAccountIndex,
|
|
264
265
|
provided: true,
|
|
@@ -366,9 +367,9 @@ var InvalidPhraseTypography = /* @__PURE__ */ __name((props) => /* @__PURE__ */
|
|
|
366
367
|
// src/components/SeedPhrase/dialog/components/fields/validation-messages/PhraseHeaderBox.tsx
|
|
367
368
|
import { CheckCircleOutline as CheckCircleOutlineIcon, HighlightOff as HighlightOffIcon } from "@mui/icons-material";
|
|
368
369
|
import { FlexRow } from "@xylabs/react-flexbox";
|
|
369
|
-
import React9, { useMemo as
|
|
370
|
+
import React9, { useMemo as useMemo3 } from "react";
|
|
370
371
|
var PhraseHeaderBox = /* @__PURE__ */ __name(({ children, conditional, ...props }) => {
|
|
371
|
-
const state =
|
|
372
|
+
const state = useMemo3(() => {
|
|
372
373
|
switch (conditional) {
|
|
373
374
|
case true: {
|
|
374
375
|
return "success";
|
|
@@ -383,7 +384,7 @@ var PhraseHeaderBox = /* @__PURE__ */ __name(({ children, conditional, ...props
|
|
|
383
384
|
}, [
|
|
384
385
|
conditional
|
|
385
386
|
]);
|
|
386
|
-
const Icon =
|
|
387
|
+
const Icon = useMemo3(() => {
|
|
387
388
|
switch (state) {
|
|
388
389
|
case "success": {
|
|
389
390
|
return /* @__PURE__ */ React9.createElement(CheckCircleOutlineIcon, {
|
|
@@ -460,16 +461,16 @@ var PhraseDialogActions = /* @__PURE__ */ __name(({ hideClear, hideGenerate, ...
|
|
|
460
461
|
import { ContentCopy } from "@mui/icons-material";
|
|
461
462
|
import { Chip, FormControl as FormControl2, FormLabel, IconButton as IconButton2, TextField as TextField2, Tooltip, useTheme } from "@mui/material";
|
|
462
463
|
import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
|
463
|
-
import React12, {
|
|
464
|
+
import React12, { useState as useState5 } from "react";
|
|
464
465
|
var SavedPhraseTextField = /* @__PURE__ */ __name(({ fullWidth, showCopyButton, showPhraseHeader, visible: visibleProp, ...props }) => {
|
|
465
466
|
const { validSeedPhrase, seedPhrase } = useSeedPhrase();
|
|
466
467
|
const theme = useTheme();
|
|
467
468
|
const [visible, setVisible] = useState5(visibleProp);
|
|
468
|
-
|
|
469
|
+
const [previousVisibleProp, setPreviousVisibleProp] = useState5(visibleProp);
|
|
470
|
+
if (visibleProp !== previousVisibleProp) {
|
|
471
|
+
setPreviousVisibleProp(visibleProp);
|
|
469
472
|
setVisible(visibleProp);
|
|
470
|
-
}
|
|
471
|
-
visibleProp
|
|
472
|
-
]);
|
|
473
|
+
}
|
|
473
474
|
const [copied, setCopied] = useState5(false);
|
|
474
475
|
const onCopyPhrase = /* @__PURE__ */ __name(async () => {
|
|
475
476
|
if (seedPhrase) {
|
|
@@ -818,9 +819,8 @@ var WalletAccountDetails = /* @__PURE__ */ __name(({ exploreUrl = "https://explo
|
|
|
818
819
|
}, "WalletAccountDetails");
|
|
819
820
|
|
|
820
821
|
// src/components/WalletAccountSelect/Select.tsx
|
|
821
|
-
import { CircularProgress
|
|
822
|
+
import { CircularProgress } from "@mui/material";
|
|
822
823
|
import { SelectEx } from "@xylabs/react-select";
|
|
823
|
-
import { AddressRenderRowBox as AddressRenderRowBox2 } from "@xyo-network/react-address-render";
|
|
824
824
|
import React18 from "react";
|
|
825
825
|
|
|
826
826
|
// src/components/WalletAccountSelect/RenderedMenuItem.tsx
|
|
@@ -884,33 +884,16 @@ var WalletAccountSelect = /* @__PURE__ */ __name(({ addressNames, iconOnly, icon
|
|
|
884
884
|
size,
|
|
885
885
|
variant,
|
|
886
886
|
...props
|
|
887
|
-
}, rootWallet && arrayRange(maxAccounts).map((index) => {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
sx: {
|
|
898
|
-
minHeight: 0,
|
|
899
|
-
paddingBottom: 0,
|
|
900
|
-
paddingTop: 0
|
|
901
|
-
}
|
|
902
|
-
}, /* @__PURE__ */ React18.createElement(AddressRenderRowBox2, {
|
|
903
|
-
disableSharedRef: true,
|
|
904
|
-
flexGrow: 1,
|
|
905
|
-
address: account?.address,
|
|
906
|
-
favorite,
|
|
907
|
-
iconOnly,
|
|
908
|
-
iconSize,
|
|
909
|
-
icons,
|
|
910
|
-
name: customName,
|
|
911
|
-
showFavorite
|
|
912
|
-
}));
|
|
913
|
-
})) : /* @__PURE__ */ React18.createElement(CircularProgress, {
|
|
887
|
+
}, rootWallet && arrayRange(maxAccounts).map((index) => /* @__PURE__ */ React18.createElement(RenderedAccountMenuItem, {
|
|
888
|
+
key: index,
|
|
889
|
+
addressNames,
|
|
890
|
+
iconOnly,
|
|
891
|
+
iconSize,
|
|
892
|
+
icons,
|
|
893
|
+
rootWallet,
|
|
894
|
+
selectedAccountIndex: index,
|
|
895
|
+
showFavorite
|
|
896
|
+
}))) : /* @__PURE__ */ React18.createElement(CircularProgress, {
|
|
914
897
|
size: 24
|
|
915
898
|
}));
|
|
916
899
|
}, "WalletAccountSelect");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/MaxAccounts/MaxAccountsTableRow.tsx","../../src/components/MaxAccounts/OutOfBoundsSnackBar.tsx","../../src/components/SeedPhrase/_shared/SeedPhraseIconButton.tsx","../../src/components/SeedPhrase/DefaultSeedPhrase.tsx","../../src/components/SeedPhrase/dialog/components/DialogActionButtons.tsx","../../src/contexts/SeedPhrase/Context.ts","../../src/contexts/SeedPhrase/Provider.tsx","../../src/contexts/SeedPhrase/use.ts","../../src/contexts/Wallet/Context.ts","../../src/contexts/Wallet/Provider.tsx","../../src/contexts/Wallet/use.ts","../../src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx","../../src/components/SeedPhrase/dialog/components/fields/validation-messages/colorParser.ts","../../src/components/SeedPhrase/dialog/components/fields/validation-messages/InvalidPhrase.tsx","../../src/components/SeedPhrase/dialog/components/fields/validation-messages/PhraseHeaderBox.tsx","../../src/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.tsx","../../src/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.tsx","../../src/components/SeedPhrase/dialog/components/OverwriteWarning.tsx","../../src/components/SeedPhrase/dialog/SeedPhraseDialog.tsx","../../src/components/SeedPhrase/settings/SeedPhraseTableRow.tsx","../../src/components/WalletAccountDetails/WalletAccountDetails.tsx","../../src/hooks/useAccount.ts","../../src/hooks/useWallet.ts","../../src/hooks/useWallets.ts","../../src/hooks/useWrapperAccount.ts","../../src/components/WalletAccountSelect/Select.tsx","../../src/components/WalletAccountSelect/RenderedMenuItem.tsx","../../src/components/WalletAccountSelect/SelectBar.tsx"],"sourcesContent":["import type { TableRowProps } from '@mui/material'\nimport {\n ButtonGroup, TableCell, TableRow, Typography,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport React, { useState } from 'react'\n\nimport { OutOfBoundsSnackBar } from './OutOfBoundsSnackBar.tsx'\n\n/** @public */\nexport interface MaxAccountsTableRow extends TableRowProps {\n activeAccountIndex?: number\n changeMaxAccounts?: (maxAccounts: number) => void\n maxAccounts?: number\n}\n\n/** @public */\nexport const MaxAccountsTableRow: React.FC<MaxAccountsTableRow> = ({\n activeAccountIndex, changeMaxAccounts, maxAccounts,\n}) => {\n const [desiredMaximumAccounts, setDesiredMaximumAccounts] = useState<number | undefined>()\n const [showSnackBar, setShowSnackBar] = useState(false)\n\n const handleChangeMaxAccounts = (change: 'increase' | 'decrease') => {\n if (maxAccounts !== undefined && activeAccountIndex !== undefined) {\n switch (change) {\n case 'decrease': {\n const desiredMaximumAccounts = maxAccounts - 1\n const validMaximumAccounts = desiredMaximumAccounts > 0\n const maxAccountsWithinRange = activeAccountIndex + 1 <= desiredMaximumAccounts\n if (validMaximumAccounts && maxAccountsWithinRange) {\n changeMaxAccounts?.(desiredMaximumAccounts)\n }\n if (!maxAccountsWithinRange) setShowSnackBar(true)\n setDesiredMaximumAccounts(desiredMaximumAccounts)\n return\n }\n case 'increase': {\n changeMaxAccounts?.(maxAccounts + 1)\n return\n }\n default: {\n console.error(change, 'is not a recognized value')\n }\n }\n } else {\n throw new Error('Max Accounts is unset and needs a default')\n }\n }\n\n return (\n <TableRow>\n <TableCell>Maximum Accounts</TableCell>\n <TableCell align=\"center\">\n <Typography variant=\"caption\">{maxAccounts}</Typography>\n </TableCell>\n <TableCell align=\"center\">\n <ButtonGroup>\n <ButtonEx onClick={() => handleChangeMaxAccounts('decrease')} variant=\"contained\" size=\"small\">\n -\n </ButtonEx>\n <ButtonEx onClick={() => handleChangeMaxAccounts('increase')} variant=\"contained\" size=\"small\">\n +\n </ButtonEx>\n </ButtonGroup>\n <OutOfBoundsSnackBar\n desiredMaximumAccounts={desiredMaximumAccounts}\n activeAccountIndex={activeAccountIndex}\n setShowSnackBar={setShowSnackBar}\n showSnackBar={showSnackBar}\n />\n </TableCell>\n </TableRow>\n )\n}\n","import type { SnackbarProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Snackbar,\n} from '@mui/material'\nimport type { Dispatch, SetStateAction } from 'react'\nimport React from 'react'\n\n/** @public */\nexport interface OutOfBoundsSnackBarProps extends SnackbarProps {\n activeAccountIndex?: number\n desiredMaximumAccounts?: number\n setShowSnackBar?: Dispatch<SetStateAction<boolean>>\n showSnackBar?: boolean\n}\n\n/** @public */\nexport const OutOfBoundsSnackBar: React.FC<OutOfBoundsSnackBarProps> = ({\n activeAccountIndex,\n desiredMaximumAccounts,\n setShowSnackBar,\n showSnackBar,\n}) => {\n return (\n <Snackbar\n anchorOrigin={{ horizontal: 'center', vertical: 'top' }}\n autoHideDuration={5000}\n onClose={() => setShowSnackBar?.(false)}\n open={showSnackBar}\n >\n <Alert severity=\"error\" onClose={() => setShowSnackBar?.(false)}>\n <AlertTitle>Maximum Accounts Error</AlertTitle>\n Your currently selected account number (\n {activeAccountIndex === undefined ? '' : activeAccountIndex + 1}\n ) cannot be greater than the desired\n Maximum Accounts (\n {desiredMaximumAccounts}\n ).\n </Alert>\n </Snackbar>\n )\n}\n","import { HelpOutline as HelpOutlineIcon } from '@mui/icons-material'\nimport type { IconButtonProps } from '@mui/material'\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n IconButton,\n Link,\n List,\n ListItem,\n Typography,\n} from '@mui/material'\nimport React, { useState } from 'react'\n\n/** @internal */\nexport const SeedPhraseIconButton: React.FC<IconButtonProps> = (props) => {\n const [open, setOpen] = useState(false)\n const onClose = () => setOpen(false)\n return (\n <>\n <IconButton onClick={() => setOpen(true)} {...props}>\n <HelpOutlineIcon fontSize=\"small\" />\n </IconButton>\n <Dialog open={open}>\n <DialogTitle>Understanding your Seed Phrase</DialogTitle>\n <DialogContent>\n <Typography>\n Your Seed Phrase should adhere to the\n {' '}\n <Link target=\"_blank\" href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\">\n bip39 specification\n </Link>\n {' '}\n and is used to generate accounts which identify your data on the XYO Network.\n </Typography>\n <List>\n <ListItem>Do not share this phrase with anyone.</ListItem>\n <ListItem>Do not save it to a public computer.</ListItem>\n <ListItem>Do not use a existing phrase from another wallet (i.e. Metamask).</ListItem>\n <ListItem>Do not use before copying it down somewhere safe.</ListItem>\n </List>\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose} variant=\"outlined\">\n OK\n </Button>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import {\n Alert, AlertTitle, Snackbar,\n} from '@mui/material'\nimport { generateMnemonic } from '@scure/bip39'\nimport { wordlist } from '@scure/bip39/wordlists/english.js'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo, useState } from 'react'\n\n/** @public */\nexport interface DefaultSeedPhraseProps extends PropsWithChildren {\n changeSeedPhrase?: (seedPhrase: string) => void\n hideDefaultSeedPhraseMessage?: boolean\n seedPhrase?: string\n}\n\n/** @public */\nexport const DefaultSeedPhrase: React.FC<DefaultSeedPhraseProps> = ({\n changeSeedPhrase, children, hideDefaultSeedPhraseMessage, seedPhrase,\n}) => {\n const [showSnackBar, setShowSnackBar] = useState(false)\n\n useMemo(() => {\n if (!seedPhrase) {\n const mnemonic = generateMnemonic(wordlist, 256)\n changeSeedPhrase?.(mnemonic)\n setShowSnackBar(true)\n }\n }, [changeSeedPhrase, seedPhrase])\n\n return (\n <>\n {hideDefaultSeedPhraseMessage\n ? null\n : (\n <Snackbar\n open={showSnackBar}\n autoHideDuration={5000}\n onClose={() => setShowSnackBar(false)}\n anchorOrigin={{ horizontal: 'center', vertical: 'top' }}\n >\n <Alert severity=\"success\">\n <AlertTitle>Default Seed Phrase Generated</AlertTitle>\n Go to application settings to save it.\n </Alert>\n </Snackbar>\n )}\n {children}\n </>\n )\n}\n","import type { DialogActionsProps, DialogProps } from '@mui/material'\nimport { Button, DialogActions } from '@mui/material'\nimport type { MouseEvent } from 'react'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../contexts/index.ts'\n\n/** @public */\nexport interface DialogActionButtonsProps extends DialogActionsProps {\n onClose?: DialogProps['onClose']\n}\n\n/** @public */\nexport const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({ onClose, ...props }) => {\n const { handleSave, setPhrase } = useSeedPhrase()\n\n const wrappedOnClose = (e: MouseEvent<HTMLElement>) => {\n // clear local copy of phrase when modal closes\n setPhrase?.('')\n onClose?.(e, 'escapeKeyDown')\n }\n\n return (\n <DialogActions {...props}>\n <Button variant=\"outlined\" onClick={wrappedOnClose}>\n Cancel\n </Button>\n <Button type=\"submit\" variant=\"contained\" onClick={handleSave}>\n Save\n </Button>\n </DialogActions>\n )\n}\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { SeedPhraseContextState } from './State.ts'\n\n/** @public */\nexport const SeedPhraseContext = createContextEx<SeedPhraseContextState>()\n","import { generateMnemonic, validateMnemonic } from '@scure/bip39'\nimport { wordlist } from '@scure/bip39/wordlists/english.js'\nimport { useResetState } from '@xylabs/react-hooks'\nimport type { PropsWithChildren } from 'react'\nimport React, {\n useCallback, useEffect, useMemo, useState,\n} from 'react'\n\nimport { SeedPhraseContext } from './Context.ts'\nimport type { SeedPhraseContextState } from './State.ts'\n\n/** @public */\nexport interface SeedPhraseProviderProps extends PropsWithChildren {\n defaultPhrase?: string\n handleChangeSeedPhrase?: (phrase: string) => void\n open?: boolean\n saveCallback?: () => void\n seedPhrase?: string\n}\n\nconst validate = (passedPhrase?: string) => {\n if (!passedPhrase) {\n return null\n }\n return validateMnemonic(passedPhrase, wordlist)\n}\n\n/** @public */\nexport const SeedPhraseProvider: React.FC<SeedPhraseProviderProps> = ({\n children,\n defaultPhrase,\n handleChangeSeedPhrase,\n saveCallback,\n seedPhrase,\n open,\n}) => {\n const [phrase, setPhrase] = useResetState<string | undefined>(defaultPhrase)\n const [overwriteWarning, setOverwriteWarning] = useState(false)\n\n useEffect(() => {\n if (seedPhrase || open) {\n setPhrase?.(seedPhrase ?? '')\n }\n }, [seedPhrase, open, setPhrase])\n\n const handleGenerate = useCallback(() => {\n const mnemonic = generateMnemonic(wordlist, 256)\n setPhrase?.(mnemonic)\n setOverwriteWarning?.(false)\n }, [])\n\n const handleCancelOverwrite = useCallback(() => {\n setOverwriteWarning(false)\n }, [setOverwriteWarning])\n\n const handleClear = useCallback(() => {\n setPhrase('')\n setOverwriteWarning(false)\n }, [setPhrase, setOverwriteWarning])\n\n const handleSave = useCallback(() => {\n if (!overwriteWarning && seedPhrase && seedPhrase !== phrase) {\n setOverwriteWarning?.(true)\n } else {\n handleChangeSeedPhrase?.(phrase ?? '')\n saveCallback?.()\n }\n }, [handleChangeSeedPhrase, overwriteWarning, phrase, saveCallback, seedPhrase])\n\n useEffect(() => {\n if (!open) {\n handleCancelOverwrite()\n }\n }, [handleCancelOverwrite, open])\n\n const validSeedPhrase = useMemo(() => validate?.(seedPhrase), [seedPhrase])\n const validPhrase = useMemo(() => validate?.(phrase), [phrase])\n\n const value: SeedPhraseContextState = useMemo(() => ({\n handleCancelOverwrite,\n handleChangeSeedPhrase,\n handleClear,\n handleGenerate,\n handleSave,\n overwriteWarning,\n phrase,\n provided: true,\n seedPhrase,\n setOverwriteWarning,\n setPhrase,\n validPhrase,\n validSeedPhrase,\n validate,\n }), [handleCancelOverwrite,\n handleChangeSeedPhrase,\n handleClear,\n handleGenerate,\n handleSave,\n overwriteWarning,\n phrase,\n seedPhrase,\n setOverwriteWarning,\n setPhrase,\n validPhrase,\n validSeedPhrase,\n validate])\n\n return (\n <SeedPhraseContext\n value={value}\n >\n {children}\n </SeedPhraseContext>\n )\n}\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { SeedPhraseContext } from './Context.ts'\n\n/** @public */\nexport const useSeedPhrase = () => useContextEx(SeedPhraseContext, 'SeedPhrase', true)\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { WalletContextState } from './State.ts'\n\n/** @public */\nexport const WalletContext = createContextEx<WalletContextState>()\n","import { useResetState } from '@xylabs/react-hooks'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\nimport { WalletContext } from './Context.ts'\nimport type { WalletContextState } from './State.ts'\n\n/** @public */\nexport interface WalletProviderProps {\n defaultActiveAccountIndex?: number\n rootWallet?: WalletInstance | null\n}\n\n/** @public */\nexport const WalletProvider: React.FC<PropsWithChildren<WalletProviderProps>> = ({\n children,\n defaultActiveAccountIndex = 0,\n rootWallet = null,\n ...props\n}) => {\n const [activeAccountIndex, setActiveAccountIndex] = useResetState(defaultActiveAccountIndex)\n\n const [activeAccount = null] = usePromise(async () => await rootWallet?.derivePath(activeAccountIndex.toString()), [activeAccountIndex, rootWallet])\n\n const value: WalletContextState = useMemo(() => ({\n activeAccount,\n activeAccountIndex,\n provided: true,\n rootWallet,\n setActiveAccountIndex,\n }), [activeAccount,\n activeAccountIndex,\n rootWallet,\n setActiveAccountIndex])\n\n return (\n <WalletContext\n value={value}\n {...props}\n >\n {children}\n </WalletContext>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { useContextEx, useProvided } from '@xylabs/react-shared'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport { WalletContext } from './Context.ts'\n\n/** @public */\nexport const useWalletContext = (required = true) => {\n return useContextEx(WalletContext, 'Wallet', required)\n}\n\n/** @public */\nexport const useWalletProvided = () => {\n return useProvided(WalletContext)\n}\n\n/** @public */\nexport const useRootWallet = (required = true): [WalletInstance | null | undefined, Error | undefined] => {\n const { rootWallet } = useWalletContext(required)\n return [rootWallet, undefined]\n}\n\n/** @public */\nexport const useIndexedWalletFromContext = (index: number, required = true): [WalletInstance | null | undefined, Error | undefined] => {\n const { rootWallet } = useWalletContext(required)\n const [wallet] = usePromise(async () => (await rootWallet?.derivePath(index.toString())) ?? rootWallet, [rootWallet, index])\n return [wallet, undefined]\n}\n\n/** @public */\nexport const useSelectedWalletAccount = (required = true): [WalletInstance | null | undefined, Error | undefined] => {\n const { activeAccountIndex } = useWalletContext(required)\n // we pass in 0 as default since we can not call the hook optionally,\n // we resolve this false result by checking whether activeAccountIndex is defined before returning it\n const [account] = useIndexedWalletFromContext(activeAccountIndex ?? 0, required)\n return activeAccountIndex === undefined && account === null ? [null, undefined] : [account, undefined]\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../../contexts/index.ts'\nimport { colorParser, InvalidPhraseTypography } from './validation-messages/index.ts'\n\n/** @public */\nexport interface NewPhraseTextFieldProps extends StandardTextFieldProps {\n children?: ReactNode\n disableColor?: boolean\n}\n\n/** @public */\nexport const NewPhraseTextField: React.FC<NewPhraseTextFieldProps> = ({\n children, disableColor, ...props\n}) => {\n const {\n phrase, setPhrase, validPhrase,\n } = useSeedPhrase()\n return (\n <FormControl\n fullWidth\n size=\"small\"\n sx={{\n display: 'flex', flexDirection: 'column', rowGap: 1,\n }}\n >\n {children}\n <TextField\n focused\n color={disableColor ? undefined : colorParser(validPhrase)}\n error={validPhrase === false}\n helperText={validPhrase === false ? <InvalidPhraseTypography /> : null}\n fullWidth\n maxRows={Number.POSITIVE_INFINITY}\n multiline\n onChange={e => setPhrase?.(e.target.value)}\n value={phrase}\n {...props}\n />\n </FormControl>\n )\n}\n","/** @public */\nexport const colorParser = (conditional?: boolean | null) => {\n switch (conditional) {\n case true: {\n return 'success'\n }\n case false: {\n return 'error'\n }\n default: {\n return\n }\n }\n}\n","import type { TypographyProps } from '@mui/material'\nimport { Link, Typography } from '@mui/material'\nimport React from 'react'\n\n/** @public */\nexport const InvalidPhraseTypography: React.FC<TypographyProps> = props => (\n <Typography variant=\"caption\" color=\"error\" {...props}>\n Invalid seed phrase. See -\n {' '}\n <Link target=\"_blank\" href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\">\n bip39 Proposal\n </Link>\n </Typography>\n)\n","import { CheckCircleOutline as CheckCircleOutlineIcon, HighlightOff as HighlightOffIcon } from '@mui/icons-material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\n/** @public */\nexport interface PhraseHeaderBoxProps extends FlexBoxProps, PropsWithChildren {\n conditional?: boolean | null\n}\n\n/** @public */\nexport const PhraseHeaderBox: React.FC<PhraseHeaderBoxProps> = ({\n children, conditional, ...props\n}) => {\n const state = useMemo(() => {\n switch (conditional) {\n case true: {\n return 'success'\n }\n case false: {\n return 'error'\n }\n default: {\n return null\n }\n }\n }, [conditional])\n\n const Icon = useMemo(() => {\n switch (state) {\n case 'success': {\n return <CheckCircleOutlineIcon fontSize=\"small\" color=\"success\" />\n }\n case 'error': {\n return <HighlightOffIcon fontSize=\"small\" color=\"error\" />\n }\n default: {\n return null\n }\n }\n }, [state])\n\n return (\n <FlexRow justifyContent=\"start\" columnGap={1} {...props}>\n {Icon}\n {children}\n </FlexRow>\n )\n}\n","import type { DialogActionsProps } from '@mui/material'\nimport { Button, DialogActions } from '@mui/material'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../../contexts/index.ts'\n\nexport interface PhraseDialogActionsProps extends DialogActionsProps {\n hideClear?: boolean\n hideGenerate?: boolean\n}\n\n/** @public */\nexport const PhraseDialogActions: React.FC<PhraseDialogActionsProps> = ({\n hideClear, hideGenerate, ...props\n}) => {\n const {\n handleClear, handleGenerate, overwriteWarning,\n } = useSeedPhrase()\n return (\n <DialogActions sx={{ justifyContent: 'center' }} {...props}>\n {hideGenerate\n ? null\n : (\n <Button disabled={overwriteWarning} variant=\"contained\" onClick={handleGenerate}>\n Generate\n </Button>\n )}\n {hideClear\n ? null\n : (\n <Button variant=\"outlined\" onClick={handleClear}>\n Clear\n </Button>\n\n )}\n </DialogActions>\n )\n}\n","import { ContentCopy } from '@mui/icons-material'\nimport type { StandardTextFieldProps } from '@mui/material'\nimport {\n Chip, FormControl, FormLabel, IconButton, TextField,\n Tooltip,\n useTheme,\n} from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React, { useMemo, useState } from 'react'\n\nimport { useSeedPhrase } from '../../../../../contexts/index.ts'\nimport { InvalidPhraseTypography, PhraseHeaderBox } from './validation-messages/index.ts'\n\n/** @public */\nexport interface SavedPhraseTextFieldProps extends StandardTextFieldProps {\n fullWidth?: boolean\n showCopyButton?: boolean\n showPhraseHeader?: boolean\n visible?: boolean\n}\n\n/** @public */\nexport const SavedPhraseTextField: React.FC<SavedPhraseTextFieldProps> = ({\n\n fullWidth, showCopyButton, showPhraseHeader, visible: visibleProp, ...props\n}) => {\n const { validSeedPhrase, seedPhrase } = useSeedPhrase()\n const theme = useTheme()\n\n const [visible, setVisible] = useState(visibleProp)\n\n useMemo(() => {\n setVisible(visibleProp)\n }, [visibleProp])\n\n const [copied, setCopied] = useState(false)\n const onCopyPhrase = async () => {\n if (seedPhrase) {\n try {\n await navigator.clipboard.writeText(seedPhrase)\n setCopied(true)\n setTimeout(() => setCopied(false), 2000)\n } catch (e) {\n console.error('Error copying resolvedSelectedAddress to clipboard', e)\n }\n }\n }\n\n return (\n <FormControl\n fullWidth={fullWidth}\n size=\"small\"\n sx={{\n display: 'flex', flexDirection: 'column', rowGap: 1,\n }}\n >\n <FlexRow gap={0.5}>\n <Chip\n label=\"Show Seed Phrase\"\n onClick={() => setVisible(!visible)}\n // Margin is set to 2px to match the Copy Button size and remove jumping during animation\n sx={{ alignSelf: 'center', my: '2px' }}\n />\n <Tooltip title={copied ? 'Copied!' : 'Copy'}>\n <IconButton\n onClick={() => void onCopyPhrase()}\n sx={{\n height: visible ? 'auto' : 0,\n opacity: visible ? 1 : 0,\n overflow: 'hidden',\n padding: visible ? theme.spacing(1) : 0,\n transition: 'all .25s ease-in-out',\n width: visible ? 'max-content' : 0,\n }}\n >\n <ContentCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </FlexRow>\n {visible && showPhraseHeader\n ? (\n <FormLabel>\n <PhraseHeaderBox conditional={validSeedPhrase}>Saved Seed Phrase</PhraseHeaderBox>\n </FormLabel>\n )\n : null}\n <TextField\n defaultValue={seedPhrase}\n disabled\n error={validSeedPhrase === false}\n helperText={validSeedPhrase === false ? <InvalidPhraseTypography /> : null}\n fullWidth\n maxRows={Number.POSITIVE_INFINITY}\n multiline\n slotProps={{\n input: {\n style: {\n height: visible ? 'auto' : '0',\n overflow: 'hidden',\n opacity: visible ? 1 : 0,\n padding: visible ? theme.spacing(1) : 0,\n transition: 'all .25s ease-in-out',\n },\n },\n }}\n {...props}\n />\n\n </FormControl>\n )\n}\n","import { Alert, Button } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../contexts/index.ts'\n\n/** @public */\nexport const OverwriteWarning = () => {\n const { handleCancelOverwrite, handleSave } = useSeedPhrase()\n return (\n <Alert\n variant=\"outlined\"\n severity=\"warning\"\n action={(\n <FlexRow sx={{ columnGap: 1 }}>\n <Button variant=\"outlined\" color=\"inherit\" size=\"small\" onClick={handleSave}>\n Overwrite\n </Button>\n <Button variant=\"outlined\" color=\"inherit\" size=\"small\" onClick={handleCancelOverwrite}>\n Cancel\n </Button>\n </FlexRow>\n )}\n >\n Are you sure you want to overwrite existing seed phrase? This action cannot be undone.\n </Alert>\n )\n}\n","import type { DialogProps } from '@mui/material'\nimport {\n Dialog, DialogContent, DialogTitle, FormLabel,\n} from '@mui/material'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { SeedPhraseProvider, useSeedPhrase } from '../../../contexts/index.ts'\nimport { SeedPhraseIconButton } from '../_shared/index.ts'\nimport {\n DialogActionButtons,\n NewPhraseTextField,\n OverwriteWarning,\n PhraseDialogActions,\n PhraseHeaderBox,\n SavedPhraseTextField,\n} from './components/index.ts'\n\n/** @public */\nexport interface SeedPhraseDialogProps extends DialogProps {\n changeSeedPhrase?: (value: string) => void\n dialogTitle?: ReactNode\n seedPhrase?: string\n seedPhraseTextFieldTitle?: ReactNode\n showCopyButton?: boolean\n}\n\n/** @public */\nexport const SeedPhraseDialog: React.FC<SeedPhraseDialogProps> = ({\n changeSeedPhrase, dialogTitle = 'Update Your Seed Phrase', seedPhrase, seedPhraseTextFieldTitle = 'New Seed Phrase', ...props\n}) => {\n return (\n <SeedPhraseProvider\n seedPhrase={seedPhrase}\n handleChangeSeedPhrase={changeSeedPhrase}\n open={props.open}\n saveCallback={() => props.onClose?.({}, 'escapeKeyDown')}\n >\n <SeedPhraseDialogInner dialogTitle={dialogTitle} seedPhraseTextFieldTitle={seedPhraseTextFieldTitle} {...props} />\n </SeedPhraseProvider>\n )\n}\n\n/** @public */\nexport const SeedPhraseDialogInner: React.FC<SeedPhraseDialogProps> = ({\n dialogTitle, seedPhraseTextFieldTitle, showCopyButton, ...props\n}) => {\n const {\n overwriteWarning, seedPhrase, validPhrase,\n } = useSeedPhrase()\n\n return (\n <Dialog aria-labelledby=\"alert-dialog-title\" aria-describedby=\"alert-dialog-description\" fullWidth maxWidth=\"sm\" {...props}>\n <DialogTitle\n id=\"alert-dialog-title\"\n sx={{\n alignItems: 'center', display: 'inline-flex', flexDirection: 'row',\n }}\n >\n {dialogTitle}\n <SeedPhraseIconButton />\n </DialogTitle>\n <DialogContent sx={{\n display: 'flex', flexDirection: 'column', rowGap: 2,\n }}\n >\n\n <NewPhraseTextField>\n <FormLabel>\n <PhraseHeaderBox conditional={validPhrase}>{seedPhraseTextFieldTitle}</PhraseHeaderBox>\n </FormLabel>\n </NewPhraseTextField>\n <PhraseDialogActions />\n {seedPhrase\n ? <SavedPhraseTextField showCopyButton={showCopyButton} />\n : null}\n {overwriteWarning\n ? <OverwriteWarning />\n : null}\n </DialogContent>\n <DialogActionButtons onClose={props.onClose} />\n </Dialog>\n )\n}\n","import { Cancel as CancelIcon, RadioButtonChecked as RadioButtonCheckedIcon } from '@mui/icons-material'\nimport type { TableRowProps } from '@mui/material'\nimport {\n Button, ButtonGroup, TableCell, TableRow,\n} from '@mui/material'\nimport React, { useState } from 'react'\n\nimport { SeedPhraseIconButton } from '../_shared/index.ts'\nimport { SeedPhraseDialog } from '../dialog/index.ts'\n\n/** @public */\nexport interface SeedPhraseTableRowProps extends TableRowProps {\n changeSeedPhrase?: (seedPhrase: string) => void\n seedPhrase?: string\n}\n\n/** @public */\nexport const SeedPhraseTableRow: React.FC<SeedPhraseTableRowProps> = ({\n changeSeedPhrase, seedPhrase, ...props\n}) => {\n const [open, setOpen] = useState(false)\n\n const handleOpen = () => {\n setOpen(true)\n }\n return (\n <TableRow {...props}>\n <TableCell>\n Seed Phrase\n {' '}\n <SeedPhraseIconButton />\n </TableCell>\n <TableCell align=\"center\">\n {seedPhrase\n ? <RadioButtonCheckedIcon color=\"success\" />\n : <CancelIcon color=\"error\" />}\n </TableCell>\n <TableCell>\n <SeedPhraseDialog changeSeedPhrase={changeSeedPhrase} open={open} onClose={() => setOpen(false)} seedPhrase={seedPhrase} />\n <ButtonGroup fullWidth>\n <Button variant=\"contained\" size=\"small\" onClick={handleOpen}>\n Update\n </Button>\n </ButtonGroup>\n </TableCell>\n </TableRow>\n )\n}\n","import { EthAddressWrapper } from '@xylabs/eth-address'\nimport { EthAccountButton } from '@xylabs/react-crypto'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { NumberStatus } from '@xylabs/react-number-status'\nimport { useNetwork } from '@xyo-network/react-network'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React from 'react'\n\nimport { useAccount } from '../../hooks/index.ts'\n\n/** @public */\nexport interface WalletAccountDetailsProps extends FlexBoxProps {\n account?: WalletInstance\n exploreUrl?: string\n}\n\n/** @public */\nexport const WalletAccountDetails: React.FC<WalletAccountDetailsProps> = ({\n exploreUrl = 'https://explore.xyo.network', account, ...props\n}) => {\n const [accountToUse] = useAccount({ account })\n const { network } = useNetwork()\n const exploreAddressUrl = `${exploreUrl}/recent?account=${accountToUse?.address}&network=${network?.name ?? 'main'}`\n\n return (\n <FlexCol {...props}>\n <EthAccountButton address={EthAddressWrapper.fromString(accountToUse?.address)} />\n <FlexRow gap={1}>\n <NumberStatus rounded title=\"Tokens\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.tokens`} target=\"_blank\" />\n <NumberStatus rounded title=\"NFTs\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.nfts`} target=\"_blank\" />\n <NumberStatus rounded title=\"Signatures\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.signatures`} target=\"_blank\" />\n <NumberStatus rounded title=\"Signins\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.signins`} target=\"_blank\" />\n </FlexRow>\n </FlexCol>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport { useState } from 'react'\n\nimport {\n useRootWallet, useWalletContext, useWalletProvided,\n} from '../contexts/index.ts'\n\n/** @public */\nexport interface AccountHookParams {\n account?: AccountInstance\n index?: number\n required?: boolean\n wallet?: WalletInstance\n}\n\n/** @public */\nexport const useAccount = ({\n wallet, account, index, required = false,\n}: AccountHookParams = {}): [\n AccountInstance | null | undefined,\n Error | undefined,\n] => {\n const walletContextProvided = useWalletProvided()\n const [validationError, setValidationError] = useState<Error>()\n if (wallet && account && !validationError) {\n setValidationError(new Error('useAccount can not have both a wallet and an account in the parameters'))\n }\n\n if (index && account && !validationError) {\n setValidationError(new Error('useAccount can not have both a index and an account in the parameters'))\n }\n\n const [error, setError] = useState<Error>()\n const [rootWallet] = useRootWallet(!wallet && required)\n const { activeAccountIndex } = useWalletContext(false)\n const [activeAccount] = usePromise(async () => {\n try {\n if (!validationError) {\n if (wallet) {\n const path = `${index ?? 0}'\\0`\n return await wallet?.derivePath?.(path)\n } else if (rootWallet) {\n const path = `${index ?? activeAccountIndex ?? 0}'\\/0`\n return await rootWallet?.derivePath?.(path)\n }\n }\n } catch (ex) {\n const error = ex as Error\n console.error(error.message)\n setError(error)\n }\n }, [index, wallet, rootWallet, activeAccountIndex, validationError])\n if (validationError && !error) {\n console.error(validationError.message)\n setError(validationError)\n }\n\n return [\n error\n ? undefined\n : (account ?? activeAccount ?? walletContextProvided)\n ? null\n : undefined,\n error,\n ]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { HDWallet } from '@xyo-network/wallet'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport { useState } from 'react'\n\nimport { useSelectedWalletAccount, useWalletContext } from '../contexts/index.ts'\n\n/** @public */\nexport interface WalletHookParams {\n mnemonic?: string\n path?: string\n required?: boolean\n seed?: ArrayBufferLike | string\n wallet?: WalletInstance | null\n}\n\n/** @public */\nexport const useWallet = ({\n mnemonic, wallet, path, required = false, seed,\n}: WalletHookParams = {}): [\n WalletInstance | null | undefined,\n Error | undefined,\n] => {\n const walletContextProvided = useWalletContext(false)\n const [error, setError] = useState<Error>()\n const [contextAccount] = useSelectedWalletAccount(!wallet && required)\n const [activeAccount] = usePromise(async () => {\n try {\n const newAccount = await (() => {\n if (wallet) {\n return wallet\n } else if (mnemonic) {\n return HDWallet.fromPhrase(mnemonic)\n } else if (seed) {\n return HDWallet.fromSeed(seed)\n }\n return contextAccount\n })()\n\n return path ? newAccount?.derivePath?.(path) : (newAccount ?? wallet)\n } catch (ex) {\n setError(ex as Error)\n }\n }, [mnemonic, contextAccount, seed, path, wallet])\n return [activeAccount ?? (walletContextProvided ? null : activeAccount), error]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport { useWalletContext } from '../contexts/index.ts'\nimport { useWallet } from './useWallet.ts'\n\n/** @public */\nexport interface WalletsHookParams {\n paths: string[]\n wallet?: WalletInstance | null\n}\n\n/** @public */\nexport const useWallets = ({ wallet, paths }: WalletsHookParams): [WalletInstance[] | null | undefined, Error | undefined] => {\n const walletContextProvided = useWalletContext(false)\n const [foundWallet] = useWallet({ wallet })\n const [wallets, error] = usePromise(\n async () => (foundWallet ? await Promise.all(paths.map(path => foundWallet.derivePath(path))) : undefined),\n [foundWallet, paths],\n )\n return [wallets ?? (walletContextProvided ? null : wallets), error]\n}\n","import type { UsePromiseState } from '@xylabs/react-promise'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { HDWallet } from '@xyo-network/wallet'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport { Mutex } from 'async-mutex'\n\nlet globalWrapperWallet: WalletInstance | undefined\nconst globalWrapperWalletMutex = new Mutex()\n\n/** @public */\nexport const useWrapperAccount = (\n account?: AccountInstance | null,\n): [AccountInstance | null | undefined, Error | undefined, UsePromiseState | undefined] => {\n return usePromise(async () => {\n return await globalWrapperWalletMutex.runExclusive(async () => {\n // if we are expecting to receive a wallet or did receive on, return the override account\n if (account !== undefined) {\n return account\n }\n\n if (globalWrapperWallet) {\n return globalWrapperWallet\n }\n\n try {\n globalWrapperWallet = await HDWallet.random()\n console.log(`Global Wrapper Wallet Creation Success: ${globalWrapperWallet.address}`)\n } catch (ex) {\n const error = ex as Error\n console.error(`Global Wrapper Wallet Creation Failed: ${error.message}`)\n }\n return globalWrapperWallet\n })\n }, [account])\n}\n","import type { SelectProps } from '@mui/material'\nimport { CircularProgress, MenuItem } from '@mui/material'\nimport { SelectEx } from '@xylabs/react-select'\nimport type { AddressRenderRowBoxProps } from '@xyo-network/react-address-render'\nimport { AddressRenderRowBox } from '@xyo-network/react-address-render'\nimport React from 'react'\n\nimport { useWalletContext } from '../../contexts/index.ts'\nimport { useWallet } from '../../hooks/index.ts'\nimport { RenderedAccountMenuItem } from './RenderedMenuItem.tsx'\n\ntype SharedAddressRenderRowBoxProps = Pick<AddressRenderRowBoxProps, 'iconOnly' | 'iconSize' | 'icons' | 'showFavorite'>\n\n/** @public */\nexport type WalletAccountSelectProps = SharedAddressRenderRowBoxProps\n & Omit<SelectProps<number>, 'variant'>\n & Partial<SelectProps<number>> & {\n addressNames?: Record<string, string | undefined>\n maxAccounts?: number\n }\n\nconst arrayRange = (length: number, start = 0) => {\n return [...Array.from({ length }).keys()].map(x => x + start)\n}\n\n/** @public */\nexport const WalletAccountSelect: React.FC<WalletAccountSelectProps> = ({\n addressNames,\n iconOnly,\n iconSize = 24,\n icons,\n maxAccounts = 1,\n showFavorite = false,\n size,\n variant = 'outlined',\n ...props\n}) => {\n const {\n activeAccountIndex, setActiveAccountIndex, rootWallet,\n } = useWalletContext()\n const disabled = !rootWallet || activeAccountIndex === undefined\n\n return (\n <>\n {rootWallet\n ? (\n <SelectEx\n margin=\"dense\"\n disabled={disabled}\n renderValue={(selectedAccountIndex) => {\n return (\n <RenderedAccountMenuItem\n addressNames={addressNames}\n iconOnly={iconOnly}\n iconSize={iconSize}\n icons={icons}\n rootWallet={rootWallet}\n selectedAccountIndex={selectedAccountIndex}\n showFavorite={showFavorite}\n />\n )\n }}\n value={activeAccountIndex === undefined ? '' : activeAccountIndex}\n onChange={event => setActiveAccountIndex?.(Number.parseInt(`${event.target.value}`))}\n size={size}\n variant={variant}\n {...props}\n >\n {rootWallet && arrayRange(maxAccounts).map((index) => {\n const [account] = useWallet({ path: index.toString(), wallet: rootWallet })\n const customName = account ? addressNames?.[account.address] : undefined\n const favorite = !!account && account.address in (addressNames ?? {})\n return (\n <MenuItem\n key={account?.address}\n value={index}\n sx={{\n minHeight: 0, paddingBottom: 0, paddingTop: 0,\n }}\n >\n <AddressRenderRowBox\n disableSharedRef={true}\n flexGrow={1}\n address={account?.address}\n favorite={favorite}\n iconOnly={iconOnly}\n iconSize={iconSize}\n icons={icons}\n name={customName}\n showFavorite={showFavorite}\n />\n </MenuItem>\n )\n })}\n </SelectEx>\n )\n : <CircularProgress size={24} />}\n </>\n )\n}\n","import { MenuItem, type MenuItemProps } from '@mui/material'\nimport { AddressRenderRowBox } from '@xyo-network/react-address-render'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React from 'react'\n\nimport { useWallet } from '../../hooks/index.ts'\n\n/** @public */\nexport interface RenderedAccountMenuItemProps extends MenuItemProps {\n addressNames?: Record<string, string | undefined>\n iconOnly?: boolean\n iconSize?: number\n icons?: boolean\n rootWallet: WalletInstance\n selectedAccountIndex?: number\n showFavorite?: boolean\n}\n\n/** @public */\nexport const RenderedAccountMenuItem: React.FC<RenderedAccountMenuItemProps> = ({\n selectedAccountIndex,\n rootWallet,\n addressNames,\n iconOnly,\n iconSize,\n icons,\n showFavorite,\n}) => {\n const [selectedAccount] = useWallet({ path: selectedAccountIndex?.toString(), wallet: rootWallet })\n const customName = selectedAccount ? addressNames?.[selectedAccount.address] : undefined\n const favorite = !!selectedAccount && selectedAccount.address in (addressNames ?? {})\n return (\n <MenuItem\n value={selectedAccountIndex}\n sx={{\n minHeight: 0, paddingBottom: 0, paddingTop: 0,\n }}\n >\n <AddressRenderRowBox\n disableSharedRef={true}\n flexGrow={1}\n address={selectedAccount?.address}\n iconOnly={iconOnly}\n iconSize={iconSize}\n icons={icons}\n name={customName}\n favorite={favorite}\n showFavorite={showFavorite}\n />\n </MenuItem>\n )\n}\n","import type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { WalletAccountSelect } from './Select.tsx'\n\n/** @public */\nexport interface WalletAccountSelectBarProps extends FlexBoxProps {\n addressNames?: Record<string, string | undefined>\n iconOnly?: boolean\n iconSize?: number\n icons?: boolean\n maxAccounts?: number\n showFavorite?: boolean\n size?: 'small' | 'medium'\n}\n\n/** @public */\nexport const WalletAccountSelectBar: React.FC<WalletAccountSelectBarProps> = ({\n addressNames,\n iconOnly,\n iconSize,\n icons,\n maxAccounts = 1,\n showFavorite = false,\n size = 'small',\n ...props\n}) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <WalletAccountSelect\n addressNames={addressNames}\n fullWidth\n showFavorite={showFavorite}\n iconSize={iconSize}\n iconOnly={iconOnly}\n icons={icons}\n maxAccounts={maxAccounts}\n size={size ?? 'small'}\n variant=\"outlined\"\n />\n </FlexCol>\n )\n}\n"],"mappings":";;;;AACA,SACEA,aAAaC,WAAWC,UAAUC,kBAC7B;AACP,SAASC,gBAAgB;AACzB,OAAOC,UAASC,gBAAgB;;;ACJhC,SACEC,OAAOC,YAAYC,gBACd;AAEP,OAAOC,WAAW;AAWX,IAAMC,sBAA0D,wBAAC,EACtEC,oBACAC,wBACAC,iBACAC,aAAY,MACb;AACC,SACE,sBAAA,cAACC,UAAAA;IACCC,cAAc;MAAEC,YAAY;MAAUC,UAAU;IAAM;IACtDC,kBAAkB;IAClBC,SAAS,6BAAMP,kBAAkB,KAAA,GAAxB;IACTQ,MAAMP;KAEN,sBAAA,cAACQ,OAAAA;IAAMC,UAAS;IAAQH,SAAS,6BAAMP,kBAAkB,KAAA,GAAxB;KAC/B,sBAAA,cAACW,YAAAA,MAAW,wBAAA,GAAmC,4CAE9Cb,uBAAuBc,SAAY,KAAKd,qBAAqB,GAAE,2DAG/DC,wBAAuB,IAAA,CAAA;AAKhC,GAxBuE;;;ADChE,IAAMc,sBAAqD,wBAAC,EACjEC,oBAAoBC,mBAAmBC,YAAW,MACnD;AACC,QAAM,CAACC,wBAAwBC,yBAAAA,IAA6BC,SAAAA;AAC5D,QAAM,CAACC,cAAcC,eAAAA,IAAmBF,SAAS,KAAA;AAEjD,QAAMG,0BAA0B,wBAACC,WAAAA;AAC/B,QAAIP,gBAAgBQ,UAAaV,uBAAuBU,QAAW;AACjE,cAAQD,QAAAA;QACN,KAAK,YAAY;AACf,gBAAMN,0BAAyBD,cAAc;AAC7C,gBAAMS,uBAA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rB;IAAW,CAAA;AACzE,UAAMsB,aAAaL,UAAU5B,eAAe4B,QAAQM,OAAO,IAAIpB;AAC/D,UAAMqB,WAAW,CAAC,CAACP,WAAWA,QAAQM,YAAYlC,gBAAgB,CAAC;AACnE,WACE,gBAAAe,QAAA,cAACqB,WAAAA;MACCC,KAAKT,SAASM;MACdb,OAAOM;MACPW,IAAI;QACFC,WAAW;QAAGC,eAAe;QAAGC,YAAY;MAC9C;OAEA,gBAAA1B,QAAA,cAAC2B,sBAAAA;MACCC,kBAAkB;MAClBC,UAAU;MACVV,SAASN,SAASM;MAClBC;MACAlC;MACAC;MACAC;MACA0C,MAAMZ;MACN5B;;EAIR,CAAA,CAAA,IAGJ,gBAAAU,QAAA,cAAC+B,kBAAAA;IAAiBxC,MAAM;;AAGlC,GAzEuE;;;AEzBvE,SAASyC,WAAAA,gBAAe;AACxB,OAAOC,aAAW;AAgBX,IAAMC,yBAAgE,wBAAC,EAC5EC,cACAC,UACAC,UACAC,OACAC,cAAc,GACdC,eAAe,OACfC,OAAO,SACP,GAAGC,MAAAA,MACJ;AACC,SACE,gBAAAC,QAAA,cAACC,UAAAA;IAAQC,YAAW;IAAW,GAAGH;KAChC,gBAAAC,QAAA,cAACG,qBAAAA;IACCX;IACAY,WAAAA;IACAP;IACAH;IACAD;IACAE;IACAC;IACAE,MAAMA,QAAQ;IACdO,SAAQ;;AAIhB,GAzB6E;","names":["ButtonGroup","TableCell","TableRow","Typography","ButtonEx","React","useState","Alert","AlertTitle","Snackbar","React","OutOfBoundsSnackBar","activeAccountIndex","desiredMaximumAccounts","setShowSnackBar","showSnackBar","Snackbar","anchorOrigin","horizontal","vertical","autoHideDuration","onClose","open","Alert","severity","AlertTitle","undefined","MaxAccountsTableRow","activeAccountIndex","changeMaxAccounts","maxAccounts","desiredMaximumAccounts","setDesiredMaximumAccounts","useState","showSnackBar","setShowSnackBar","handleChangeMaxAccounts","change","undefined","validMaximumAccounts","maxAccountsWithinRange","console","error","Error","React","TableRow","TableCell","align","Typography","variant","ButtonGroup","ButtonEx","onClick","size","OutOfBoundsSnackBar","HelpOutline","HelpOutlineIcon","Button","Dialog","DialogActions","DialogContent","DialogTitle","IconButton","Link","List","ListItem","Typography","React","useState","SeedPhraseIconButton","props","open","setOpen","useState","onClose","React","IconButton","onClick","HelpOutlineIcon","fontSize","Dialog","DialogTitle","DialogContent","Typography","Link","target","href","List","ListItem","DialogActions","Button","variant","Alert","AlertTitle","Snackbar","generateMnemonic","wordlist","React","useMemo","useState","DefaultSeedPhrase","changeSeedPhrase","children","hideDefaultSeedPhraseMessage","seedPhrase","showSnackBar","setShowSnackBar","useState","useMemo","mnemonic","generateMnemonic","wordlist","React","Snackbar","open","autoHideDuration","onClose","anchorOrigin","horizontal","vertical","Alert","severity","AlertTitle","Button","DialogActions","React","createContextEx","SeedPhraseContext","generateMnemonic","validateMnemonic","wordlist","useResetState","React","useCallback","useEffect","useMemo","useState","validate","passedPhrase","validateMnemonic","wordlist","SeedPhraseProvider","children","defaultPhrase","handleChangeSeedPhrase","saveCallback","seedPhrase","open","phrase","setPhrase","useResetState","overwriteWarning","setOverwriteWarning","useState","useEffect","handleGenerate","useCallback","mnemonic","generateMnemonic","handleCancelOverwrite","handleClear","handleSave","validSeedPhrase","useMemo","validPhrase","value","provided","React","SeedPhraseContext","useContextEx","useSeedPhrase","useContextEx","SeedPhraseContext","createContextEx","WalletContext","useResetState","usePromise","React","useMemo","WalletProvider","children","defaultActiveAccountIndex","rootWallet","props","activeAccountIndex","setActiveAccountIndex","useResetState","activeAccount","usePromise","derivePath","toString","value","useMemo","provided","React","WalletContext","usePromise","useContextEx","useProvided","useWalletContext","required","useContextEx","WalletContext","useWalletProvided","useProvided","useRootWallet","rootWallet","undefined","useIndexedWalletFromContext","index","wallet","usePromise","derivePath","toString","useSelectedWalletAccount","activeAccountIndex","account","DialogActionButtons","onClose","props","handleSave","setPhrase","useSeedPhrase","wrappedOnClose","e","React","DialogActions","Button","variant","onClick","type","FormControl","TextField","React","colorParser","conditional","Link","Typography","React","InvalidPhraseTypography","props","React","Typography","variant","color","Link","target","href","CheckCircleOutline","CheckCircleOutlineIcon","HighlightOff","HighlightOffIcon","FlexRow","React","useMemo","PhraseHeaderBox","children","conditional","props","state","useMemo","Icon","React","CheckCircleOutlineIcon","fontSize","color","HighlightOffIcon","FlexRow","justifyContent","columnGap","NewPhraseTextField","children","disableColor","props","phrase","setPhrase","validPhrase","useSeedPhrase","React","FormControl","fullWidth","size","sx","display","flexDirection","rowGap","TextField","focused","color","undefined","colorParser","error","helperText","InvalidPhraseTypography","maxRows","Number","POSITIVE_INFINITY","multiline","onChange","e","target","value","Button","DialogActions","React","PhraseDialogActions","hideClear","hideGenerate","props","handleClear","handleGenerate","overwriteWarning","useSeedPhrase","React","DialogActions","sx","justifyContent","Button","disabled","variant","onClick","ContentCopy","Chip","FormControl","FormLabel","IconButton","TextField","Tooltip","useTheme","FlexRow","React","useMemo","useState","SavedPhraseTextField","fullWidth","showCopyButton","showPhraseHeader","visible","visibleProp","props","validSeedPhrase","seedPhrase","useSeedPhrase","theme","useTheme","setVisible","useState","useMemo","copied","setCopied","onCopyPhrase","navigator","clipboard","writeText","setTimeout","e","console","error","React","FormControl","size","sx","display","flexDirection","rowGap","FlexRow","gap","Chip","label","onClick","alignSelf","my","Tooltip","title","IconButton","height","opacity","overflow","padding","spacing","transition","width","ContentCopy","fontSize","FormLabel","PhraseHeaderBox","conditional","TextField","defaultValue","disabled","helperText","InvalidPhraseTypography","maxRows","Number","POSITIVE_INFINITY","multiline","slotProps","input","style","Alert","Button","FlexRow","React","OverwriteWarning","handleCancelOverwrite","handleSave","useSeedPhrase","React","Alert","variant","severity","action","FlexRow","sx","columnGap","Button","color","size","onClick","Dialog","DialogContent","DialogTitle","FormLabel","React","SeedPhraseDialog","changeSeedPhrase","dialogTitle","seedPhrase","seedPhraseTextFieldTitle","props","React","SeedPhraseProvider","handleChangeSeedPhrase","open","saveCallback","onClose","SeedPhraseDialogInner","showCopyButton","overwriteWarning","validPhrase","useSeedPhrase","Dialog","aria-labelledby","aria-describedby","fullWidth","maxWidth","DialogTitle","id","sx","alignItems","display","flexDirection","SeedPhraseIconButton","DialogContent","rowGap","NewPhraseTextField","FormLabel","PhraseHeaderBox","conditional","PhraseDialogActions","SavedPhraseTextField","OverwriteWarning","DialogActionButtons","Cancel","CancelIcon","RadioButtonChecked","RadioButtonCheckedIcon","Button","ButtonGroup","TableCell","TableRow","React","useState","SeedPhraseTableRow","changeSeedPhrase","seedPhrase","props","open","setOpen","useState","handleOpen","React","TableRow","TableCell","SeedPhraseIconButton","align","RadioButtonCheckedIcon","color","CancelIcon","SeedPhraseDialog","onClose","ButtonGroup","fullWidth","Button","variant","size","onClick","EthAddressWrapper","EthAccountButton","FlexCol","FlexRow","NumberStatus","useNetwork","React","usePromise","useState","useAccount","wallet","account","index","required","walletContextProvided","useWalletProvided","validationError","setValidationError","useState","Error","error","setError","rootWallet","useRootWallet","activeAccountIndex","useWalletContext","activeAccount","usePromise","path","derivePath","ex","console","message","undefined","usePromise","HDWallet","useState","useWallet","mnemonic","wallet","path","required","seed","walletContextProvided","useWalletContext","error","setError","useState","contextAccount","useSelectedWalletAccount","activeAccount","usePromise","newAccount","HDWallet","fromPhrase","fromSeed","derivePath","ex","usePromise","useWallets","wallet","paths","walletContextProvided","useWalletContext","foundWallet","useWallet","wallets","error","usePromise","Promise","all","map","path","derivePath","undefined","usePromise","HDWallet","Mutex","globalWrapperWallet","globalWrapperWalletMutex","Mutex","useWrapperAccount","account","usePromise","runExclusive","undefined","HDWallet","random","console","log","address","ex","error","message","WalletAccountDetails","exploreUrl","account","props","accountToUse","useAccount","network","useNetwork","exploreAddressUrl","address","name","React","FlexCol","EthAccountButton","EthAddressWrapper","fromString","FlexRow","gap","NumberStatus","rounded","title","value","to","target","CircularProgress","MenuItem","SelectEx","AddressRenderRowBox","React","MenuItem","AddressRenderRowBox","React","RenderedAccountMenuItem","selectedAccountIndex","rootWallet","addressNames","iconOnly","iconSize","icons","showFavorite","selectedAccount","useWallet","path","toString","wallet","customName","address","undefined","favorite","React","MenuItem","value","sx","minHeight","paddingBottom","paddingTop","AddressRenderRowBox","disableSharedRef","flexGrow","name","arrayRange","length","start","Array","from","keys","map","x","WalletAccountSelect","addressNames","iconOnly","iconSize","icons","maxAccounts","showFavorite","size","variant","props","activeAccountIndex","setActiveAccountIndex","rootWallet","useWalletContext","disabled","undefined","React","SelectEx","margin","renderValue","selectedAccountIndex","RenderedAccountMenuItem","value","onChange","event","Number","parseInt","target","index","account","useWallet","path","toString","wallet","customName","address","favorite","MenuItem","key","sx","minHeight","paddingBottom","paddingTop","AddressRenderRowBox","disableSharedRef","flexGrow","name","CircularProgress","FlexCol","React","WalletAccountSelectBar","addressNames","iconOnly","iconSize","icons","maxAccounts","showFavorite","size","props","React","FlexCol","alignItems","WalletAccountSelect","fullWidth","variant"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/MaxAccounts/MaxAccountsTableRow.tsx","../../src/components/MaxAccounts/OutOfBoundsSnackBar.tsx","../../src/components/SeedPhrase/_shared/SeedPhraseIconButton.tsx","../../src/components/SeedPhrase/DefaultSeedPhrase.tsx","../../src/components/SeedPhrase/dialog/components/DialogActionButtons.tsx","../../src/contexts/SeedPhrase/Context.ts","../../src/contexts/SeedPhrase/Provider.tsx","../../src/contexts/SeedPhrase/use.ts","../../src/contexts/Wallet/Context.ts","../../src/contexts/Wallet/Provider.tsx","../../src/contexts/Wallet/use.ts","../../src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx","../../src/components/SeedPhrase/dialog/components/fields/validation-messages/colorParser.ts","../../src/components/SeedPhrase/dialog/components/fields/validation-messages/InvalidPhrase.tsx","../../src/components/SeedPhrase/dialog/components/fields/validation-messages/PhraseHeaderBox.tsx","../../src/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.tsx","../../src/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.tsx","../../src/components/SeedPhrase/dialog/components/OverwriteWarning.tsx","../../src/components/SeedPhrase/dialog/SeedPhraseDialog.tsx","../../src/components/SeedPhrase/settings/SeedPhraseTableRow.tsx","../../src/components/WalletAccountDetails/WalletAccountDetails.tsx","../../src/hooks/useAccount.ts","../../src/hooks/useWallet.ts","../../src/hooks/useWallets.ts","../../src/hooks/useWrapperAccount.ts","../../src/components/WalletAccountSelect/Select.tsx","../../src/components/WalletAccountSelect/RenderedMenuItem.tsx","../../src/components/WalletAccountSelect/SelectBar.tsx"],"sourcesContent":["import type { TableRowProps } from '@mui/material'\nimport {\n ButtonGroup, TableCell, TableRow, Typography,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport React, { useState } from 'react'\n\nimport { OutOfBoundsSnackBar } from './OutOfBoundsSnackBar.tsx'\n\n/** @public */\nexport interface MaxAccountsTableRow extends TableRowProps {\n activeAccountIndex?: number\n changeMaxAccounts?: (maxAccounts: number) => void\n maxAccounts?: number\n}\n\n/** @public */\nexport const MaxAccountsTableRow: React.FC<MaxAccountsTableRow> = ({\n activeAccountIndex, changeMaxAccounts, maxAccounts,\n}) => {\n const [desiredMaximumAccounts, setDesiredMaximumAccounts] = useState<number | undefined>()\n const [showSnackBar, setShowSnackBar] = useState(false)\n\n const handleChangeMaxAccounts = (change: 'increase' | 'decrease') => {\n if (maxAccounts !== undefined && activeAccountIndex !== undefined) {\n switch (change) {\n case 'decrease': {\n const desiredMaximumAccounts = maxAccounts - 1\n const validMaximumAccounts = desiredMaximumAccounts > 0\n const maxAccountsWithinRange = activeAccountIndex + 1 <= desiredMaximumAccounts\n if (validMaximumAccounts && maxAccountsWithinRange) {\n changeMaxAccounts?.(desiredMaximumAccounts)\n }\n if (!maxAccountsWithinRange) setShowSnackBar(true)\n setDesiredMaximumAccounts(desiredMaximumAccounts)\n return\n }\n case 'increase': {\n changeMaxAccounts?.(maxAccounts + 1)\n return\n }\n default: {\n console.error(change, 'is not a recognized value')\n }\n }\n } else {\n throw new Error('Max Accounts is unset and needs a default')\n }\n }\n\n return (\n <TableRow>\n <TableCell>Maximum Accounts</TableCell>\n <TableCell align=\"center\">\n <Typography variant=\"caption\">{maxAccounts}</Typography>\n </TableCell>\n <TableCell align=\"center\">\n <ButtonGroup>\n <ButtonEx onClick={() => handleChangeMaxAccounts('decrease')} variant=\"contained\" size=\"small\">\n -\n </ButtonEx>\n <ButtonEx onClick={() => handleChangeMaxAccounts('increase')} variant=\"contained\" size=\"small\">\n +\n </ButtonEx>\n </ButtonGroup>\n <OutOfBoundsSnackBar\n desiredMaximumAccounts={desiredMaximumAccounts}\n activeAccountIndex={activeAccountIndex}\n setShowSnackBar={setShowSnackBar}\n showSnackBar={showSnackBar}\n />\n </TableCell>\n </TableRow>\n )\n}\n","import type { SnackbarProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Snackbar,\n} from '@mui/material'\nimport type { Dispatch, SetStateAction } from 'react'\nimport React from 'react'\n\n/** @public */\nexport interface OutOfBoundsSnackBarProps extends SnackbarProps {\n activeAccountIndex?: number\n desiredMaximumAccounts?: number\n setShowSnackBar?: Dispatch<SetStateAction<boolean>>\n showSnackBar?: boolean\n}\n\n/** @public */\nexport const OutOfBoundsSnackBar: React.FC<OutOfBoundsSnackBarProps> = ({\n activeAccountIndex,\n desiredMaximumAccounts,\n setShowSnackBar,\n showSnackBar,\n}) => {\n return (\n <Snackbar\n anchorOrigin={{ horizontal: 'center', vertical: 'top' }}\n autoHideDuration={5000}\n onClose={() => setShowSnackBar?.(false)}\n open={showSnackBar}\n >\n <Alert severity=\"error\" onClose={() => setShowSnackBar?.(false)}>\n <AlertTitle>Maximum Accounts Error</AlertTitle>\n Your currently selected account number (\n {activeAccountIndex === undefined ? '' : activeAccountIndex + 1}\n ) cannot be greater than the desired\n Maximum Accounts (\n {desiredMaximumAccounts}\n ).\n </Alert>\n </Snackbar>\n )\n}\n","import { HelpOutline as HelpOutlineIcon } from '@mui/icons-material'\nimport type { IconButtonProps } from '@mui/material'\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n IconButton,\n Link,\n List,\n ListItem,\n Typography,\n} from '@mui/material'\nimport React, { useState } from 'react'\n\n/** @internal */\nexport const SeedPhraseIconButton: React.FC<IconButtonProps> = (props) => {\n const [open, setOpen] = useState(false)\n const onClose = () => setOpen(false)\n return (\n <>\n <IconButton onClick={() => setOpen(true)} {...props}>\n <HelpOutlineIcon fontSize=\"small\" />\n </IconButton>\n <Dialog open={open}>\n <DialogTitle>Understanding your Seed Phrase</DialogTitle>\n <DialogContent>\n <Typography>\n Your Seed Phrase should adhere to the\n {' '}\n <Link target=\"_blank\" href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\">\n bip39 specification\n </Link>\n {' '}\n and is used to generate accounts which identify your data on the XYO Network.\n </Typography>\n <List>\n <ListItem>Do not share this phrase with anyone.</ListItem>\n <ListItem>Do not save it to a public computer.</ListItem>\n <ListItem>Do not use a existing phrase from another wallet (i.e. Metamask).</ListItem>\n <ListItem>Do not use before copying it down somewhere safe.</ListItem>\n </List>\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose} variant=\"outlined\">\n OK\n </Button>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n","import {\n Alert, AlertTitle, Snackbar,\n} from '@mui/material'\nimport { generateMnemonic } from '@scure/bip39'\nimport { wordlist } from '@scure/bip39/wordlists/english.js'\nimport { isUndefinedOrNull } from '@xylabs/sdk-js'\nimport type { PropsWithChildren } from 'react'\nimport React, { useState } from 'react'\n\n/** @public */\nexport interface DefaultSeedPhraseProps extends PropsWithChildren {\n changeSeedPhrase?: (seedPhrase: string) => void\n hideDefaultSeedPhraseMessage?: boolean\n seedPhrase?: string\n}\n\n/** @public */\nexport const DefaultSeedPhrase: React.FC<DefaultSeedPhraseProps> = ({\n changeSeedPhrase, children, hideDefaultSeedPhraseMessage, seedPhrase,\n}) => {\n const [showSnackBar, setShowSnackBar] = useState(false)\n const [previousSeedPhrase, setPreviousSeedPhrase] = useState<string | undefined>()\n if (seedPhrase !== previousSeedPhrase) {\n setPreviousSeedPhrase(seedPhrase)\n if (isUndefinedOrNull(previousSeedPhrase) && !isUndefinedOrNull(seedPhrase)) {\n const mnemonic = generateMnemonic(wordlist, 256)\n changeSeedPhrase?.(mnemonic)\n setShowSnackBar(true)\n }\n }\n\n return (\n <>\n {hideDefaultSeedPhraseMessage\n ? null\n : (\n <Snackbar\n open={showSnackBar}\n autoHideDuration={5000}\n onClose={() => setShowSnackBar(false)}\n anchorOrigin={{ horizontal: 'center', vertical: 'top' }}\n >\n <Alert severity=\"success\">\n <AlertTitle>Default Seed Phrase Generated</AlertTitle>\n Go to application settings to save it.\n </Alert>\n </Snackbar>\n )}\n {children}\n </>\n )\n}\n","import type { DialogActionsProps, DialogProps } from '@mui/material'\nimport { Button, DialogActions } from '@mui/material'\nimport type { MouseEvent } from 'react'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../contexts/index.ts'\n\n/** @public */\nexport interface DialogActionButtonsProps extends DialogActionsProps {\n onClose?: DialogProps['onClose']\n}\n\n/** @public */\nexport const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({ onClose, ...props }) => {\n const { handleSave, setPhrase } = useSeedPhrase()\n\n const wrappedOnClose = (e: MouseEvent<HTMLElement>) => {\n // clear local copy of phrase when modal closes\n setPhrase?.('')\n onClose?.(e, 'escapeKeyDown')\n }\n\n return (\n <DialogActions {...props}>\n <Button variant=\"outlined\" onClick={wrappedOnClose}>\n Cancel\n </Button>\n <Button type=\"submit\" variant=\"contained\" onClick={handleSave}>\n Save\n </Button>\n </DialogActions>\n )\n}\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { SeedPhraseContextState } from './State.ts'\n\n/** @public */\nexport const SeedPhraseContext = createContextEx<SeedPhraseContextState>()\n","import { generateMnemonic, validateMnemonic } from '@scure/bip39'\nimport { wordlist } from '@scure/bip39/wordlists/english.js'\nimport { useResetState } from '@xylabs/react-hooks'\nimport type { PropsWithChildren } from 'react'\nimport React, {\n useCallback, useEffect, useMemo, useState,\n} from 'react'\n\nimport { SeedPhraseContext } from './Context.ts'\nimport type { SeedPhraseContextState } from './State.ts'\n\n/** @public */\nexport interface SeedPhraseProviderProps extends PropsWithChildren {\n defaultPhrase?: string\n handleChangeSeedPhrase?: (phrase: string) => void\n open?: boolean\n saveCallback?: () => void\n seedPhrase?: string\n}\n\nconst validate = (passedPhrase?: string) => {\n if (!passedPhrase) {\n return null\n }\n return validateMnemonic(passedPhrase, wordlist)\n}\n\n/** @public */\nexport const SeedPhraseProvider: React.FC<SeedPhraseProviderProps> = ({\n children,\n defaultPhrase,\n handleChangeSeedPhrase,\n saveCallback,\n seedPhrase,\n open,\n}) => {\n const [phrase, setPhrase] = useResetState<string | undefined>(defaultPhrase)\n const [overwriteWarning, setOverwriteWarning] = useState(false)\n\n useEffect(() => {\n if (seedPhrase || open) {\n setPhrase?.(seedPhrase ?? '')\n }\n }, [seedPhrase, open, setPhrase])\n\n const handleGenerate = useCallback(() => {\n const mnemonic = generateMnemonic(wordlist, 256)\n setPhrase?.(mnemonic)\n setOverwriteWarning?.(false)\n }, [setPhrase])\n\n const handleCancelOverwrite = useCallback(() => {\n setOverwriteWarning(false)\n }, [setOverwriteWarning])\n\n const handleClear = useCallback(() => {\n setPhrase('')\n setOverwriteWarning(false)\n }, [setPhrase, setOverwriteWarning])\n\n const handleSave = useCallback(() => {\n if (!overwriteWarning && seedPhrase && seedPhrase !== phrase) {\n setOverwriteWarning?.(true)\n } else {\n handleChangeSeedPhrase?.(phrase ?? '')\n saveCallback?.()\n }\n }, [handleChangeSeedPhrase, overwriteWarning, phrase, saveCallback, seedPhrase])\n\n useEffect(() => {\n if (!open) {\n handleCancelOverwrite()\n }\n }, [handleCancelOverwrite, open])\n\n const validSeedPhrase = useMemo(() => validate?.(seedPhrase), [seedPhrase])\n const validPhrase = useMemo(() => validate?.(phrase), [phrase])\n\n const value: SeedPhraseContextState = useMemo(() => ({\n handleCancelOverwrite,\n handleChangeSeedPhrase,\n handleClear,\n handleGenerate,\n handleSave,\n overwriteWarning,\n phrase,\n provided: true,\n seedPhrase,\n setOverwriteWarning,\n setPhrase,\n validPhrase,\n validSeedPhrase,\n validate,\n }), [handleCancelOverwrite, handleChangeSeedPhrase, handleClear, handleGenerate, handleSave, overwriteWarning, phrase, seedPhrase, setOverwriteWarning, setPhrase, validPhrase, validSeedPhrase])\n\n return (\n <SeedPhraseContext\n value={value}\n >\n {children}\n </SeedPhraseContext>\n )\n}\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { SeedPhraseContext } from './Context.ts'\n\n/** @public */\nexport const useSeedPhrase = () => useContextEx(SeedPhraseContext, 'SeedPhrase', true)\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { WalletContextState } from './State.ts'\n\n/** @public */\nexport const WalletContext = createContextEx<WalletContextState>()\n","import { useResetState } from '@xylabs/react-hooks'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\nimport { WalletContext } from './Context.ts'\nimport type { WalletContextState } from './State.ts'\n\n/** @public */\nexport interface WalletProviderProps {\n defaultActiveAccountIndex?: number\n rootWallet?: WalletInstance | null\n}\n\n/** @public */\nexport const WalletProvider: React.FC<PropsWithChildren<WalletProviderProps>> = ({\n children,\n defaultActiveAccountIndex = 0,\n rootWallet = null,\n ...props\n}) => {\n const [activeAccountIndex, setActiveAccountIndex] = useResetState(defaultActiveAccountIndex)\n\n const [activeAccount = null] = usePromise(async () => await rootWallet?.derivePath(activeAccountIndex.toString()), [activeAccountIndex, rootWallet])\n\n const value: WalletContextState = useMemo(() => ({\n activeAccount,\n activeAccountIndex,\n provided: true,\n rootWallet,\n setActiveAccountIndex,\n }), [activeAccount,\n activeAccountIndex,\n rootWallet,\n setActiveAccountIndex])\n\n return (\n <WalletContext\n value={value}\n {...props}\n >\n {children}\n </WalletContext>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { useContextEx, useProvided } from '@xylabs/react-shared'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport { WalletContext } from './Context.ts'\n\n/** @public */\nexport const useWalletContext = (required = true) => {\n return useContextEx(WalletContext, 'Wallet', required)\n}\n\n/** @public */\nexport const useWalletProvided = () => {\n return useProvided(WalletContext)\n}\n\n/** @public */\nexport const useRootWallet = (required = true): [WalletInstance | null | undefined, Error | undefined] => {\n const { rootWallet } = useWalletContext(required)\n return [rootWallet, undefined]\n}\n\n/** @public */\nexport const useIndexedWalletFromContext = (index: number, required = true): [WalletInstance | null | undefined, Error | undefined] => {\n const { rootWallet } = useWalletContext(required)\n const [wallet] = usePromise(async () => (await rootWallet?.derivePath(index.toString())) ?? rootWallet, [rootWallet, index])\n return [wallet, undefined]\n}\n\n/** @public */\nexport const useSelectedWalletAccount = (required = true): [WalletInstance | null | undefined, Error | undefined] => {\n const { activeAccountIndex } = useWalletContext(required)\n // we pass in 0 as default since we can not call the hook optionally,\n // we resolve this false result by checking whether activeAccountIndex is defined before returning it\n const [account] = useIndexedWalletFromContext(activeAccountIndex ?? 0, required)\n return activeAccountIndex === undefined && account === null ? [null, undefined] : [account, undefined]\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../../contexts/index.ts'\nimport { colorParser, InvalidPhraseTypography } from './validation-messages/index.ts'\n\n/** @public */\nexport interface NewPhraseTextFieldProps extends StandardTextFieldProps {\n children?: ReactNode\n disableColor?: boolean\n}\n\n/** @public */\nexport const NewPhraseTextField: React.FC<NewPhraseTextFieldProps> = ({\n children, disableColor, ...props\n}) => {\n const {\n phrase, setPhrase, validPhrase,\n } = useSeedPhrase()\n return (\n <FormControl\n fullWidth\n size=\"small\"\n sx={{\n display: 'flex', flexDirection: 'column', rowGap: 1,\n }}\n >\n {children}\n <TextField\n focused\n color={disableColor ? undefined : colorParser(validPhrase)}\n error={validPhrase === false}\n helperText={validPhrase === false ? <InvalidPhraseTypography /> : null}\n fullWidth\n maxRows={Number.POSITIVE_INFINITY}\n multiline\n onChange={e => setPhrase?.(e.target.value)}\n value={phrase}\n {...props}\n />\n </FormControl>\n )\n}\n","/** @public */\nexport const colorParser = (conditional?: boolean | null) => {\n switch (conditional) {\n case true: {\n return 'success'\n }\n case false: {\n return 'error'\n }\n default: {\n return\n }\n }\n}\n","import type { TypographyProps } from '@mui/material'\nimport { Link, Typography } from '@mui/material'\nimport React from 'react'\n\n/** @public */\nexport const InvalidPhraseTypography: React.FC<TypographyProps> = props => (\n <Typography variant=\"caption\" color=\"error\" {...props}>\n Invalid seed phrase. See -\n {' '}\n <Link target=\"_blank\" href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\">\n bip39 Proposal\n </Link>\n </Typography>\n)\n","import { CheckCircleOutline as CheckCircleOutlineIcon, HighlightOff as HighlightOffIcon } from '@mui/icons-material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\n/** @public */\nexport interface PhraseHeaderBoxProps extends FlexBoxProps, PropsWithChildren {\n conditional?: boolean | null\n}\n\n/** @public */\nexport const PhraseHeaderBox: React.FC<PhraseHeaderBoxProps> = ({\n children, conditional, ...props\n}) => {\n const state = useMemo(() => {\n switch (conditional) {\n case true: {\n return 'success'\n }\n case false: {\n return 'error'\n }\n default: {\n return null\n }\n }\n }, [conditional])\n\n const Icon = useMemo(() => {\n switch (state) {\n case 'success': {\n return <CheckCircleOutlineIcon fontSize=\"small\" color=\"success\" />\n }\n case 'error': {\n return <HighlightOffIcon fontSize=\"small\" color=\"error\" />\n }\n default: {\n return null\n }\n }\n }, [state])\n\n return (\n <FlexRow justifyContent=\"start\" columnGap={1} {...props}>\n {Icon}\n {children}\n </FlexRow>\n )\n}\n","import type { DialogActionsProps } from '@mui/material'\nimport { Button, DialogActions } from '@mui/material'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../../contexts/index.ts'\n\nexport interface PhraseDialogActionsProps extends DialogActionsProps {\n hideClear?: boolean\n hideGenerate?: boolean\n}\n\n/** @public */\nexport const PhraseDialogActions: React.FC<PhraseDialogActionsProps> = ({\n hideClear, hideGenerate, ...props\n}) => {\n const {\n handleClear, handleGenerate, overwriteWarning,\n } = useSeedPhrase()\n return (\n <DialogActions sx={{ justifyContent: 'center' }} {...props}>\n {hideGenerate\n ? null\n : (\n <Button disabled={overwriteWarning} variant=\"contained\" onClick={handleGenerate}>\n Generate\n </Button>\n )}\n {hideClear\n ? null\n : (\n <Button variant=\"outlined\" onClick={handleClear}>\n Clear\n </Button>\n\n )}\n </DialogActions>\n )\n}\n","import { ContentCopy } from '@mui/icons-material'\nimport type { StandardTextFieldProps } from '@mui/material'\nimport {\n Chip, FormControl, FormLabel, IconButton, TextField,\n Tooltip,\n useTheme,\n} from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { useSeedPhrase } from '../../../../../contexts/index.ts'\nimport { InvalidPhraseTypography, PhraseHeaderBox } from './validation-messages/index.ts'\n\n/** @public */\nexport interface SavedPhraseTextFieldProps extends StandardTextFieldProps {\n fullWidth?: boolean\n showCopyButton?: boolean\n showPhraseHeader?: boolean\n visible?: boolean\n}\n\n/** @public */\nexport const SavedPhraseTextField: React.FC<SavedPhraseTextFieldProps> = ({\n\n fullWidth, showCopyButton, showPhraseHeader, visible: visibleProp, ...props\n}) => {\n const { validSeedPhrase, seedPhrase } = useSeedPhrase()\n const theme = useTheme()\n\n const [visible, setVisible] = useState(visibleProp)\n\n const [previousVisibleProp, setPreviousVisibleProp] = useState(visibleProp)\n if (visibleProp !== previousVisibleProp) {\n setPreviousVisibleProp(visibleProp)\n setVisible(visibleProp)\n }\n\n const [copied, setCopied] = useState(false)\n const onCopyPhrase = async () => {\n if (seedPhrase) {\n try {\n await navigator.clipboard.writeText(seedPhrase)\n setCopied(true)\n setTimeout(() => setCopied(false), 2000)\n } catch (e) {\n console.error('Error copying resolvedSelectedAddress to clipboard', e)\n }\n }\n }\n\n return (\n <FormControl\n fullWidth={fullWidth}\n size=\"small\"\n sx={{\n display: 'flex', flexDirection: 'column', rowGap: 1,\n }}\n >\n <FlexRow gap={0.5}>\n <Chip\n label=\"Show Seed Phrase\"\n onClick={() => setVisible(!visible)}\n // Margin is set to 2px to match the Copy Button size and remove jumping during animation\n sx={{ alignSelf: 'center', my: '2px' }}\n />\n <Tooltip title={copied ? 'Copied!' : 'Copy'}>\n <IconButton\n onClick={() => void onCopyPhrase()}\n sx={{\n height: visible ? 'auto' : 0,\n opacity: visible ? 1 : 0,\n overflow: 'hidden',\n padding: visible ? theme.spacing(1) : 0,\n transition: 'all .25s ease-in-out',\n width: visible ? 'max-content' : 0,\n }}\n >\n <ContentCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </FlexRow>\n {visible && showPhraseHeader\n ? (\n <FormLabel>\n <PhraseHeaderBox conditional={validSeedPhrase}>Saved Seed Phrase</PhraseHeaderBox>\n </FormLabel>\n )\n : null}\n <TextField\n defaultValue={seedPhrase}\n disabled\n error={validSeedPhrase === false}\n helperText={validSeedPhrase === false ? <InvalidPhraseTypography /> : null}\n fullWidth\n maxRows={Number.POSITIVE_INFINITY}\n multiline\n slotProps={{\n input: {\n style: {\n height: visible ? 'auto' : '0',\n overflow: 'hidden',\n opacity: visible ? 1 : 0,\n padding: visible ? theme.spacing(1) : 0,\n transition: 'all .25s ease-in-out',\n },\n },\n }}\n {...props}\n />\n\n </FormControl>\n )\n}\n","import { Alert, Button } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { useSeedPhrase } from '../../../../contexts/index.ts'\n\n/** @public */\nexport const OverwriteWarning = () => {\n const { handleCancelOverwrite, handleSave } = useSeedPhrase()\n return (\n <Alert\n variant=\"outlined\"\n severity=\"warning\"\n action={(\n <FlexRow sx={{ columnGap: 1 }}>\n <Button variant=\"outlined\" color=\"inherit\" size=\"small\" onClick={handleSave}>\n Overwrite\n </Button>\n <Button variant=\"outlined\" color=\"inherit\" size=\"small\" onClick={handleCancelOverwrite}>\n Cancel\n </Button>\n </FlexRow>\n )}\n >\n Are you sure you want to overwrite existing seed phrase? This action cannot be undone.\n </Alert>\n )\n}\n","import type { DialogProps } from '@mui/material'\nimport {\n Dialog, DialogContent, DialogTitle, FormLabel,\n} from '@mui/material'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { SeedPhraseProvider, useSeedPhrase } from '../../../contexts/index.ts'\nimport { SeedPhraseIconButton } from '../_shared/index.ts'\nimport {\n DialogActionButtons,\n NewPhraseTextField,\n OverwriteWarning,\n PhraseDialogActions,\n PhraseHeaderBox,\n SavedPhraseTextField,\n} from './components/index.ts'\n\n/** @public */\nexport interface SeedPhraseDialogProps extends DialogProps {\n changeSeedPhrase?: (value: string) => void\n dialogTitle?: ReactNode\n seedPhrase?: string\n seedPhraseTextFieldTitle?: ReactNode\n showCopyButton?: boolean\n}\n\n/** @public */\nexport const SeedPhraseDialog: React.FC<SeedPhraseDialogProps> = ({\n changeSeedPhrase, dialogTitle = 'Update Your Seed Phrase', seedPhrase, seedPhraseTextFieldTitle = 'New Seed Phrase', ...props\n}) => {\n return (\n <SeedPhraseProvider\n seedPhrase={seedPhrase}\n handleChangeSeedPhrase={changeSeedPhrase}\n open={props.open}\n saveCallback={() => props.onClose?.({}, 'escapeKeyDown')}\n >\n <SeedPhraseDialogInner dialogTitle={dialogTitle} seedPhraseTextFieldTitle={seedPhraseTextFieldTitle} {...props} />\n </SeedPhraseProvider>\n )\n}\n\n/** @public */\nexport const SeedPhraseDialogInner: React.FC<SeedPhraseDialogProps> = ({\n dialogTitle, seedPhraseTextFieldTitle, showCopyButton, ...props\n}) => {\n const {\n overwriteWarning, seedPhrase, validPhrase,\n } = useSeedPhrase()\n\n return (\n <Dialog aria-labelledby=\"alert-dialog-title\" aria-describedby=\"alert-dialog-description\" fullWidth maxWidth=\"sm\" {...props}>\n <DialogTitle\n id=\"alert-dialog-title\"\n sx={{\n alignItems: 'center', display: 'inline-flex', flexDirection: 'row',\n }}\n >\n {dialogTitle}\n <SeedPhraseIconButton />\n </DialogTitle>\n <DialogContent sx={{\n display: 'flex', flexDirection: 'column', rowGap: 2,\n }}\n >\n\n <NewPhraseTextField>\n <FormLabel>\n <PhraseHeaderBox conditional={validPhrase}>{seedPhraseTextFieldTitle}</PhraseHeaderBox>\n </FormLabel>\n </NewPhraseTextField>\n <PhraseDialogActions />\n {seedPhrase\n ? <SavedPhraseTextField showCopyButton={showCopyButton} />\n : null}\n {overwriteWarning\n ? <OverwriteWarning />\n : null}\n </DialogContent>\n <DialogActionButtons onClose={props.onClose} />\n </Dialog>\n )\n}\n","import { Cancel as CancelIcon, RadioButtonChecked as RadioButtonCheckedIcon } from '@mui/icons-material'\nimport type { TableRowProps } from '@mui/material'\nimport {\n Button, ButtonGroup, TableCell, TableRow,\n} from '@mui/material'\nimport React, { useState } from 'react'\n\nimport { SeedPhraseIconButton } from '../_shared/index.ts'\nimport { SeedPhraseDialog } from '../dialog/index.ts'\n\n/** @public */\nexport interface SeedPhraseTableRowProps extends TableRowProps {\n changeSeedPhrase?: (seedPhrase: string) => void\n seedPhrase?: string\n}\n\n/** @public */\nexport const SeedPhraseTableRow: React.FC<SeedPhraseTableRowProps> = ({\n changeSeedPhrase, seedPhrase, ...props\n}) => {\n const [open, setOpen] = useState(false)\n\n const handleOpen = () => {\n setOpen(true)\n }\n return (\n <TableRow {...props}>\n <TableCell>\n Seed Phrase\n {' '}\n <SeedPhraseIconButton />\n </TableCell>\n <TableCell align=\"center\">\n {seedPhrase\n ? <RadioButtonCheckedIcon color=\"success\" />\n : <CancelIcon color=\"error\" />}\n </TableCell>\n <TableCell>\n <SeedPhraseDialog changeSeedPhrase={changeSeedPhrase} open={open} onClose={() => setOpen(false)} seedPhrase={seedPhrase} />\n <ButtonGroup fullWidth>\n <Button variant=\"contained\" size=\"small\" onClick={handleOpen}>\n Update\n </Button>\n </ButtonGroup>\n </TableCell>\n </TableRow>\n )\n}\n","import { EthAddressWrapper } from '@xylabs/eth-address'\nimport { EthAccountButton } from '@xylabs/react-crypto'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { NumberStatus } from '@xylabs/react-number-status'\nimport { useNetwork } from '@xyo-network/react-network'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React from 'react'\n\nimport { useAccount } from '../../hooks/index.ts'\n\n/** @public */\nexport interface WalletAccountDetailsProps extends FlexBoxProps {\n account?: WalletInstance\n exploreUrl?: string\n}\n\n/** @public */\nexport const WalletAccountDetails: React.FC<WalletAccountDetailsProps> = ({\n exploreUrl = 'https://explore.xyo.network', account, ...props\n}) => {\n const [accountToUse] = useAccount({ account })\n const { network } = useNetwork()\n const exploreAddressUrl = `${exploreUrl}/recent?account=${accountToUse?.address}&network=${network?.name ?? 'main'}`\n\n return (\n <FlexCol {...props}>\n <EthAccountButton address={EthAddressWrapper.fromString(accountToUse?.address)} />\n <FlexRow gap={1}>\n <NumberStatus rounded title=\"Tokens\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.tokens`} target=\"_blank\" />\n <NumberStatus rounded title=\"NFTs\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.nfts`} target=\"_blank\" />\n <NumberStatus rounded title=\"Signatures\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.signatures`} target=\"_blank\" />\n <NumberStatus rounded title=\"Signins\" value={0} to={`${exploreAddressUrl}&schema=network.xyo.account.signins`} target=\"_blank\" />\n </FlexRow>\n </FlexCol>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport { useState } from 'react'\n\nimport {\n useRootWallet, useWalletContext, useWalletProvided,\n} from '../contexts/index.ts'\n\n/** @public */\nexport interface AccountHookParams {\n account?: AccountInstance\n index?: number\n required?: boolean\n wallet?: WalletInstance\n}\n\n/** @public */\nexport const useAccount = ({\n wallet, account, index, required = false,\n}: AccountHookParams = {}): [\n AccountInstance | null | undefined,\n Error | undefined,\n] => {\n const walletContextProvided = useWalletProvided()\n const [validationError, setValidationError] = useState<Error>()\n if (wallet && account && !validationError) {\n setValidationError(new Error('useAccount can not have both a wallet and an account in the parameters'))\n }\n\n if (index && account && !validationError) {\n setValidationError(new Error('useAccount can not have both a index and an account in the parameters'))\n }\n\n const [error, setError] = useState<Error>()\n const [rootWallet] = useRootWallet(!wallet && required)\n const { activeAccountIndex } = useWalletContext(false)\n const [activeAccount] = usePromise(async () => {\n try {\n if (!validationError) {\n if (wallet) {\n const path = `${index ?? 0}'\\0`\n return await wallet?.derivePath?.(path)\n } else if (rootWallet) {\n const path = `${index ?? activeAccountIndex ?? 0}'\\/0`\n return await rootWallet?.derivePath?.(path)\n }\n }\n } catch (ex) {\n const error = ex as Error\n console.error(error.message)\n setError(error)\n }\n }, [index, wallet, rootWallet, activeAccountIndex, validationError])\n if (validationError && !error) {\n console.error(validationError.message)\n setError(validationError)\n }\n\n return [\n error\n ? undefined\n : (account ?? activeAccount ?? walletContextProvided)\n ? null\n : undefined,\n error,\n ]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { HDWallet } from '@xyo-network/wallet'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport { useState } from 'react'\n\nimport { useSelectedWalletAccount, useWalletContext } from '../contexts/index.ts'\n\n/** @public */\nexport interface WalletHookParams {\n mnemonic?: string\n path?: string\n required?: boolean\n seed?: ArrayBufferLike | string\n wallet?: WalletInstance | null\n}\n\n/** @public */\nexport const useWallet = ({\n mnemonic, wallet, path, required = false, seed,\n}: WalletHookParams = {}): [\n WalletInstance | null | undefined,\n Error | undefined,\n] => {\n const walletContextProvided = useWalletContext(false)\n const [error, setError] = useState<Error>()\n const [contextAccount] = useSelectedWalletAccount(!wallet && required)\n const [activeAccount] = usePromise(async () => {\n try {\n const newAccount = await (() => {\n if (wallet) {\n return wallet\n } else if (mnemonic) {\n return HDWallet.fromPhrase(mnemonic)\n } else if (seed) {\n return HDWallet.fromSeed(seed)\n }\n return contextAccount\n })()\n\n return path ? newAccount?.derivePath?.(path) : (newAccount ?? wallet)\n } catch (ex) {\n setError(ex as Error)\n }\n }, [mnemonic, contextAccount, seed, path, wallet])\n return [activeAccount ?? (walletContextProvided ? null : activeAccount), error]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport { useWalletContext } from '../contexts/index.ts'\nimport { useWallet } from './useWallet.ts'\n\n/** @public */\nexport interface WalletsHookParams {\n paths: string[]\n wallet?: WalletInstance | null\n}\n\n/** @public */\nexport const useWallets = ({ wallet, paths }: WalletsHookParams): [WalletInstance[] | null | undefined, Error | undefined] => {\n const walletContextProvided = useWalletContext(false)\n const [foundWallet] = useWallet({ wallet })\n const [wallets, error] = usePromise(\n async () => (foundWallet ? await Promise.all(paths.map(path => foundWallet.derivePath(path))) : undefined),\n [foundWallet, paths],\n )\n return [wallets ?? (walletContextProvided ? null : wallets), error]\n}\n","import type { UsePromiseState } from '@xylabs/react-promise'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { AccountInstance } from '@xyo-network/account-model'\nimport { HDWallet } from '@xyo-network/wallet'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport { Mutex } from 'async-mutex'\n\nlet globalWrapperWallet: WalletInstance | undefined\nconst globalWrapperWalletMutex = new Mutex()\n\n/** @public */\nexport const useWrapperAccount = (\n account?: AccountInstance | null,\n): [AccountInstance | null | undefined, Error | undefined, UsePromiseState | undefined] => {\n return usePromise(async () => {\n return await globalWrapperWalletMutex.runExclusive(async () => {\n // if we are expecting to receive a wallet or did receive on, return the override account\n if (account !== undefined) {\n return account\n }\n\n if (globalWrapperWallet) {\n return globalWrapperWallet\n }\n\n try {\n globalWrapperWallet = await HDWallet.random()\n console.log(`Global Wrapper Wallet Creation Success: ${globalWrapperWallet.address}`)\n } catch (ex) {\n const error = ex as Error\n console.error(`Global Wrapper Wallet Creation Failed: ${error.message}`)\n }\n return globalWrapperWallet\n })\n }, [account])\n}\n","import type { SelectProps } from '@mui/material'\nimport { CircularProgress } from '@mui/material'\nimport { SelectEx } from '@xylabs/react-select'\nimport type { AddressRenderRowBoxProps } from '@xyo-network/react-address-render'\nimport React from 'react'\n\nimport { useWalletContext } from '../../contexts/index.ts'\nimport { RenderedAccountMenuItem } from './RenderedMenuItem.tsx'\n\ntype SharedAddressRenderRowBoxProps = Pick<AddressRenderRowBoxProps, 'iconOnly' | 'iconSize' | 'icons' | 'showFavorite'>\n\n/** @public */\nexport type WalletAccountSelectProps = SharedAddressRenderRowBoxProps\n & Omit<SelectProps<number>, 'variant'>\n & Partial<SelectProps<number>> & {\n addressNames?: Record<string, string | undefined>\n maxAccounts?: number\n }\n\nconst arrayRange = (length: number, start = 0) => {\n return [...Array.from({ length }).keys()].map(x => x + start)\n}\n\n/** @public */\nexport const WalletAccountSelect: React.FC<WalletAccountSelectProps> = ({\n addressNames,\n iconOnly,\n iconSize = 24,\n icons,\n maxAccounts = 1,\n showFavorite = false,\n size,\n variant = 'outlined',\n ...props\n}) => {\n const {\n activeAccountIndex, setActiveAccountIndex, rootWallet,\n } = useWalletContext()\n const disabled = !rootWallet || activeAccountIndex === undefined\n\n return (\n <>\n {rootWallet\n ? (\n <SelectEx\n margin=\"dense\"\n disabled={disabled}\n renderValue={(selectedAccountIndex) => {\n return (\n <RenderedAccountMenuItem\n addressNames={addressNames}\n iconOnly={iconOnly}\n iconSize={iconSize}\n icons={icons}\n rootWallet={rootWallet}\n selectedAccountIndex={selectedAccountIndex}\n showFavorite={showFavorite}\n />\n )\n }}\n value={activeAccountIndex === undefined ? '' : activeAccountIndex}\n onChange={event => setActiveAccountIndex?.(Number.parseInt(`${event.target.value}`))}\n size={size}\n variant={variant}\n {...props}\n >\n {rootWallet && arrayRange(maxAccounts).map(index => (\n <RenderedAccountMenuItem\n key={index}\n addressNames={addressNames}\n iconOnly={iconOnly}\n iconSize={iconSize}\n icons={icons}\n rootWallet={rootWallet}\n selectedAccountIndex={index}\n showFavorite={showFavorite}\n />\n ))}\n </SelectEx>\n )\n : <CircularProgress size={24} />}\n </>\n )\n}\n","import { MenuItem, type MenuItemProps } from '@mui/material'\nimport { AddressRenderRowBox } from '@xyo-network/react-address-render'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React from 'react'\n\nimport { useWallet } from '../../hooks/index.ts'\n\n/** @public */\nexport interface RenderedAccountMenuItemProps extends MenuItemProps {\n addressNames?: Record<string, string | undefined>\n iconOnly?: boolean\n iconSize?: number\n icons?: boolean\n rootWallet: WalletInstance\n selectedAccountIndex?: number\n showFavorite?: boolean\n}\n\n/** @public */\nexport const RenderedAccountMenuItem: React.FC<RenderedAccountMenuItemProps> = ({\n selectedAccountIndex,\n rootWallet,\n addressNames,\n iconOnly,\n iconSize,\n icons,\n showFavorite,\n}) => {\n const [selectedAccount] = useWallet({ path: selectedAccountIndex?.toString(), wallet: rootWallet })\n const customName = selectedAccount ? addressNames?.[selectedAccount.address] : undefined\n const favorite = !!selectedAccount && selectedAccount.address in (addressNames ?? {})\n return (\n <MenuItem\n value={selectedAccountIndex}\n sx={{\n minHeight: 0, paddingBottom: 0, paddingTop: 0,\n }}\n >\n <AddressRenderRowBox\n disableSharedRef={true}\n flexGrow={1}\n address={selectedAccount?.address}\n iconOnly={iconOnly}\n iconSize={iconSize}\n icons={icons}\n name={customName}\n favorite={favorite}\n showFavorite={showFavorite}\n />\n </MenuItem>\n )\n}\n","import type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { WalletAccountSelect } from './Select.tsx'\n\n/** @public */\nexport interface WalletAccountSelectBarProps extends FlexBoxProps {\n addressNames?: Record<string, string | undefined>\n iconOnly?: boolean\n iconSize?: number\n icons?: boolean\n maxAccounts?: number\n showFavorite?: boolean\n size?: 'small' | 'medium'\n}\n\n/** @public */\nexport const WalletAccountSelectBar: React.FC<WalletAccountSelectBarProps> = ({\n addressNames,\n iconOnly,\n iconSize,\n icons,\n maxAccounts = 1,\n showFavorite = false,\n size = 'small',\n ...props\n}) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <WalletAccountSelect\n addressNames={addressNames}\n fullWidth\n showFavorite={showFavorite}\n iconSize={iconSize}\n iconOnly={iconOnly}\n icons={icons}\n maxAccounts={maxAccounts}\n size={size ?? 'small'}\n variant=\"outlined\"\n />\n </FlexCol>\n )\n}\n"],"mappings":";;;;AACA,SACEA,aAAaC,WAAWC,UAAUC,kBAC7B;AACP,SAASC,gBAAgB;AACzB,OAAOC,UAASC,gBAAgB;;;ACJhC,SACEC,OAAOC,YAAYC,gBACd;AAEP,OAAOC,WAAW;AAWX,IAAMC,sBAA0D,wBAAC,EACtEC,oBACAC,wBACAC,iBACAC,aAAY,MACb;AACC,SACE,sBAAA,cAACC,UAAAA;IACCC,cAAc;MAAEC,YAAY;MAAUC,UAAU;IAAM;IACtDC,kBAAkB;IAClBC,SAAS,6BAAMP,kBAAkB,KAAA,GAAxB;IACTQ,MAAMP;KAEN,sBAAA,cAACQ,OAAAA;IAAMC,UAAS;IAAQH,SAAS,6BAAMP,kBAAkB,KAAA,GAAxB;KAC/B,sBAAA,cAACW,YAAAA,MAAW,wBAAA,GAAmC,4CAE9Cb,uBAAuBc,SAAY,KAAKd,qBAAqB,GAAE,2DAG/DC,wBAAuB,IAAA,CAAA;AAKhC,GAxBuE;;;ADChE,IAAMc,sBAAqD,wBAAC,EACjEC,oBAAoBC,mBAAmBC,YAAW,MACnD;AACC,QAAM,CAACC,wBAAwBC,yBAAAA,IAA6BC,SAAAA;AAC5D,QAAM,CAACC,cAAcC,eAAAA,IAAmBF,SAAS,KAAA;AAEjD,QAAMG,0B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uBK,SAAY,KAAKL;IAC/Ca,UAAUC,wBAAAA,UAASb,wBAAwBc,OAAOC,SAAS,GAAGF,MAAMG,OAAOL,KAAK,EAAE,CAAA,GAAxEE;IACVjB;IACAC;IACC,GAAGC;KAEHG,cAAcpB,WAAWa,WAAAA,EAAaP,IAAI8B,CAAAA,UACzC,gBAAAZ,QAAA,cAACK,yBAAAA;IACCQ,KAAKD;IACL3B;IACAC;IACAC;IACAC;IACAQ;IACAQ,sBAAsBQ;IACtBtB;SAKR,gBAAAU,QAAA,cAACc,kBAAAA;IAAiBvB,MAAM;;AAGlC,GA3DuE;;;AEvBvE,SAASwB,WAAAA,gBAAe;AACxB,OAAOC,aAAW;AAgBX,IAAMC,yBAAgE,wBAAC,EAC5EC,cACAC,UACAC,UACAC,OACAC,cAAc,GACdC,eAAe,OACfC,OAAO,SACP,GAAGC,MAAAA,MACJ;AACC,SACE,gBAAAC,QAAA,cAACC,UAAAA;IAAQC,YAAW;IAAW,GAAGH;KAChC,gBAAAC,QAAA,cAACG,qBAAAA;IACCX;IACAY,WAAAA;IACAP;IACAH;IACAD;IACAE;IACAC;IACAE,MAAMA,QAAQ;IACdO,SAAQ;;AAIhB,GAzB6E;","names":["ButtonGroup","TableCell","TableRow","Typography","ButtonEx","React","useState","Alert","AlertTitle","Snackbar","React","OutOfBoundsSnackBar","activeAccountIndex","desiredMaximumAccounts","setShowSnackBar","showSnackBar","Snackbar","anchorOrigin","horizontal","vertical","autoHideDuration","onClose","open","Alert","severity","AlertTitle","undefined","MaxAccountsTableRow","activeAccountIndex","changeMaxAccounts","maxAccounts","desiredMaximumAccounts","setDesiredMaximumAccounts","useState","showSnackBar","setShowSnackBar","handleChangeMaxAccounts","change","undefined","validMaximumAccounts","maxAccountsWithinRange","console","error","Error","React","TableRow","TableCell","align","Typography","variant","ButtonGroup","ButtonEx","onClick","size","OutOfBoundsSnackBar","HelpOutline","HelpOutlineIcon","Button","Dialog","DialogActions","DialogContent","DialogTitle","IconButton","Link","List","ListItem","Typography","React","useState","SeedPhraseIconButton","props","open","setOpen","useState","onClose","React","IconButton","onClick","HelpOutlineIcon","fontSize","Dialog","DialogTitle","DialogContent","Typography","Link","target","href","List","ListItem","DialogActions","Button","variant","Alert","AlertTitle","Snackbar","generateMnemonic","wordlist","isUndefinedOrNull","React","useState","DefaultSeedPhrase","changeSeedPhrase","children","hideDefaultSeedPhraseMessage","seedPhrase","showSnackBar","setShowSnackBar","useState","previousSeedPhrase","setPreviousSeedPhrase","isUndefinedOrNull","mnemonic","generateMnemonic","wordlist","React","Snackbar","open","autoHideDuration","onClose","anchorOrigin","horizontal","vertical","Alert","severity","AlertTitle","Button","DialogActions","React","createContextEx","SeedPhraseContext","generateMnemonic","validateMnemonic","wordlist","useResetState","React","useCallback","useEffect","useMemo","useState","validate","passedPhrase","validateMnemonic","wordlist","SeedPhraseProvider","children","defaultPhrase","handleChangeSeedPhrase","saveCallback","seedPhrase","open","phrase","setPhrase","useResetState","overwriteWarning","setOverwriteWarning","useState","useEffect","handleGenerate","useCallback","mnemonic","generateMnemonic","handleCancelOverwrite","handleClear","handleSave","validSeedPhrase","useMemo","validPhrase","value","provided","React","SeedPhraseContext","useContextEx","useSeedPhrase","useContextEx","SeedPhraseContext","createContextEx","WalletContext","useResetState","usePromise","React","useMemo","WalletProvider","children","defaultActiveAccountIndex","rootWallet","props","activeAccountIndex","setActiveAccountIndex","useResetState","activeAccount","usePromise","derivePath","toString","value","useMemo","provided","React","WalletContext","usePromise","useContextEx","useProvided","useWalletContext","required","useContextEx","WalletContext","useWalletProvided","useProvided","useRootWallet","rootWallet","undefined","useIndexedWalletFromContext","index","wallet","usePromise","derivePath","toString","useSelectedWalletAccount","activeAccountIndex","account","DialogActionButtons","onClose","props","handleSave","setPhrase","useSeedPhrase","wrappedOnClose","e","React","DialogActions","Button","variant","onClick","type","FormControl","TextField","React","colorParser","conditional","Link","Typography","React","InvalidPhraseTypography","props","React","Typography","variant","color","Link","target","href","CheckCircleOutline","CheckCircleOutlineIcon","HighlightOff","HighlightOffIcon","FlexRow","React","useMemo","PhraseHeaderBox","children","conditional","props","state","useMemo","Icon","React","CheckCircleOutlineIcon","fontSize","color","HighlightOffIcon","FlexRow","justifyContent","columnGap","NewPhraseTextField","children","disableColor","props","phrase","setPhrase","validPhrase","useSeedPhrase","React","FormControl","fullWidth","size","sx","display","flexDirection","rowGap","TextField","focused","color","undefined","colorParser","error","helperText","InvalidPhraseTypography","maxRows","Number","POSITIVE_INFINITY","multiline","onChange","e","target","value","Button","DialogActions","React","PhraseDialogActions","hideClear","hideGenerate","props","handleClear","handleGenerate","overwriteWarning","useSeedPhrase","React","DialogActions","sx","justifyContent","Button","disabled","variant","onClick","ContentCopy","Chip","FormControl","FormLabel","IconButton","TextField","Tooltip","useTheme","FlexRow","React","useState","SavedPhraseTextField","fullWidth","showCopyButton","showPhraseHeader","visible","visibleProp","props","validSeedPhrase","seedPhrase","useSeedPhrase","theme","useTheme","setVisible","useState","previousVisibleProp","setPreviousVisibleProp","copied","setCopied","onCopyPhrase","navigator","clipboard","writeText","setTimeout","e","console","error","React","FormControl","size","sx","display","flexDirection","rowGap","FlexRow","gap","Chip","label","onClick","alignSelf","my","Tooltip","title","IconButton","height","opacity","overflow","padding","spacing","transition","width","ContentCopy","fontSize","FormLabel","PhraseHeaderBox","conditional","TextField","defaultValue","disabled","helperText","InvalidPhraseTypography","maxRows","Number","POSITIVE_INFINITY","multiline","slotProps","input","style","Alert","Button","FlexRow","React","OverwriteWarning","handleCancelOverwrite","handleSave","useSeedPhrase","React","Alert","variant","severity","action","FlexRow","sx","columnGap","Button","color","size","onClick","Dialog","DialogContent","DialogTitle","FormLabel","React","SeedPhraseDialog","changeSeedPhrase","dialogTitle","seedPhrase","seedPhraseTextFieldTitle","props","React","SeedPhraseProvider","handleChangeSeedPhrase","open","saveCallback","onClose","SeedPhraseDialogInner","showCopyButton","overwriteWarning","validPhrase","useSeedPhrase","Dialog","aria-labelledby","aria-describedby","fullWidth","maxWidth","DialogTitle","id","sx","alignItems","display","flexDirection","SeedPhraseIconButton","DialogContent","rowGap","NewPhraseTextField","FormLabel","PhraseHeaderBox","conditional","PhraseDialogActions","SavedPhraseTextField","OverwriteWarning","DialogActionButtons","Cancel","CancelIcon","RadioButtonChecked","RadioButtonCheckedIcon","Button","ButtonGroup","TableCell","TableRow","React","useState","SeedPhraseTableRow","changeSeedPhrase","seedPhrase","props","open","setOpen","useState","handleOpen","React","TableRow","TableCell","SeedPhraseIconButton","align","RadioButtonCheckedIcon","color","CancelIcon","SeedPhraseDialog","onClose","ButtonGroup","fullWidth","Button","variant","size","onClick","EthAddressWrapper","EthAccountButton","FlexCol","FlexRow","NumberStatus","useNetwork","React","usePromise","useState","useAccount","wallet","account","index","required","walletContextProvided","useWalletProvided","validationError","setValidationError","useState","Error","error","setError","rootWallet","useRootWallet","activeAccountIndex","useWalletContext","activeAccount","usePromise","path","derivePath","ex","console","message","undefined","usePromise","HDWallet","useState","useWallet","mnemonic","wallet","path","required","seed","walletContextProvided","useWalletContext","error","setError","useState","contextAccount","useSelectedWalletAccount","activeAccount","usePromise","newAccount","HDWallet","fromPhrase","fromSeed","derivePath","ex","usePromise","useWallets","wallet","paths","walletContextProvided","useWalletContext","foundWallet","useWallet","wallets","error","usePromise","Promise","all","map","path","derivePath","undefined","usePromise","HDWallet","Mutex","globalWrapperWallet","globalWrapperWalletMutex","Mutex","useWrapperAccount","account","usePromise","runExclusive","undefined","HDWallet","random","console","log","address","ex","error","message","WalletAccountDetails","exploreUrl","account","props","accountToUse","useAccount","network","useNetwork","exploreAddressUrl","address","name","React","FlexCol","EthAccountButton","EthAddressWrapper","fromString","FlexRow","gap","NumberStatus","rounded","title","value","to","target","CircularProgress","SelectEx","React","MenuItem","AddressRenderRowBox","React","RenderedAccountMenuItem","selectedAccountIndex","rootWallet","addressNames","iconOnly","iconSize","icons","showFavorite","selectedAccount","useWallet","path","toString","wallet","customName","address","undefined","favorite","React","MenuItem","value","sx","minHeight","paddingBottom","paddingTop","AddressRenderRowBox","disableSharedRef","flexGrow","name","arrayRange","length","start","Array","from","keys","map","x","WalletAccountSelect","addressNames","iconOnly","iconSize","icons","maxAccounts","showFavorite","size","variant","props","activeAccountIndex","setActiveAccountIndex","rootWallet","useWalletContext","disabled","undefined","React","SelectEx","margin","renderValue","selectedAccountIndex","RenderedAccountMenuItem","value","onChange","event","Number","parseInt","target","index","key","CircularProgress","FlexCol","React","WalletAccountSelectBar","addressNames","iconOnly","iconSize","icons","maxAccounts","showFavorite","size","props","React","FlexCol","alignItems","WalletAccountSelect","fullWidth","variant"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-wallet",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.8",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@xylabs/react-select": "~7.1.17",
|
|
55
55
|
"@xylabs/react-shared": "~7.1.17",
|
|
56
56
|
"@xyo-network/account-model": "~5.3.17",
|
|
57
|
-
"@xyo-network/react-address-render": "7.5.
|
|
58
|
-
"@xyo-network/react-network": "7.5.
|
|
57
|
+
"@xyo-network/react-address-render": "7.5.8",
|
|
58
|
+
"@xyo-network/react-network": "7.5.8",
|
|
59
59
|
"@xyo-network/wallet": "~5.3.17",
|
|
60
60
|
"@xyo-network/wallet-model": "~5.3.17",
|
|
61
61
|
"async-mutex": "~0.5.0"
|
|
@@ -69,11 +69,12 @@
|
|
|
69
69
|
"@xylabs/react-identicon": "~7.1.17",
|
|
70
70
|
"@xylabs/react-quick-tip-button": "~7.1.17",
|
|
71
71
|
"@xylabs/sdk-js": "~5.0.90",
|
|
72
|
+
"@xylabs/ts-scripts-common": "~7.5.6",
|
|
72
73
|
"@xylabs/ts-scripts-yarn3": "~7.5.6",
|
|
73
74
|
"@xylabs/tsconfig": "~7.5.6",
|
|
74
75
|
"@xylabs/tsconfig-dom": "~7.5.6",
|
|
75
76
|
"@xylabs/tsconfig-react": "~7.5.6",
|
|
76
|
-
"@xyo-network/react-storybook": "7.5.
|
|
77
|
+
"@xyo-network/react-storybook": "7.5.8",
|
|
77
78
|
"react": "^19.2.4",
|
|
78
79
|
"react-dom": "^19.2.4",
|
|
79
80
|
"react-router-dom": "^7.13.2",
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
"peerDependencies": {
|
|
86
87
|
"@mui/icons-material": ">=6 <8",
|
|
87
88
|
"@mui/material": ">=6 <8",
|
|
89
|
+
"ethers": "^6.16.0",
|
|
88
90
|
"react": "^19",
|
|
89
91
|
"react-dom": "^19",
|
|
90
92
|
"react-router-dom": "^7",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
declare const _default: Meta;
|
|
3
|
-
export default _default;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./DefaultSeedPhrase.tsx").DefaultSeedPhraseProps>;
|
|
5
|
-
declare const WithoutDefaultSeedPhrase: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./DefaultSeedPhrase.tsx").DefaultSeedPhraseProps>;
|
|
6
|
-
declare const WithHiddenDefaultSeedPhrase: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./DefaultSeedPhrase.tsx").DefaultSeedPhraseProps>;
|
|
7
|
-
export { Default, WithHiddenDefaultSeedPhrase, WithoutDefaultSeedPhrase, };
|
|
8
|
-
//# sourceMappingURL=DefaultSeedPhrase.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSeedPhrase.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/SeedPhrase/DefaultSeedPhrase.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;wBAQrD,IAAI;AAHT,wBAGS;AAIT,QAAA,MAAM,OAAO,uJAAoB,CAAA;AAGjC,QAAA,MAAM,wBAAwB,uJAAoB,CAAA;AAGlD,QAAA,MAAM,2BAA2B,uJAAoB,CAAA;AAMrD,OAAO,EACL,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,GAC/D,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
declare const _default: Meta;
|
|
3
|
-
export default _default;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SeedPhraseDialog.tsx").SeedPhraseDialogProps>;
|
|
5
|
-
export { Default };
|
|
6
|
-
//# sourceMappingURL=SeedPhraseDialog.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeedPhraseDialog.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeedPhrase/dialog/SeedPhraseDialog.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;wBASrD,IAAI;AAHT,wBAGS;AAkBT,QAAA,MAAM,OAAO,qJAAoB,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.stories.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
declare const _default: Meta;
|
|
3
|
-
export default _default;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./PhraseDialogActions.tsx").PhraseDialogActionsProps>;
|
|
5
|
-
declare const WithHideGenerate: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./PhraseDialogActions.tsx").PhraseDialogActionsProps>;
|
|
6
|
-
declare const WithHideClear: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./PhraseDialogActions.tsx").PhraseDialogActionsProps>;
|
|
7
|
-
export { Default, WithHideClear, WithHideGenerate, };
|
|
8
|
-
//# sourceMappingURL=PhraseDialogActions.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PhraseDialogActions.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;wBASrD,IAAI;AAHT,wBAGS;AAQT,QAAA,MAAM,OAAO,2JAAoB,CAAA;AAGjC,QAAA,MAAM,gBAAgB,2JAAoB,CAAA;AAG1C,QAAA,MAAM,aAAa,2JAAoB,CAAA;AAGvC,OAAO,EACL,OAAO,EAAE,aAAa,EAAE,gBAAgB,GACzC,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
declare const _default: Meta;
|
|
3
|
-
export default _default;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SeedPhraseTableRow.tsx").SeedPhraseTableRowProps>;
|
|
5
|
-
declare const WithSeedPhrase: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SeedPhraseTableRow.tsx").SeedPhraseTableRowProps>;
|
|
6
|
-
export { Default, WithSeedPhrase };
|
|
7
|
-
//# sourceMappingURL=SeedPhraseTableRow.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeedPhraseTableRow.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeedPhrase/settings/SeedPhraseTableRow.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;wBAUrD,IAAI;AAHT,wBAGS;AAUT,QAAA,MAAM,OAAO,yJAAoB,CAAA;AAGjC,QAAA,MAAM,cAAc,yJAAoB,CAAA;AAMxC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
import { WalletAccountDetails } from './WalletAccountDetails.tsx';
|
|
3
|
-
declare const StorybookEntry: Meta<typeof WalletAccountDetails>;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./WalletAccountDetails.tsx").WalletAccountDetailsProps>;
|
|
5
|
-
export { Default };
|
|
6
|
-
export default StorybookEntry;
|
|
7
|
-
//# sourceMappingURL=WalletAccountDetails.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletAccountDetails.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountDetails/WalletAccountDetails.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,QAAA,MAAM,cAAc,EAKf,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAUtC,QAAA,MAAM,OAAO,6JAAoB,CAAA;AAGjC,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,eAAe,cAAc,CAAA"}
|
package/dist/browser/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
import { WalletAccountDetails } from './WalletAccountDetails.tsx';
|
|
3
|
-
declare const StorybookEntry: Meta<typeof WalletAccountDetails>;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./WalletAccountDetails.tsx").WalletAccountDetailsProps>;
|
|
5
|
-
export { Default };
|
|
6
|
-
export default StorybookEntry;
|
|
7
|
-
//# sourceMappingURL=WalletAccountDetailsWithProvider.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletAccountDetailsWithProvider.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountDetails/WalletAccountDetailsWithProvider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAO1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,QAAA,MAAM,cAAc,EAKf,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAatC,QAAA,MAAM,OAAO,6JAAoB,CAAA;AAGjC,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,eAAe,cAAc,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
import { WalletAccountSelect } from './Select.tsx';
|
|
3
|
-
declare const StorybookEntry: Meta<typeof WalletAccountSelect>;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
5
|
-
declare const WithWallet: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
6
|
-
export { Default, WithWallet };
|
|
7
|
-
export default StorybookEntry;
|
|
8
|
-
//# sourceMappingURL=WalletAccountSelect.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletAccountSelect.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountSelect/WalletAccountSelect.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAMlD,QAAA,MAAM,cAAc,EAMf,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAoBrC,QAAA,MAAM,OAAO,8IAAoB,CAAA;AAGjC,QAAA,MAAM,UAAU,8IAA8B,CAAA;AAG9C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAA;AAE9B,eAAe,cAAc,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
import { WalletAccountSelectBar } from './SelectBar.tsx';
|
|
3
|
-
declare const StorybookEntry: Meta<typeof WalletAccountSelectBar>;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SelectBar.tsx").WalletAccountSelectBarProps>;
|
|
5
|
-
declare const WithWallet: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SelectBar.tsx").WalletAccountSelectBarProps>;
|
|
6
|
-
declare const WithWalletIcon: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SelectBar.tsx").WalletAccountSelectBarProps>;
|
|
7
|
-
declare const WithAdditionalAccounts: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SelectBar.tsx").WalletAccountSelectBarProps>;
|
|
8
|
-
declare const WithAccountFavorites: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./SelectBar.tsx").WalletAccountSelectBarProps>;
|
|
9
|
-
export { Default, WithAccountFavorites, WithAdditionalAccounts, WithWallet, WithWalletIcon, };
|
|
10
|
-
export default StorybookEntry;
|
|
11
|
-
//# sourceMappingURL=WalletAccountSelectBar.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletAccountSelectBar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountSelect/WalletAccountSelectBar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAI1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAKxD,QAAA,MAAM,cAAc,EAMf,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAA;AA2BxC,QAAA,MAAM,OAAO,oJAAoB,CAAA;AAGjC,QAAA,MAAM,UAAU,oJAAoB,CAAA;AAGpC,QAAA,MAAM,cAAc,oJAAoB,CAAA;AAGxC,QAAA,MAAM,sBAAsB,oJAAoB,CAAA;AAGhD,QAAA,MAAM,oBAAoB,oJAAiC,CAAA;AAE3D,OAAO,EACL,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,UAAU,EAAE,cAAc,GAClF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/dist/browser/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-vite';
|
|
2
|
-
import { WalletAccountSelect } from './Select.tsx';
|
|
3
|
-
declare const StorybookEntry: Meta<typeof WalletAccountSelect>;
|
|
4
|
-
declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
5
|
-
declare const DefaultIcons: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
6
|
-
declare const DefaultSmall: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
7
|
-
declare const DefaultSmallIcon: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
8
|
-
declare const IconsOnly: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
9
|
-
declare const IconsOnlySmall: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Select.tsx").WalletAccountSelectProps>;
|
|
10
|
-
export { Default, DefaultIcons, DefaultSmall, DefaultSmallIcon, IconsOnly, IconsOnlySmall, };
|
|
11
|
-
export default StorybookEntry;
|
|
12
|
-
//# sourceMappingURL=WalletAccountSelectWithProvider.stories.d.ts.map
|
package/dist/browser/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletAccountSelectWithProvider.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/WalletAccountSelect/WalletAccountSelectWithProvider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAGlD,QAAA,MAAM,cAAc,EAMf,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAMrC,QAAA,MAAM,OAAO,8IAAoB,CAAA;AAGjC,QAAA,MAAM,YAAY,8IAAoB,CAAA;AAGtC,QAAA,MAAM,YAAY,8IAAoB,CAAA;AAGtC,QAAA,MAAM,gBAAgB,8IAAoB,CAAA;AAG1C,QAAA,MAAM,SAAS,8IAAoB,CAAA;AAGnC,QAAA,MAAM,cAAc,8IAAoB,CAAA;AAKxC,OAAO,EACL,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,GACjF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
package/dist/browser/components/WalletAccountSelect/stories/WalletProviderDecorator.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WalletProviderDecorator.d.ts","sourceRoot":"","sources":["../../../../../src/components/WalletAccountSelect/stories/WalletProviderDecorator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAQtD,eAAO,MAAM,uBAAuB,EAAE,SAgBrC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/WalletAccountSelect/stories/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { EnumValue } from '@xylabs/sdk-js';
|
|
2
|
-
import { Enum } from '@xylabs/sdk-js';
|
|
3
|
-
import type { DependencyList } from 'react';
|
|
4
|
-
export declare const State: Enum<{
|
|
5
|
-
pending: "pending";
|
|
6
|
-
rejected: "rejected";
|
|
7
|
-
resolved: "resolved";
|
|
8
|
-
}>;
|
|
9
|
-
export type State = EnumValue<typeof State>;
|
|
10
|
-
/**
|
|
11
|
-
* usePromise -
|
|
12
|
-
*/
|
|
13
|
-
export declare const usePromise: <TResult>(promise: () => Promise<TResult | undefined>, dependencies: DependencyList, debug?: string | undefined) => [TResult | undefined, Error | undefined, State | undefined];
|
|
14
|
-
//# sourceMappingURL=usePromise.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePromise.d.ts","sourceRoot":"","sources":["../../../../src/contexts/Wallet/usePromise.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAK3C,eAAO,MAAM,KAAK;;;;EAIhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,KAAK,CAAC,CAAA;AAE3C;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,EAChC,SAAS,MAAM,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,EAC3C,cAAc,cAAc,EAC5B,QAAO,MAAM,GAAG,SAAqB,KACpC,CAAC,OAAO,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CA6D5D,CAAA"}
|