├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── config.yml ├── dependabot.yml └── workflows │ ├── audit.yml │ ├── check-commit-signing.yml │ ├── code-check.yml │ ├── crowdin-pull.yml │ ├── crowdin-push.yml │ ├── dependency-review.yml │ ├── extract-strings.yml │ └── stale-issue.yml ├── .gitignore ├── .husky └── pre-commit ├── .npmrc ├── .nvmrc ├── .prettierrc.yml ├── .repo-content-updater.yml ├── .vscode ├── extensions.json └── settings.json ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── crowdin.yml ├── lerna.json ├── package-lock.json ├── package.json ├── packages ├── api-react │ ├── .babelrc │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── load-package.cjs │ ├── package.json │ ├── rollup.config.mjs │ ├── src │ │ ├── @types │ │ │ ├── MethodFirstParameter.ts │ │ │ ├── MethodReturnType.ts │ │ │ ├── ServiceConstructor.ts │ │ │ └── ServiceOld.ts │ │ ├── api.ts │ │ ├── chiaLazyBaseQuery.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── useClearCache.ts │ │ │ ├── useCurrentFingerprintSettings.ts │ │ │ ├── useFingerprintSettings.ts │ │ │ ├── useForceUpdate.ts │ │ │ ├── useGetFarmerFullNodeConnectionsQuery.ts │ │ │ ├── useGetHarvesterConnectionsQuery.ts │ │ │ ├── useGetHarvesterQuery.ts │ │ │ ├── useGetHarvesterStats.ts │ │ │ ├── useGetLatestBlocksQuery.ts │ │ │ ├── useGetLatestPeakTimestampQuery.ts │ │ │ ├── useGetLocalCatName.ts │ │ │ ├── useGetNFTWallets.ts │ │ │ ├── useGetThrottlePlotQueueQuery.ts │ │ │ ├── useGetTotalHarvestersSummaryQuery.ts │ │ │ ├── useLocalStorage.ts │ │ │ ├── useNFTCoinAdded.ts │ │ │ ├── useNFTCoinDIDSet.ts │ │ │ ├── useNFTCoinRemoved.ts │ │ │ ├── useNFTCoinUpdated.ts │ │ │ ├── usePrefs.ts │ │ │ ├── useService.ts │ │ │ ├── useServices.ts │ │ │ ├── useSubscribeToEvent.ts │ │ │ ├── useThrottleQuery.ts │ │ │ └── useVCEvents.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── client.ts │ │ │ ├── daemon.ts │ │ │ ├── dataLayer.ts │ │ │ ├── farmer.ts │ │ │ ├── fullNode.ts │ │ │ ├── harvester.ts │ │ │ ├── index.ts │ │ │ ├── plotter.ts │ │ │ └── wallet.ts │ │ ├── slices │ │ │ ├── api.ts │ │ │ └── index.ts │ │ ├── store.ts │ │ └── utils │ │ │ ├── EventEmitter.ts │ │ │ ├── normalizePoolState.ts │ │ │ ├── onCacheEntryAddedInvalidate.ts │ │ │ ├── reduxToolkitEndpointAbstractions.ts │ │ │ └── removeOldPoints.ts │ ├── tsconfig.eslint.json │ └── tsconfig.json ├── api │ ├── .babelrc │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── load-package.cjs │ ├── package.json │ ├── rollup.config.mjs │ ├── src │ │ ├── @types │ │ │ ├── AutoClaim.ts │ │ │ ├── Block.ts │ │ │ ├── BlockHeader.ts │ │ │ ├── BlockRecord.ts │ │ │ ├── BlockchainConnection.ts │ │ │ ├── BlockchainState.ts │ │ │ ├── CATToken.ts │ │ │ ├── CalculateRoyaltiesRequest.ts │ │ │ ├── CalculateRoyaltiesResponse.ts │ │ │ ├── Challenge.ts │ │ │ ├── Coin.ts │ │ │ ├── Coin2.ts │ │ │ ├── CoinSolution.ts │ │ │ ├── Connection.ts │ │ │ ├── DataLayerChange.ts │ │ │ ├── DataLayerRootHash.ts │ │ │ ├── FarmedAmount.ts │ │ │ ├── FarmingInfo.ts │ │ │ ├── FeeEstimate.ts │ │ │ ├── Fingerprint.ts │ │ │ ├── Foliage.ts │ │ │ ├── FoliageTransactionBlock.ts │ │ │ ├── G2Element.ts │ │ │ ├── Harvester.ts │ │ │ ├── HarvesterPlotsPaginated.ts │ │ │ ├── Header.ts │ │ │ ├── InitialTargetState.ts │ │ │ ├── KeyData.ts │ │ │ ├── KeyringStatus.ts │ │ │ ├── MessageInterface.ts │ │ │ ├── NFTAttribute.ts │ │ │ ├── NFTInfo.ts │ │ │ ├── NewFarmingInfo.ts │ │ │ ├── OfferCoinOfInterest.ts │ │ │ ├── OfferSummaryRecord.ts │ │ │ ├── OfferTradeRecord.ts │ │ │ ├── Peak.ts │ │ │ ├── Plot.ts │ │ │ ├── PlotAdd.ts │ │ │ ├── PlotNFT.ts │ │ │ ├── PlotNFTExternal.ts │ │ │ ├── PlotQueueItem.ts │ │ │ ├── Plotter.ts │ │ │ ├── Point.ts │ │ │ ├── PoolInfo.ts │ │ │ ├── PoolState.ts │ │ │ ├── PoolWalletStatus.ts │ │ │ ├── PrivateKey.ts │ │ │ ├── Program.ts │ │ │ ├── ProofOfSpace.ts │ │ │ ├── ProofsOfSpace.ts │ │ │ ├── PuzzleDecorator.ts │ │ │ ├── Response.ts │ │ │ ├── RewardTargets.ts │ │ │ ├── RoyaltyCalculationFungibleAsset.ts │ │ │ ├── RoyaltyCalculationFungibleAssetPayout.ts │ │ │ ├── RoyaltyCalculationRoyaltyAsset.ts │ │ │ ├── ServiceClass.ts │ │ │ ├── SignagePoint.ts │ │ │ ├── SpendBundle.ts │ │ │ ├── SubBlock.ts │ │ │ ├── TradeRecord.ts │ │ │ ├── Transaction.ts │ │ │ ├── UnconfirmedPlotNFT.ts │ │ │ ├── Wallet.ts │ │ │ ├── WalletAddress.ts │ │ │ ├── WalletBalance.ts │ │ │ ├── WalletCreate.ts │ │ │ ├── crypto-browserify.d.ts │ │ │ ├── helpers │ │ │ │ └── Modify.ts │ │ │ └── index.ts │ │ ├── Client.ts │ │ ├── Message.test.ts │ │ ├── Message.ts │ │ ├── constants │ │ │ ├── ConnectionState.ts │ │ │ ├── OfferState.ts │ │ │ ├── PassphrasePromptReason.ts │ │ │ ├── PlotFilter.ts │ │ │ ├── PlotNFTState.ts │ │ │ ├── PlotStatus.ts │ │ │ ├── PlotterName.ts │ │ │ ├── Plotters.ts │ │ │ ├── ServiceConnectionName.ts │ │ │ ├── ServiceHumanName.ts │ │ │ ├── ServiceName.ts │ │ │ ├── SyncingStatus.ts │ │ │ ├── TransactionType.ts │ │ │ ├── TransactionTypeFilterMode.ts │ │ │ ├── WalletType.ts │ │ │ ├── defaultPlotter.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── Daemon.ts │ │ │ ├── DataLayer.ts │ │ │ ├── Events.ts │ │ │ ├── Farmer.ts │ │ │ ├── FullNode.ts │ │ │ ├── Harvester.ts │ │ │ ├── PlotterService.ts │ │ │ ├── Service.test.ts │ │ │ ├── Service.ts │ │ │ ├── WalletService.test.ts │ │ │ ├── WalletService.ts │ │ │ └── index.ts │ │ ├── tests │ │ │ └── utils │ │ │ │ └── calculateRoyalties.test.ts │ │ ├── utils │ │ │ ├── ErrorData.ts │ │ │ ├── calculateRoyalties.ts │ │ │ ├── defaultsForPlotter.ts │ │ │ ├── english.ts │ │ │ ├── index.ts │ │ │ ├── optionsForPlotter.ts │ │ │ ├── sleep.ts │ │ │ ├── toBech32m.test.ts │ │ │ ├── toBech32m.ts │ │ │ ├── toCamelCase.test.ts │ │ │ ├── toCamelCase.ts │ │ │ ├── toSafeNumber.test.ts │ │ │ ├── toSafeNumber.ts │ │ │ ├── toSnakeCase.ts │ │ │ └── toSnakeCast.test.ts │ │ └── wallets │ │ │ ├── CAT.ts │ │ │ ├── DID.ts │ │ │ ├── DL.ts │ │ │ ├── NFT.ts │ │ │ ├── Pool.ts │ │ │ ├── RL.ts │ │ │ ├── VC.ts │ │ │ └── index.ts │ ├── tsconfig.eslint.json │ └── tsconfig.json ├── core │ ├── .babelrc │ ├── .gitignore │ ├── .linguirc │ ├── load-package.cjs │ ├── package.json │ ├── rollup.config.mjs │ ├── src │ │ ├── components │ │ │ ├── Accordion │ │ │ │ ├── Accordion.tsx │ │ │ │ └── index.ts │ │ │ ├── Address │ │ │ │ ├── Address.tsx │ │ │ │ └── index.ts │ │ │ ├── AddressBookProvider │ │ │ │ ├── AddressBookProvider.tsx │ │ │ │ └── index.ts │ │ │ ├── AdvancedOptions │ │ │ │ ├── AdvancedOptions.tsx │ │ │ │ └── index.ts │ │ │ ├── AlertDialog │ │ │ │ ├── AlertDialog.tsx │ │ │ │ └── index.ts │ │ │ ├── Amount │ │ │ │ ├── Amount.tsx │ │ │ │ ├── NumberFormatCustom.tsx │ │ │ │ └── index.ts │ │ │ ├── AspectRatio │ │ │ │ ├── AspectRatio.tsx │ │ │ │ └── index.ts │ │ │ ├── Auth │ │ │ │ ├── AuthProvider.tsx │ │ │ │ └── index.ts │ │ │ ├── Autocomplete │ │ │ │ ├── Autocomplete.tsx │ │ │ │ └── index.ts │ │ │ ├── Back │ │ │ │ ├── Back.tsx │ │ │ │ └── index.ts │ │ │ ├── Button │ │ │ │ ├── Button.tsx │ │ │ │ └── index.ts │ │ │ ├── ButtonLoading │ │ │ │ ├── ButtonLoading.tsx │ │ │ │ └── index.ts │ │ │ ├── ButtonSelected │ │ │ │ ├── ButtonSelected.tsx │ │ │ │ └── index.ts │ │ │ ├── Card │ │ │ │ ├── Card.tsx │ │ │ │ └── index.ts │ │ │ ├── CardHero │ │ │ │ ├── CardHero.tsx │ │ │ │ └── index.ts │ │ │ ├── CardKeyValue │ │ │ │ ├── CardKeyValue.tsx │ │ │ │ └── index.ts │ │ │ ├── CardListItem │ │ │ │ ├── CardListItem.tsx │ │ │ │ └── index.ts │ │ │ ├── CardSimple │ │ │ │ ├── CardSimple.tsx │ │ │ │ └── index.ts │ │ │ ├── CardStep │ │ │ │ ├── CardStep.tsx │ │ │ │ └── index.ts │ │ │ ├── Checkbox │ │ │ │ ├── Checkbox.tsx │ │ │ │ └── index.ts │ │ │ ├── ConfirmDialog │ │ │ │ ├── ConfirmDialog.tsx │ │ │ │ └── index.ts │ │ │ ├── CopyToClipboard │ │ │ │ ├── CopyToClipboard.tsx │ │ │ │ └── index.ts │ │ │ ├── CurrencyCode │ │ │ │ ├── CurrencyCode.tsx │ │ │ │ └── index.ts │ │ │ ├── DarkModeToggle │ │ │ │ ├── DarkModeToggle.tsx │ │ │ │ └── index.ts │ │ │ ├── DialogActions │ │ │ │ ├── DialogActions.tsx │ │ │ │ └── index.ts │ │ │ ├── Dropdown │ │ │ │ ├── Dropdown.tsx │ │ │ │ ├── DropdownActions.tsx │ │ │ │ ├── DropdownBase.tsx │ │ │ │ ├── DropdownButton.tsx │ │ │ │ ├── DropdownIconButton.tsx │ │ │ │ └── index.ts │ │ │ ├── Dropzone │ │ │ │ ├── Dropzone.tsx │ │ │ │ └── index.ts │ │ │ ├── ErrorBoundary │ │ │ │ ├── ErrorBoundary.tsx │ │ │ │ └── index.ts │ │ │ ├── EstimatedFee │ │ │ │ ├── EstimatedFee.tsx │ │ │ │ └── index.ts │ │ │ ├── Fee │ │ │ │ ├── Fee.tsx │ │ │ │ └── index.ts │ │ │ ├── Flex │ │ │ │ ├── Flex.tsx │ │ │ │ └── index.ts │ │ │ ├── Fonts │ │ │ │ ├── Fonts.tsx │ │ │ │ ├── Roboto-Light.ttf │ │ │ │ ├── Roboto-Medium.ttf │ │ │ │ ├── Roboto-Regular.ttf │ │ │ │ ├── index.ts │ │ │ │ ├── ionicons.eot │ │ │ │ ├── ionicons.svg │ │ │ │ ├── ionicons.ttf │ │ │ │ ├── ionicons.woff │ │ │ │ └── ionicons.woff2 │ │ │ ├── Form │ │ │ │ ├── Form.tsx │ │ │ │ └── index.ts │ │ │ ├── FormBackButton │ │ │ │ ├── FormBackButton.tsx │ │ │ │ └── index.ts │ │ │ ├── FormatBytes │ │ │ │ ├── FormatBytes.tsx │ │ │ │ └── index.ts │ │ │ ├── FormatConnectionStatus │ │ │ │ ├── FormatConnectionStatus.tsx │ │ │ │ └── index.ts │ │ │ ├── FormatLargeNumber │ │ │ │ ├── FormatLargeNumber.tsx │ │ │ │ └── index.ts │ │ │ ├── GuestRoute │ │ │ │ ├── GuestRoute.tsx │ │ │ │ └── index.ts │ │ │ ├── Heading │ │ │ │ ├── Heading.tsx │ │ │ │ └── index.ts │ │ │ ├── IconButton │ │ │ │ ├── IconButton.tsx │ │ │ │ └── index.ts │ │ │ ├── IconMessage │ │ │ │ ├── IconMessage.tsx │ │ │ │ └── index.ts │ │ │ ├── Indicator │ │ │ │ ├── Indicator.tsx │ │ │ │ └── index.ts │ │ │ ├── InputBase │ │ │ │ ├── InputBase.tsx │ │ │ │ └── index.ts │ │ │ ├── LayoutDashboard │ │ │ │ ├── LayoutDashboard.tsx │ │ │ │ ├── LayoutDashboardSub.tsx │ │ │ │ ├── NewerAppVersionAvailable.tsx │ │ │ │ └── index.ts │ │ │ ├── LayoutHero │ │ │ │ ├── LayoutHero.tsx │ │ │ │ └── index.ts │ │ │ ├── LayoutLoading │ │ │ │ ├── LayoutLoading.tsx │ │ │ │ └── index.ts │ │ │ ├── LayoutMain │ │ │ │ ├── LayoutFooter.tsx │ │ │ │ ├── LayoutMain.tsx │ │ │ │ └── index.ts │ │ │ ├── LineChart │ │ │ │ ├── LineChart.tsx │ │ │ │ └── index.ts │ │ │ ├── Link │ │ │ │ ├── Link.tsx │ │ │ │ └── index.ts │ │ │ ├── Loading │ │ │ │ ├── Loading.tsx │ │ │ │ └── index.ts │ │ │ ├── LoadingOverlay │ │ │ │ ├── LoadingOverlay.tsx │ │ │ │ └── index.ts │ │ │ ├── LocaleProvider │ │ │ │ ├── LocaleProvider.tsx │ │ │ │ └── index.ts │ │ │ ├── LocaleToggle │ │ │ │ ├── LocaleToggle.tsx │ │ │ │ └── index.ts │ │ │ ├── Log │ │ │ │ ├── Log.tsx │ │ │ │ └── index.ts │ │ │ ├── Logo │ │ │ │ ├── Logo.tsx │ │ │ │ └── index.ts │ │ │ ├── Menu │ │ │ │ ├── Menu.tsx │ │ │ │ └── index.ts │ │ │ ├── MenuItem │ │ │ │ ├── MenuItem.tsx │ │ │ │ └── index.ts │ │ │ ├── ModalDialogs │ │ │ │ ├── ModalDialogs.tsx │ │ │ │ ├── ModalDialogsContext.tsx │ │ │ │ ├── ModalDialogsProvider.tsx │ │ │ │ └── index.ts │ │ │ ├── Mode │ │ │ │ ├── ModeProvider.tsx │ │ │ │ └── index.ts │ │ │ ├── MojoToCAT │ │ │ │ ├── MojoToCAT.tsx │ │ │ │ └── index.ts │ │ │ ├── MojoToChia │ │ │ │ ├── MojoToChia.tsx │ │ │ │ └── index.ts │ │ │ ├── More │ │ │ │ ├── More.tsx │ │ │ │ └── index.ts │ │ │ ├── Mute │ │ │ │ ├── Mute.tsx │ │ │ │ └── index.ts │ │ │ ├── Persist │ │ │ │ ├── Persist.tsx │ │ │ │ └── index.ts │ │ │ ├── PrivateRoute │ │ │ │ ├── PrivateRoute.tsx │ │ │ │ └── index.ts │ │ │ ├── RadioGroup │ │ │ │ ├── RadioGroup.tsx │ │ │ │ └── index.ts │ │ │ ├── SandboxedIframe │ │ │ │ ├── SandboxedIframe.tsx │ │ │ │ └── index.ts │ │ │ ├── Scrollbar │ │ │ │ ├── Scrollbar.tsx │ │ │ │ ├── ScrollbarFlex.tsx │ │ │ │ ├── ScrollbarVirtuoso.tsx │ │ │ │ └── index.ts │ │ │ ├── Select │ │ │ │ ├── Select.tsx │ │ │ │ └── index.ts │ │ │ ├── Settings │ │ │ │ ├── Settings.tsx │ │ │ │ ├── SettingsApp.tsx │ │ │ │ ├── SettingsFooter.tsx │ │ │ │ ├── SettingsHR.tsx │ │ │ │ ├── SettingsLabel.tsx │ │ │ │ ├── SettingsSection.tsx │ │ │ │ ├── SettingsText.tsx │ │ │ │ ├── SettingsTitle.tsx │ │ │ │ └── index.ts │ │ │ ├── SideBarItem │ │ │ │ ├── SideBarItem.tsx │ │ │ │ └── index.ts │ │ │ ├── Spacer │ │ │ │ ├── Spacer.tsx │ │ │ │ └── index.ts │ │ │ ├── Spinner │ │ │ │ ├── Spinner.tsx │ │ │ │ └── index.ts │ │ │ ├── StateIndicator │ │ │ │ ├── StateIndicator.tsx │ │ │ │ ├── StateIndicatorDot.tsx │ │ │ │ └── index.ts │ │ │ ├── StateTypography │ │ │ │ ├── StateTypography.tsx │ │ │ │ └── index.ts │ │ │ ├── Table │ │ │ │ ├── Table.tsx │ │ │ │ ├── TableControlled.tsx │ │ │ │ └── index.ts │ │ │ ├── TextField │ │ │ │ ├── TextField.tsx │ │ │ │ └── index.ts │ │ │ ├── TextFieldNumber │ │ │ │ ├── NumberFormatCustom.tsx │ │ │ │ ├── TextFieldNumber.tsx │ │ │ │ └── index.ts │ │ │ ├── ThemeProvider │ │ │ │ ├── ThemeProvider.tsx │ │ │ │ └── index.ts │ │ │ ├── ToolbarSpacing │ │ │ │ ├── ToolbarSpacing.tsx │ │ │ │ └── index.ts │ │ │ ├── Tooltip │ │ │ │ ├── Tooltip.tsx │ │ │ │ └── index.ts │ │ │ ├── TooltipIcon │ │ │ │ ├── TooltipIcon.tsx │ │ │ │ └── index.ts │ │ │ ├── TooltipTypography │ │ │ │ ├── TooltipTypography.tsx │ │ │ │ └── index.ts │ │ │ ├── Truncate │ │ │ │ ├── Truncate.tsx │ │ │ │ └── index.ts │ │ │ ├── UnitFormat │ │ │ │ ├── UnitFormat.tsx │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── constants │ │ │ ├── Color.ts │ │ │ ├── CrCatsWellKnownProviders.ts │ │ │ ├── Mode.ts │ │ │ ├── State.ts │ │ │ ├── StateColor.ts │ │ │ ├── Unit.ts │ │ │ ├── UnitAliases.ts │ │ │ ├── UnitFractionDigits.ts │ │ │ ├── UnitValue.ts │ │ │ └── index.ts │ │ ├── errors │ │ │ ├── FileSizeError.ts │ │ │ └── index.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── useAddressBook.tsx │ │ │ ├── useAppVersion.ts │ │ │ ├── useAuth.ts │ │ │ ├── useCurrencyCode.ts │ │ │ ├── useDarkMode.ts │ │ │ ├── useGetLatestVersionFromWebsite.ts │ │ │ ├── useHiddenList.ts │ │ │ ├── useIsSimulator.ts │ │ │ ├── useKeyringMigrationPrompt.tsx │ │ │ ├── useLocale.ts │ │ │ ├── useMode.ts │ │ │ ├── useOpenDialog.ts │ │ │ ├── useOpenExternal.ts │ │ │ ├── usePersist.ts │ │ │ ├── usePersistState.ts │ │ │ ├── useScrollbarsSettings.tsx │ │ │ ├── useSerializedNavigationState.ts │ │ │ ├── useShowDebugInformation.ts │ │ │ ├── useShowError.tsx │ │ │ ├── useShowSaveDialog.ts │ │ │ ├── useSkipMigration.ts │ │ │ ├── useTrans.ts │ │ │ ├── useValidateChangePassphraseParams.tsx │ │ │ └── useWalletThemeColor.ts │ │ ├── index.ts │ │ ├── locales │ │ │ ├── af-ZA │ │ │ │ └── messages.po │ │ │ ├── ak-GH │ │ │ │ └── messages.po │ │ │ ├── ar-SA │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── be-BY │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── bg-BG │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── bn-BD │ │ │ │ └── messages.po │ │ │ ├── bn-IN │ │ │ │ └── messages.po │ │ │ ├── bs-BA │ │ │ │ └── messages.po │ │ │ ├── ca-ES │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── cs-CZ │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── cy-GB │ │ │ │ └── messages.po │ │ │ ├── da-DK │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── de-DE │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── el-GR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── en-AU │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── en-NZ │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── en-PT │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── en-US │ │ │ │ └── messages.po │ │ │ ├── eo-UY │ │ │ │ └── messages.po │ │ │ ├── es-AR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── es-ES │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── es-MX │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── fa-IR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── fi-FI │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── fr-FR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── he-IL │ │ │ │ └── messages.po │ │ │ ├── hi-IN │ │ │ │ └── messages.po │ │ │ ├── hr-HR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── hu-HU │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── id-ID │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── index.ts │ │ │ ├── is-IS │ │ │ │ └── messages.po │ │ │ ├── it-IT │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── ja-JP │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── km-KH │ │ │ │ └── messages.po │ │ │ ├── ko-KR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── lol-US │ │ │ │ └── messages.po │ │ │ ├── lt-LT │ │ │ │ └── messages.po │ │ │ ├── lv-LV │ │ │ │ └── messages.po │ │ │ ├── mk-MK │ │ │ │ └── messages.po │ │ │ ├── mn-MN │ │ │ │ └── messages.po │ │ │ ├── nl-NL │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── no-NO │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── pa-IN │ │ │ │ └── messages.po │ │ │ ├── pl-PL │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── pt-BR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── pt-PT │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── ro-RO │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── ru-RU │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── si-LK │ │ │ │ └── messages.po │ │ │ ├── sk-SK │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── sl-SI │ │ │ │ └── messages.po │ │ │ ├── sq-AL │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── sr-SP │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── srp │ │ │ │ └── messages.po │ │ │ ├── sv-SE │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── th-TH │ │ │ │ └── messages.po │ │ │ ├── tlh-AA │ │ │ │ └── messages.po │ │ │ ├── tr-TR │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── uk-UA │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ ├── vi-VN │ │ │ │ └── messages.po │ │ │ ├── zh-CN │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ │ └── zh-TW │ │ │ │ ├── messages.js │ │ │ │ └── messages.po │ │ ├── screens │ │ │ ├── SelectKey │ │ │ │ ├── EmojiAndColorPicker.tsx │ │ │ │ ├── Search.tsx │ │ │ │ ├── SelectKey.tsx │ │ │ │ ├── SelectKeyDeleteKeyDialog.tsx │ │ │ │ ├── SelectKeyDetailDialog.tsx │ │ │ │ ├── SelectKeyItem.tsx │ │ │ │ ├── SelectKeyRenameForm.tsx │ │ │ │ ├── WalletDeleteDialog.tsx │ │ │ │ ├── WalletStatus.tsx │ │ │ │ ├── WalletStatusHeight.tsx │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── theme │ │ │ ├── dark.ts │ │ │ ├── default.ts │ │ │ ├── index.ts │ │ │ └── light.ts │ │ └── utils │ │ │ ├── activateLocale.ts │ │ │ ├── bigNumberToLocaleString.ts │ │ │ ├── blockHeightToTimestamp.ts │ │ │ ├── blockRewards.ts │ │ │ ├── catToMojo.ts │ │ │ ├── chiaFormatter.ts │ │ │ ├── chiaToMojo.ts │ │ │ ├── compareAppVersion.test.ts │ │ │ ├── compareAppVersion.ts │ │ │ ├── getPercentPointsSuccessfull.ts │ │ │ ├── getPoolInfo.ts │ │ │ ├── getTransactionResult.ts │ │ │ ├── getUnit │ │ │ ├── getUnitValue.ts │ │ │ ├── getWalletSyncingStatus.ts │ │ │ ├── index.ts │ │ │ ├── isValidURL.test.ts │ │ │ ├── isValidURL.ts │ │ │ ├── isWindows.ts │ │ │ ├── lru.test.ts │ │ │ ├── lru.ts │ │ │ ├── mojoToCAT.ts │ │ │ ├── mojoToCATLocaleString.ts │ │ │ ├── mojoToChia.ts │ │ │ ├── mojoToChiaLocaleString.ts │ │ │ ├── normalizePoolState.ts │ │ │ ├── removeOldPoints.ts │ │ │ ├── sleep.ts │ │ │ ├── useColorModeValue.ts │ │ │ └── validAddress.ts │ ├── tsconfig.eslint.json │ └── tsconfig.json ├── gui │ ├── .env.example │ ├── .linguirc │ ├── CODE_OF_CONDUCT.md │ ├── LICENSE │ ├── README.md │ ├── babel.config.js │ ├── chiablockchain.provisionprofile │ ├── entitlements.mac.plist │ ├── installer.nsh │ ├── package.json │ ├── playwright.config.js │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── remote.md │ ├── src │ │ ├── @types │ │ │ ├── CacheAPI.ts │ │ │ ├── CacheInfo.ts │ │ │ ├── CacheInfoBase.ts │ │ │ ├── Driver.ts │ │ │ ├── Headers.ts │ │ │ ├── Metadata.ts │ │ │ ├── MetadataOnDemand.ts │ │ │ ├── MetadataState.ts │ │ │ ├── NFTData.ts │ │ │ ├── NFTOnDemand.ts │ │ │ ├── NFTState.ts │ │ │ ├── NFTVisibility.ts │ │ │ ├── NFTsDataStatistics.ts │ │ │ ├── Notification.ts │ │ │ ├── Offer.ts │ │ │ ├── OfferBuilderData.ts │ │ │ ├── OfferOnDemand.ts │ │ │ ├── OfferState.ts │ │ │ ├── OfferSummary.ts │ │ │ ├── Pair.ts │ │ │ ├── WalletConnectCommand.ts │ │ │ ├── WalletConnectCommandParam.ts │ │ │ ├── WalletConnectCommandParamName.ts │ │ │ ├── WalletConnectMetadata.ts │ │ │ ├── WalletConnectNamespaces.ts │ │ │ └── svgr.d.ts │ │ ├── assets │ │ │ ├── fonts │ │ │ │ ├── Roboto-Light.ttf │ │ │ │ ├── Roboto-Medium.ttf │ │ │ │ ├── Roboto-Regular.ttf │ │ │ │ ├── ionicons.eot │ │ │ │ ├── ionicons.svg │ │ │ │ ├── ionicons.ttf │ │ │ │ ├── ionicons.woff │ │ │ │ └── ionicons.woff2 │ │ │ └── img │ │ │ │ ├── arrow-down.svg │ │ │ │ ├── audio-blob.svg │ │ │ │ ├── audio-small.svg │ │ │ │ ├── audio.png │ │ │ │ ├── audio.svg │ │ │ │ ├── audio_dark.png │ │ │ │ ├── check.svg │ │ │ │ ├── checkmark.svg │ │ │ │ ├── chia.icns │ │ │ │ ├── chia.ico │ │ │ │ ├── chia.png │ │ │ │ ├── chia64x64.png │ │ │ │ ├── chia_circle.png │ │ │ │ ├── chia_circle.svg │ │ │ │ ├── chia_logo.svg │ │ │ │ ├── circle-cropped.png │ │ │ │ ├── document-blob.svg │ │ │ │ ├── document-small.svg │ │ │ │ ├── document.png │ │ │ │ ├── document_dark.png │ │ │ │ ├── farm_sidebar.svg │ │ │ │ ├── filter.svg │ │ │ │ ├── help_sidebar.svg │ │ │ │ ├── home_sidebar.svg │ │ │ │ ├── image.png │ │ │ │ ├── image_dark.png │ │ │ │ ├── model-blob.svg │ │ │ │ ├── model-small.svg │ │ │ │ ├── model.png │ │ │ │ ├── model_dark.png │ │ │ │ ├── multi-select.svg │ │ │ │ ├── multi_select.svg │ │ │ │ ├── next.svg │ │ │ │ ├── nft-small-frame.svg │ │ │ │ ├── noun_Farm.svg │ │ │ │ ├── plot_sidebar.svg │ │ │ │ ├── pool_sidebar.svg │ │ │ │ ├── previous.svg │ │ │ │ ├── reload.svg │ │ │ │ ├── search.svg │ │ │ │ ├── unknown-blob.svg │ │ │ │ ├── unknown-small.svg │ │ │ │ ├── unknown.png │ │ │ │ ├── unknown_dark.png │ │ │ │ ├── vc_empty.png │ │ │ │ ├── video-blob.svg │ │ │ │ ├── video-small.svg │ │ │ │ ├── video.png │ │ │ │ ├── video_dark.png │ │ │ │ └── wallet_sidebar.svg │ │ ├── components │ │ │ ├── about │ │ │ │ └── About.tsx │ │ │ ├── addressbook │ │ │ │ ├── AddressBook.tsx │ │ │ │ ├── AddressBookMenuItem.tsx │ │ │ │ ├── AddressBookSideBar.tsx │ │ │ │ ├── ContactAdd.tsx │ │ │ │ ├── ContactEdit.tsx │ │ │ │ ├── ContactSummary.tsx │ │ │ │ └── MyContact.tsx │ │ │ ├── app │ │ │ │ ├── App.tsx │ │ │ │ ├── AppAutoLogin.tsx │ │ │ │ ├── AppKeyringMigrator.tsx │ │ │ │ ├── AppPassPrompt.tsx │ │ │ │ ├── AppProviders.tsx │ │ │ │ ├── AppRouter.tsx │ │ │ │ ├── AppSelectMode.tsx │ │ │ │ ├── AppState.tsx │ │ │ │ ├── AppStatusHeader.tsx │ │ │ │ ├── AppTestnetIndicator.tsx │ │ │ │ ├── AppVersionWarning.tsx │ │ │ │ └── LogoutButton.tsx │ │ │ ├── block │ │ │ │ ├── Block.jsx │ │ │ │ └── BlockTitle.tsx │ │ │ ├── cache │ │ │ │ ├── CacheContext.ts │ │ │ │ └── CacheProvider.tsx │ │ │ ├── chiatools │ │ │ │ ├── ChiaToolsPage.tsx │ │ │ │ └── logViewer │ │ │ │ │ ├── LogRecord.tsx │ │ │ │ │ ├── LogViewer.tsx │ │ │ │ │ ├── LogViewerCard.tsx │ │ │ │ │ ├── LogViewerToolbar.tsx │ │ │ │ │ ├── LogViewerTypes.ts │ │ │ │ │ └── LogViewerUtils.tsx │ │ │ ├── dashboard │ │ │ │ └── DashboardSideBar.tsx │ │ │ ├── did │ │ │ │ └── DIDProfileDropdown.tsx │ │ │ ├── farm │ │ │ │ ├── Farm.tsx │ │ │ │ ├── FarmCloseConnection.tsx │ │ │ │ ├── FarmFullNodeConnections.tsx │ │ │ │ ├── FarmHeader.tsx │ │ │ │ ├── FarmHealth.tsx │ │ │ │ ├── FarmHero.tsx │ │ │ │ ├── FarmLastAttemptedProof.tsx │ │ │ │ ├── FarmLatestBlockChallenges.tsx │ │ │ │ ├── FarmManageFarmingRewards.tsx │ │ │ │ ├── FarmYourHarvesterNetwork.tsx │ │ │ │ ├── PoolingHealth.tsx │ │ │ │ └── card │ │ │ │ │ ├── EstimatedEarning.tsx │ │ │ │ │ ├── ExpectedTimeToWin.tsx │ │ │ │ │ ├── FarmCardNotAvailable.tsx │ │ │ │ │ ├── FarmingRewardsCards.tsx │ │ │ │ │ ├── FarmingRewardsHistoryCards.tsx │ │ │ │ │ ├── NetspaceCards.tsx │ │ │ │ │ ├── TotalNetworkSpace.tsx │ │ │ │ │ └── TotalSizeOfPlots.tsx │ │ │ ├── fullNode │ │ │ │ ├── FullNode.jsx │ │ │ │ ├── FullNodeAddConnection.tsx │ │ │ │ ├── FullNodeBlockSearch.tsx │ │ │ │ ├── FullNodeCloseConnection.tsx │ │ │ │ ├── FullNodeConnections.tsx │ │ │ │ ├── FullNodeStateIndicator.tsx │ │ │ │ └── card │ │ │ │ │ ├── FullNodeCardConnectionStatus.tsx │ │ │ │ │ ├── FullNodeCardDifficulty.tsx │ │ │ │ │ ├── FullNodeCardNetworkName.tsx │ │ │ │ │ ├── FullNodeCardPeakHeight.tsx │ │ │ │ │ ├── FullNodeCardPeakTime.tsx │ │ │ │ │ ├── FullNodeCardStatus.tsx │ │ │ │ │ ├── FullNodeCardTotalIterations.tsx │ │ │ │ │ ├── FullNodeCardVDFSubSlotIterations.tsx │ │ │ │ │ ├── FullNodeCards.tsx │ │ │ │ │ └── FullNodeEstimatedNetworkSpace.tsx │ │ │ ├── harvest │ │ │ │ ├── Harvest.tsx │ │ │ │ ├── HarvesterDetail.tsx │ │ │ │ ├── HarvesterLatency.tsx │ │ │ │ ├── HarvesterOverview.tsx │ │ │ │ ├── HarvesterPlotDetails.tsx │ │ │ │ ├── LatencyCharts.tsx │ │ │ │ └── PlotDetailsChart.tsx │ │ │ ├── helpers │ │ │ │ ├── ErrorMessage.tsx │ │ │ │ ├── HeightToTimestamp.tsx │ │ │ │ ├── Highlight.tsx │ │ │ │ ├── HumanTimestamp.tsx │ │ │ │ ├── LabelProgress.tsx │ │ │ │ └── LinearProgressWithLabel.tsx │ │ │ ├── lrus │ │ │ │ └── LRUsProvider.tsx │ │ │ ├── nfts │ │ │ │ ├── MultipleDownloadDialog.tsx │ │ │ │ ├── NFTAutocomplete.tsx │ │ │ │ ├── NFTBurnDialog.tsx │ │ │ │ ├── NFTCard.tsx │ │ │ │ ├── NFTContextualActions.tsx │ │ │ │ ├── NFTDetails.tsx │ │ │ │ ├── NFTFilterProvider.tsx │ │ │ │ ├── NFTHashStatus.tsx │ │ │ │ ├── NFTMetadata.tsx │ │ │ │ ├── NFTMoveToProfileDialog.tsx │ │ │ │ ├── NFTPreview.tsx │ │ │ │ ├── NFTPreviewDialog.tsx │ │ │ │ ├── NFTProfileDropdown.tsx │ │ │ │ ├── NFTProgressBar.tsx │ │ │ │ ├── NFTProperties.tsx │ │ │ │ ├── NFTRankings.tsx │ │ │ │ ├── NFTSummary.tsx │ │ │ │ ├── NFTTitle.tsx │ │ │ │ ├── NFTTransferAction.tsx │ │ │ │ ├── NFTTransferConfirmationDialog.tsx │ │ │ │ ├── NFTs.tsx │ │ │ │ ├── detail │ │ │ │ │ └── NFTDetailV2.tsx │ │ │ │ ├── gallery │ │ │ │ │ ├── FilterPill.tsx │ │ │ │ │ ├── NFTGallery.tsx │ │ │ │ │ ├── NFTGalleryHero.svg │ │ │ │ │ ├── NFTGalleryHero.tsx │ │ │ │ │ ├── NFTGalleryHeroDark.svg │ │ │ │ │ ├── NFTGalleryScrollPositionProvider.tsx │ │ │ │ │ ├── NFTGallerySearch.tsx │ │ │ │ │ └── SelectedActionsDialog.tsx │ │ │ │ ├── provider │ │ │ │ │ ├── NFTProvider.tsx │ │ │ │ │ ├── NFTProviderContext.ts │ │ │ │ │ └── hooks │ │ │ │ │ │ ├── useMetadataData.ts │ │ │ │ │ │ ├── useNFTData.ts │ │ │ │ │ │ ├── useNFTDataNachos.ts │ │ │ │ │ │ └── useNFTDataOnDemand.ts │ │ │ │ ├── utils.test.ts │ │ │ │ └── utils.ts │ │ │ ├── notification │ │ │ │ ├── Notification.tsx │ │ │ │ ├── NotificationAnnouncement.tsx │ │ │ │ ├── NotificationAnnouncementDialog.tsx │ │ │ │ ├── NotificationOffer.tsx │ │ │ │ ├── NotificationPreview.tsx │ │ │ │ ├── NotificationPreviewNFT.tsx │ │ │ │ ├── NotificationPreviewOffer.tsx │ │ │ │ ├── NotificationSendDialog.tsx │ │ │ │ ├── NotificationWrapper.tsx │ │ │ │ ├── NotificationsDropdown.tsx │ │ │ │ ├── NotificationsMenu.tsx │ │ │ │ ├── NotificationsProvider.tsx │ │ │ │ ├── utils.test.ts │ │ │ │ └── utils.ts │ │ │ ├── offers │ │ │ │ ├── ConfirmOfferCancellation.tsx │ │ │ │ ├── NFTOfferEditor.tsx │ │ │ │ ├── NFTOfferExchangeType.ts │ │ │ │ ├── NFTOfferPreview.tsx │ │ │ │ ├── NFTOfferTokenSelector.tsx │ │ │ │ ├── NFTOfferViewer.tsx │ │ │ │ ├── OfferAcceptConfirmationDialog.tsx │ │ │ │ ├── OfferAsset.ts │ │ │ │ ├── OfferAssetSelector.tsx │ │ │ │ ├── OfferDataDialog.tsx │ │ │ │ ├── OfferDataEntryDialog.tsx │ │ │ │ ├── OfferEditor.tsx │ │ │ │ ├── OfferEditorConditionsPanel.tsx │ │ │ │ ├── OfferEditorConfirmationDialog.tsx │ │ │ │ ├── OfferEditorRowData.ts │ │ │ │ ├── OfferExchangeRate.tsx │ │ │ │ ├── OfferHeader.tsx │ │ │ │ ├── OfferImport.tsx │ │ │ │ ├── OfferManager.tsx │ │ │ │ ├── OfferRowData.tsx │ │ │ │ ├── OfferShareDialog.tsx │ │ │ │ ├── OfferState.ts │ │ │ │ ├── OfferSummary.tsx │ │ │ │ ├── OfferSummaryRow.tsx │ │ │ │ ├── OfferViewerTitle.tsx │ │ │ │ └── utils.ts │ │ │ ├── offers2 │ │ │ │ ├── CancelOfferList.tsx │ │ │ │ ├── CreateOfferBuilder.tsx │ │ │ │ ├── OfferBuilder.tsx │ │ │ │ ├── OfferBuilderAmountWithRoyalties.tsx │ │ │ │ ├── OfferBuilderContext.tsx │ │ │ │ ├── OfferBuilderExpirationCountdown.tsx │ │ │ │ ├── OfferBuilderExpirationSection.tsx │ │ │ │ ├── OfferBuilderFeeSection.tsx │ │ │ │ ├── OfferBuilderHeader.tsx │ │ │ │ ├── OfferBuilderImport.tsx │ │ │ │ ├── OfferBuilderNFT.tsx │ │ │ │ ├── OfferBuilderNFTProvenance.tsx │ │ │ │ ├── OfferBuilderNFTRoyalties.tsx │ │ │ │ ├── OfferBuilderNFTSection.tsx │ │ │ │ ├── OfferBuilderProvider.tsx │ │ │ │ ├── OfferBuilderRoyaltyPayouts.tsx │ │ │ │ ├── OfferBuilderSection.tsx │ │ │ │ ├── OfferBuilderToken.tsx │ │ │ │ ├── OfferBuilderTokenSelector.tsx │ │ │ │ ├── OfferBuilderTokensSection.tsx │ │ │ │ ├── OfferBuilderTradeColumn.tsx │ │ │ │ ├── OfferBuilderValue.tsx │ │ │ │ ├── OfferBuilderViewer.tsx │ │ │ │ ├── OfferBuilderViewerDialog.tsx │ │ │ │ ├── OfferBuilderWalletAmount.tsx │ │ │ │ ├── OfferBuilderWalletBalance.tsx │ │ │ │ ├── OfferBuilderXCHSection.tsx │ │ │ │ ├── OfferDetails.tsx │ │ │ │ ├── OfferEditorCancelConflictingOffersDialog.tsx │ │ │ │ ├── OfferIncomingTable.tsx │ │ │ │ ├── OfferNavigationHeader.tsx │ │ │ │ ├── OffersProvider.tsx │ │ │ │ ├── images │ │ │ │ │ └── offerFileIcon.svg │ │ │ │ └── utils │ │ │ │ │ ├── createDefaultValues.test.ts │ │ │ │ │ ├── createDefaultValues.ts │ │ │ │ │ └── defaultValues.ts │ │ │ ├── plot │ │ │ │ ├── Plot.tsx │ │ │ │ ├── PlotAction.tsx │ │ │ │ ├── PlotAddDirectoryDialog.tsx │ │ │ │ ├── PlotHarvester.tsx │ │ │ │ ├── PlotHarvesterPlots.tsx │ │ │ │ ├── PlotHarvesterPlotsDuplicate.tsx │ │ │ │ ├── PlotHarvesterPlotsFailed.tsx │ │ │ │ ├── PlotHarvesterPlotsNotFound.tsx │ │ │ │ ├── PlotHarvesterState.tsx │ │ │ │ ├── PlotHarvesters.tsx │ │ │ │ ├── PlotPlotting.tsx │ │ │ │ ├── PlotStatus.tsx │ │ │ │ ├── add │ │ │ │ │ ├── PlotAdd.tsx │ │ │ │ │ ├── PlotAddChooseKeys.tsx │ │ │ │ │ ├── PlotAddChoosePlotter.tsx │ │ │ │ │ ├── PlotAddChooseSize.tsx │ │ │ │ │ ├── PlotAddForm.tsx │ │ │ │ │ ├── PlotAddNFT.tsx │ │ │ │ │ ├── PlotAddNumberOfPlots.tsx │ │ │ │ │ ├── PlotAddSelectFinalDirectory.tsx │ │ │ │ │ ├── PlotAddSelectHybridDiskMode.tsx │ │ │ │ │ └── PlotAddSelectTemporaryDirectory.tsx │ │ │ │ ├── card │ │ │ │ │ ├── PlotCardNotFound.tsx │ │ │ │ │ ├── PlotCardPlotsDuplicate.tsx │ │ │ │ │ ├── PlotCardPlotsFailedToOpen.tsx │ │ │ │ │ ├── PlotCardTotalHarvesters.tsx │ │ │ │ │ ├── PlotCardTotalPlots.tsx │ │ │ │ │ └── PlotCardTotalPlotsSize.tsx │ │ │ │ ├── overview │ │ │ │ │ ├── PlotOverview.tsx │ │ │ │ │ ├── PlotOverviewCards.tsx │ │ │ │ │ ├── PlotOverviewHero.tsx │ │ │ │ │ └── PlotOverviewPlots.tsx │ │ │ │ └── queue │ │ │ │ │ ├── PlotQueueActions.tsx │ │ │ │ │ ├── PlotQueueIndicator.tsx │ │ │ │ │ ├── PlotQueueLogDialog.tsx │ │ │ │ │ └── PlotQueueSize.tsx │ │ │ ├── plotNFT │ │ │ │ ├── PlotExternalNFTCard.tsx │ │ │ │ ├── PlotNFTAbsorbRewards.tsx │ │ │ │ ├── PlotNFTAdd.tsx │ │ │ │ ├── PlotNFTCard.tsx │ │ │ │ ├── PlotNFTChangePool.tsx │ │ │ │ ├── PlotNFTExternalState.tsx │ │ │ │ ├── PlotNFTGetPoolLoginLinkDialog.tsx │ │ │ │ ├── PlotNFTGraph.tsx │ │ │ │ ├── PlotNFTName.tsx │ │ │ │ ├── PlotNFTPayoutInstructionsDialog.tsx │ │ │ │ ├── PlotNFTState.tsx │ │ │ │ ├── PlotNFTUnconfirmedCard.tsx │ │ │ │ └── select │ │ │ │ │ ├── PlotNFTSelectBase.tsx │ │ │ │ │ ├── PlotNFTSelectFaucet.tsx │ │ │ │ │ └── PlotNFTSelectPool.tsx │ │ │ ├── pool │ │ │ │ ├── Pool.tsx │ │ │ │ ├── PoolAbsorbRewards.tsx │ │ │ │ ├── PoolHeader.tsx │ │ │ │ ├── PoolHero.tsx │ │ │ │ ├── PoolInfo.tsx │ │ │ │ ├── PoolJoin.tsx │ │ │ │ └── PoolOverview.tsx │ │ │ ├── settings │ │ │ │ ├── ChangePassphrasePrompt.tsx │ │ │ │ ├── IdentitiesPanel.tsx │ │ │ │ ├── LimitCacheSize.tsx │ │ │ │ ├── ProfileAdd.tsx │ │ │ │ ├── ProfileView.tsx │ │ │ │ ├── RemovePassphrasePrompt.tsx │ │ │ │ ├── ResyncPrompt.tsx │ │ │ │ ├── SetPassphrasePrompt.tsx │ │ │ │ ├── Settings.tsx │ │ │ │ ├── SettingsAdvanced.tsx │ │ │ │ ├── SettingsCustody.tsx │ │ │ │ ├── SettingsCustodyAutoClaim.tsx │ │ │ │ ├── SettingsCustodyClawbackOutgoing.tsx │ │ │ │ ├── SettingsDataLayer.tsx │ │ │ │ ├── SettingsDerivationIndex.tsx │ │ │ │ ├── SettingsExpiringOffers.tsx │ │ │ │ ├── SettingsGeneral.tsx │ │ │ │ ├── SettingsHarvester.tsx │ │ │ │ ├── SettingsIntegration.tsx │ │ │ │ ├── SettingsNFT.tsx │ │ │ │ ├── SettingsNotifications.tsx │ │ │ │ ├── SettingsPanel.tsx │ │ │ │ ├── SettingsProfiles.tsx │ │ │ │ ├── SettingsStartup.tsx │ │ │ │ └── SettingsVerifiableCredentials.tsx │ │ │ ├── signVerify │ │ │ │ ├── SignMessage.tsx │ │ │ │ ├── SignMessageEntities.ts │ │ │ │ ├── SignMessageResultDialog.tsx │ │ │ │ ├── SignVerifyDialog.tsx │ │ │ │ ├── SigningEntityDID.tsx │ │ │ │ ├── SigningEntityNFT.tsx │ │ │ │ ├── SigningEntityWalletAddress.tsx │ │ │ │ ├── VerifyMessage.tsx │ │ │ │ └── VerifyMessageImport.tsx │ │ │ ├── vcs │ │ │ │ ├── VCCard.tsx │ │ │ │ ├── VCDetail.tsx │ │ │ │ ├── VCEditTitle.tsx │ │ │ │ ├── VCGetTimestamp.tsx │ │ │ │ ├── VCList.tsx │ │ │ │ ├── VCRevokeDialog.tsx │ │ │ │ └── VCs.tsx │ │ │ └── walletConnect │ │ │ │ ├── WalletConnectActiveSessions.tsx │ │ │ │ ├── WalletConnectAddConnectionDialog.tsx │ │ │ │ ├── WalletConnectCATAmount.tsx │ │ │ │ ├── WalletConnectConfirmDialog.tsx │ │ │ │ ├── WalletConnectConnectedDialog.tsx │ │ │ │ ├── WalletConnectConnections.tsx │ │ │ │ ├── WalletConnectCreateOfferPreview.tsx │ │ │ │ ├── WalletConnectDropdown.tsx │ │ │ │ ├── WalletConnectMetadata.tsx │ │ │ │ ├── WalletConnectOfferPreview.tsx │ │ │ │ ├── WalletConnectPairInfoDialog.tsx │ │ │ │ ├── WalletConnectProvider.tsx │ │ │ │ ├── WalletConnectRequestPermissionsConfirmDialog.tsx │ │ │ │ └── images │ │ │ │ ├── walletConnectConnected.svg │ │ │ │ └── walletConnectToChia.svg │ │ ├── config │ │ │ ├── config.js │ │ │ ├── env.ts │ │ │ └── locales.ts │ │ ├── constants │ │ │ ├── CacheState.ts │ │ │ ├── ErrorCode.ts │ │ │ ├── FarmerStatus.ts │ │ │ ├── FileType.ts │ │ │ ├── FullNodeState.ts │ │ │ ├── ModeServices.ts │ │ │ ├── NotificationType.ts │ │ │ ├── OfferServices.ts │ │ │ ├── PlotNFTState.ts │ │ │ ├── PlotStatus.ts │ │ │ ├── PlotterName.ts │ │ │ ├── SyncingStatus.ts │ │ │ ├── WalletConnectCommands.tsx │ │ │ ├── plotLocalStorage.ts │ │ │ └── plotSizes.ts │ │ ├── electron │ │ │ ├── CacheManager.ts │ │ │ ├── addressBook.ts │ │ │ ├── installDevTools.dev.ts │ │ │ ├── main.tsx │ │ │ ├── prefs.ts │ │ │ ├── preload.js │ │ │ └── utils │ │ │ │ ├── canReadFile.ts │ │ │ │ ├── decodeError.ts │ │ │ │ ├── directoryExists.ts │ │ │ │ ├── downloadFile.ts │ │ │ │ ├── encodeError.ts │ │ │ │ ├── ensureDirectoryExists.ts │ │ │ │ ├── fileExists.ts │ │ │ │ ├── getChecksum.ts │ │ │ │ ├── handleWithCustomErrors.ts │ │ │ │ ├── invokeWithCustomErrors.ts │ │ │ │ ├── sanitizeNumber.ts │ │ │ │ └── yamlUtils.ts │ │ ├── fonts.d.ts │ │ ├── hooks │ │ │ ├── useAcceptOfferHook.tsx │ │ │ ├── useAssetIdName.ts │ │ │ ├── useBlockchainNotifications.tsx │ │ │ ├── useBurnAddress.ts │ │ │ ├── useCache.ts │ │ │ ├── useEnableAutoLogin.ts │ │ │ ├── useEnableDataLayerService.ts │ │ │ ├── useEnableFilePropagationServer.ts │ │ │ ├── useFarmerStatus.ts │ │ │ ├── useFetchAndProcessMetadata.ts │ │ │ ├── useFileType.ts │ │ │ ├── useFilteredNFTs.ts │ │ │ ├── useFullNodeState.ts │ │ │ ├── useHiddenNFTs.ts │ │ │ ├── useHideObjectionableContent.ts │ │ │ ├── useIntersectionObserver.ts │ │ │ ├── useIsMainnet.tsx │ │ │ ├── useIsServiceRunning.ts │ │ │ ├── useNFT.ts │ │ │ ├── useNFTCoinEvents.ts │ │ │ ├── useNFTFilter.ts │ │ │ ├── useNFTGalleryScrollPosition.ts │ │ │ ├── useNFTImageFittingMode.tsx │ │ │ ├── useNFTMetadata.ts │ │ │ ├── useNFTMetadataLRU.ts │ │ │ ├── useNFTMinterDID.ts │ │ │ ├── useNFTProvider.ts │ │ │ ├── useNFTVerifyHash.ts │ │ │ ├── useNFTs.ts │ │ │ ├── useNachoNFTs.ts │ │ │ ├── useNotificationSettings.ts │ │ │ ├── useNotifications.tsx │ │ │ ├── useOffer.ts │ │ │ ├── useOfferBuilderContext.ts │ │ │ ├── useOfferExpirationDefaultTime.tsx │ │ │ ├── useOfferInfo.ts │ │ │ ├── useOffers.ts │ │ │ ├── useOpenExternal.ts │ │ │ ├── useOpenUnsafeLink.tsx │ │ │ ├── usePaste.ts │ │ │ ├── usePayoutAddress.ts │ │ │ ├── usePlotNFTDetails.ts │ │ │ ├── usePlotNFTExternalDetails.ts │ │ │ ├── usePlotNFTName.ts │ │ │ ├── usePlotNFTs.ts │ │ │ ├── usePoolInfo.ts │ │ │ ├── useResolveNFTOffer.ts │ │ │ ├── useSaveFile.ts │ │ │ ├── useSaveOfferFile.ts │ │ │ ├── useSelectDirectory.tsx │ │ │ ├── useShowNotification.ts │ │ │ ├── useStandardWallet.ts │ │ │ ├── useStateAbort.ts │ │ │ ├── useStateRefAbort.ts │ │ │ ├── useSuppressShareOnCreate.ts │ │ │ ├── useUnconfirmedPlotNFTs.ts │ │ │ ├── useValidNotifications.ts │ │ │ ├── useViewNFTOnExplorer.ts │ │ │ ├── useWaitForWalletSync.ts │ │ │ ├── useWalletConnect.ts │ │ │ ├── useWalletConnectClient.ts │ │ │ ├── useWalletConnectCommand.tsx │ │ │ ├── useWalletConnectContext.ts │ │ │ ├── useWalletConnectPairs.ts │ │ │ ├── useWalletConnectPreferences.ts │ │ │ ├── useWalletKeyAddresses.ts │ │ │ └── useWalletOffers.ts │ │ ├── index.html │ │ ├── index.tsx │ │ ├── init-prefs.ts │ │ ├── locales │ │ │ ├── af-ZA │ │ │ │ └── messages.po │ │ │ ├── ak-GH │ │ │ │ └── messages.po │ │ │ ├── ar-SA │ │ │ │ └── messages.po │ │ │ ├── be-BY │ │ │ │ └── messages.po │ │ │ ├── bg-BG │ │ │ │ └── messages.po │ │ │ ├── bn-BD │ │ │ │ └── messages.po │ │ │ ├── bn-IN │ │ │ │ └── messages.po │ │ │ ├── bs-BA │ │ │ │ └── messages.po │ │ │ ├── ca-ES │ │ │ │ └── messages.po │ │ │ ├── cs-CZ │ │ │ │ └── messages.po │ │ │ ├── cy-GB │ │ │ │ └── messages.po │ │ │ ├── da-DK │ │ │ │ └── messages.po │ │ │ ├── de-DE │ │ │ │ └── messages.po │ │ │ ├── el-GR │ │ │ │ └── messages.po │ │ │ ├── en-AU │ │ │ │ └── messages.po │ │ │ ├── en-NZ │ │ │ │ └── messages.po │ │ │ ├── en-PT │ │ │ │ └── messages.po │ │ │ ├── en-US │ │ │ │ └── messages.po │ │ │ ├── eo-UY │ │ │ │ └── messages.po │ │ │ ├── es-AR │ │ │ │ └── messages.po │ │ │ ├── es-ES │ │ │ │ └── messages.po │ │ │ ├── es-MX │ │ │ │ └── messages.po │ │ │ ├── fa-IR │ │ │ │ └── messages.po │ │ │ ├── fi-FI │ │ │ │ └── messages.po │ │ │ ├── fr-FR │ │ │ │ └── messages.po │ │ │ ├── he-IL │ │ │ │ └── messages.po │ │ │ ├── hi-IN │ │ │ │ └── messages.po │ │ │ ├── hr-HR │ │ │ │ └── messages.po │ │ │ ├── hu-HU │ │ │ │ └── messages.po │ │ │ ├── id-ID │ │ │ │ └── messages.po │ │ │ ├── index.ts │ │ │ ├── is-IS │ │ │ │ └── messages.po │ │ │ ├── it-IT │ │ │ │ └── messages.po │ │ │ ├── ja-JP │ │ │ │ └── messages.po │ │ │ ├── km-KH │ │ │ │ └── messages.po │ │ │ ├── ko-KR │ │ │ │ └── messages.po │ │ │ ├── lol-US │ │ │ │ └── messages.po │ │ │ ├── lt-LT │ │ │ │ └── messages.po │ │ │ ├── lv-LV │ │ │ │ └── messages.po │ │ │ ├── mk-MK │ │ │ │ └── messages.po │ │ │ ├── mn-MN │ │ │ │ └── messages.po │ │ │ ├── nl-NL │ │ │ │ └── messages.po │ │ │ ├── no-NO │ │ │ │ └── messages.po │ │ │ ├── pa-IN │ │ │ │ └── messages.po │ │ │ ├── pl-PL │ │ │ │ └── messages.po │ │ │ ├── pt-BR │ │ │ │ └── messages.po │ │ │ ├── pt-PT │ │ │ │ └── messages.po │ │ │ ├── ro-RO │ │ │ │ └── messages.po │ │ │ ├── ru-RU │ │ │ │ └── messages.po │ │ │ ├── si-LK │ │ │ │ └── messages.po │ │ │ ├── sk-SK │ │ │ │ └── messages.po │ │ │ ├── sl-SI │ │ │ │ └── messages.po │ │ │ ├── sq-AL │ │ │ │ └── messages.po │ │ │ ├── sr-SP │ │ │ │ └── messages.po │ │ │ ├── srp │ │ │ │ └── messages.po │ │ │ ├── sv-SE │ │ │ │ └── messages.po │ │ │ ├── th-TH │ │ │ │ └── messages.po │ │ │ ├── tlh-AA │ │ │ │ └── messages.po │ │ │ ├── tr-TR │ │ │ │ └── messages.po │ │ │ ├── uk-UA │ │ │ │ └── messages.po │ │ │ ├── vi-VN │ │ │ │ └── messages.po │ │ │ ├── zh-CN │ │ │ │ └── messages.po │ │ │ └── zh-TW │ │ │ │ └── messages.po │ │ ├── logo.svg │ │ ├── polyfill.ts │ │ ├── react-app-env.d.ts │ │ ├── types │ │ │ ├── Fingerprint.ts │ │ │ ├── InitialTargetState.ts │ │ │ ├── NFTSelection.tsx │ │ │ ├── Plot.ts │ │ │ ├── PlotAdd.ts │ │ │ ├── PlotNFT.ts │ │ │ ├── PlotNFTExternal.ts │ │ │ ├── PlotQueueItem.ts │ │ │ ├── Plotter.ts │ │ │ ├── Point.ts │ │ │ ├── PoolInfo.ts │ │ │ ├── PoolState.ts │ │ │ ├── PoolWalletStatus.ts │ │ │ ├── UnconfirmedPlotNFT.ts │ │ │ └── WalletBalance.ts │ │ ├── util │ │ │ ├── chiaEnvironment.js │ │ │ ├── compareChecksums.ts │ │ │ ├── computeHash.ts │ │ │ ├── createOfferForIdsToOfferBuilderData.test.ts │ │ │ ├── createOfferForIdsToOfferBuilderData.ts │ │ │ ├── dids.ts │ │ │ ├── download.ts │ │ │ ├── fetchOffer.ts │ │ │ ├── findCATWalletByAssetId.test.ts │ │ │ ├── findCATWalletByAssetId.ts │ │ │ ├── getCurrentTime.ts │ │ │ ├── getFileExtension.test.ts │ │ │ ├── getFileExtension.ts │ │ │ ├── getFileType.ts │ │ │ ├── getNFTFileType.ts │ │ │ ├── getNFTId.ts │ │ │ ├── getNFTsDataStatistics.ts │ │ │ ├── getPercentPointsSuccessfull.ts │ │ │ ├── getPoolInfo.ts │ │ │ ├── getUnknownCATs.test.ts │ │ │ ├── getUnknownCATs.ts │ │ │ ├── hasSensitiveContent.ts │ │ │ ├── hasSpendableBalance.ts │ │ │ ├── isLocalhost.ts │ │ │ ├── isRankingAttribute.ts │ │ │ ├── limit.ts │ │ │ ├── loadConfig.ts │ │ │ ├── manageDaemonLifetime.ts │ │ │ ├── math.ts │ │ │ ├── nfts.test.ts │ │ │ ├── nfts.ts │ │ │ ├── normalizeUrl.ts │ │ │ ├── offerBuilderDataToOffer.ts │ │ │ ├── offerToOfferBuilderData.ts │ │ │ ├── parseFee.ts │ │ │ ├── parseFileContent.ts │ │ │ ├── parsefee.test.ts │ │ │ ├── plot.ts │ │ │ ├── prepareNFTOffer.test.ts │ │ │ ├── prepareNFTOffer.ts │ │ │ ├── prepareWalletConnectCommand.ts │ │ │ ├── removeHexPrefix.ts │ │ │ ├── resolveOfferInfo.ts │ │ │ ├── service_names.js │ │ │ ├── sleep.ts │ │ │ ├── throttleAsync.ts │ │ │ ├── untildify.ts │ │ │ ├── userData.ts │ │ │ ├── utils.js │ │ │ ├── waitForWalletSync.ts │ │ │ └── walletConnect.ts │ │ └── wdyr.dev.ts │ ├── tests │ │ ├── data_fixtures │ │ │ ├── data.json │ │ │ └── data12.json │ │ ├── data_object_model │ │ │ ├── close_dialog.ts │ │ │ ├── passphrase_login.ts │ │ │ ├── read_data_file.ts │ │ │ └── send_funds.ts │ │ ├── offers │ │ │ ├── offer_created_via_nft.spec.ts │ │ │ ├── offer_page.spec.ts │ │ │ ├── offer_page_negative.spec.ts │ │ │ └── offer_transfer_via_nft.spec.ts │ │ ├── plots │ │ │ ├── cancel_create_plot.spec.ts │ │ │ └── create_delete_plot.spec.ts │ │ ├── select_key_page │ │ │ ├── create_delete_wallet.spec.ts │ │ │ ├── key_import_negative_test.spec.ts │ │ │ ├── paste_key_import_negative_test.spec.ts │ │ │ ├── rename_wallet.spec.ts │ │ │ └── rename_wallet_existing_name.spec.ts │ │ ├── settings │ │ │ ├── auto_login.spec.ts │ │ │ ├── data_layer_test.spec.ts │ │ │ ├── passphrase_test.spec.ts │ │ │ └── settings_test.spec.ts │ │ ├── tokens │ │ │ ├── receive_generatenew_address.spec.ts │ │ │ ├── receive_txch.spec.ts │ │ │ ├── send_amount_greater.spec.ts │ │ │ ├── send_error_page.spec.ts │ │ │ └── send_fee_txch.spec.ts │ │ └── utils │ │ │ └── wallet.ts │ ├── tsconfig.eslint.json │ ├── tsconfig.json │ ├── webpack.electron.babel.ts │ └── webpack.react.babel.ts ├── icons │ ├── .babelrc │ ├── .gitignore │ ├── load-package.cjs │ ├── package.json │ ├── rollup.config.mjs │ ├── src │ │ ├── @types │ │ │ └── svgr.d.ts │ │ ├── Burn.tsx │ │ ├── Chia.tsx │ │ ├── Contacts.tsx │ │ ├── CrCat.tsx │ │ ├── Farm.tsx │ │ ├── Farming.tsx │ │ ├── Fees.tsx │ │ ├── FullNode.tsx │ │ ├── Harvest.tsx │ │ ├── Home.tsx │ │ ├── Hourglass.tsx │ │ ├── Keys.tsx │ │ ├── Link.tsx │ │ ├── MyContacts.tsx │ │ ├── NFTs.tsx │ │ ├── Notification.tsx │ │ ├── Offering.tsx │ │ ├── Offers.tsx │ │ ├── Plot.tsx │ │ ├── PlotHero.tsx │ │ ├── Plots.tsx │ │ ├── Pool.tsx │ │ ├── Pooling.tsx │ │ ├── Requesting.tsx │ │ ├── Search.tsx │ │ ├── Settings.tsx │ │ ├── Status.tsx │ │ ├── Tokens.tsx │ │ ├── Trade.tsx │ │ ├── VC.tsx │ │ ├── Wallet.tsx │ │ ├── WalletConnect.tsx │ │ ├── ZeroState.tsx │ │ ├── images │ │ │ ├── Burn.svg │ │ │ ├── CrCat.svg │ │ │ ├── Farm.svg │ │ │ ├── Farming.svg │ │ │ ├── Fees.svg │ │ │ ├── FullNode.svg │ │ │ ├── Harvest.svg │ │ │ ├── Hourglass.svg │ │ │ ├── LinkSmall.svg │ │ │ ├── MyContacts.svg │ │ │ ├── NFTs.svg │ │ │ ├── NFTsSmall.svg │ │ │ ├── Offering.svg │ │ │ ├── Offers.svg │ │ │ ├── OffersSmall.svg │ │ │ ├── PlotHero.svg │ │ │ ├── Plots.svg │ │ │ ├── Pooling.svg │ │ │ ├── Requesting.svg │ │ │ ├── Tokens.svg │ │ │ ├── cancelConnect.svg │ │ │ ├── checkmark.svg │ │ │ ├── checkmarkConnect.svg │ │ │ ├── chia-black.svg │ │ │ ├── chia.svg │ │ │ ├── contacts.svg │ │ │ ├── copy.svg │ │ │ ├── exit.svg │ │ │ ├── home.svg │ │ │ ├── keys.svg │ │ │ ├── notification.svg │ │ │ ├── plot.svg │ │ │ ├── pool.svg │ │ │ ├── reload.svg │ │ │ ├── reloadConnect.svg │ │ │ ├── search.svg │ │ │ ├── settings.svg │ │ │ ├── trade.svg │ │ │ ├── vc.svg │ │ │ ├── vcZeroStateBackground.svg │ │ │ ├── vcZeroStateBackgroundDark.svg │ │ │ ├── vcZeroStateBadge.svg │ │ │ ├── vcZeroStateKYC.svg │ │ │ ├── vcZeroStateMembership.svg │ │ │ ├── wallet.svg │ │ │ ├── walletConnect.svg │ │ │ ├── zero-state-coins-dark.svg │ │ │ └── zero-state-coins.svg │ │ └── index.ts │ ├── tsconfig.eslint.json │ └── tsconfig.json └── wallets │ ├── .babelrc │ ├── .linguirc │ ├── load-package.cjs │ ├── package.json │ ├── rollup.config.mjs │ ├── src │ ├── components │ │ ├── AddressBookAutocomplete.tsx │ │ ├── ClawbackClaimTransactionDialog.tsx │ │ ├── PasteMnemonic.tsx │ │ ├── Wallet.tsx │ │ ├── WalletAdd.tsx │ │ ├── WalletBadge.tsx │ │ ├── WalletCards.tsx │ │ ├── WalletCardsCRCat.tsx │ │ ├── WalletConnections.tsx │ │ ├── WalletEmptyDialog.tsx │ │ ├── WalletGraph.tsx │ │ ├── WalletGraphTooltip.tsx │ │ ├── WalletHeader.tsx │ │ ├── WalletHistory.tsx │ │ ├── WalletHistoryClawbackChip.tsx │ │ ├── WalletHistoryPending.tsx │ │ ├── WalletIcon.tsx │ │ ├── WalletImport.tsx │ │ ├── WalletName.tsx │ │ ├── WalletReceiveAddress.tsx │ │ ├── WalletReceiveAddressField.tsx │ │ ├── WalletRenameDialog.tsx │ │ ├── WalletSend.tsx │ │ ├── WalletSendTransactionResultDialog.tsx │ │ ├── WalletStatus.tsx │ │ ├── WalletStatusHeight.tsx │ │ ├── WalletTokenCard.tsx │ │ ├── Wallets.tsx │ │ ├── WalletsDropdown.tsx │ │ ├── WalletsManageTokens.tsx │ │ ├── WalletsSidebar.tsx │ │ ├── card │ │ │ ├── WalletCardCRCatApprove.tsx │ │ │ ├── WalletCardCRCatRestrictions.tsx │ │ │ ├── WalletCardPendingBalance.tsx │ │ │ ├── WalletCardPendingChange.tsx │ │ │ ├── WalletCardPendingTotalBalance.tsx │ │ │ ├── WalletCardSpendableBalance.tsx │ │ │ └── WalletCardTotalBalance.tsx │ │ ├── cat │ │ │ ├── WalletCAT.tsx │ │ │ ├── WalletCATCreateExistingSimple.tsx │ │ │ ├── WalletCATCreateSimple.tsx │ │ │ ├── WalletCATList.tsx │ │ │ ├── WalletCATSelect.tsx │ │ │ ├── WalletCATSend.tsx │ │ │ └── WalletCATTAILDialog.tsx │ │ ├── crCat │ │ │ ├── CrCatApprovePendingDialog.tsx │ │ │ ├── CrCatAuthorizedProviders.tsx │ │ │ └── CrCatFlags.tsx │ │ ├── create │ │ │ ├── WalletCreate.tsx │ │ │ ├── WalletCreateCard.tsx │ │ │ └── WalletCreateList.tsx │ │ ├── index.ts │ │ └── standard │ │ │ ├── WalletStandard.tsx │ │ │ └── WalletStandardCards.tsx │ ├── constants │ │ ├── WalletName.ts │ │ └── index.ts │ ├── hooks │ │ ├── index.ts │ │ ├── useClawbackDefaultTime.tsx │ │ ├── useHiddenWallet.ts │ │ ├── useIsWalletSynced.ts │ │ ├── useWallet.ts │ │ ├── useWalletHumanValue.ts │ │ ├── useWalletState.ts │ │ ├── useWalletTransactions.ts │ │ └── useWalletsList.ts │ ├── index.ts │ ├── locales │ │ ├── af-ZA │ │ │ └── messages.po │ │ ├── ak-GH │ │ │ └── messages.po │ │ ├── ar-SA │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── be-BY │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── bg-BG │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── bn-BD │ │ │ └── messages.po │ │ ├── bn-IN │ │ │ └── messages.po │ │ ├── bs-BA │ │ │ └── messages.po │ │ ├── ca-ES │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── cs-CZ │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── cy-GB │ │ │ └── messages.po │ │ ├── da-DK │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── de-DE │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── el-GR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── en-AU │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── en-NZ │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── en-PT │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── en-US │ │ │ └── messages.po │ │ ├── eo-UY │ │ │ └── messages.po │ │ ├── es-AR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── es-ES │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── es-MX │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── fa-IR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── fi-FI │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── fr-FR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── he-IL │ │ │ └── messages.po │ │ ├── hi-IN │ │ │ └── messages.po │ │ ├── hr-HR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── hu-HU │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── id-ID │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── index.ts │ │ ├── is-IS │ │ │ └── messages.po │ │ ├── it-IT │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── ja-JP │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── km-KH │ │ │ └── messages.po │ │ ├── ko-KR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── lol-US │ │ │ └── messages.po │ │ ├── lt-LT │ │ │ └── messages.po │ │ ├── lv-LV │ │ │ └── messages.po │ │ ├── mk-MK │ │ │ └── messages.po │ │ ├── mn-MN │ │ │ └── messages.po │ │ ├── nl-NL │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── no-NO │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── pa-IN │ │ │ └── messages.po │ │ ├── pl-PL │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── pt-BR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── pt-PT │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── ro-RO │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── ru-RU │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── si-LK │ │ │ └── messages.po │ │ ├── sk-SK │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── sl-SI │ │ │ └── messages.po │ │ ├── sq-AL │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── sr-SP │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── srp │ │ │ └── messages.po │ │ ├── sv-SE │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── th-TH │ │ │ └── messages.po │ │ ├── tlh-AA │ │ │ └── messages.po │ │ ├── tr-TR │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── uk-UA │ │ │ ├── messages.js │ │ │ └── messages.po │ │ ├── vi-VN │ │ │ └── messages.po │ │ ├── zh-CN │ │ │ ├── messages.js │ │ │ └── messages.po │ │ └── zh-TW │ │ │ ├── messages.js │ │ │ └── messages.po │ └── utils │ │ ├── getWalletPrimaryTitle.ts │ │ ├── getWalletSyncingStatus.ts │ │ ├── index.ts │ │ └── isCATWalletPresent.ts │ ├── tsconfig.eslint.json │ └── tsconfig.json ├── restoreMessages.js └── src └── locales └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | end_of_line = lf 10 | # editorconfig-tools is unable to ignore longs strings or urls 11 | max_line_length = off 12 | 13 | [.md] 14 | indent_size = false -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | examples 4 | daemon 5 | build 6 | *_old 7 | packages/*/test/data_fixtures 8 | packages/wallet/* 9 | locales 10 | restoreMessages.js 11 | rollup.config.js 12 | webpack.** 13 | packages/gui/tests 14 | **/coverage/** -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @Chia-Network/required-reviewers 2 | /.github/* @Chia-Network/actions-reviewers 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - about: Ask a question or request support here 3 | name: Ask for Support 4 | url: >- 5 | https://github.com/Chia-Network/chia-blockchain/discussions/new?category=support 6 | - about: Request a new feature or idea here 7 | name: Make a Request 8 | url: >- 9 | https://github.com/Chia-Network/chia-blockchain/discussions/new?category=ideas 10 | - about: Get support on the Chia Discord chat channels. 11 | name: Join the Discord support chat 12 | url: "https://discord.gg/chia" 13 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | lint-staged 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | overrides: 2 | - files: ["*.yaml", "*.yml", "*.toml", "*.json", "*.ini"] 3 | options: 4 | tabWidth: 2 5 | singleQuote: false 6 | experimentalTernaries: true 7 | useTabs: false 8 | - files: ["*.md"] 9 | options: 10 | singleQuote: false 11 | - files: ["*.js", "*.jsx", "*.ts", "*.tsx", "*.cjs", "*.mjs"] 12 | options: 13 | printWidth: 120 14 | singleQuote: true 15 | -------------------------------------------------------------------------------- /.repo-content-updater.yml: -------------------------------------------------------------------------------- 1 | var_overrides: 2 | DEPENDABOT_ACTIONS_REVIEWERS: '["cmmarslender", "altendky"]' 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["streetsidesoftware.code-spell-checker", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "editor.defaultFormatter": "esbenp.prettier-vscode", 4 | "editor.codeActionsOnSave": ["source.fixAll.eslint"], 5 | "git.inputValidationSubjectLength": 70, 6 | "search.exclude": { 7 | "**/dist": true, 8 | "**/build": true, 9 | "**/package-lock.json": true, 10 | "**/*.po": true 11 | }, 12 | "files.associations": { 13 | ".eslintrc.json": "jsonc", 14 | "tsconfig.json": "jsonc" 15 | }, 16 | "cSpell.words": ["clawback"] 17 | } 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Please report security concerns to https://hackerone.com/chia_network. 6 | 7 | If your security issue is established to be valid, we will reach out immediately to establish 8 | communication channels and compensate the issue reporter for responsibly reporting security bugs via 9 | our bug bounty program. 10 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | project_id: 1 2 | api_token_env: CROWDIN_PERSONAL_TOKEN 3 | base_path: "." 4 | base_url: "https://chia.crowdin.com" 5 | preserve_hierarchy: true 6 | files: 7 | - source: /packages/core/src/locales/en-US/*.po 8 | translation: /packages/core/src/locales/%locale%/messages.po 9 | - source: /packages/gui/src/locales/en-US/*.po 10 | translation: /packages/gui/src/locales/%locale%/messages.po 11 | - source: /packages/wallets/src/locales/en-US/*.po 12 | translation: /packages/wallets/src/locales/%locale%/messages.po 13 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["packages/*"], 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/api-react/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/env", "@babel/typescript"], 3 | "plugins": ["@babel/plugin-transform-runtime"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/api-react/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env -------------------------------------------------------------------------------- /packages/api-react/.npmignore: -------------------------------------------------------------------------------- 1 | coverage 2 | node_modules 3 | .DS_Store 4 | package-lock.json 5 | tsconfig.json 6 | .babelrc 7 | rollup.config.js 8 | .env 9 | src 10 | -------------------------------------------------------------------------------- /packages/api-react/load-package.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('./package.json'); 2 | -------------------------------------------------------------------------------- /packages/api-react/src/@types/MethodFirstParameter.ts: -------------------------------------------------------------------------------- 1 | type MethodFirstParameter< 2 | TClass extends new (...args: any) => any, 3 | Method extends keyof InstanceType & string, 4 | > = Parameters[Method]>[0]; 5 | 6 | export default MethodFirstParameter; 7 | -------------------------------------------------------------------------------- /packages/api-react/src/@types/MethodReturnType.ts: -------------------------------------------------------------------------------- 1 | type MethodReturnType< 2 | TClass extends new (...args: any) => any, 3 | Method extends keyof InstanceType & string, 4 | > = Awaited[Method]>>; 5 | 6 | export default MethodReturnType; 7 | -------------------------------------------------------------------------------- /packages/api-react/src/@types/ServiceConstructor.ts: -------------------------------------------------------------------------------- 1 | export default interface ServiceConstructor { 2 | new (...args: any[]): any; 3 | isClient?: boolean; 4 | isDaemon?: boolean; 5 | } 6 | -------------------------------------------------------------------------------- /packages/api-react/src/@types/ServiceOld.ts: -------------------------------------------------------------------------------- 1 | import type { Daemon, Events, Farmer, FullNode, Harvester, PlotterService, WalletService } from '@chia-network/api'; 2 | 3 | type Service = 4 | | typeof Daemon 5 | | typeof Events 6 | | typeof Farmer 7 | | typeof FullNode 8 | | typeof Harvester 9 | | typeof PlotterService 10 | | typeof WalletService; 11 | 12 | export default Service; 13 | -------------------------------------------------------------------------------- /packages/api-react/src/api.ts: -------------------------------------------------------------------------------- 1 | import { createApi } from '@reduxjs/toolkit/query/react'; 2 | 3 | import baseQuery from './chiaLazyBaseQuery'; 4 | 5 | export { baseQuery }; 6 | 7 | export default createApi({ 8 | reducerPath: 'chiaApi', 9 | baseQuery, 10 | endpoints: () => ({}), 11 | }); 12 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useClearCache.ts: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react'; 2 | 3 | import { walletApi } from '../services/wallet'; 4 | import { useAppDispatch } from '../store'; 5 | 6 | export default function useClearCache() { 7 | const dispatch = useAppDispatch(); 8 | 9 | const handleClearCache = useCallback(async () => dispatch(walletApi.util.resetApiState()), [dispatch]); 10 | 11 | return handleClearCache; 12 | } 13 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useForceUpdate.ts: -------------------------------------------------------------------------------- 1 | import { useReducer } from 'react'; 2 | 3 | export default function useForceUpdate() { 4 | const [, forceUpdate] = useReducer((x) => x + 1, 0); 5 | 6 | return forceUpdate; 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useGetFarmerFullNodeConnectionsQuery.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | import { useGetFarmerConnectionsQuery } from '../services/farmer'; 4 | 5 | export default function useGetFarmerFullNodeConnectionsQuery() { 6 | const { data: connections, ...rest } = useGetFarmerConnectionsQuery(undefined, { 7 | pollingInterval: 10_000, 8 | }); 9 | const data = useMemo(() => connections?.filter((connection) => connection.type === 1), [connections]); 10 | 11 | return { 12 | data, 13 | ...rest, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useGetHarvesterConnectionsQuery.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | import { useGetFarmerConnectionsQuery } from '../services/farmer'; 4 | 5 | export default function useGetHarvesterConnectionsQuery() { 6 | const { data: connections, ...rest } = useGetFarmerConnectionsQuery(undefined, { 7 | pollingInterval: 10_000, 8 | }); 9 | const data = useMemo(() => connections?.filter((connection) => connection.type === 2), [connections]); 10 | 11 | return { 12 | data, 13 | ...rest, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useGetHarvesterStats.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | import { useGetHarvestersSummaryQuery } from '../services/farmer'; 4 | 5 | export default function useGetHarvesterStats(nodeId: string) { 6 | const { data, isLoading, error } = useGetHarvestersSummaryQuery(); 7 | 8 | const harvester = useMemo( 9 | () => data?.find((harvesterItem) => harvesterItem.connection.nodeId === nodeId), 10 | [data, nodeId], 11 | ); 12 | 13 | return { 14 | isLoading, 15 | error, 16 | harvester, 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useGetNFTWallets.ts: -------------------------------------------------------------------------------- 1 | import type { Wallet } from '@chia-network/api'; 2 | import { WalletType } from '@chia-network/api'; 3 | import { useMemo } from 'react'; 4 | 5 | import { useGetWalletsQuery } from '../services'; 6 | 7 | export default function useGetNFTWallets() { 8 | const { data, isLoading, error } = useGetWalletsQuery(); 9 | const nftWallets = useMemo(() => { 10 | if (!data || isLoading) { 11 | return []; 12 | } 13 | 14 | return data.filter((wallet: Wallet) => wallet.type === WalletType.NFT); 15 | }, [data, isLoading]); 16 | 17 | return { wallets: nftWallets, isLoading, error }; 18 | } 19 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useNFTCoinAdded.ts: -------------------------------------------------------------------------------- 1 | import { WalletService } from '@chia-network/api'; 2 | 3 | import useSubscribeToEvent from './useSubscribeToEvent'; 4 | 5 | export default function useNFTCoinAdded(callback: (coin: any) => void) { 6 | return useSubscribeToEvent('onNFTCoinAdded', WalletService, callback); 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useNFTCoinDIDSet.ts: -------------------------------------------------------------------------------- 1 | import { WalletService } from '@chia-network/api'; 2 | 3 | import useSubscribeToEvent from './useSubscribeToEvent'; 4 | 5 | export default function useNFTCoinDIDSet(callback: (coin: any) => void) { 6 | return useSubscribeToEvent('onNFTCoinDIDSet', WalletService, callback); 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useNFTCoinRemoved.ts: -------------------------------------------------------------------------------- 1 | import { WalletService } from '@chia-network/api'; 2 | 3 | import useSubscribeToEvent from './useSubscribeToEvent'; 4 | 5 | export default function useNFTCoinRemoved(callback: (coin: any) => void) { 6 | return useSubscribeToEvent('onNFTCoinRemoved', WalletService, callback); 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useNFTCoinUpdated.ts: -------------------------------------------------------------------------------- 1 | import { WalletService } from '@chia-network/api'; 2 | 3 | import useSubscribeToEvent from './useSubscribeToEvent'; 4 | 5 | export default function useNFTCoinUpdated(callback: (coin: any) => void) { 6 | return useSubscribeToEvent('onNFTCoinUpdated', WalletService, callback); 7 | } 8 | -------------------------------------------------------------------------------- /packages/api-react/src/hooks/useVCEvents.ts: -------------------------------------------------------------------------------- 1 | import { VC } from '@chia-network/api'; 2 | 3 | import useSubscribeToEvent from './useSubscribeToEvent'; 4 | 5 | export function useVCCoinAdded(callback: (coin: any) => void) { 6 | return useSubscribeToEvent('onVCCoinAdded', VC, callback); 7 | } 8 | 9 | export function useVCCoinRemoved(callback: (coin: any) => void) { 10 | return useSubscribeToEvent('onVCCoinRemoved', VC, callback); 11 | } 12 | -------------------------------------------------------------------------------- /packages/api-react/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hooks'; 2 | export { store, createStore, useAppDispatch, useTypedSelector } from './store'; 3 | export * from './services'; 4 | export * from './slices'; 5 | export { default } from './api'; 6 | -------------------------------------------------------------------------------- /packages/api-react/src/slices/index.ts: -------------------------------------------------------------------------------- 1 | export * as api from './api'; 2 | -------------------------------------------------------------------------------- /packages/api-react/src/utils/normalizePoolState.ts: -------------------------------------------------------------------------------- 1 | import type { PoolState } from '@chia-network/api'; 2 | 3 | import removeOldPoints from './removeOldPoints'; 4 | 5 | export default function normalizePoolState(poolState: PoolState): PoolState { 6 | return { 7 | ...poolState, 8 | pointsAcknowledged24H: removeOldPoints(poolState.pointsAcknowledged24H), 9 | pointsFound24H: removeOldPoints(poolState.pointsFound24H), 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/api-react/src/utils/removeOldPoints.ts: -------------------------------------------------------------------------------- 1 | import type { Point } from '@chia-network/api'; 2 | 3 | const DAY_SECONDS = 60 * 60 * 24; 4 | 5 | export default function removeOldPoints(points: Point[], second: number = DAY_SECONDS): Point[] { 6 | const current = Date.now() / 1000; 7 | const dayBefore = current - second; 8 | 9 | return points?.filter((point) => { 10 | const [timestamp] = point; 11 | 12 | return timestamp >= dayBefore; 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/api-react/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "dist"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/api-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "noFallthroughCasesInSwitch": true, 5 | "noUnusedParameters": true, 6 | "noImplicitReturns": true, 7 | "moduleResolution": "node", 8 | "esModuleInterop": true, 9 | "noUnusedLocals": true, 10 | "noImplicitAny": true, 11 | "declarationDir": "dist/types", 12 | "declaration": true, 13 | "target": "es2015", 14 | "module": "es2015", 15 | "strict": true, 16 | "jsx": "react", 17 | "skipLibCheck": true 18 | }, 19 | "include": ["src/**/*"], 20 | "exclude": ["node_modules", "dist", "**/*.test.ts"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/api/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/env", "@babel/typescript"], 3 | "plugins": ["@babel/plugin-transform-runtime"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/api/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env -------------------------------------------------------------------------------- /packages/api/.npmignore: -------------------------------------------------------------------------------- 1 | coverage 2 | node_modules 3 | .DS_Store 4 | package-lock.json 5 | tsconfig.json 6 | .babelrc 7 | rollup.config.js 8 | .env 9 | src 10 | -------------------------------------------------------------------------------- /packages/api/load-package.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('./package.json'); 2 | -------------------------------------------------------------------------------- /packages/api/src/@types/AutoClaim.ts: -------------------------------------------------------------------------------- 1 | import type BigNumber from 'bignumber.js'; 2 | 3 | type AutoClaim = { 4 | enabled: boolean; 5 | txFee: number | BigNumber; 6 | minAmount: number | BigNumber; 7 | batchSize: number; 8 | }; 9 | 10 | export default AutoClaim; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/BlockchainConnection.ts: -------------------------------------------------------------------------------- 1 | export default interface BlockchainConnection {} 2 | -------------------------------------------------------------------------------- /packages/api/src/@types/CATToken.ts: -------------------------------------------------------------------------------- 1 | type CATToken = { 2 | assetId: string; 3 | name: string; 4 | symbol: string; 5 | }; 6 | 7 | export default CATToken; 8 | 9 | export type CATTokenStray = { 10 | assetId: string; 11 | name: string; 12 | firstSeenHeight: number; 13 | senderPuzzleHash: string; 14 | }; 15 | -------------------------------------------------------------------------------- /packages/api/src/@types/CalculateRoyaltiesRequest.ts: -------------------------------------------------------------------------------- 1 | import RoyaltyCalculationFungibleAsset from './RoyaltyCalculationFungibleAsset'; 2 | import RoyaltyCalculationRoyaltyAsset from './RoyaltyCalculationRoyaltyAsset'; 3 | 4 | type CalculateRoyaltiesRequest = { 5 | royaltyAssets: RoyaltyCalculationRoyaltyAsset[]; 6 | fungibleAssets: RoyaltyCalculationFungibleAsset[]; 7 | }; 8 | 9 | export default CalculateRoyaltiesRequest; 10 | -------------------------------------------------------------------------------- /packages/api/src/@types/CalculateRoyaltiesResponse.ts: -------------------------------------------------------------------------------- 1 | import Response from './Response'; 2 | import RoyaltyCalculationFungibleAssetPayout from './RoyaltyCalculationFungibleAssetPayout'; 3 | 4 | type CalculateRoyaltiesResponse = Response & { 5 | royalties: { 6 | [key: string]: RoyaltyCalculationFungibleAssetPayout[]; 7 | }; 8 | }; 9 | 10 | export default CalculateRoyaltiesResponse; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/Challenge.ts: -------------------------------------------------------------------------------- 1 | type Challenge = { 2 | challenge: string; 3 | difficulty: number; 4 | height: number; 5 | estimates: number[]; 6 | weight: number; 7 | timestamp?: number; 8 | }; 9 | 10 | export default Challenge; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/Coin.ts: -------------------------------------------------------------------------------- 1 | import WalletType from '../constants/WalletType'; 2 | 3 | type Coin = { 4 | confirmed_block_index: number; 5 | spent_block_index: number; 6 | spent: boolean; 7 | coinbase: boolean; 8 | wallet_type: WalletType; 9 | wallet_id: number; 10 | parent_coin_info: string; 11 | }; 12 | 13 | export default Coin; 14 | -------------------------------------------------------------------------------- /packages/api/src/@types/Coin2.ts: -------------------------------------------------------------------------------- 1 | type Coin2 = { 2 | amount: number; 3 | coinId: string; 4 | coinType: number; 5 | confirmedHeight: number; 6 | metadata: { 7 | isRecipient: boolean; 8 | recipientPuzzleHash: string; 9 | senderPuzzleHash: string; 10 | timeLock: number; 11 | }; 12 | parentCoin: string; 13 | puzzleHash: string; 14 | spentHeight: number; 15 | }; 16 | 17 | export default Coin2; 18 | -------------------------------------------------------------------------------- /packages/api/src/@types/CoinSolution.ts: -------------------------------------------------------------------------------- 1 | import type Coin from './Coin'; 2 | import type Program from './Program'; 3 | 4 | type CoinSolution = { 5 | coin: Coin; 6 | solution: Program; 7 | }; 8 | 9 | export default CoinSolution; 10 | -------------------------------------------------------------------------------- /packages/api/src/@types/Connection.ts: -------------------------------------------------------------------------------- 1 | import type BigNumber from 'bignumber.js'; 2 | 3 | type Connection = { 4 | bytesRead: number; 5 | bytesWritten: number; 6 | creationTime: BigNumber; 7 | lastMessageTime: BigNumber; 8 | localPort: number; 9 | nodeId: string; 10 | peakHash?: string; 11 | peakHeight?: number | null; 12 | peakWeight?: number | null; 13 | peerHost: string; 14 | peerPort: number; 15 | peerServerPort: number; 16 | type: number; 17 | }; 18 | 19 | export default Connection; 20 | -------------------------------------------------------------------------------- /packages/api/src/@types/DataLayerChange.ts: -------------------------------------------------------------------------------- 1 | export interface DataLayerChange { 2 | action: 'delete' | 'insert'; 3 | key: string; 4 | value?: string; 5 | } 6 | -------------------------------------------------------------------------------- /packages/api/src/@types/DataLayerRootHash.ts: -------------------------------------------------------------------------------- 1 | type DataLayerRootHash = { 2 | confirmed: boolean; 3 | hash: string; 4 | id: string; 5 | timestamp: number; 6 | }; 7 | 8 | export default DataLayerRootHash; 9 | -------------------------------------------------------------------------------- /packages/api/src/@types/FarmedAmount.ts: -------------------------------------------------------------------------------- 1 | type FarmedAmount = { 2 | farmedAmount: number; 3 | farmerRewardAmount: number; 4 | feeAmount: number; 5 | lastHeightFarmed: number; 6 | poolRewardAmount: number; 7 | lastTimeFarmed: number; 8 | blocksWon: number; 9 | }; 10 | 11 | export default FarmedAmount; 12 | -------------------------------------------------------------------------------- /packages/api/src/@types/FarmingInfo.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | type FarmingInfo = { 4 | challengeHash: string; 5 | totalPlots: number; 6 | foundProofs: number; 7 | eligiblePlots: number; 8 | time: BigNumber; 9 | }; 10 | 11 | export default FarmingInfo; 12 | -------------------------------------------------------------------------------- /packages/api/src/@types/FeeEstimate.ts: -------------------------------------------------------------------------------- 1 | import type BigNumber from 'bignumber.js'; 2 | 3 | type FeeEstimate = { 4 | currentFeeRate: BigNumber; 5 | estimates: BigNumber[]; 6 | feeRateLastBlock: BigNumber; 7 | feesLastBlock: number; 8 | fullNodeSynced: boolean; 9 | lastBlockCost: number; 10 | lastPeakTimestamp: number; 11 | lastTxBlockHeight: number; 12 | mempoolFees: number; 13 | mempoolMaxSize: number; 14 | mempoolSize: number; 15 | nodeTimeUtc: number; 16 | numSpends: number; 17 | peakHeight: number; 18 | targetTimes: number[]; 19 | }; 20 | 21 | export default FeeEstimate; 22 | -------------------------------------------------------------------------------- /packages/api/src/@types/Fingerprint.ts: -------------------------------------------------------------------------------- 1 | type Fingerprint = number; 2 | 3 | export default Fingerprint; 4 | -------------------------------------------------------------------------------- /packages/api/src/@types/Foliage.ts: -------------------------------------------------------------------------------- 1 | type FoliageBlockData = { 2 | extensionData: string; 3 | farmerRewardPuzzleHash: string; 4 | poolSignature: string | null; 5 | poolTarget: { 6 | maxHeight: number; 7 | puzzleHash: string; 8 | }; 9 | unfinishedRewardBlockHash: string; 10 | }; 11 | 12 | type Foliage = { 13 | foliageBlockData: FoliageBlockData; 14 | foliageBlockDataSignature: string; 15 | foliageTransactionBlockHash: string; 16 | foliageTransactionBlockSignature: string; 17 | prevBlockHash: string; 18 | rewardBlockHash: string; 19 | }; 20 | 21 | export default Foliage; 22 | -------------------------------------------------------------------------------- /packages/api/src/@types/FoliageTransactionBlock.ts: -------------------------------------------------------------------------------- 1 | type FoliageTransactionBlock = { 2 | additionsRoot: string; 3 | filterHash: string; 4 | prevTransactionBlockHash: string; 5 | removalsRoot: string; 6 | timestamp: number; 7 | transactionsInfoHash: string; 8 | }; 9 | 10 | export default FoliageTransactionBlock; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/G2Element.ts: -------------------------------------------------------------------------------- 1 | type G2Element = string; 2 | 3 | export default G2Element; 4 | -------------------------------------------------------------------------------- /packages/api/src/@types/HarvesterPlotsPaginated.ts: -------------------------------------------------------------------------------- 1 | import type Plot from './Plot'; 2 | 3 | type HarvesterPlotsPaginated = { 4 | nodeId: string; 5 | page: number; 6 | pageCount: number; 7 | totalCount: number; 8 | plots: Plot[]; 9 | }; 10 | 11 | export default HarvesterPlotsPaginated; 12 | -------------------------------------------------------------------------------- /packages/api/src/@types/InitialTargetState.ts: -------------------------------------------------------------------------------- 1 | type InitialTargetState = 2 | | { 3 | state: 'SELF_POOLING'; 4 | } 5 | | { 6 | state: 'FARMING_TO_POOL'; 7 | pool_url: string; 8 | relative_lock_height: number; 9 | target_puzzle_hash: string; 10 | }; 11 | 12 | export default InitialTargetState; 13 | -------------------------------------------------------------------------------- /packages/api/src/@types/KeyData.ts: -------------------------------------------------------------------------------- 1 | type KeyData = { 2 | fingerprint: number; 3 | label: string | null; 4 | publicKey: string; 5 | secrets: { 6 | mnemonic: string[]; 7 | entropy: string; 8 | privateKey: string; 9 | } | null; 10 | }; 11 | 12 | export default KeyData; 13 | -------------------------------------------------------------------------------- /packages/api/src/@types/KeyringStatus.ts: -------------------------------------------------------------------------------- 1 | type KeyringStatus = { 2 | isKeyringLocked: boolean; 3 | canSavePassphrase: boolean; 4 | userPassphraseIsSet: boolean; 5 | canSetPassphraseHint: boolean; 6 | passphraseHint: string; 7 | passphraseRequirements: { isOptional: boolean; min_length: number }; 8 | }; 9 | 10 | export default KeyringStatus; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/MessageInterface.ts: -------------------------------------------------------------------------------- 1 | import { type ServiceNameValue } from '../constants/ServiceName'; 2 | 3 | export default interface MessageInterface { 4 | command: string; 5 | data?: Object; 6 | origin: ServiceNameValue; 7 | destination: ServiceNameValue; 8 | ack?: boolean; 9 | requestId?: string; 10 | } 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/NFTAttribute.ts: -------------------------------------------------------------------------------- 1 | type NFTAttribute = { 2 | name?: string; 3 | value?: string | number; 4 | trait_type?: string; 5 | min_value?: number; 6 | max_value?: number; 7 | }; 8 | 9 | export default NFTAttribute; 10 | -------------------------------------------------------------------------------- /packages/api/src/@types/NewFarmingInfo.ts: -------------------------------------------------------------------------------- 1 | type NewFarmingInfo = { 2 | nodeId: string; 3 | challengeHash: string; 4 | signagePoint: string; 5 | timestamp: number; 6 | passedFilter: number; 7 | proofs: number; 8 | totalPlots: number; 9 | lookupTime: number; 10 | }; 11 | 12 | export default NewFarmingInfo; 13 | -------------------------------------------------------------------------------- /packages/api/src/@types/OfferCoinOfInterest.ts: -------------------------------------------------------------------------------- 1 | type OfferCoinOfInterest = { 2 | amount: number; 3 | parentCoinInfo: string; 4 | puzzleHash: string; 5 | }; 6 | 7 | export default OfferCoinOfInterest; 8 | -------------------------------------------------------------------------------- /packages/api/src/@types/OfferTradeRecord.ts: -------------------------------------------------------------------------------- 1 | import type OfferCoinOfInterest from './OfferCoinOfInterest'; 2 | import type OfferSummaryRecord from './OfferSummaryRecord'; 3 | 4 | type OfferTradeRecord = { 5 | confirmed_at_index: number; 6 | accepted_at_time: number; 7 | created_at_time: number; 8 | is_my_offer: boolean; 9 | sent: number; 10 | coins_of_interest: OfferCoinOfInterest[]; 11 | trade_id: string; 12 | status: string; 13 | sent_to: any[]; 14 | summary: OfferSummaryRecord; 15 | offer_data?: string; 16 | }; 17 | 18 | export default OfferTradeRecord; 19 | -------------------------------------------------------------------------------- /packages/api/src/@types/Peak.ts: -------------------------------------------------------------------------------- 1 | type Peak = { 2 | height: number; 3 | timestamp: number; 4 | }; 5 | 6 | export default Peak; 7 | -------------------------------------------------------------------------------- /packages/api/src/@types/Plot.ts: -------------------------------------------------------------------------------- 1 | type Plot = { 2 | plotId: string; 3 | fileSize: number; 4 | filename: string; 5 | plotPublicKey: string; 6 | poolContractPuzzleHash: null | string; 7 | poolPublicKey: string; 8 | size: number; 9 | timeModified: number; 10 | compressionLevel?: number; 11 | }; 12 | 13 | export default Plot; 14 | -------------------------------------------------------------------------------- /packages/api/src/@types/PlotAdd.ts: -------------------------------------------------------------------------------- 1 | import Fingerprint from './Fingerprint'; 2 | 3 | type PlotAdd = { 4 | plotSize: number; 5 | plotCount: number; 6 | maxRam: number; 7 | numThreads: number; 8 | numBuckets: number; 9 | queue: string; 10 | finalLocation: string; 11 | workspaceLocation: string; 12 | workspaceLocation2: string; 13 | parallel: boolean; 14 | delay: number; 15 | fingerprint?: Fingerprint; 16 | disableBitfieldPlotting?: boolean; 17 | excludeFinalDir?: boolean; 18 | overrideK?: boolean; 19 | farmerPublicKey?: string; 20 | poolPublicKey?: string; 21 | c: string; 22 | }; 23 | 24 | export default PlotAdd; 25 | -------------------------------------------------------------------------------- /packages/api/src/@types/PlotNFT.ts: -------------------------------------------------------------------------------- 1 | import type PoolState from './PoolState'; 2 | import type PoolWalletStatus from './PoolWalletStatus'; 3 | import type WalletBalance from './WalletBalance'; 4 | 5 | type PlotNFT = { 6 | pool_state: PoolState; 7 | wallet_balance: WalletBalance; 8 | pool_wallet_status: PoolWalletStatus; 9 | }; 10 | 11 | export default PlotNFT; 12 | -------------------------------------------------------------------------------- /packages/api/src/@types/PlotNFTExternal.ts: -------------------------------------------------------------------------------- 1 | import type PoolState from './PoolState'; 2 | 3 | type PlotNFTExternal = { 4 | pool_state: PoolState; 5 | }; 6 | 7 | export default PlotNFTExternal; 8 | -------------------------------------------------------------------------------- /packages/api/src/@types/PlotQueueItem.ts: -------------------------------------------------------------------------------- 1 | import PlotStatus from '../constants/PlotStatus'; 2 | 3 | type PlotQueueItem = { 4 | id: string; 5 | queue: string; 6 | size: number; 7 | parallel: boolean; 8 | delay: number; 9 | state: PlotStatus; 10 | error?: string; 11 | log?: string; 12 | logNew?: string; 13 | progress?: number; 14 | }; 15 | 16 | export default PlotQueueItem; 17 | -------------------------------------------------------------------------------- /packages/api/src/@types/Point.ts: -------------------------------------------------------------------------------- 1 | type Point = [number, number]; 2 | 3 | export default Point; 4 | -------------------------------------------------------------------------------- /packages/api/src/@types/PoolInfo.ts: -------------------------------------------------------------------------------- 1 | type PoolInfo = { 2 | name: string; 3 | description: string; 4 | pool_url: string; 5 | fee: string; 6 | logo_url: string; 7 | minimum_difficulty: number; 8 | protocol_version: string; 9 | relative_lock_height: number; 10 | target_puzzle_hash: string; 11 | }; 12 | 13 | export default PoolInfo; 14 | -------------------------------------------------------------------------------- /packages/api/src/@types/PrivateKey.ts: -------------------------------------------------------------------------------- 1 | type PrivateKey = { 2 | farmerPk: string; 3 | fingerprint: number; 4 | pk: string; 5 | poolPk: string; 6 | seed: string; 7 | sk: string; 8 | }; 9 | 10 | export default PrivateKey; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/Program.ts: -------------------------------------------------------------------------------- 1 | type Program = {}; 2 | 3 | export default Program; 4 | -------------------------------------------------------------------------------- /packages/api/src/@types/ProofOfSpace.ts: -------------------------------------------------------------------------------- 1 | type ProofOfSpace = 2 | | string 3 | | { 4 | challenge: string; 5 | publicPoolKey: string; 6 | poolContractPuzzleHash: string; 7 | plotPublicKey: string; 8 | size: number; 9 | proof: string; 10 | }; 11 | 12 | export default ProofOfSpace; 13 | -------------------------------------------------------------------------------- /packages/api/src/@types/ProofsOfSpace.ts: -------------------------------------------------------------------------------- 1 | type ProofsOfSpace = { 2 | [key: string]: [string, ProofsOfSpace][]; 3 | }; 4 | 5 | export default ProofsOfSpace; 6 | -------------------------------------------------------------------------------- /packages/api/src/@types/PuzzleDecorator.ts: -------------------------------------------------------------------------------- 1 | type PuzzleDecorator = { 2 | decorator: 'CLAWBACK'; 3 | clawbackTimelock: number; 4 | }; 5 | 6 | export default PuzzleDecorator; 7 | -------------------------------------------------------------------------------- /packages/api/src/@types/Response.ts: -------------------------------------------------------------------------------- 1 | type Response = { 2 | success: boolean; 3 | error?: string; 4 | errorDetails?: { message: string }; 5 | }; 6 | 7 | export default Response; 8 | -------------------------------------------------------------------------------- /packages/api/src/@types/RewardTargets.ts: -------------------------------------------------------------------------------- 1 | type RewardTargets = { 2 | farmerTarget: string; 3 | poolTarget: string; 4 | haveFarmerSk?: boolean; 5 | havePoolSk?: boolean; 6 | }; 7 | 8 | export default RewardTargets; 9 | -------------------------------------------------------------------------------- /packages/api/src/@types/RoyaltyCalculationFungibleAsset.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | type RoyaltyCalculationFungibleAsset = { 4 | asset: string; // Use walletId value here. Corresponds to RoyaltyCalculationFungibleAssetPayout.asset 5 | amount: BigNumber; 6 | }; 7 | 8 | export default RoyaltyCalculationFungibleAsset; 9 | -------------------------------------------------------------------------------- /packages/api/src/@types/RoyaltyCalculationFungibleAssetPayout.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | type RoyaltyCalculationFungibleAssetPayout = { 4 | address: string; 5 | amount: BigNumber; 6 | asset: string; // Corresponds to RoyaltyCalculationFungibleAsset.asset 7 | }; 8 | 9 | export default RoyaltyCalculationFungibleAssetPayout; 10 | -------------------------------------------------------------------------------- /packages/api/src/@types/RoyaltyCalculationRoyaltyAsset.ts: -------------------------------------------------------------------------------- 1 | type RoyaltyCalculationRoyaltyAsset = { 2 | asset: string; 3 | royaltyAddress: string; 4 | royaltyPercentage: number; 5 | }; 6 | 7 | export default RoyaltyCalculationRoyaltyAsset; 8 | -------------------------------------------------------------------------------- /packages/api/src/@types/SignagePoint.ts: -------------------------------------------------------------------------------- 1 | type SignagePoint = { 2 | challengeHash: string; 3 | challengeChainSp: string; 4 | rewardChainSp: string; 5 | difficulty: number; 6 | subSlotIters: number; 7 | signagePointIndex: number; 8 | }; 9 | 10 | export default SignagePoint; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/SpendBundle.ts: -------------------------------------------------------------------------------- 1 | // import type CoinSolution from './CoinSolution'; 2 | import type G2Element from './G2Element'; 3 | 4 | type CoinSpends = { 5 | coin: Coin; 6 | puzzleReveal: string; 7 | solution: string; 8 | }; 9 | type Coin = { 10 | amount: number; 11 | parentCoinInfo: string; 12 | puzzleHash: string; 13 | }; 14 | 15 | type SpendBundle = { 16 | coinSpends: CoinSpends[]; 17 | // coinSolutions: CoinSolution[]; 18 | aggregatedSignature: G2Element; 19 | }; 20 | 21 | export default SpendBundle; 22 | -------------------------------------------------------------------------------- /packages/api/src/@types/UnconfirmedPlotNFT.ts: -------------------------------------------------------------------------------- 1 | import PlotNFTState from '../constants/PlotNFTState'; 2 | 3 | type UnconfirmedPlotNFT = { 4 | fingerprint: string; 5 | transactionId: string; 6 | state: PlotNFTState; 7 | poolUrl?: string; 8 | }; 9 | 10 | export default UnconfirmedPlotNFT; 11 | -------------------------------------------------------------------------------- /packages/api/src/@types/WalletAddress.ts: -------------------------------------------------------------------------------- 1 | type WalletAddress = { 2 | address: string; 3 | hdPath: string; 4 | }; 5 | 6 | export default WalletAddress; 7 | -------------------------------------------------------------------------------- /packages/api/src/@types/WalletBalance.ts: -------------------------------------------------------------------------------- 1 | type WalletBalance = { 2 | confirmedWalletBalance: number; 3 | fingerprint: number; 4 | maxSendAmount: number; 5 | pendingApprovalBalance: number; 6 | pendingChange: number; 7 | pendingCoinRemovalCount: number; 8 | spendableBalance: number; 9 | unconfirmedWalletBalance: number; 10 | unspentCoinCount: number; 11 | walletId: number; 12 | walletType: number; 13 | }; 14 | 15 | export default WalletBalance; 16 | -------------------------------------------------------------------------------- /packages/api/src/@types/crypto-browserify.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'crypto-browserify' { 2 | export * from 'crypto'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/api/src/@types/helpers/Modify.ts: -------------------------------------------------------------------------------- 1 | type Modify = Omit & R; 2 | 3 | export default Modify; 4 | -------------------------------------------------------------------------------- /packages/api/src/constants/ConnectionState.ts: -------------------------------------------------------------------------------- 1 | enum ConnectionState { 2 | CONNECTED = 'CONNECTED', 3 | CONNECTING = 'CONNECTING', 4 | DISCONNECTED = 'DISCONNECTED', 5 | } 6 | 7 | export default ConnectionState; 8 | -------------------------------------------------------------------------------- /packages/api/src/constants/OfferState.ts: -------------------------------------------------------------------------------- 1 | enum OfferState { 2 | PENDING_ACCEPT = 'PENDING_ACCEPT', 3 | PENDING_CONFIRM = 'PENDING_CONFIRM', 4 | PENDING_CANCEL = 'PENDING_CANCEL', 5 | CANCELLED = 'CANCELLED', 6 | CONFIRMED = 'CONFIRMED', 7 | FAILED = 'FAILED', 8 | } 9 | 10 | export default OfferState; 11 | -------------------------------------------------------------------------------- /packages/api/src/constants/PassphrasePromptReason.ts: -------------------------------------------------------------------------------- 1 | enum PassphrasePromptReason { 2 | KEYRING_LOCKED = 'KEYRING_LOCKED', 3 | DELETING_KEY = 'DELETING_KEY', 4 | } 5 | 6 | export default PassphrasePromptReason; 7 | -------------------------------------------------------------------------------- /packages/api/src/constants/PlotNFTState.ts: -------------------------------------------------------------------------------- 1 | // PoolSingletonState 2 | 3 | enum PlotNFTState { 4 | SELF_POOLING = 1, 5 | LEAVING_POOL = 2, 6 | FARMING_TO_POOL = 3, 7 | } 8 | 9 | export default PlotNFTState; 10 | -------------------------------------------------------------------------------- /packages/api/src/constants/PlotStatus.ts: -------------------------------------------------------------------------------- 1 | enum PlotStatus { 2 | SUBMITTED = 'SUBMITTED', 3 | RUNNING = 'RUNNING', 4 | REMOVING = 'REMOVING', 5 | FINISHED = 'FINISHED', 6 | } 7 | 8 | export default PlotStatus; 9 | -------------------------------------------------------------------------------- /packages/api/src/constants/PlotterName.ts: -------------------------------------------------------------------------------- 1 | enum PlotterName { 2 | BLADEBIT_RAM = 'bladebit_ram', 3 | BLADEBIT_DISK = 'bladebit_disk', 4 | BLADEBIT_CUDA = 'bladebit_cuda', 5 | CHIAPOS = 'chiapos', 6 | MADMAX = 'madmax', 7 | } 8 | 9 | export default PlotterName; 10 | -------------------------------------------------------------------------------- /packages/api/src/constants/ServiceConnectionName.ts: -------------------------------------------------------------------------------- 1 | import ServiceHumanName from './ServiceHumanName'; 2 | import ServiceName from './ServiceName'; 3 | 4 | export default { 5 | 1: ServiceHumanName[ServiceName.FULL_NODE], 6 | 2: ServiceHumanName[ServiceName.HARVESTER], 7 | 3: ServiceHumanName[ServiceName.FARMER], 8 | 4: ServiceHumanName[ServiceName.TIMELORD], 9 | 5: ServiceHumanName[ServiceName.INTRODUCER], 10 | 6: ServiceHumanName[ServiceName.WALLET], 11 | 7: ServiceHumanName[ServiceName.PLOTTER], 12 | 8: ServiceHumanName[ServiceName.DATALAYER], 13 | }; 14 | -------------------------------------------------------------------------------- /packages/api/src/constants/ServiceHumanName.ts: -------------------------------------------------------------------------------- 1 | import ServiceName from './ServiceName'; 2 | 3 | export default { 4 | [ServiceName.WALLET]: 'Wallet', 5 | [ServiceName.FULL_NODE]: 'Full Node', 6 | [ServiceName.FARMER]: 'Farmer', 7 | [ServiceName.HARVESTER]: 'Harvester', 8 | [ServiceName.SIMULATOR]: 'Full Node Simulator', 9 | [ServiceName.DAEMON]: 'Daemon', 10 | [ServiceName.PLOTTER]: 'Plotter', 11 | [ServiceName.TIMELORD]: 'Timelord', 12 | [ServiceName.INTRODUCER]: 'Introducer', 13 | [ServiceName.EVENTS]: 'Events', 14 | [ServiceName.DATALAYER]: 'DataLayer', 15 | [ServiceName.DATALAYER_SERVER]: 'DataLayer File Propagation Server', 16 | }; 17 | -------------------------------------------------------------------------------- /packages/api/src/constants/ServiceName.ts: -------------------------------------------------------------------------------- 1 | const ServiceName = { 2 | WALLET: 'chia_wallet', 3 | FULL_NODE: 'chia_full_node', 4 | FARMER: 'chia_farmer', 5 | HARVESTER: 'chia_harvester', 6 | SIMULATOR: 'chia_full_node_simulator', 7 | DAEMON: 'daemon', 8 | PLOTTER: 'chia_plotter', 9 | TIMELORD: 'chia_timelord', 10 | INTRODUCER: 'chia_introducer', 11 | EVENTS: 'wallet_ui', 12 | DATALAYER: 'chia_data_layer', 13 | DATALAYER_SERVER: 'chia_data_layer_http', 14 | } as const; 15 | 16 | type ObjectValues = T[keyof T]; 17 | 18 | export type ServiceNameValue = ObjectValues; 19 | 20 | export default ServiceName; 21 | -------------------------------------------------------------------------------- /packages/api/src/constants/SyncingStatus.ts: -------------------------------------------------------------------------------- 1 | enum SyncingStatus { 2 | SYNCING = 'SYNCING', 3 | SYNCED = 'SYNCED', 4 | NOT_SYNCED = 'NOT_SYNCED', 5 | } 6 | 7 | export default SyncingStatus; 8 | -------------------------------------------------------------------------------- /packages/api/src/constants/TransactionType.ts: -------------------------------------------------------------------------------- 1 | enum TransactionType { 2 | INCOMING = 0, 3 | OUTGOING = 1, 4 | COINBASE_REWARD = 2, 5 | FEE_REWARD = 3, 6 | INCOMING_TRADE = 4, 7 | OUTGOING_TRADE = 5, 8 | INCOMING_CLAWBACK_RECEIVE = 6, 9 | INCOMING_CLAWBACK_SEND = 7, 10 | OUTGOING_CLAWBACK = 8, 11 | INCOMING_CRCAT_PENDING = 9, 12 | } 13 | 14 | export default TransactionType; 15 | -------------------------------------------------------------------------------- /packages/api/src/constants/TransactionTypeFilterMode.ts: -------------------------------------------------------------------------------- 1 | enum TransactionTypeFilterMode { 2 | INCLUDE = 1, 3 | EXCLUDE = 2, 4 | } 5 | 6 | export default TransactionTypeFilterMode; 7 | -------------------------------------------------------------------------------- /packages/api/src/constants/WalletType.ts: -------------------------------------------------------------------------------- 1 | enum WalletType { 2 | STANDARD_WALLET = 0, 3 | RATE_LIMITED = 1, 4 | ATOMIC_SWAP = 2, 5 | AUTHORIZED_PAYEE = 3, 6 | MULTI_SIG = 4, 7 | CUSTODY = 5, 8 | CAT = 6, 9 | RECOVERABLE = 7, 10 | DECENTRALIZED_ID = 8, 11 | POOLING_WALLET = 9, 12 | NFT = 10, 13 | DATA_LAYER = 11, 14 | CRCAT = 57, 15 | } 16 | 17 | export default WalletType; 18 | -------------------------------------------------------------------------------- /packages/api/src/constants/defaultPlotter.ts: -------------------------------------------------------------------------------- 1 | import defaultsForPlotter from '../utils/defaultsForPlotter'; 2 | import optionsForPlotter from '../utils/optionsForPlotter'; 3 | 4 | import PlotterName from './PlotterName'; 5 | 6 | export default { 7 | displayName: 'Chia Proof of Space', 8 | options: optionsForPlotter(PlotterName.CHIAPOS), 9 | defaults: defaultsForPlotter(PlotterName.CHIAPOS), 10 | installInfo: { installed: true }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/api/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Client'; 2 | export * from './services'; 3 | export * from './wallets'; 4 | export * from './constants'; 5 | export * from './utils'; 6 | export * from './@types'; 7 | -------------------------------------------------------------------------------- /packages/api/src/services/Events.ts: -------------------------------------------------------------------------------- 1 | import Client from '../Client'; 2 | import ServiceName from '../constants/ServiceName'; 3 | 4 | import Service from './Service'; 5 | import type { Options } from './Service'; 6 | 7 | export default class Events extends Service { 8 | constructor(client: Client, options?: Options) { 9 | super(ServiceName.EVENTS, client, options); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/api/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Daemon } from './Daemon'; 2 | export { default as DataLayer } from './DataLayer'; 3 | export { default as Events } from './Events'; 4 | export { default as Farmer } from './Farmer'; 5 | export type { LatencyData, LatencyInfo, LatencyRecord } from './Farmer'; 6 | export { default as FullNode } from './FullNode'; 7 | export { default as Harvester } from './Harvester'; 8 | export type { FarmingInfoWithIndex, HarvesterConfig } from './Harvester'; 9 | export { default as PlotterService } from './PlotterService'; 10 | export { default as Service } from './Service'; 11 | export { default as WalletService } from './WalletService'; 12 | -------------------------------------------------------------------------------- /packages/api/src/utils/ErrorData.ts: -------------------------------------------------------------------------------- 1 | export default class ErrorData extends Error { 2 | data: any; 3 | 4 | constructor(message: string, data: any) { 5 | super(message); 6 | 7 | this.data = data; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/api/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | default as royaltyAssetFromNFTInfo, 3 | fungibleAssetFromAssetIdAndAmount, 4 | fungibleAssetFromWalletIdAndAmount, 5 | } from './calculateRoyalties'; 6 | export { default as defaultsForPlotter } from './defaultsForPlotter'; 7 | export { default as english } from './english'; 8 | export { default as optionsForPlotter } from './optionsForPlotter'; 9 | export { default as toCamelCase } from './toCamelCase'; 10 | export { default as toSnakeCase } from './toSnakeCase'; 11 | export { default as toBech32m, fromBech32m, decodeBech32m } from './toBech32m'; 12 | -------------------------------------------------------------------------------- /packages/api/src/utils/sleep.ts: -------------------------------------------------------------------------------- 1 | export default function sleep(ms: number) { 2 | return new Promise((resolve) => { 3 | setTimeout(resolve, ms); 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /packages/api/src/utils/toCamelCase.ts: -------------------------------------------------------------------------------- 1 | import { camelCase, transform, isArray, isObject } from 'lodash'; 2 | 3 | export default function toCamelCase(object: Object): { [key: string]: unknown } { 4 | return transform(object, (acc, value, key, target) => { 5 | const newKey = isArray(target) || key.indexOf('_') === -1 ? key : camelCase(key); 6 | 7 | acc[newKey] = isObject(value) ? toCamelCase(value) : value; 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /packages/api/src/utils/toSafeNumber.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import { transform } from 'lodash'; 3 | 4 | export default function toSafeNumber(object: Object): { [key: string]: unknown } { 5 | return transform(object, (acc, value, key) => { 6 | if (value instanceof BigNumber && value.isInteger() && value.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)) { 7 | acc[key] = value.toNumber(); 8 | } else { 9 | acc[key] = value; 10 | } 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /packages/api/src/utils/toSnakeCase.ts: -------------------------------------------------------------------------------- 1 | import { snakeCase, transform, isArray, isObject } from 'lodash'; 2 | 3 | export default function toSnakeCase(object: Object): { [key: string]: unknown } { 4 | return transform(object, (acc, value, key, target) => { 5 | const newKey = isArray(target) ? key : snakeCase(key); 6 | 7 | acc[newKey] = isObject(value) ? toSnakeCase(value) : value; 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /packages/api/src/wallets/Pool.ts: -------------------------------------------------------------------------------- 1 | import Wallet from '../services/WalletService'; 2 | 3 | export default class PoolWallet extends Wallet { 4 | async createNewPoolWallet(args: { initialTargetState: Object; fee: string }) { 5 | return super.createNewWallet({ 6 | walletType: 'pool_wallet', 7 | options: { 8 | mode: 'new', 9 | ...args, 10 | }, 11 | }); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/api/src/wallets/RL.ts: -------------------------------------------------------------------------------- 1 | import Wallet from '../services/WalletService'; 2 | 3 | export default class RLWallet extends Wallet { 4 | async createAdminWallet(args: { interval: string; limit: string; pubkey: string; amount: string }) { 5 | return this.createNewWallet({ 6 | walletType: 'rl_wallet', 7 | options: { 8 | rlType: 'admin', 9 | ...args, 10 | }, 11 | }); 12 | } 13 | 14 | async createUserWallet() { 15 | return this.createNewWallet({ 16 | walletType: 'rl_wallet', 17 | options: { 18 | rlType: 'user', 19 | }, 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/api/src/wallets/index.ts: -------------------------------------------------------------------------------- 1 | export { default as CAT } from './CAT'; 2 | export { default as DID } from './DID'; 3 | export { default as DL } from './DL'; 4 | export { default as NFT } from './NFT'; 5 | export { default as Pool } from './Pool'; 6 | export { default as RL } from './RL'; 7 | export { default as VC } from './VC'; 8 | -------------------------------------------------------------------------------- /packages/api/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "dist"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/core/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /packages/core/load-package.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('./package.json'); 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Accordion/Accordion.tsx: -------------------------------------------------------------------------------- 1 | import { Collapse } from '@mui/material'; 2 | import React, { ReactNode } from 'react'; 3 | 4 | type Props = { 5 | children?: ReactNode; 6 | expanded?: boolean; 7 | }; 8 | 9 | export default function Accordion({ expanded = false, children }: Props) { 10 | return {children}; 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/components/Accordion/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Accordion'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Address/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Address'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/AddressBookProvider/index.ts: -------------------------------------------------------------------------------- 1 | export { default, AddressBookContext } from './AddressBookProvider'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/AdvancedOptions/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './AdvancedOptions'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/AlertDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './AlertDialog'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Amount/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Amount'; 2 | export type { AmountProps } from './Amount'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/AspectRatio/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './AspectRatio'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Auth/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AuthProvider } from './AuthProvider'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Autocomplete/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Autocomplete'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Back/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Back'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Button/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Button'; 2 | export type { ButtonProps } from './Button'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/ButtonLoading/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ButtonLoading'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/ButtonSelected/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ButtonSelected'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Card/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Card'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CardHero/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CardHero'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CardKeyValue/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CardKeyValue'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CardListItem/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CardListItem'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CardSimple/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CardSimple'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CardStep/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CardStep'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Checkbox/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Checkbox'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/ConfirmDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ConfirmDialog'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CopyToClipboard/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CopyToClipboard'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/CurrencyCode/CurrencyCode.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/CurrencyCode/CurrencyCode.tsx -------------------------------------------------------------------------------- /packages/core/src/components/CurrencyCode/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './CurrencyCode'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/DarkModeToggle/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './DarkModeToggle'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/DialogActions/DialogActions.tsx: -------------------------------------------------------------------------------- 1 | import { DialogActions, type DialogActionsProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | export default function StyledDialogActions(props: DialogActionsProps) { 5 | return `${theme.spacing(2)} ${theme.spacing(3)}` }} />; 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/src/components/DialogActions/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './DialogActions'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Dropdown/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Dropdown'; 2 | export { default as DropdownBase } from './DropdownBase'; 3 | export { default as DropdownActions } from './DropdownActions'; 4 | export { default as DropdownButton } from './DropdownButton'; 5 | export { default as DropdownIconButton } from './DropdownIconButton'; 6 | -------------------------------------------------------------------------------- /packages/core/src/components/Dropzone/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Dropzone'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/ErrorBoundary/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ErrorBoundary'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/EstimatedFee/index.ts: -------------------------------------------------------------------------------- 1 | export { default, FeeTxType } from './EstimatedFee'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Fee/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Fee'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Flex/index.ts: -------------------------------------------------------------------------------- 1 | export { default, type FlexProps } from './Flex'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/Fonts.tsx: -------------------------------------------------------------------------------- 1 | import { createGlobalStyle } from 'styled-components'; 2 | import '@fontsource/roboto/700.css'; 3 | import '@fontsource/roboto/500.css'; 4 | import '@fontsource/roboto/400.css'; 5 | import '@fontsource/roboto/300.css'; 6 | 7 | export default createGlobalStyle` 8 | body { 9 | font-family: "Roboto"; 10 | } 11 | `; 12 | -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Fonts'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/ionicons.eot -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/ionicons.ttf -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/ionicons.woff -------------------------------------------------------------------------------- /packages/core/src/components/Fonts/ionicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/components/Fonts/ionicons.woff2 -------------------------------------------------------------------------------- /packages/core/src/components/Form/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Form'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/FormBackButton/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './FormBackButton'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/FormatBytes/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './FormatBytes'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/FormatConnectionStatus/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './FormatConnectionStatus'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/FormatLargeNumber/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './FormatLargeNumber'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/GuestRoute/GuestRoute.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useSelector } from 'react-redux'; 3 | import { Route, Navigate, RouteProps } from 'react-router-dom'; 4 | // import type { RootState } from '../../../../modules/rootReducer'; 5 | 6 | type RootState = any; 7 | type Props = RouteProps; 8 | 9 | export default function GuestRoute(props: Props) { 10 | const loggedIn = useSelector((state: RootState) => state.wallet_state.logged_in); 11 | 12 | if (loggedIn) { 13 | return ; 14 | } 15 | 16 | return ; 17 | } 18 | -------------------------------------------------------------------------------- /packages/core/src/components/GuestRoute/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './GuestRoute'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Heading/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Heading'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/IconButton/IconButton.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, type IconButtonProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | export default function StyledIconButton(props: IconButtonProps) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/src/components/IconButton/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './IconButton'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/IconMessage/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './IconMessage'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Indicator/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Indicator'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/InputBase/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './InputBase'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LayoutDashboard/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LayoutDashboard'; 2 | export { default as LayoutDashboardSub } from './LayoutDashboardSub'; 3 | export { default as NewerAppVersionAvailable } from './NewerAppVersionAvailable'; 4 | -------------------------------------------------------------------------------- /packages/core/src/components/LayoutHero/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LayoutHero'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LayoutLoading/LayoutLoading.tsx: -------------------------------------------------------------------------------- 1 | import React, { type ReactNode } from 'react'; 2 | 3 | import LayoutHero from '../LayoutHero'; 4 | import Loading from '../Loading'; 5 | 6 | export type LayoutLoadingProps = { 7 | children?: ReactNode; 8 | }; 9 | 10 | export default function LayoutLoading(props: LayoutLoadingProps) { 11 | const { children } = props; 12 | 13 | return ( 14 | 15 | 16 | {children} 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/core/src/components/LayoutLoading/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LayoutLoading'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LayoutMain/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LayoutMain'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LineChart/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LineChart'; 2 | export * from './LineChart'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/Link/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Link'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Loading/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Loading'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LoadingOverlay/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LoadingOverlay'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LocaleProvider/index.ts: -------------------------------------------------------------------------------- 1 | export { default, LocaleContext } from './LocaleProvider'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/LocaleToggle/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './LocaleToggle'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Log/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Log'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Logo/Logo.tsx: -------------------------------------------------------------------------------- 1 | import { Chia } from '@chia-network/icons'; 2 | import { Box, BoxProps } from '@mui/material'; 3 | import React from 'react'; 4 | import styled from 'styled-components'; 5 | 6 | const StyledChia = styled(Chia)` 7 | max-width: 100%; 8 | width: auto; 9 | height: auto; 10 | `; 11 | 12 | export default function Logo(props: BoxProps) { 13 | return ( 14 | 15 | 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /packages/core/src/components/Logo/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Logo'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Menu/index.ts: -------------------------------------------------------------------------------- 1 | export { MenuContext, default as Menu } from './Menu'; 2 | export type { MenuProps, MenuContextInterface } from './Menu'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/MenuItem/index.ts: -------------------------------------------------------------------------------- 1 | export { default as MenuItem } from './MenuItem'; 2 | export type { MenuItemProps } from './MenuItem'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/ModalDialogs/ModalDialogsContext.tsx: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | export default createContext(); 4 | -------------------------------------------------------------------------------- /packages/core/src/components/ModalDialogs/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ModalDialogs'; 2 | 3 | export { default as ModalDialogsProvider } from './ModalDialogsProvider'; 4 | -------------------------------------------------------------------------------- /packages/core/src/components/Mode/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ModeProvider } from './ModeProvider'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/MojoToCAT/MojoToCAT.tsx: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import React from 'react'; 3 | 4 | import mojoToCAT from '../../utils/mojoToCATLocaleString'; 5 | import FormatLargeNumber from '../FormatLargeNumber'; 6 | 7 | export type MojoToCATProps = { 8 | value: number | BigNumber; 9 | currencyCode: string; 10 | }; 11 | 12 | export default function MojoToCAT(props: MojoToCATProps) { 13 | const { value, currencyCode } = props; 14 | const updatedValue = mojoToCAT(value); 15 | 16 | return ( 17 | <> 18 | 19 |  {currencyCode} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /packages/core/src/components/MojoToCAT/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './MojoToCAT'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/MojoToChia/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './MojoToChia'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/More/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './More'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Mute/Mute.tsx: -------------------------------------------------------------------------------- 1 | import { styled } from '@mui/styles'; 2 | 3 | const Mute = styled('span')(({ theme }) => ({ 4 | color: theme.palette.text.secondary, 5 | })); 6 | 7 | export default Mute; 8 | -------------------------------------------------------------------------------- /packages/core/src/components/Mute/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Mute'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Persist/index.ts: -------------------------------------------------------------------------------- 1 | export { default, PersistContext } from './Persist'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/PrivateRoute/PrivateRoute.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, RouteProps } from 'react-router-dom'; 3 | 4 | type Props = RouteProps; 5 | 6 | export default function PrivateRoute(props: Props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/core/src/components/PrivateRoute/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './PrivateRoute'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/RadioGroup/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './RadioGroup'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/SandboxedIframe/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './SandboxedIframe'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Scrollbar/ScrollbarFlex.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import Flex, { type FlexProps } from '../Flex'; 4 | 5 | import Scrollbar from './Scrollbar'; 6 | 7 | export type ScrollbarFlexProps = FlexProps & {}; 8 | 9 | export default function ScrollbarFlex(props: ScrollbarFlexProps) { 10 | const { children, className = '', ...rest } = props; 11 | 12 | return ( 13 | 14 | {children} 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /packages/core/src/components/Scrollbar/index.ts: -------------------------------------------------------------------------------- 1 | import 'overlayscrollbars/css/OverlayScrollbars.css'; 2 | 3 | export { OverlayScrollbarsComponent as ScrollbarContainer } from 'overlayscrollbars-react'; 4 | 5 | export { default as Scrollbar } from './Scrollbar'; 6 | export { default as ScrollbarFlex } from './ScrollbarFlex'; 7 | export { default as ScrollbarVirtuoso } from './ScrollbarVirtuoso'; 8 | -------------------------------------------------------------------------------- /packages/core/src/components/Select/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Select'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Settings/SettingsHR.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from '@mui/material/styles'; 2 | import React from 'react'; 3 | 4 | import useDarkMode from '../../hooks/useDarkMode'; 5 | 6 | export default function SettingsHR() { 7 | const theme = useTheme(); 8 | const { isDarkMode } = useDarkMode(); 9 | const backgroundColor = isDarkMode ? (theme.palette as any).border.dark : (theme.palette as any).border.main; 10 | 11 | return ( 12 |
13 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /packages/core/src/components/Settings/SettingsLabel.tsx: -------------------------------------------------------------------------------- 1 | import { Typography } from '@mui/material'; 2 | import React, { type ReactNode } from 'react'; 3 | 4 | export type SettingsLabelProps = { 5 | children?: ReactNode; 6 | }; 7 | 8 | export default function SettingsLabel(props: SettingsLabelProps) { 9 | const { children } = props; 10 | 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/core/src/components/Settings/SettingsSection.tsx: -------------------------------------------------------------------------------- 1 | import { Typography } from '@mui/material'; 2 | import React, { type ReactNode } from 'react'; 3 | 4 | export type SettingsSectionProps = { 5 | children?: ReactNode; 6 | }; 7 | 8 | export default function SettingsSection(props: SettingsSectionProps) { 9 | const { children } = props; 10 | 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/core/src/components/Settings/SettingsText.tsx: -------------------------------------------------------------------------------- 1 | import { Typography } from '@mui/material'; 2 | import React, { type ReactNode } from 'react'; 3 | 4 | export type SettingsTextProps = { 5 | children?: ReactNode; 6 | }; 7 | 8 | export default function SettingsText(props: SettingsTextProps) { 9 | const { children } = props; 10 | 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/core/src/components/Settings/SettingsTitle.tsx: -------------------------------------------------------------------------------- 1 | import { Typography } from '@mui/material'; 2 | import React, { type ReactNode } from 'react'; 3 | 4 | export type SettingsTitleProps = { 5 | children?: ReactNode; 6 | }; 7 | 8 | export default function SettingsTitle(props: SettingsTitleProps) { 9 | const { children } = props; 10 | 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/core/src/components/Settings/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Settings'; 2 | export { default as SettingsApp } from './SettingsApp'; 3 | export { default as SettingsHR } from './SettingsHR'; 4 | export { default as SettingsLabel } from './SettingsLabel'; 5 | export { default as SettingsSection } from './SettingsSection'; 6 | export { default as SettingsText } from './SettingsText'; 7 | export { default as SettingsTitle } from './SettingsTitle'; 8 | -------------------------------------------------------------------------------- /packages/core/src/components/SideBarItem/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './SideBarItem'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Spacer/Spacer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import Flex from '../Flex'; 4 | 5 | export default function Spacer() { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/src/components/Spacer/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Spacer'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Spinner/Spinner.tsx: -------------------------------------------------------------------------------- 1 | import { Backdrop, CircularProgress } from '@mui/material'; 2 | import React from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | const StyledBackdrop = styled(Backdrop)` 6 | z-index: 2000; 7 | `; 8 | 9 | type Props = { 10 | show?: boolean; 11 | }; 12 | 13 | export default function Spinner(props: Props) { 14 | const { show = false } = props; 15 | 16 | return ( 17 | 18 | 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /packages/core/src/components/Spinner/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Spinner'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/StateIndicator/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './StateIndicator'; 2 | export { default as StateIndicatorDot } from './StateIndicatorDot'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/StateTypography/StateTypography.tsx: -------------------------------------------------------------------------------- 1 | import { Typography } from '@mui/material'; 2 | import React from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | import State from '../../constants/State'; 6 | import StateColor from '../../constants/StateColor'; 7 | 8 | const Color = { 9 | [State.SUCCESS]: StateColor.SUCCESS, 10 | [State.WARNING]: StateColor.WARNING, 11 | [State.ERROR]: StateColor.ERROR, 12 | }; 13 | 14 | export default styled(({ state, ...rest }) => )` 15 | ${({ state }) => (state ? `color: ${Color[state]};` : '')} 16 | `; 17 | -------------------------------------------------------------------------------- /packages/core/src/components/StateTypography/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './StateTypography'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Table/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Table'; 2 | export { default as TableControlled, TableControlledRow } from './TableControlled'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/TextField/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './TextField'; 2 | export type { TextFieldProps } from './TextField'; 3 | -------------------------------------------------------------------------------- /packages/core/src/components/TextFieldNumber/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './TextFieldNumber'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/ThemeProvider/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ThemeProvider'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/ToolbarSpacing/ToolbarSpacing.tsx: -------------------------------------------------------------------------------- 1 | import { makeStyles, Theme, createStyles } from '@mui/styles'; 2 | import React from 'react'; 3 | 4 | const useStyles = makeStyles((theme: Theme) => 5 | createStyles({ 6 | toolbar: theme.mixins.toolbar, 7 | }), 8 | ); 9 | 10 | export default function ToolbarSpacing() { 11 | const classes = useStyles(); 12 | 13 | return
; 14 | } 15 | -------------------------------------------------------------------------------- /packages/core/src/components/ToolbarSpacing/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ToolbarSpacing'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Tooltip'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/TooltipIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './TooltipIcon'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/TooltipTypography/TooltipTypography.tsx: -------------------------------------------------------------------------------- 1 | import { Typography, TypographyProps } from '@mui/material'; 2 | import React, { ReactElement } from 'react'; 3 | 4 | import Flex from '../Flex'; 5 | import TooltipIcon from '../TooltipIcon'; 6 | 7 | type Props = TypographyProps & { 8 | title: ReactElement; 9 | }; 10 | 11 | export default function TooltipTypography(props: Props) { 12 | const { title, ...rest } = props; 13 | 14 | return ( 15 | 16 | 17 | {title} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/core/src/components/TooltipTypography/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './TooltipTypography'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/Truncate/index.ts: -------------------------------------------------------------------------------- 1 | export { default, truncateValue } from './Truncate'; 2 | -------------------------------------------------------------------------------- /packages/core/src/components/UnitFormat/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './UnitFormat'; 2 | -------------------------------------------------------------------------------- /packages/core/src/constants/CrCatsWellKnownProviders.ts: -------------------------------------------------------------------------------- 1 | const CrCatsWellKnownProviders = { 2 | a8f06692e013166feffb0fa10db1f2d594350a84e0dcbb8ad8c156f00bb86c8f: { 3 | // TODO: this is a test provider, please remove after initial testing or before release 4 | name: 'Quex Inc.', 5 | url: 'example.com/quex', 6 | }, 7 | // '15b1f6f7f8f2cf00ff65ed5577a2299049e7900d6b92d868cc4d1b3bc411c592': { 8 | // name: 'Crypto Identity Solutions LLC', 9 | // url: 'example.com/identity-solutions', 10 | // }, 11 | }; 12 | 13 | export default CrCatsWellKnownProviders; 14 | -------------------------------------------------------------------------------- /packages/core/src/constants/Mode.ts: -------------------------------------------------------------------------------- 1 | enum Mode { 2 | WALLET = 'wallet', 3 | FARMING = 'farming', 4 | } 5 | 6 | export default Mode; 7 | -------------------------------------------------------------------------------- /packages/core/src/constants/State.ts: -------------------------------------------------------------------------------- 1 | enum State { 2 | SUCCESS = 'SUCCESS', 3 | WARNING = 'WARNING', 4 | ERROR = 'ERROR', 5 | } 6 | 7 | export default State; 8 | -------------------------------------------------------------------------------- /packages/core/src/constants/StateColor.ts: -------------------------------------------------------------------------------- 1 | import Color from './Color'; 2 | 3 | enum StateColor { 4 | SUCCESS = Color.Green[500], 5 | WARNING = Color.Orange[500], 6 | ERROR = Color.Red[500], 7 | } 8 | 9 | export default StateColor; 10 | -------------------------------------------------------------------------------- /packages/core/src/constants/Unit.ts: -------------------------------------------------------------------------------- 1 | enum Unit { 2 | CHIA = 'chia', 3 | MOJO = 'mojo', 4 | CAT = 'cat', 5 | } 6 | 7 | export default Unit; 8 | -------------------------------------------------------------------------------- /packages/core/src/constants/UnitAliases.ts: -------------------------------------------------------------------------------- 1 | import Unit from './Unit'; 2 | 3 | // deprecated 4 | const UnitAliases = { 5 | [Unit.CHIA]: ['ch', 'chia', 'xch'], 6 | [Unit.MOJO]: ['mj', 'mojo', 'mojos'], 7 | [Unit.CAT]: ['cat', 'cc', 'colouredcoin'], 8 | }; 9 | 10 | export default UnitAliases; 11 | -------------------------------------------------------------------------------- /packages/core/src/constants/UnitFractionDigits.ts: -------------------------------------------------------------------------------- 1 | import Unit from './Unit'; 2 | 3 | const UnitFractionDigits = { 4 | [Unit.CHIA]: 12, 5 | [Unit.MOJO]: 0, 6 | [Unit.CAT]: 3, 7 | }; 8 | 9 | export default UnitFractionDigits; 10 | -------------------------------------------------------------------------------- /packages/core/src/constants/UnitValue.ts: -------------------------------------------------------------------------------- 1 | import Unit from './Unit'; 2 | 3 | const UnitValue = { 4 | [Unit.CHIA]: 1, 5 | [Unit.MOJO]: 1 / 1e12, 6 | [Unit.CAT]: 1 / 1e9, 7 | }; 8 | 9 | export default UnitValue; 10 | -------------------------------------------------------------------------------- /packages/core/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Color } from './Color'; 2 | export { default as Mode } from './Mode'; 3 | export { default as State } from './State'; 4 | export { default as StateColor } from './StateColor'; 5 | export { default as Unit } from './Unit'; 6 | export { default as UnitAliases } from './UnitAliases'; 7 | export { default as UnitValue } from './UnitValue'; 8 | export { default as CrCatsWellKnownProviders } from './CrCatsWellKnownProviders'; 9 | -------------------------------------------------------------------------------- /packages/core/src/errors/FileSizeError.ts: -------------------------------------------------------------------------------- 1 | export default class FileSizeError extends Error { 2 | code = 'FILE_SIZE_ERROR'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/core/src/errors/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FileSizeError } from './FileSizeError'; 2 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useAuth.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { AuthContext } from '../components/Auth/AuthProvider'; 4 | 5 | export default function useAuth() { 6 | const context = useContext(AuthContext); 7 | if (!context) { 8 | throw new Error('useAuth must be used within an AuthProvider'); 9 | } 10 | 11 | return context; 12 | } 13 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useCurrencyCode.ts: -------------------------------------------------------------------------------- 1 | import { useGetNetworkInfoQuery } from '@chia-network/api-react'; 2 | 3 | export default function useCurrencyCode(): string | undefined { 4 | const { data: networkInfo, isLoading } = useGetNetworkInfoQuery(); 5 | 6 | if (isLoading || !networkInfo) { 7 | return undefined; 8 | } 9 | 10 | return networkInfo.networkPrefix.toUpperCase(); 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useIsSimulator.ts: -------------------------------------------------------------------------------- 1 | export default function useIsSimulator(): boolean { 2 | return false; 3 | } 4 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useLocale.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { LocaleContext } from '../components/LocaleProvider'; 4 | 5 | export default function useLocale(): [string, (locale: string) => void] { 6 | const localeContext = useContext(LocaleContext); 7 | 8 | if (!localeContext) { 9 | throw new Error('You need to use LocaleProvider.'); 10 | } 11 | 12 | const { locale, setLocale } = localeContext; 13 | 14 | return [locale, setLocale]; 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useMode.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { ModeContext } from '../components/Mode/ModeProvider'; 4 | import type Mode from '../constants/Mode'; 5 | 6 | export default function useMode(): [Mode, (newMode: Mode) => void] { 7 | const context = useContext(ModeContext); 8 | if (!context) { 9 | throw new Error('useMode must be used within a ModeProvider'); 10 | } 11 | 12 | const { mode, setMode } = context; 13 | return [mode, setMode]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useOpenExternal.ts: -------------------------------------------------------------------------------- 1 | import isElectron from 'is-electron'; 2 | import { useCallback } from 'react'; 3 | import isURL from 'validator/es/lib/isURL'; 4 | 5 | export default function useOpenExternal(): (url: string) => void { 6 | const handleOpen = useCallback((url: string) => { 7 | if (!isURL(url, { protocols: ['http', 'https', 'ipfs'], require_protocol: true })) { 8 | return; 9 | } 10 | 11 | if (isElectron()) { 12 | // @ts-ignore 13 | window.shell.openExternal(url); 14 | return; 15 | } 16 | 17 | window.open(url, '_blank'); 18 | }, []); 19 | 20 | return handleOpen; 21 | } 22 | -------------------------------------------------------------------------------- /packages/core/src/hooks/usePersist.ts: -------------------------------------------------------------------------------- 1 | export default function usePersist(baseNamespace: string): (namespace?: string) => string { 2 | if (!baseNamespace) { 3 | throw new Error('baseNamespace is required'); 4 | } 5 | 6 | function handleGenerateNamespace(namespace?: string): string { 7 | return namespace ? `${baseNamespace}.${namespace}` : baseNamespace; 8 | } 9 | 10 | return handleGenerateNamespace; 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useShowDebugInformation.ts: -------------------------------------------------------------------------------- 1 | export default function useShowDebugInformation(): boolean { 2 | return true; 3 | } 4 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useShowError.tsx: -------------------------------------------------------------------------------- 1 | import { Trans } from '@lingui/macro'; 2 | import React from 'react'; 3 | 4 | import AlertDialog from '../components/AlertDialog'; 5 | 6 | import useOpenDialog from './useOpenDialog'; 7 | 8 | export default function useShowError() { 9 | const openDialog = useOpenDialog(); 10 | 11 | async function showError(error: Error) { 12 | console.error(error); 13 | 14 | return openDialog(Error}>{error.message}); 15 | } 16 | 17 | return showError; 18 | } 19 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useShowSaveDialog.ts: -------------------------------------------------------------------------------- 1 | import isElectron from 'is-electron'; 2 | 3 | export default function useShowSaveDialog(): () => Promise { 4 | async function handleShowSaveDialog(options: any = {}): Promise { 5 | if (!isElectron()) { 6 | throw new Error('useSaveDialog is only available in electron'); 7 | } 8 | 9 | if (!window.ipcRenderer) { 10 | throw new Error('ipcRenderer is not available'); 11 | } 12 | 13 | return window.ipcRenderer?.invoke('showSaveDialog', options); 14 | } 15 | 16 | return handleShowSaveDialog; 17 | } 18 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useSkipMigration.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export default function useSkipMigration(): [boolean, (skip: boolean) => void] { 4 | const [skip, setSkip] = usePrefs('skipMigration', false); 5 | 6 | return [skip, setSkip]; 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useTrans.ts: -------------------------------------------------------------------------------- 1 | import { useLingui } from '@lingui/react'; 2 | import { useCallback } from 'react'; 3 | 4 | export default function useTrans() { 5 | const { i18n } = useLingui(); 6 | 7 | const handleTranslate = useCallback( 8 | (messageId: string, values?: Object, options?: Object) => i18n._(messageId, values, options), 9 | [i18n], 10 | ); 11 | 12 | return handleTranslate; 13 | } 14 | -------------------------------------------------------------------------------- /packages/core/src/hooks/useWalletThemeColor.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | import { Theme } from '@mui/material'; 3 | 4 | export default function useWalletThemeColor(theme: Theme, variant?: string): string { 5 | const [themeColor] = usePrefs('walletThemeColor', 'default'); 6 | return theme.palette.colors[themeColor || 'neutral'][variant || 'main']; 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './constants'; 3 | export * from './utils'; 4 | export * from './hooks'; 5 | export * from './theme'; 6 | export * from './screens'; 7 | export * as locales from './locales'; 8 | export * from './errors'; 9 | -------------------------------------------------------------------------------- /packages/core/src/screens/SelectKey/index.ts: -------------------------------------------------------------------------------- 1 | export { default as EmojiAndColorPicker } from './EmojiAndColorPicker'; 2 | export { default as SelectKey } from './SelectKey'; 3 | -------------------------------------------------------------------------------- /packages/core/src/screens/index.ts: -------------------------------------------------------------------------------- 1 | export { default as EmojiAndColorPicker } from './SelectKey/EmojiAndColorPicker'; 2 | export { default as SelectKey } from './SelectKey/SelectKey'; 3 | -------------------------------------------------------------------------------- /packages/core/src/theme/index.ts: -------------------------------------------------------------------------------- 1 | export { default as dark } from './dark'; 2 | export { default as light } from './light'; 3 | -------------------------------------------------------------------------------- /packages/core/src/utils/activateLocale.ts: -------------------------------------------------------------------------------- 1 | import type { I18n } from '@lingui/core'; 2 | import moment from 'moment'; 3 | 4 | export default function activateLocale(i18n: I18n, locale: string) { 5 | i18n.activate(locale); 6 | moment.locale([locale, 'en']); 7 | 8 | // @ts-ignore 9 | if (typeof window !== 'undefined' && window.ipcRenderer) { 10 | window.ipcRenderer.invoke('setLocale', locale); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/core/src/utils/blockHeightToTimestamp.ts: -------------------------------------------------------------------------------- 1 | import type { Transaction } from '@chia-network/api'; 2 | 3 | const BLOCK_DURATION_SECONDS = (24 * 60 * 60) / 4608; 4 | 5 | export default function blockHeightToTimestamp(height: number, peakTransaction: Transaction): number { 6 | const diff = peakTransaction.confirmedAtHeight - height; 7 | const seconds = diff * BLOCK_DURATION_SECONDS; 8 | 9 | return peakTransaction.createdAtTime - seconds; 10 | } 11 | -------------------------------------------------------------------------------- /packages/core/src/utils/catToMojo.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import Unit from '../constants/Unit'; 4 | 5 | import chiaFormatter from './chiaFormatter'; 6 | 7 | export default function catToMojo(cat: string | number | BigNumber): BigNumber { 8 | return chiaFormatter(cat, Unit.CAT).to(Unit.MOJO).toBigNumber(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/utils/chiaToMojo.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import Unit from '../constants/Unit'; 4 | 5 | import chiaFormatter from './chiaFormatter'; 6 | 7 | export default function chiaToMojo(chia: string | number | BigNumber): BigNumber { 8 | return chiaFormatter(chia, Unit.CHIA).to(Unit.MOJO).toBigNumber(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/utils/getPercentPointsSuccessfull.ts: -------------------------------------------------------------------------------- 1 | import type { Point } from '@chia-network/api'; 2 | import { sumBy } from 'lodash'; 3 | 4 | function sumPoints(points: Point[]): number { 5 | return sumBy(points, (point) => point[1]) ?? 0; 6 | } 7 | 8 | export default function getPercentPointsSuccessfull(pointsAcknowledged: Point[], pointsFound: Point[]): number { 9 | const acknowledged = sumPoints(pointsAcknowledged); 10 | const found = sumPoints(pointsFound); 11 | 12 | if (!acknowledged || !found) { 13 | return 0; 14 | } 15 | 16 | return acknowledged / found; 17 | } 18 | -------------------------------------------------------------------------------- /packages/core/src/utils/getPoolInfo.ts: -------------------------------------------------------------------------------- 1 | import type { PoolInfo } from '@chia-network/api'; 2 | 3 | export default async function getPoolInfo(poolUrl: string): PoolInfo { 4 | const url = `${poolUrl}/pool_info`; 5 | const response = await fetch(url); 6 | return response.json(); 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/src/utils/getUnit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/core/src/utils/getUnit -------------------------------------------------------------------------------- /packages/core/src/utils/getWalletSyncingStatus.ts: -------------------------------------------------------------------------------- 1 | import { SyncingStatus } from '@chia-network/api'; 2 | 3 | export default function getWalletSyncingStatus(walletState) { 4 | const { syncing, synced } = walletState; 5 | 6 | if (syncing) { 7 | return SyncingStatus.SYNCING; 8 | } 9 | if (synced) { 10 | return SyncingStatus.SYNCED; 11 | } 12 | 13 | return SyncingStatus.NOT_SYNCED; 14 | } 15 | -------------------------------------------------------------------------------- /packages/core/src/utils/isWindows.ts: -------------------------------------------------------------------------------- 1 | import os from 'os'; 2 | 3 | const platform = os.platform(); 4 | 5 | export default platform && platform.startsWith('win'); 6 | -------------------------------------------------------------------------------- /packages/core/src/utils/mojoToCAT.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import Unit from '../constants/Unit'; 4 | 5 | import chiaFormatter from './chiaFormatter'; 6 | 7 | export default function mojoToCAT(mojo: string | number | BigNumber): BigNumber { 8 | return chiaFormatter(mojo, Unit.MOJO).to(Unit.CAT).toBigNumber(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/utils/mojoToCATLocaleString.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import Unit from '../constants/Unit'; 4 | 5 | import chiaFormatter from './chiaFormatter'; 6 | 7 | export default function mojoToCATLocaleString(mojo: string | number | BigNumber, locale?: string) { 8 | return chiaFormatter(mojo, Unit.MOJO).to(Unit.CAT).toLocaleString(locale); 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/utils/mojoToChia.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import Unit from '../constants/Unit'; 4 | 5 | import chiaFormatter from './chiaFormatter'; 6 | 7 | export default function mojoToChia(mojo: string | number | BigNumber): BigNumber { 8 | return chiaFormatter(mojo, Unit.MOJO).to(Unit.CHIA).toBigNumber(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/utils/mojoToChiaLocaleString.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import Unit from '../constants/Unit'; 4 | 5 | import chiaFormatter from './chiaFormatter'; 6 | 7 | export default function mojoToChiaLocaleString(mojo: string | number | BigNumber, locale?: string) { 8 | return chiaFormatter(mojo, Unit.MOJO).to(Unit.CHIA).toLocaleString(locale); 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/src/utils/normalizePoolState.ts: -------------------------------------------------------------------------------- 1 | import type { PoolState } from '@chia-network/api'; 2 | 3 | import removeOldPoints from './removeOldPoints'; 4 | 5 | export default function normalizePoolState(poolState: PoolState): PoolState { 6 | return { 7 | ...poolState, 8 | points_acknowledged_24h: removeOldPoints(poolState.points_acknowledged_24h), 9 | points_found_24h: removeOldPoints(poolState.points_found_24h), 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/utils/removeOldPoints.ts: -------------------------------------------------------------------------------- 1 | import type { Point } from '@chia-network/api'; 2 | 3 | const DAY_SECONDS = 60 * 60 * 24; 4 | 5 | export default function removeOldPoints(points: Point[], second: number = DAY_SECONDS): Point[] { 6 | const current = Date.now() / 1000; 7 | const dayBefore = current - second; 8 | 9 | return points?.filter((point) => { 10 | const [timestamp] = point; 11 | 12 | return timestamp >= dayBefore; 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/core/src/utils/sleep.ts: -------------------------------------------------------------------------------- 1 | export default function sleep(ms: number) { 2 | return new Promise((resolve) => { 3 | setTimeout(resolve, ms); 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /packages/core/src/utils/useColorModeValue.ts: -------------------------------------------------------------------------------- 1 | import { type Theme } from '@mui/material'; 2 | 3 | type PaletteKeys = keyof Theme['palette']; 4 | 5 | export default function getColorModeValue(theme: Theme, color: PaletteKeys): string { 6 | const isDark = theme.palette.mode === 'dark'; 7 | 8 | const value = isDark ? theme.palette[color].dark : theme.palette[color].light; 9 | 10 | return value ?? theme.palette[color].main; 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/src/utils/validAddress.ts: -------------------------------------------------------------------------------- 1 | import { decodeBech32m } from '@chia-network/api'; 2 | 3 | export default function validAddress(address: string, allowedPrefixes?: string[]) { 4 | const response = decodeBech32m(address); 5 | const prefix = response.prefix.toLowerCase(); 6 | 7 | if (allowedPrefixes && !allowedPrefixes.includes(prefix)) { 8 | throw new Error( 9 | `Invalid address: ${address}. Valid addresses must contain one of the following prefixes: ${allowedPrefixes.join( 10 | ', ', 11 | )}`, 12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/core/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "dist"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "noFallthroughCasesInSwitch": true, 5 | "noUnusedParameters": true, 6 | "noImplicitReturns": true, 7 | "moduleResolution": "node", 8 | "esModuleInterop": true, 9 | "noUnusedLocals": true, 10 | "noImplicitAny": true, 11 | "declarationDir": "dist/types", 12 | "declaration": true, 13 | "target": "es2015", 14 | "module": "es2015", 15 | "strict": true, 16 | "jsx": "react", 17 | "skipLibCheck": true 18 | }, 19 | "include": ["src/**/*", "vite.config.ts"], 20 | "exclude": ["node_modules", "dist", "**/*.test.ts"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/gui/.env.example: -------------------------------------------------------------------------------- 1 | LOCAL_TEST=true 2 | -------------------------------------------------------------------------------- /packages/gui/chiablockchain.provisionprofile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/chiablockchain.provisionprofile -------------------------------------------------------------------------------- /packages/gui/entitlements.mac.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/gui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/public/favicon.ico -------------------------------------------------------------------------------- /packages/gui/remote.md: -------------------------------------------------------------------------------- 1 | # Connecting the UI to a Remote Daemon 2 | 3 | _This instructional how-to has been updated and [moved to the wiki](https://github.com/Chia-Network/chia-blockchain/wiki/Connecting-the-UI-to-a-remote-daemon)._ 4 | -------------------------------------------------------------------------------- /packages/gui/src/@types/CacheInfo.ts: -------------------------------------------------------------------------------- 1 | import type CacheInfoBase from './CacheInfoBase'; 2 | 3 | type CacheInfo = { 4 | url: string; 5 | timestamp: number; 6 | } & CacheInfoBase; 7 | 8 | export default CacheInfo; 9 | -------------------------------------------------------------------------------- /packages/gui/src/@types/CacheInfoBase.ts: -------------------------------------------------------------------------------- 1 | import type CacheState from '../constants/CacheState'; 2 | 3 | import type Headers from './Headers'; 4 | 5 | type CacheInfoBase = 6 | | { 7 | state: CacheState.NOT_CACHED; 8 | } 9 | | { 10 | state: CacheState.CACHED; 11 | headers: Headers; 12 | checksum: string; 13 | } 14 | | { 15 | state: CacheState.ERROR; 16 | error: string; 17 | }; 18 | 19 | export default CacheInfoBase; 20 | -------------------------------------------------------------------------------- /packages/gui/src/@types/Driver.ts: -------------------------------------------------------------------------------- 1 | type Driver = { 2 | type: 'singleton'; 3 | launcher_id: string; 4 | launcher_ph: string; 5 | also: { 6 | type: 'metadata'; 7 | metadata: any; 8 | updater_hash: string; 9 | also?: { 10 | type: 'ownership'; 11 | owner: '()'; 12 | transfer_program: { 13 | type: 'royalty transfer program'; 14 | launcher_id: string; 15 | royalty_address: string; 16 | royalty_percentage: string; 17 | }; 18 | }; 19 | }; 20 | }; 21 | 22 | export default Driver; 23 | -------------------------------------------------------------------------------- /packages/gui/src/@types/Headers.ts: -------------------------------------------------------------------------------- 1 | type Headers = Record; 2 | 3 | export default Headers; 4 | -------------------------------------------------------------------------------- /packages/gui/src/@types/Metadata.ts: -------------------------------------------------------------------------------- 1 | type Metadata = { 2 | attributes?: { 3 | trait_type: string; 4 | value: string; 5 | }[]; 6 | collection?: { 7 | name: string; 8 | id: string; 9 | attributes: { 10 | trait_type: string; 11 | value: string; 12 | }[]; 13 | }; 14 | description?: string; 15 | image?: string; 16 | format?: string; 17 | name?: string; 18 | sensitive_content?: 'false' | 'true' | true | false; 19 | minting_tool?: string; 20 | preview_video_uris?: string[]; 21 | preview_video_hash?: string; 22 | preview_image_uris?: string[]; 23 | preview_image_hash?: string; 24 | }; 25 | 26 | export default Metadata; 27 | -------------------------------------------------------------------------------- /packages/gui/src/@types/MetadataOnDemand.ts: -------------------------------------------------------------------------------- 1 | import type Metadata from './Metadata'; 2 | 3 | type MetadataOnDemand = { 4 | metadata?: Metadata; 5 | error?: Error; 6 | promise?: Promise; 7 | }; 8 | 9 | export default MetadataOnDemand; 10 | -------------------------------------------------------------------------------- /packages/gui/src/@types/MetadataState.ts: -------------------------------------------------------------------------------- 1 | import type Metadata from './Metadata'; 2 | 3 | type MetadataState = { 4 | metadata: Metadata | undefined; 5 | error?: Error; 6 | isLoading: boolean; 7 | }; 8 | 9 | export default MetadataState; 10 | -------------------------------------------------------------------------------- /packages/gui/src/@types/NFTData.ts: -------------------------------------------------------------------------------- 1 | import { type NFTInfo } from '@chia-network/api'; 2 | 3 | import type FileType from '../constants/FileType'; 4 | 5 | import type Metadata from './Metadata'; 6 | 7 | type NFTData = { 8 | id: string; // nftId 9 | 10 | nft?: NFTInfo; 11 | nftPromise?: Promise; 12 | nftError?: Error; 13 | 14 | metadata?: Metadata; 15 | metadataError?: Error; 16 | metadataPromise?: Promise; 17 | 18 | type?: FileType; 19 | inList?: boolean; 20 | }; 21 | 22 | export default NFTData; 23 | -------------------------------------------------------------------------------- /packages/gui/src/@types/NFTOnDemand.ts: -------------------------------------------------------------------------------- 1 | import { type NFTInfo } from '@chia-network/api'; 2 | 3 | type NFTOnDemand = { 4 | nft?: NFTInfo; 5 | error?: Error; 6 | promise?: Promise; 7 | }; 8 | 9 | export default NFTOnDemand; 10 | -------------------------------------------------------------------------------- /packages/gui/src/@types/NFTState.ts: -------------------------------------------------------------------------------- 1 | import { type NFTInfo } from '@chia-network/api'; 2 | 3 | type NFTState = { 4 | nft?: NFTInfo; 5 | isLoading: boolean; 6 | error?: Error; 7 | }; 8 | 9 | export default NFTState; 10 | -------------------------------------------------------------------------------- /packages/gui/src/@types/NFTVisibility.ts: -------------------------------------------------------------------------------- 1 | enum NFTVisibility { 2 | VISIBLE = 'visible', 3 | HIDDEN = 'hidden', 4 | ALL = 'all', 5 | NONE = 'none', 6 | } 7 | 8 | export default NFTVisibility; 9 | -------------------------------------------------------------------------------- /packages/gui/src/@types/NFTsDataStatistics.ts: -------------------------------------------------------------------------------- 1 | import type FileType from '../constants/FileType'; 2 | 3 | type NFTsDataStatistics = Record; 4 | 5 | export default NFTsDataStatistics; 6 | -------------------------------------------------------------------------------- /packages/gui/src/@types/Offer.ts: -------------------------------------------------------------------------------- 1 | import { type OfferSummaryRecord } from '@chia-network/api'; 2 | 3 | type Offer = { 4 | id: string; 5 | valid: boolean; 6 | data: string; 7 | summary: OfferSummaryRecord; 8 | }; 9 | 10 | export default Offer; 11 | -------------------------------------------------------------------------------- /packages/gui/src/@types/OfferOnDemand.ts: -------------------------------------------------------------------------------- 1 | import type Offer from './Offer'; 2 | 3 | type OfferOnDemand = { 4 | offer?: Offer; 5 | error?: Error; 6 | promise?: Promise; 7 | }; 8 | 9 | export default OfferOnDemand; 10 | -------------------------------------------------------------------------------- /packages/gui/src/@types/OfferState.ts: -------------------------------------------------------------------------------- 1 | import type Offer from './Offer'; 2 | 3 | type OfferState = { 4 | offer: Offer | undefined; 5 | isLoading: boolean; 6 | error: Error | undefined; 7 | }; 8 | 9 | export default OfferState; 10 | -------------------------------------------------------------------------------- /packages/gui/src/@types/OfferSummary.ts: -------------------------------------------------------------------------------- 1 | import { type OfferSummaryRecord } from '@chia-network/api'; 2 | 3 | export default OfferSummaryRecord; 4 | -------------------------------------------------------------------------------- /packages/gui/src/@types/Pair.ts: -------------------------------------------------------------------------------- 1 | import type WalletConnectMetadata from './WalletConnectMetadata'; 2 | import type WalletConnectNamespaces from './WalletConnectNamespaces'; 3 | 4 | type Pair = { 5 | topic: string; 6 | mainnet: boolean; 7 | fingerprints: number[]; 8 | sessions: { 9 | topic: string; 10 | metadata?: WalletConnectMetadata; 11 | namespaces: WalletConnectNamespaces; 12 | }[]; 13 | metadata?: WalletConnectMetadata; 14 | bypassCommands?: Record; 15 | }; 16 | 17 | export default Pair; 18 | -------------------------------------------------------------------------------- /packages/gui/src/@types/WalletConnectMetadata.ts: -------------------------------------------------------------------------------- 1 | type WalletConnectMetadata = { 2 | name?: string; 3 | icons?: string[]; 4 | description?: string; 5 | url?: string; 6 | }; 7 | 8 | export default WalletConnectMetadata; 9 | -------------------------------------------------------------------------------- /packages/gui/src/@types/WalletConnectNamespaces.ts: -------------------------------------------------------------------------------- 1 | type WalletConnectNamespaces = Record< 2 | string, 3 | { 4 | accounts: string[]; 5 | events: string[]; 6 | methods: string[]; 7 | } 8 | >; 9 | 10 | export default WalletConnectNamespaces; 11 | -------------------------------------------------------------------------------- /packages/gui/src/@types/svgr.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.svg' { 2 | import React from 'react'; 3 | 4 | const SVG: React.VFC>; 5 | export default SVG; 6 | } 7 | -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/ionicons.eot -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/ionicons.ttf -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/ionicons.woff -------------------------------------------------------------------------------- /packages/gui/src/assets/fonts/ionicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/fonts/ionicons.woff2 -------------------------------------------------------------------------------- /packages/gui/src/assets/img/arrow-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/audio.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/audio_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/audio_dark.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/check.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/chia.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/chia.icns -------------------------------------------------------------------------------- /packages/gui/src/assets/img/chia.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/chia.ico -------------------------------------------------------------------------------- /packages/gui/src/assets/img/chia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/chia.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/chia64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/chia64x64.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/chia_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/chia_circle.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/circle-cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/circle-cropped.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/document.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/document_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/document_dark.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/image.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/image_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/image_dark.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/model.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/model_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/model_dark.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/multi-select.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/multi_select.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/reload.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/unknown-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/gui/src/assets/img/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/unknown.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/unknown_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/unknown_dark.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/vc_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/vc_empty.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/video.png -------------------------------------------------------------------------------- /packages/gui/src/assets/img/video_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chia-Network/chia-blockchain-gui/c5ff1694a54062794ada2095d4230c0cc236c3c6/packages/gui/src/assets/img/video_dark.png -------------------------------------------------------------------------------- /packages/gui/src/components/app/App.tsx: -------------------------------------------------------------------------------- 1 | import { ModeProvider, Persist } from '@chia-network/core'; 2 | import React from 'react'; 3 | 4 | import AppRouter from './AppRouter'; 5 | 6 | export default function App() { 7 | return ( 8 | 9 | 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/components/cache/CacheContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | import type CacheAPI from '../../@types/CacheAPI'; 4 | 5 | const CacheContext = createContext< 6 | | (Omit & { 7 | cacheDirectory: string | undefined; 8 | cacheSize: number | undefined; 9 | maxCacheSize: number | undefined; 10 | }) 11 | | undefined 12 | >(undefined); 13 | 14 | export default CacheContext; 15 | -------------------------------------------------------------------------------- /packages/gui/src/components/chiatools/logViewer/LogViewerCard.tsx: -------------------------------------------------------------------------------- 1 | import { Card } from '@mui/material'; 2 | import { useTheme } from '@mui/material/styles'; 3 | import React from 'react'; 4 | 5 | import LogViewer from './LogViewer'; 6 | 7 | export default function LogViewerCard() { 8 | const theme = useTheme(); 9 | 10 | return ( 11 | 12 | 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /packages/gui/src/components/farm/FarmCloseConnection.tsx: -------------------------------------------------------------------------------- 1 | import { useCloseFarmerConnectionMutation } from '@chia-network/api-react'; 2 | 3 | type Props = { 4 | nodeId: string; 5 | children: (props: { onClose: () => void }) => JSX.Element; 6 | }; 7 | 8 | export default function FarmCloseConnection(props: Props): JSX.Element { 9 | const { nodeId, children } = props; 10 | const [closeFarmerConnection] = useCloseFarmerConnectionMutation(); 11 | 12 | async function handleClose() { 13 | await closeFarmerConnection({ nodeId }).unwrap(); 14 | } 15 | 16 | return children({ 17 | onClose: handleClose, 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/gui/src/components/fullNode/card/FullNodeCardNetworkName.tsx: -------------------------------------------------------------------------------- 1 | import { useGetNetworkInfoQuery } from '@chia-network/api-react'; 2 | import { CardSimple } from '@chia-network/core'; 3 | import { Trans } from '@lingui/macro'; 4 | import React from 'react'; 5 | 6 | export default function FullNodeCardNetworkName() { 7 | const { data: networkInfo, isLoading, error } = useGetNetworkInfoQuery(); 8 | const value = networkInfo?.networkName; 9 | 10 | return ( 11 | Network Name} 15 | value={value} 16 | error={error} 17 | /> 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/gui/src/components/harvest/Harvest.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, LayoutDashboardSub } from '@chia-network/core'; 2 | import React from 'react'; 3 | import { Route, Routes } from 'react-router-dom'; 4 | 5 | import PlotAdd from '../plot/add/PlotAdd'; 6 | 7 | import HarvesterOverview from './HarvesterOverview'; 8 | 9 | export default function Harvester() { 10 | return ( 11 | 12 | 13 | 14 | } /> 15 | } /> 16 | 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/gui/src/components/helpers/ErrorMessage.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, TooltipIcon } from '@chia-network/core'; 2 | import { Trans } from '@lingui/macro'; 3 | import { Typography } from '@mui/material'; 4 | import React from 'react'; 5 | 6 | export type ErrorMessageProps = { 7 | error: Error; 8 | }; 9 | 10 | export default function ErrorMessage(props: ErrorMessageProps) { 11 | const { error } = props; 12 | return ( 13 | 14 | Error 15 | 16 | {error.message} 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/gui/src/components/nfts/NFTTitle.tsx: -------------------------------------------------------------------------------- 1 | import { Trans } from '@lingui/macro'; 2 | import React from 'react'; 3 | 4 | import NFTMetadata, { type NFTMetadataProps } from './NFTMetadata'; 5 | 6 | export type NFTTitleProps = Omit; 7 | 8 | export default function NFTTitle(props: NFTTitleProps) { 9 | return ( 10 | 11 | Title Not Available 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/components/offers/NFTOfferExchangeType.ts: -------------------------------------------------------------------------------- 1 | enum NFTOfferExchangeType { 2 | NFTForToken = 'nft_for_token', 3 | TokenForNFT = 'token_for_nft', 4 | } 5 | 6 | export default NFTOfferExchangeType; 7 | -------------------------------------------------------------------------------- /packages/gui/src/components/offers/OfferAsset.ts: -------------------------------------------------------------------------------- 1 | enum OfferAsset { 2 | CHIA = 'CHIA', 3 | TOKEN = 'TOKEN', 4 | NFT = 'NFT', 5 | } 6 | 7 | export default OfferAsset; 8 | -------------------------------------------------------------------------------- /packages/gui/src/components/offers/OfferEditorRowData.ts: -------------------------------------------------------------------------------- 1 | import type BigNumber from 'bignumber.js'; 2 | 3 | import OfferRowData from './OfferRowData'; 4 | 5 | type OfferEditorRowData = OfferRowData & { 6 | spendableBalance: BigNumber; 7 | spendableBalanceString?: string; 8 | }; 9 | 10 | export default OfferEditorRowData; 11 | -------------------------------------------------------------------------------- /packages/gui/src/components/offers/OfferRowData.tsx: -------------------------------------------------------------------------------- 1 | import { WalletType } from '@chia-network/api'; 2 | 3 | type OfferRowData = { 4 | amount: string; 5 | assetWalletId: number; // 0 if no selection made 6 | walletType: WalletType; 7 | }; 8 | 9 | export default OfferRowData; 10 | -------------------------------------------------------------------------------- /packages/gui/src/components/offers/OfferState.ts: -------------------------------------------------------------------------------- 1 | enum OfferState { 2 | PENDING_ACCEPT = 'PENDING_ACCEPT', 3 | PENDING_CONFIRM = 'PENDING_CONFIRM', 4 | PENDING_CANCEL = 'PENDING_CANCEL', 5 | CANCELLED = 'CANCELLED', 6 | CONFIRMED = 'CONFIRMED', 7 | FAILED = 'FAILED', 8 | } 9 | 10 | export default OfferState; 11 | -------------------------------------------------------------------------------- /packages/gui/src/components/offers2/utils/defaultValues.ts: -------------------------------------------------------------------------------- 1 | export const emptyDefaultValues = { 2 | offered: { 3 | xch: [], 4 | tokens: [], 5 | nfts: [], 6 | fee: [], 7 | }, 8 | requested: { 9 | xch: [], 10 | tokens: [], 11 | nfts: [], 12 | fee: [], 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/gui/src/components/plot/Plot.tsx: -------------------------------------------------------------------------------- 1 | import { Flex, LayoutDashboardSub } from '@chia-network/core'; 2 | import React from 'react'; 3 | import { Route, Routes } from 'react-router-dom'; 4 | 5 | import PlotAdd from './add/PlotAdd'; 6 | import PlotOverview from './overview/PlotOverview'; 7 | 8 | export default function Plot() { 9 | return ( 10 | 11 | 12 | 13 | } /> 14 | } /> 15 | 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/gui/src/components/plot/card/PlotCardPlotsDuplicate.tsx: -------------------------------------------------------------------------------- 1 | import { useGetTotalHarvestersSummaryQuery } from '@chia-network/api-react'; 2 | import { FormatLargeNumber, CardSimple } from '@chia-network/core'; 3 | import { Trans } from '@lingui/macro'; 4 | import React from 'react'; 5 | 6 | export default function PlotCardPlotsDuplicate() { 7 | const { duplicates, initializedHarvesters, isLoading } = useGetTotalHarvestersSummaryQuery(); 8 | 9 | return ( 10 | Duplicate Plots} 12 | value={} 13 | loading={isLoading || !initializedHarvesters} 14 | /> 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/gui/src/components/plot/card/PlotCardTotalHarvesters.tsx: -------------------------------------------------------------------------------- 1 | import { useGetTotalHarvestersSummaryQuery } from '@chia-network/api-react'; 2 | import { FormatLargeNumber, CardSimple } from '@chia-network/core'; 3 | import { Trans } from '@lingui/macro'; 4 | import React from 'react'; 5 | 6 | export default function PlotCardTotalHarvesters() { 7 | const { harvesters, isLoading } = useGetTotalHarvestersSummaryQuery(); 8 | 9 | return ( 10 | Total Harvesters} 12 | value={} 13 | loading={isLoading} 14 | /> 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/gui/src/components/plot/card/PlotCardTotalPlots.tsx: -------------------------------------------------------------------------------- 1 | import { useGetTotalHarvestersSummaryQuery } from '@chia-network/api-react'; 2 | import { FormatLargeNumber, CardSimple } from '@chia-network/core'; 3 | import { Trans } from '@lingui/macro'; 4 | import React from 'react'; 5 | 6 | export default function PlotCardTotalPlots() { 7 | const { plots, initializedHarvesters, isLoading } = useGetTotalHarvestersSummaryQuery(); 8 | 9 | return ( 10 | Total Plots} 12 | value={} 13 | loading={isLoading || !initializedHarvesters} 14 | /> 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/gui/src/components/plot/queue/PlotQueueSize.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { getEffectivePlotSize } from '../../../constants/plotSizes'; 4 | import type PlotQueueItem from '../../../types/PlotQueueItem'; 5 | 6 | type Props = { 7 | queueItem: PlotQueueItem; 8 | }; 9 | 10 | export default function PlotQueueSize(props: Props) { 11 | const { 12 | queueItem: { size }, 13 | } = props; 14 | const item = getEffectivePlotSize(size as 25 | 32 | 33 | 34 | 35); 15 | if (!item) { 16 | return null; 17 | } 18 | 19 | return <>{`K-${size}, ${item}`}; 20 | } 21 | -------------------------------------------------------------------------------- /packages/gui/src/components/pool/PoolHeader.tsx: -------------------------------------------------------------------------------- 1 | import { createTeleporter } from 'react-teleporter'; 2 | 3 | const PoolHeaderTeleporter = createTeleporter(); 4 | 5 | export const PoolHeaderSource = PoolHeaderTeleporter.Source; 6 | 7 | export const PoolHeaderTarget = PoolHeaderTeleporter.Target; 8 | -------------------------------------------------------------------------------- /packages/gui/src/components/settings/SettingsGeneral.tsx: -------------------------------------------------------------------------------- 1 | import { Grid } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import SettingsPanel from './SettingsPanel'; 5 | 6 | export default function SettingsGeneral() { 7 | return ( 8 | 9 | 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/components/vcs/VCs.tsx: -------------------------------------------------------------------------------- 1 | import { useSerializedNavigationState } from '@chia-network/core'; 2 | import React from 'react'; 3 | import { Routes, Route } from 'react-router-dom'; 4 | 5 | import VCDetail from './VCDetail'; 6 | import VCList from './VCList'; 7 | 8 | export default function VCs() { 9 | const { getLocationState } = useSerializedNavigationState(); 10 | const locationState = getLocationState(); 11 | return ( 12 | 13 | } /> 14 | } /> 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /packages/gui/src/config/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | multipleWallets: process.env.MULTIPLE_WALLETS === 'true', 3 | local_test: process.env.LOCAL_TEST === 'true', 4 | }; 5 | -------------------------------------------------------------------------------- /packages/gui/src/config/env.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | -------------------------------------------------------------------------------- /packages/gui/src/constants/CacheState.ts: -------------------------------------------------------------------------------- 1 | enum CacheState { 2 | NOT_CACHED = 'NOT_CACHED', 3 | CACHED = 'CACHED', 4 | // CACHING = 'CACHING', 5 | ERROR = 'ERROR', 6 | } 7 | 8 | export default CacheState; 9 | -------------------------------------------------------------------------------- /packages/gui/src/constants/ErrorCode.ts: -------------------------------------------------------------------------------- 1 | enum ErrorCode { 2 | NO_FILE_AVAILABLE, 3 | INVALID_PREVIEW_URL, 4 | UPDATE_PENDING, 5 | HASH_MISMATCH, 6 | IMAGE_HASH_MISMATCH, 7 | VIDEO_HASH_MISMATCH, 8 | METADATA_HASH_MISMATCH, 9 | MISSING_PREVIEW_VIDEO_HASH, 10 | MISSING_PREVIEW_IMAGE_HASH, 11 | FAILED_FETCH_CONTENT, 12 | INVALID_METADATA_URL, 13 | ERROR_PARSING_JSON, 14 | RESPONSE_TOO_LARGE, 15 | } 16 | 17 | export default ErrorCode; 18 | -------------------------------------------------------------------------------- /packages/gui/src/constants/FarmerStatus.ts: -------------------------------------------------------------------------------- 1 | enum FarmerStatus { 2 | FARMING = 'FARMING', 3 | SYNCHING = 'SYNCHING', 4 | NOT_AVAILABLE = 'NOT_AVAILABLE', 5 | NOT_CONNECTED = 'NOT_CONNECTED', 6 | NOT_RUNNING = 'NOT_RUNNING', 7 | } 8 | 9 | export default FarmerStatus; 10 | -------------------------------------------------------------------------------- /packages/gui/src/constants/FileType.ts: -------------------------------------------------------------------------------- 1 | enum FileType { 2 | IMAGE = 'image', 3 | VIDEO = 'video', 4 | AUDIO = 'audio', 5 | DOCUMENT = 'document', 6 | MODEL = 'model', 7 | UNKNOWN = 'unknown', 8 | } 9 | 10 | export default FileType; 11 | -------------------------------------------------------------------------------- /packages/gui/src/constants/FullNodeState.ts: -------------------------------------------------------------------------------- 1 | enum FullNodeState { 2 | SYNCHING = 'SYNCHING', 3 | ERROR = 'ERROR', 4 | SYNCED = 'SYNCED', 5 | } 6 | 7 | export default FullNodeState; 8 | -------------------------------------------------------------------------------- /packages/gui/src/constants/ModeServices.ts: -------------------------------------------------------------------------------- 1 | import { ServiceName } from '@chia-network/api'; 2 | import { Mode } from '@chia-network/core'; 3 | 4 | export default { 5 | [Mode.WALLET]: [ServiceName.WALLET], 6 | [Mode.FARMING]: [ServiceName.WALLET, ServiceName.FULL_NODE, ServiceName.FARMER, ServiceName.HARVESTER], 7 | }; 8 | 9 | export const SimulatorServices = [ServiceName.WALLET, ServiceName.SIMULATOR]; 10 | -------------------------------------------------------------------------------- /packages/gui/src/constants/NotificationType.ts: -------------------------------------------------------------------------------- 1 | enum NotificationType { 2 | OFFER = 'offer', 3 | COUNTER_OFFER = 'counterOffer', 4 | ANNOUNCEMENT = 'announcement', 5 | } 6 | 7 | export default NotificationType; 8 | -------------------------------------------------------------------------------- /packages/gui/src/constants/OfferServices.ts: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | label: 'Dexie', 4 | domains: ['dexie.space'], 5 | }, 6 | { 7 | label: 'Mint Garden', 8 | domains: ['mintgarden.io'], 9 | }, 10 | { 11 | label: 'Spacescan', 12 | domains: ['spacescan.io'], 13 | }, 14 | { 15 | label: 'Offerpool', 16 | domains: ['offerpool.io'], 17 | }, 18 | ]; 19 | -------------------------------------------------------------------------------- /packages/gui/src/constants/PlotNFTState.ts: -------------------------------------------------------------------------------- 1 | // PoolSingletonState 2 | 3 | enum PlotNFTState { 4 | SELF_POOLING = 1, 5 | LEAVING_POOL = 2, 6 | FARMING_TO_POOL = 3, 7 | } 8 | 9 | export default PlotNFTState; 10 | -------------------------------------------------------------------------------- /packages/gui/src/constants/PlotStatus.ts: -------------------------------------------------------------------------------- 1 | enum PlotStatus { 2 | SUBMITTED = 'SUBMITTED', 3 | RUNNING = 'RUNNING', 4 | REMOVING = 'REMOVING', 5 | FINISHED = 'FINISHED', 6 | } 7 | 8 | export default PlotStatus; 9 | -------------------------------------------------------------------------------- /packages/gui/src/constants/PlotterName.ts: -------------------------------------------------------------------------------- 1 | enum PlotterName { 2 | BLADEBIT_RAM = 'bladebit_ram', 3 | BLADEBIT_DISK = 'bladebit_disk', 4 | BLADEBIT_CUDA = 'bladebit_cuda', 5 | CHIAPOS = 'chiapos', 6 | MADMAX = 'madmax', 7 | } 8 | 9 | export default PlotterName; 10 | -------------------------------------------------------------------------------- /packages/gui/src/constants/SyncingStatus.ts: -------------------------------------------------------------------------------- 1 | enum SyncingStatus { 2 | SYNCING = 'SYNCING', 3 | SYNCED = 'SYNCED', 4 | NOT_SYNCED = 'NOT_SYNCED', 5 | } 6 | 7 | export default SyncingStatus; 8 | -------------------------------------------------------------------------------- /packages/gui/src/constants/plotLocalStorage.ts: -------------------------------------------------------------------------------- 1 | enum PlotLocalStorageKeys { 2 | TMPDIR = 'tmpdir', 3 | TMP2DIR = 'tmp2dir', 4 | FINALDIR = 'finaldir', 5 | } 6 | 7 | export default PlotLocalStorageKeys; 8 | -------------------------------------------------------------------------------- /packages/gui/src/electron/installDevTools.dev.ts: -------------------------------------------------------------------------------- 1 | export default async () => { 2 | if (process.env.NODE_ENV !== 'development') return; 3 | 4 | // eslint-disable-next-line global-require -- We cannot use import since it should be only loaded in development 5 | const { default: installExtension, REDUX_DEVTOOLS, REACT_DEVELOPER_TOOLS } = require('electron-devtools-assembler'); 6 | try { 7 | // install "browser" extensions 8 | await installExtension([REDUX_DEVTOOLS, REACT_DEVELOPER_TOOLS]); 9 | } catch (err: any) { 10 | console.error(err.message); 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/canReadFile.ts: -------------------------------------------------------------------------------- 1 | import fsBase from 'fs'; 2 | import fs from 'fs/promises'; 3 | 4 | export default async function canReadFile(filePath: string) { 5 | try { 6 | await fs.access(filePath, fsBase.constants.R_OK); 7 | return true; 8 | } catch (error) { 9 | return false; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/decodeError.ts: -------------------------------------------------------------------------------- 1 | export default function decodeError({ name, message, extra }: { name: string; message: string; extra: any }) { 2 | const error = new Error(message); 3 | error.name = name; 4 | Object.assign(error, extra); 5 | 6 | return error; 7 | } 8 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/directoryExists.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs/promises'; 2 | 3 | export default async function directoryExists(dirPath: string) { 4 | try { 5 | const stats = await fs.stat(dirPath); 6 | return stats.isDirectory(); 7 | } catch (error) { 8 | return false; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/encodeError.ts: -------------------------------------------------------------------------------- 1 | export default function encodeError(error: Error) { 2 | return { 3 | name: error.name, 4 | message: error.message, 5 | extra: { ...error }, 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/ensureDirectoryExists.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs/promises'; 2 | 3 | import directoryExists from './directoryExists'; 4 | 5 | export default async function ensureDirectoryExists(dirPath: string) { 6 | if (!(await directoryExists(dirPath))) { 7 | await fs.mkdir(dirPath, { recursive: true }); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/fileExists.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs/promises'; 2 | 3 | export default async function fileExists(filePath: string): Promise { 4 | try { 5 | await fs.stat(filePath); 6 | return true; 7 | } catch { 8 | return false; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/getChecksum.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | import fs from 'fs'; 3 | 4 | export default async function getChecksum(filePath: string) { 5 | return new Promise((resolve, reject) => { 6 | const hash = crypto.createHash('sha256'); 7 | const readStream = fs.createReadStream(filePath); 8 | 9 | readStream.on('data', (chunk) => { 10 | hash.update(chunk); 11 | }); 12 | 13 | readStream.on('end', () => { 14 | const checksum = hash.digest('hex'); 15 | resolve(checksum); 16 | }); 17 | 18 | readStream.on('error', (error) => { 19 | reject(error); 20 | }); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/handleWithCustomErrors.ts: -------------------------------------------------------------------------------- 1 | import { ipcMain } from 'electron'; 2 | 3 | import encodeError from './encodeError'; 4 | 5 | export default function handleWithCustomErrors(channel: string, handler: (...args: any[]) => any) { 6 | ipcMain.handle(channel, async (...args: any[]) => { 7 | try { 8 | return { result: await handler(...args) }; 9 | } catch (e) { 10 | const error = e || new Error('Unknown error'); 11 | return { error: encodeError(error as Error) }; 12 | } 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/invokeWithCustomErrors.ts: -------------------------------------------------------------------------------- 1 | import { ipcRenderer } from 'electron'; 2 | 3 | import decodeError from './decodeError'; 4 | 5 | export default async function invokeWithCustomErrors(channel: string, ...args: any[]) { 6 | const { error, result } = await ipcRenderer.invoke(channel, ...args); 7 | if (error) { 8 | throw decodeError(error); 9 | } 10 | 11 | return result; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/electron/utils/sanitizeNumber.ts: -------------------------------------------------------------------------------- 1 | export default function sanitizeNumber(input: number | string): number { 2 | let size: number; 3 | 4 | if (typeof input === 'string') { 5 | size = parseInt(input, 10); 6 | } else { 7 | size = input; 8 | } 9 | 10 | if (Number.isNaN(size) || size <= 0) { 11 | throw new Error('Invalid maxTotalSize value. It must be a positive number.'); 12 | } 13 | 14 | return size; 15 | } 16 | -------------------------------------------------------------------------------- /packages/gui/src/fonts.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.woff'; 2 | declare module '*.woff2'; 3 | declare module '*.ttf'; 4 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useBurnAddress.ts: -------------------------------------------------------------------------------- 1 | import { toBech32m } from '@chia-network/api'; 2 | import { useCurrencyCode } from '@chia-network/core'; 3 | import { useMemo } from 'react'; 4 | 5 | export default function useBurnAddress(): string | undefined { 6 | const feeUnit = useCurrencyCode(); 7 | 8 | const retireAddress = useMemo(() => { 9 | if (!feeUnit) { 10 | return undefined; 11 | } 12 | 13 | return toBech32m('000000000000000000000000000000000000000000000000000000000000dead', feeUnit); 14 | }, [feeUnit]); 15 | 16 | return retireAddress; 17 | } 18 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useCache.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import CacheContext from '../components/cache/CacheContext'; 4 | 5 | export default function useCache() { 6 | const context = useContext(CacheContext); 7 | if (!context) { 8 | throw new Error('Use of useCache outside of CacheProvider'); 9 | } 10 | 11 | return context; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useEnableAutoLogin.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export default function useEnableAutoLogin() { 4 | return usePrefs('enableAutoLogin', true); 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useEnableDataLayerService.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export default function useEnableDataLayerService() { 4 | return usePrefs('enableDataLayerService', false); 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useEnableFilePropagationServer.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export default function useEnableFilePropagationServer() { 4 | return usePrefs('enableFilePropagationServer', false); 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useHideObjectionableContent.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export default function useHideObjectionableContent() { 4 | return usePrefs('hideObjectionableContent', true); 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useIsMainnet.tsx: -------------------------------------------------------------------------------- 1 | import { useGetNetworkInfoQuery } from '@chia-network/api-react'; 2 | 3 | export default function useIsMainnet(): boolean | undefined { 4 | const { data: networkInfo } = useGetNetworkInfoQuery(); 5 | const networkPrefix = networkInfo?.networkPrefix; 6 | 7 | if (!networkPrefix) { 8 | return undefined; 9 | } 10 | 11 | return networkPrefix.toLowerCase() === 'xch'; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNFTFilter.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { NFTFilterContext } from '../components/nfts/NFTFilterProvider'; 4 | 5 | export default function useNFTFilter() { 6 | const context = useContext(NFTFilterContext); 7 | 8 | if (!context) { 9 | throw new Error('useNFTFilter must be used within a NFTFilterProvider'); 10 | } 11 | 12 | return context; 13 | } 14 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNFTGalleryScrollPosition.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { NFTGalleryScrollPositionContext } from '../components/nfts/gallery/NFTGalleryScrollPositionProvider'; 4 | 5 | export default function useNFTGalleryScrollPosition(): [number, (position: number) => void] { 6 | const context = useContext(NFTGalleryScrollPositionContext); 7 | if (!context) { 8 | throw new Error('useNFTGalleryScrollPosition must be used within a NFTGalleryScrollPositionProvider'); 9 | } 10 | 11 | return [context.scrollPosition, context.setScrollPosition]; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNFTImageFittingMode.tsx: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export type NFTImageFittingMode = 'contain' | 'cover' | 'fill'; 4 | 5 | export const defaultFittingMode: NFTImageFittingMode = 'cover'; 6 | 7 | export default function useNFTImageFittingMode(): [NFTImageFittingMode, (fittingMode: NFTImageFittingMode) => void] { 8 | return usePrefs('nftImageFittingMode', defaultFittingMode); 9 | } 10 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNFTMetadataLRU.ts: -------------------------------------------------------------------------------- 1 | import LRU from '@chia-network/core'; 2 | import { useContext } from 'react'; 3 | 4 | import { LRUsContext } from '../components/lrus/LRUsProvider'; 5 | 6 | const NFT_METADATA_LRU_NAME = 'nftMetadata'; 7 | 8 | export default function useNFTMetadataLRU(): LRU { 9 | const context = useContext(LRUsContext); 10 | 11 | if (!context) { 12 | throw new Error('useNFTMetadataLRU must be used within a LRUsProvider'); 13 | } 14 | 15 | return context.getLRU(NFT_METADATA_LRU_NAME); 16 | } 17 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNFTProvider.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import NFTProviderContext from '../components/nfts/provider/NFTProviderContext'; 4 | 5 | export default function useNFTProvider() { 6 | const context = useContext(NFTProviderContext); 7 | if (!context) { 8 | throw new Error('useNFTProvider must be used within a NFTProvider'); 9 | } 10 | 11 | return context; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNachoNFTs.ts: -------------------------------------------------------------------------------- 1 | import { useGetNFTsByNFTIDsQuery, useLocalStorage } from '@chia-network/api-react'; 2 | 3 | export default function useNachoNFTs() { 4 | const [nachoNFTsString] = useLocalStorage('nachoNFTs', ''); 5 | const nachoNFTIDs = nachoNFTsString.split(',').map((nachoNFT: string) => nachoNFT.trim()); 6 | 7 | return useGetNFTsByNFTIDsQuery({ nftIds: nachoNFTIDs }, { skip: !nachoNFTsString || nachoNFTIDs.length === 0 }); 8 | } 9 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useNotifications.tsx: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { NotificationsContext } from '../components/notification/NotificationsProvider'; 4 | 5 | export default function useNotifications() { 6 | const context = useContext(NotificationsContext); 7 | if (!context) { 8 | throw new Error('useNotifications must be used within a NotificationsProvider'); 9 | } 10 | 11 | return context; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useOfferBuilderContext.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import OfferBuilderContext, { OfferBuilderContextData } from '../components/offers2/OfferBuilderContext'; 4 | 5 | export default function useOfferBuilderContext(): OfferBuilderContextData { 6 | const context = useContext(OfferBuilderContext); 7 | 8 | if (!context) { 9 | throw new Error('useOfferBuilderContext must be used within a OfferBuilderProvider'); 10 | } 11 | 12 | return context; 13 | } 14 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useOffers.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { OffersContext } from '../components/offers2/OffersProvider'; 4 | 5 | export default function useOffers() { 6 | const context = useContext(OffersContext); 7 | if (!context) { 8 | throw new Error('useOffer must be used within OffersProvider'); 9 | } 10 | 11 | return context; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useOpenExternal.ts: -------------------------------------------------------------------------------- 1 | import isElectron from 'is-electron'; 2 | import { useCallback } from 'react'; 3 | import isURL from 'validator/es/lib/isURL'; 4 | 5 | export default function useOpenExternal(): (url: string) => void { 6 | const handleOpen = useCallback((url: string) => { 7 | if (!isURL(url, { protocols: ['http', 'https', 'ipfs'], require_protocol: true })) { 8 | return; 9 | } 10 | 11 | if (isElectron()) { 12 | // @ts-ignore 13 | window.shell.openExternal(url); 14 | return; 15 | } 16 | 17 | window.open(url, '_blank'); 18 | }, []); 19 | 20 | return handleOpen; 21 | } 22 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/usePaste.ts: -------------------------------------------------------------------------------- 1 | import { useHotkeys } from 'react-hotkeys-hook'; 2 | 3 | import { isMac } from '../util/utils'; 4 | 5 | export type PasteParams = { 6 | callback: (pastedText: string) => void; 7 | }; 8 | 9 | export default function usePaste(params: PasteParams) { 10 | const { callback } = params; 11 | const hotKey = isMac() ? 'meta+v' : 'ctrl+v'; 12 | 13 | useHotkeys(hotKey, () => { 14 | navigator.clipboard 15 | .readText() 16 | .then((text) => { 17 | callback(text); 18 | }) 19 | .catch((err) => { 20 | console.error('Error during paste from clipboard', err); 21 | }); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useShowNotification.ts: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react'; 2 | 3 | export default function useShowNotification() { 4 | const handleShowNotification = useCallback((notification: { title?: string; body?: string }) => { 5 | const { ipcRenderer } = window as any; 6 | ipcRenderer.invoke('showNotification', notification); 7 | }, []); 8 | 9 | return handleShowNotification; 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useStateAbort.ts: -------------------------------------------------------------------------------- 1 | import { useState, useCallback } from 'react'; 2 | 3 | export default function useStateAbort(initialValue: T | (() => T)) { 4 | const [value, setValue] = useState(initialValue); 5 | 6 | const handleSetValue = useCallback((newValue: Parameters[0], signal?: AbortSignal) => { 7 | if (signal?.aborted) { 8 | return; 9 | } 10 | 11 | setValue(newValue); 12 | }, []); 13 | 14 | return [value, handleSetValue] as const; 15 | } 16 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useSuppressShareOnCreate.ts: -------------------------------------------------------------------------------- 1 | import { usePrefs } from '@chia-network/api-react'; 2 | 3 | export default function useSuppressShareOnCreate() { 4 | return usePrefs('suppressShareOnCreate', false); 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/src/hooks/useWalletConnectContext.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { WalletConnectContext } from '../components/walletConnect/WalletConnectProvider'; 4 | 5 | export default function useWalletConnectContext() { 6 | const context = useContext(WalletConnectContext); 7 | if (!context) { 8 | throw new Error('useWalletConnectContext must be used within a WalletConnectProvider'); 9 | } 10 | 11 | return context; 12 | } 13 | -------------------------------------------------------------------------------- /packages/gui/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Chia Blockchain 10 | 11 | 12 | 13 |
14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/gui/src/index.tsx: -------------------------------------------------------------------------------- 1 | import './wdyr.dev'; // must be first 2 | import './polyfill'; 3 | import './config/env'; 4 | import React from 'react'; 5 | import { createRoot } from 'react-dom/client'; 6 | 7 | import App from './components/app/App'; 8 | import initPrefs from './init-prefs'; 9 | 10 | // we need to use additional root for hot reloading 11 | function Root() { 12 | return ; 13 | } 14 | 15 | const onInit = () => { 16 | const container = document.querySelector('#root'); 17 | const root = createRoot(container!); 18 | root.render(); 19 | }; 20 | 21 | initPrefs(onInit).catch(() => { 22 | // window.alert(e); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/gui/src/polyfill.ts: -------------------------------------------------------------------------------- 1 | import 'core-js/stable'; 2 | import 'regenerator-runtime/runtime'; 3 | import { polyfill } from 'es6-promise'; 4 | import 'isomorphic-fetch'; 5 | 6 | polyfill(); 7 | -------------------------------------------------------------------------------- /packages/gui/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/gui/src/types/Fingerprint.ts: -------------------------------------------------------------------------------- 1 | type Fingerprint = number; 2 | 3 | export default Fingerprint; 4 | -------------------------------------------------------------------------------- /packages/gui/src/types/InitialTargetState.ts: -------------------------------------------------------------------------------- 1 | type InitialTargetState = 2 | | { 3 | state: 'SELF_POOLING'; 4 | } 5 | | { 6 | state: 'FARMING_TO_POOL'; 7 | pool_url: string; 8 | relative_lock_height: number; 9 | target_puzzle_hash: string; 10 | }; 11 | 12 | export default InitialTargetState; 13 | -------------------------------------------------------------------------------- /packages/gui/src/types/NFTSelection.tsx: -------------------------------------------------------------------------------- 1 | import type NFTInfo from '@chia-network/api'; 2 | 3 | type NFTSelection = { 4 | items: NFTInfo[]; 5 | }; 6 | 7 | export default NFTSelection; 8 | -------------------------------------------------------------------------------- /packages/gui/src/types/Plot.ts: -------------------------------------------------------------------------------- 1 | type Plot = { 2 | plot_id: string; 3 | filename: string; 4 | file_size: number; 5 | size: number; 6 | local_sk: string; 7 | farmer_public_key: string; 8 | plot_public_key: string; 9 | pool_public_key: string; 10 | pool_contract_puzzle_hash: string; 11 | duplicates?: Plot[]; 12 | }; 13 | 14 | export default Plot; 15 | -------------------------------------------------------------------------------- /packages/gui/src/types/PlotNFT.ts: -------------------------------------------------------------------------------- 1 | import type PoolState from './PoolState'; 2 | import type PoolWalletStatus from './PoolWalletStatus'; 3 | import type WalletBalance from './WalletBalance'; 4 | 5 | type PlotNFT = { 6 | pool_state: PoolState; 7 | wallet_balance: WalletBalance; 8 | pool_wallet_status: PoolWalletStatus; 9 | }; 10 | 11 | export default PlotNFT; 12 | -------------------------------------------------------------------------------- /packages/gui/src/types/PlotNFTExternal.ts: -------------------------------------------------------------------------------- 1 | import type PoolState from './PoolState'; 2 | 3 | type PlotNFTExternal = { 4 | pool_state: PoolState; 5 | }; 6 | 7 | export default PlotNFTExternal; 8 | -------------------------------------------------------------------------------- /packages/gui/src/types/PlotQueueItem.ts: -------------------------------------------------------------------------------- 1 | import PlotStatus from '../constants/PlotStatus'; 2 | 3 | type PlotQueueItem = { 4 | id: string; 5 | queue: string; 6 | size: number; 7 | parallel: boolean; 8 | delay: number; 9 | state: PlotStatus; 10 | error?: string; 11 | log?: string; 12 | progress?: number; 13 | }; 14 | 15 | export default PlotQueueItem; 16 | -------------------------------------------------------------------------------- /packages/gui/src/types/Point.ts: -------------------------------------------------------------------------------- 1 | type Point = [number, number]; 2 | 3 | export default Point; 4 | -------------------------------------------------------------------------------- /packages/gui/src/types/PoolInfo.ts: -------------------------------------------------------------------------------- 1 | type PoolInfo = { 2 | name: string; 3 | description: string; 4 | pool_url: string; 5 | fee: string; 6 | logo_url: string; 7 | minimum_difficulty: number; 8 | protocol_version: string; 9 | relative_lock_height: number; 10 | target_puzzle_hash: string; 11 | }; 12 | 13 | export default PoolInfo; 14 | -------------------------------------------------------------------------------- /packages/gui/src/types/UnconfirmedPlotNFT.ts: -------------------------------------------------------------------------------- 1 | import PlotNFTState from '../constants/PlotNFTState'; 2 | 3 | type UnconfirmedPlotNFT = { 4 | fingerprint: string; 5 | transactionId: string; 6 | state: PlotNFTState; 7 | poolUrl?: string; 8 | }; 9 | 10 | export default UnconfirmedPlotNFT; 11 | -------------------------------------------------------------------------------- /packages/gui/src/types/WalletBalance.ts: -------------------------------------------------------------------------------- 1 | type WalletBalance = { 2 | wallet_id: number; 3 | confirmed_wallet_balance: number; 4 | max_send_amount: number; 5 | pending_change: number; 6 | pending_coin_removal_count: number; 7 | spendable_balance: number; 8 | unconfirmed_wallet_balance: number; 9 | unspent_coin_count: number; 10 | balance_pending: number; 11 | }; 12 | 13 | export default WalletBalance; 14 | -------------------------------------------------------------------------------- /packages/gui/src/util/compareChecksums.ts: -------------------------------------------------------------------------------- 1 | import removeHexPrefix from './removeHexPrefix'; 2 | 3 | export default function compareChecksums(checksum1: string, checksum2: string) { 4 | // Remove the "0x" prefix from the checksums 5 | const strippedChecksum1 = removeHexPrefix(checksum1); 6 | const strippedChecksum2 = removeHexPrefix(checksum2); 7 | 8 | // Compare the stripped checksums and return the result 9 | return strippedChecksum1 === strippedChecksum2; 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/util/computeHash.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | export default function computeHash(content: string, options: { hash?: string; encoding?: string }): string { 4 | const { hash, encoding } = options; 5 | return crypto 6 | .createHash(hash ?? 'sha256') 7 | .update(content, (encoding ?? 'binary') as crypto.Encoding) 8 | .digest('hex'); 9 | } 10 | -------------------------------------------------------------------------------- /packages/gui/src/util/dids.ts: -------------------------------------------------------------------------------- 1 | import { toBech32m, fromBech32m } from '@chia-network/api'; 2 | 3 | import removeHexPrefix from './removeHexPrefix'; 4 | 5 | export function didToDIDId(did: string): string { 6 | return toBech32m(removeHexPrefix(did), 'did:chia:'); 7 | } 8 | 9 | export function didFromDIDId(didId: string): string | undefined { 10 | let decoded: string | undefined; 11 | 12 | try { 13 | decoded = fromBech32m(didId); 14 | } catch (e) { 15 | return undefined; 16 | } 17 | 18 | return decoded; 19 | } 20 | -------------------------------------------------------------------------------- /packages/gui/src/util/download.ts: -------------------------------------------------------------------------------- 1 | export default async function download(url: string): Promise { 2 | const { ipcRenderer } = window as any; 3 | 4 | return ipcRenderer?.invoke('download', { 5 | url, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /packages/gui/src/util/findCATWalletByAssetId.ts: -------------------------------------------------------------------------------- 1 | import type { Wallet } from '@chia-network/api'; 2 | import { WalletType } from '@chia-network/api'; 3 | 4 | export default function findCATWalletByAssetId(wallets: Wallet[], assetId: string) { 5 | return wallets.find( 6 | (wallet) => 7 | [WalletType.CAT, WalletType.CRCAT].includes(wallet.type) && 8 | wallet.meta?.assetId?.toLowerCase() === assetId.toLowerCase(), 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/util/getCurrentTime.ts: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | 3 | export default function getCurrentTime(lastBlockTimeStampData: any) { 4 | const lastBlockTimeStamp = lastBlockTimeStampData?.timestamp || 0; 5 | const currentTimeMoment = moment.unix(lastBlockTimeStamp); 6 | // eslint-disable-next-line no-underscore-dangle -- description 7 | const currentTime = currentTimeMoment._i / 1000; 8 | 9 | return currentTime; 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/util/getNFTFileType.ts: -------------------------------------------------------------------------------- 1 | import { type NFTInfo } from '@chia-network/api'; 2 | 3 | import FileType from '../constants/FileType'; 4 | 5 | import getFileType from './getFileType'; 6 | 7 | export default function getNFTFileType(nft: NFTInfo): FileType { 8 | const { dataUris } = nft; 9 | if (dataUris && Array.isArray(dataUris) && dataUris.length > 0) { 10 | const file = dataUris[0]; 11 | if (file) { 12 | return getFileType(file); 13 | } 14 | } 15 | 16 | return FileType.UNKNOWN; 17 | } 18 | -------------------------------------------------------------------------------- /packages/gui/src/util/getNFTId.ts: -------------------------------------------------------------------------------- 1 | import { launcherIdToNFTId } from './nfts'; 2 | import removeHexPrefix from './removeHexPrefix'; 3 | 4 | // id can be a launcher id or an nft id 5 | export default function getNFTId(id: string) { 6 | const sanitizedId = id.trim(); 7 | 8 | try { 9 | const isNFTId = sanitizedId.startsWith('nft'); 10 | return isNFTId ? sanitizedId : launcherIdToNFTId(removeHexPrefix(sanitizedId)); 11 | } catch { 12 | return id; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/util/getPercentPointsSuccessfull.ts: -------------------------------------------------------------------------------- 1 | import { sumBy } from 'lodash'; 2 | 3 | import type Point from '../types/Point'; 4 | 5 | function sumPoints(points: Point[]): number { 6 | return sumBy(points, (point) => point[1]) ?? 0; 7 | } 8 | 9 | export default function getPercentPointsSuccessfull(pointsAcknowledged: Point[], pointsFound: Point[]): number { 10 | const acknowledged = sumPoints(pointsAcknowledged); 11 | const found = sumPoints(pointsFound); 12 | 13 | if (!acknowledged || !found) { 14 | return 0; 15 | } 16 | 17 | return acknowledged / found; 18 | } 19 | -------------------------------------------------------------------------------- /packages/gui/src/util/getPoolInfo.ts: -------------------------------------------------------------------------------- 1 | import type { PoolInfo } from '@chia-network/api'; 2 | import { toCamelCase } from '@chia-network/api'; 3 | 4 | export default async function getPoolInfo(poolUrl: string): PoolInfo { 5 | const url = `${poolUrl}/pool_info`; 6 | const response = await fetch(url); 7 | const data = await response.json(); 8 | 9 | return toCamelCase(data); 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/src/util/getUnknownCATs.ts: -------------------------------------------------------------------------------- 1 | import type { Wallet } from '@chia-network/api'; 2 | 3 | import findCATWalletByAssetId from './findCATWalletByAssetId'; 4 | 5 | export default function getUnknownCATs(wallets: Wallet[], assetIds: string[]): string[] { 6 | return assetIds.filter((assetId) => !findCATWalletByAssetId(wallets, assetId)); 7 | } 8 | -------------------------------------------------------------------------------- /packages/gui/src/util/hasSensitiveContent.ts: -------------------------------------------------------------------------------- 1 | import type Metadata from '../@types/Metadata'; 2 | 3 | export default function hasSensitiveContent(metadata?: Metadata) { 4 | if (!metadata) { 5 | return false; 6 | } 7 | 8 | const sensitiveContent = metadata.sensitive_content; 9 | if (!sensitiveContent || sensitiveContent === false || sensitiveContent === 'false') { 10 | return false; 11 | } 12 | 13 | return true; 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/util/isLocalhost.ts: -------------------------------------------------------------------------------- 1 | export default function isLocalhost(ip: string): boolean { 2 | return ip === '::1' || ip === '127.0.0.1'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/gui/src/util/isRankingAttribute.ts: -------------------------------------------------------------------------------- 1 | import type { NFTAttribute } from '@chia-network/api'; 2 | 3 | export default function isRankingAttribute(attribute: NFTAttribute) { 4 | if ('max_value' in attribute && typeof attribute.max_value === 'number') { 5 | return true; 6 | } 7 | 8 | return false; 9 | } 10 | -------------------------------------------------------------------------------- /packages/gui/src/util/manageDaemonLifetime.ts: -------------------------------------------------------------------------------- 1 | import { get } from 'lodash'; 2 | 3 | import { readConfigFile } from './loadConfig'; 4 | 5 | export default function manageDaemonLifetime(net?: string): boolean { 6 | try { 7 | const config = readConfigFile(net); 8 | const selfHostname = get(config, 'self_hostname', 'localhost'); 9 | const uiDaemonHost = get(config, 'ui.daemon_host', 'localhost'); 10 | 11 | return selfHostname === uiDaemonHost; 12 | } catch (error: any) { 13 | if (error.code === 'ENOENT') { 14 | // configuration file does not exists, use default value 15 | return true; 16 | } 17 | throw error; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/gui/src/util/normalizeUrl.ts: -------------------------------------------------------------------------------- 1 | import normalize from 'normalize-url'; 2 | 3 | export default function normalizeUrl(url: string): string { 4 | return normalize(url, { 5 | defaultProtocol: 'https:', 6 | stripAuthentication: false, 7 | stripTextFragment: false, 8 | stripWWW: false, 9 | removeQueryParameters: false, 10 | removeTrailingSlash: false, 11 | removeSingleSlash: false, 12 | sortQueryParameters: false, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/gui/src/util/parseFee.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | export default function parseFee(value: any) { 4 | if (value === null || value === undefined) { 5 | return ''; 6 | } 7 | 8 | if (typeof value === 'string') { 9 | return value; 10 | } 11 | 12 | if (typeof value === 'number') { 13 | if (Number.isNaN(value)) { 14 | return ''; 15 | } 16 | 17 | return value.toString(); 18 | } 19 | 20 | if (value instanceof BigNumber) { 21 | if (value.isNaN()) { 22 | return ''; 23 | } 24 | 25 | return value.toFixed(); 26 | } 27 | 28 | return value; 29 | } 30 | -------------------------------------------------------------------------------- /packages/gui/src/util/parseFileContent.ts: -------------------------------------------------------------------------------- 1 | export default function parseFileContent(content: Buffer, headers: any) { 2 | let encoding: BufferEncoding = 'utf8'; 3 | if (headers?.['content-type']) { 4 | const contentType = headers['content-type']; 5 | const parsedEncoding = contentType?.split('charset=')[1]; 6 | 7 | if (parsedEncoding) { 8 | encoding = parsedEncoding.toLowerCase() === 'iso-8859-1' ? 'latin1' : parsedEncoding; 9 | } 10 | } 11 | 12 | return Buffer.from(content).toString(encoding); 13 | } 14 | -------------------------------------------------------------------------------- /packages/gui/src/util/removeHexPrefix.ts: -------------------------------------------------------------------------------- 1 | export default function removeHexPrefix(hex: string) { 2 | if (hex.startsWith('0x') || hex.startsWith('0X')) { 3 | return hex.slice(2); 4 | } 5 | return hex; 6 | } 7 | -------------------------------------------------------------------------------- /packages/gui/src/util/service_names.js: -------------------------------------------------------------------------------- 1 | // Corresponds with outbound_message.py NodeTypes 2 | export const serviceConnectionTypes = { 3 | 1: 'Full Node', 4 | 2: 'Harvester', 5 | 3: 'Farmer', 6 | 4: 'Timelord', 7 | 5: 'Introducer', 8 | 6: 'Wallet', 9 | 7: 'Data Layer', 10 | }; 11 | -------------------------------------------------------------------------------- /packages/gui/src/util/sleep.ts: -------------------------------------------------------------------------------- 1 | export default function sleep(ms: number) { 2 | return new Promise((resolve) => { 3 | setTimeout(resolve, ms); 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /packages/gui/src/util/throttleAsync.ts: -------------------------------------------------------------------------------- 1 | type FN = () => Promise; 2 | 3 | export default function throttleAsync() { 4 | let processing: boolean = false; 5 | let nextFn: FN | undefined; 6 | 7 | async function process(fn: FN) { 8 | if (processing) { 9 | nextFn = fn; 10 | return; 11 | } 12 | 13 | try { 14 | processing = true; 15 | await fn(); 16 | } finally { 17 | processing = false; 18 | 19 | if (nextFn) { 20 | const currentFn = nextFn; 21 | nextFn = undefined; 22 | process(currentFn); 23 | } 24 | } 25 | } 26 | 27 | return process; 28 | } 29 | -------------------------------------------------------------------------------- /packages/gui/src/util/untildify.ts: -------------------------------------------------------------------------------- 1 | import os from 'os'; 2 | 3 | const homeDirectory = os.homedir(); 4 | 5 | export default function untildify(pathWithTilde: string): string { 6 | if (typeof pathWithTilde !== 'string') { 7 | throw new TypeError(`Expected a string, got ${typeof pathWithTilde}`); 8 | } 9 | 10 | return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde; 11 | } 12 | -------------------------------------------------------------------------------- /packages/gui/src/wdyr.dev.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | /// 4 | if (process.env.NODE_ENV === 'development') { 5 | // eslint-disable-next-line global-require -- this is a dev-only import 6 | const whyDidYouRender = require('@welldone-software/why-did-you-render'); 7 | whyDidYouRender(React, { 8 | // trackAllPureComponents: true, 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /packages/gui/tests/data_fixtures/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": "abandon", 3 | "1": "ability", 4 | "2": "able", 5 | "3": "about", 6 | "4": "above", 7 | "5": "absent", 8 | "6": "baby", 9 | "7": "bachelor", 10 | "8": "bacon", 11 | "9": "badge", 12 | "10": "bag", 13 | "11": "balance", 14 | "12": "cabbage", 15 | "13": "cabin", 16 | "14": "cable", 17 | "15": "cactus", 18 | "16": "cage", 19 | "17": "cake", 20 | "18": "dad", 21 | "19": "damage", 22 | "20": "damp", 23 | "21": "dance", 24 | "22": "danger", 25 | "23": "daring" 26 | } 27 | -------------------------------------------------------------------------------- /packages/gui/tests/data_fixtures/data12.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": "abandon", 3 | "1": "ability", 4 | "2": "able", 5 | "3": "about", 6 | "4": "above", 7 | "5": "absent", 8 | "6": "baby", 9 | "7": "bachelor", 10 | "8": "bacon", 11 | "9": "badge", 12 | "10": "bag", 13 | "11": "balance", 14 | "12": "cabbage" 15 | } 16 | -------------------------------------------------------------------------------- /packages/gui/tests/data_object_model/close_dialog.ts: -------------------------------------------------------------------------------- 1 | //pages/closeDialog.ts 2 | 3 | import type { Page } from 'playwright'; 4 | export class CloseDialog { 5 | readonly page: Page; 6 | constructor(page: Page) { 7 | this.page = page; 8 | } 9 | 10 | async closeIt() { 11 | await this.page.locator('button:has-text("Close")').click(); 12 | } 13 | 14 | async logOut() { 15 | await this.page.locator('[data-testid="LayoutDashboard-log-out"]').click(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/gui/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "dist"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/icons/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /packages/icons/load-package.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('./package.json'); 2 | -------------------------------------------------------------------------------- /packages/icons/src/@types/svgr.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.svg' { 2 | import React from 'react'; 3 | 4 | const SVG: React.VFC>; 5 | export default SVG; 6 | } 7 | -------------------------------------------------------------------------------- /packages/icons/src/Burn.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import BurnIcon from './images/Burn.svg'; 5 | 6 | export default function Tokens(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Chia.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import ChiaBlackIcon from './images/chia-black.svg'; 5 | import ChiaIcon from './images/chia.svg'; 6 | 7 | export default function Keys(props: SvgIconProps) { 8 | return ; 9 | } 10 | 11 | export function ChiaBlack(props: SvgIconProps) { 12 | return ; 13 | } 14 | -------------------------------------------------------------------------------- /packages/icons/src/Contacts.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import ContactsIcon from './images/contacts.svg'; 5 | 6 | export default function Contacts(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/CrCat.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import CrCatIcon from './images/CrCat.svg'; 5 | 6 | export default function CrCat(props: SvgIconProps) { 7 | const { sx, ...rest } = props; 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /packages/icons/src/Farm.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import FarmIcon from './images/Farm.svg'; 5 | 6 | export default function Farm(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Farming.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import FarmingIcon from './images/Farming.svg'; 5 | 6 | export default function Farming(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Fees.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import FeesIcon from './images/Fees.svg'; 5 | 6 | export default function Fees(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/FullNode.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import FullNodeIcon from './images/FullNode.svg'; 5 | 6 | export default function FullNode(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Harvest.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import HarvestIcon from './images/Harvest.svg'; 5 | 6 | export default function Harvest(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Home.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps, styled, type Theme } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import HomeIcon from './images/home.svg'; 5 | 6 | function getColor({ theme }: { theme: Theme }) { 7 | return theme.palette.mode === 'dark' ? 'white' : '#757575'; 8 | } 9 | 10 | const StyledHomeIcon = styled(HomeIcon)` 11 | path { 12 | stroke: ${getColor}; 13 | stroke-width: 2; 14 | } 15 | `; 16 | 17 | export default function Home(props: SvgIconProps) { 18 | return ; 19 | } 20 | -------------------------------------------------------------------------------- /packages/icons/src/Hourglass.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import HourglassIcon from './images/Hourglass.svg'; 5 | 6 | export default function Hourglass(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Keys.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import KeysIcon from './images/keys.svg'; 5 | 6 | export default function Keys(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Link.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import LinkSmallIcon from './images/LinkSmall.svg'; 5 | 6 | export default function LinkSmall(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/MyContacts.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import MyContactsIcon from './images/MyContacts.svg'; 5 | 6 | export default function MyContacts(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Notification.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import NotificationIcon from './images/notification.svg'; 5 | 6 | export default function Notification(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Offering.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import OfferingIcon from './images/Offering.svg'; 5 | 6 | export default function Offering(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Offers.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import OffersIcon from './images/Offers.svg'; 5 | import OffersSmallIcon from './images/OffersSmall.svg'; 6 | 7 | export function OffersSmall(props: SvgIconProps) { 8 | return ; 9 | } 10 | 11 | export default function Offers(props: SvgIconProps) { 12 | return ; 13 | } 14 | -------------------------------------------------------------------------------- /packages/icons/src/Plot.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import PlotIcon from './images/plot.svg'; 5 | 6 | export default function Plot(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/PlotHero.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import PlotHeroIcon from './images/PlotHero.svg'; 5 | 6 | export default function PlotHero(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Plots.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import PlotsIcon from './images/Plots.svg'; 5 | 6 | export default function Plots(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Pool.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import FarmIcon from './images/pool.svg'; 5 | 6 | export default function Farm(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Pooling.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import PoolingIcon from './images/Pooling.svg'; 5 | 6 | export default function Pooling(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Requesting.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import RequestingIcon from './images/Requesting.svg'; 5 | 6 | export default function Requesting(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Search.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import SearchIcon from './images/search.svg'; 5 | 6 | export default function Search(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Settings.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import SettingsIcon from './images/settings.svg'; 5 | 6 | export default function Settings(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Tokens.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import TokensIcon from './images/Tokens.svg'; 5 | 6 | export default function Tokens(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Trade.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import TradeIcon from './images/trade.svg'; 5 | 6 | export default function Trade(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/Wallet.tsx: -------------------------------------------------------------------------------- 1 | import { SvgIcon, SvgIconProps } from '@mui/material'; 2 | import React from 'react'; 3 | 4 | import WalletIcon from './images/wallet.svg'; 5 | 6 | export default function Wallet(props: SvgIconProps) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/icons/src/images/NFTs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/icons/src/images/NFTsSmall.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/icons/src/images/checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/icons/src/images/exit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/icons/src/images/reload.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/icons/src/images/search.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/icons/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "dist"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/icons/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "noFallthroughCasesInSwitch": true, 5 | "noUnusedParameters": true, 6 | "noImplicitReturns": true, 7 | "moduleResolution": "node", 8 | "esModuleInterop": true, 9 | "noUnusedLocals": true, 10 | "noImplicitAny": true, 11 | "declarationDir": "dist/types", 12 | "declaration": true, 13 | "target": "es2015", 14 | "module": "es2015", 15 | "strict": true, 16 | "jsx": "react", 17 | "skipLibCheck": true 18 | }, 19 | "include": ["src/**/*"], 20 | "exclude": ["node_modules", "dist", "**/*.test.ts"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/wallets/load-package.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('./package.json'); 2 | -------------------------------------------------------------------------------- /packages/wallets/src/components/cat/WalletCATList.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Routes, Route } from 'react-router-dom'; 3 | 4 | import WalletCATCreateExistingSimple from './WalletCATCreateExistingSimple'; 5 | import WalletCATSelect from './WalletCATSelect'; 6 | 7 | export default function WalletCATList() { 8 | return ( 9 | 10 | } index /> 11 | } /> 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/wallets/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export { default as WalletName } from './WalletName'; 2 | -------------------------------------------------------------------------------- /packages/wallets/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useIsWalletSynced } from './useIsWalletSynced'; 2 | export { default as useWallet } from './useWallet'; 3 | export { default as useWalletHumanValue } from './useWalletHumanValue'; 4 | export { default as useWalletState } from './useWalletState'; 5 | export { default as useWalletTransactions } from './useWalletTransactions'; 6 | export { 7 | default as useClawbackDefaultTime, 8 | clawbackDefaultTimeDefaults, 9 | getClawbackTimeInSeconds, 10 | type ClawbackDefaultTimeInput, 11 | type ClawbackDefaultTimeOutput, 12 | } from './useClawbackDefaultTime'; 13 | -------------------------------------------------------------------------------- /packages/wallets/src/hooks/useIsWalletSynced.ts: -------------------------------------------------------------------------------- 1 | import { SyncingStatus } from '@chia-network/api'; 2 | 3 | import useWalletState from './useWalletState'; 4 | 5 | export default function useIsWalletSynced(): boolean { 6 | const { state, isLoading } = useWalletState(); 7 | const isWalletSynced = !isLoading && state === SyncingStatus.SYNCED; 8 | 9 | return isWalletSynced; 10 | } 11 | -------------------------------------------------------------------------------- /packages/wallets/src/hooks/useWalletState.ts: -------------------------------------------------------------------------------- 1 | import { SyncingStatus } from '@chia-network/api'; 2 | import { useGetSyncStatusQuery } from '@chia-network/api-react'; 3 | 4 | import getWalletSyncingStatus from '../utils/getWalletSyncingStatus'; 5 | 6 | export default function useWalletState(): { 7 | isLoading: boolean; 8 | state?: SyncingStatus; 9 | } { 10 | const { data: walletState, isLoading } = useGetSyncStatusQuery( 11 | {}, 12 | { 13 | pollingInterval: 10_000, 14 | }, 15 | ); 16 | 17 | return { 18 | isLoading, 19 | state: walletState && getWalletSyncingStatus(walletState), 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /packages/wallets/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './constants'; 3 | export * from './hooks'; 4 | export * from './utils'; 5 | export * as locales from './locales'; 6 | -------------------------------------------------------------------------------- /packages/wallets/src/utils/getWalletPrimaryTitle.ts: -------------------------------------------------------------------------------- 1 | import { WalletType } from '@chia-network/api'; 2 | import type { Wallet } from '@chia-network/api'; 3 | 4 | export default function getWalletPrimaryTitle(wallet: Wallet): string { 5 | switch (wallet.type) { 6 | case WalletType.STANDARD_WALLET: 7 | return 'Chia'; 8 | default: 9 | return wallet.meta?.name ?? wallet.name; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/wallets/src/utils/getWalletSyncingStatus.ts: -------------------------------------------------------------------------------- 1 | import { SyncingStatus } from '@chia-network/api'; 2 | 3 | export default function getWalletSyncingStatus(walletState) { 4 | const { syncing, synced } = walletState; 5 | 6 | if (syncing) { 7 | return SyncingStatus.SYNCING; 8 | } 9 | if (synced) { 10 | return SyncingStatus.SYNCED; 11 | } 12 | 13 | return SyncingStatus.NOT_SYNCED; 14 | } 15 | -------------------------------------------------------------------------------- /packages/wallets/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { default as getWalletPrimaryTitle } from './getWalletPrimaryTitle'; 2 | export { default as getWalletSyncingStatus } from './getWalletSyncingStatus'; 3 | export { default as isCATWalletPresent } from './isCATWalletPresent'; 4 | -------------------------------------------------------------------------------- /packages/wallets/src/utils/isCATWalletPresent.ts: -------------------------------------------------------------------------------- 1 | import type { Wallet, CATToken } from '@chia-network/api'; 2 | import { WalletType } from '@chia-network/api'; 3 | 4 | export default function isCATWalletPresent(wallets: Wallet[], token: CATToken): boolean { 5 | return !!wallets?.find((wallet) => { 6 | if ([WalletType.CAT, WalletType.CRCAT].includes(wallet.type) && wallet.meta?.assetId === token.assetId) { 7 | return true; 8 | } 9 | 10 | return false; 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /packages/wallets/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "dist"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/wallets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "noFallthroughCasesInSwitch": true, 5 | "noUnusedParameters": true, 6 | "noImplicitReturns": true, 7 | "moduleResolution": "node", 8 | "esModuleInterop": true, 9 | "noUnusedLocals": true, 10 | "noImplicitAny": true, 11 | "declarationDir": "dist/types", 12 | "declaration": true, 13 | "target": "es2015", 14 | "module": "es2015", 15 | "strict": true, 16 | "jsx": "react" 17 | }, 18 | "include": ["src/**/*"], 19 | "exclude": ["node_modules", "dist", "**/*.test.ts"] 20 | } 21 | -------------------------------------------------------------------------------- /src/locales/README.md: -------------------------------------------------------------------------------- 1 | # Localization 2 | 3 | > ## Deprecation notice 4 | > 5 | > This file is deprecated and will be deleted in future major release. 6 | > 7 | > Please follow the Localization from main repo [README.md](https://github.com/Chia-Network/chia-blockchain-gui) 8 | 9 | Thanks for helping to translate the GUI for Chia Blockchain. 10 | 11 | Please head over to our [Crowdin project](https://crowdin.com/project/chia-blockchain/) and add/edit translations there. 12 | --------------------------------------------------------------------------------