@ethersphere/bee-dashboard 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +3 -3
- package/build/index.html +1 -1
- package/build/static/js/{main.712f4f3e.js → main.c3963f3e.js} +3 -3
- package/build/static/js/{main.712f4f3e.js.LICENSE.txt → main.c3963f3e.js.LICENSE.txt} +0 -0
- package/build/static/js/{main.712f4f3e.js.map → main.c3963f3e.js.map} +1 -1
- package/lib/App.js +1 -1
- package/lib/src/App.d.ts +10 -0
- package/lib/src/components/AlertUploadSize.d.ts +6 -0
- package/lib/src/components/Capacity.d.ts +7 -0
- package/lib/src/components/Card.d.ts +11 -0
- package/lib/src/components/CashoutModal.d.ts +7 -0
- package/lib/src/components/ClipboardCopy.d.ts +6 -0
- package/lib/src/components/CloseButton.d.ts +6 -0
- package/lib/src/components/Code.d.ts +7 -0
- package/lib/src/components/CodeBlock.d.ts +8 -0
- package/lib/src/components/CodeBlockTabs.d.ts +8 -0
- package/lib/src/components/DocumentationText.d.ts +6 -0
- package/lib/src/components/ErrorBoundary.d.ts +16 -0
- package/lib/src/components/EthereumAddress.d.ts +9 -0
- package/lib/src/components/ExpandableElement.d.ts +8 -0
- package/lib/src/components/ExpandableList.d.ts +10 -0
- package/lib/src/components/ExpandableListItem.d.ts +8 -0
- package/lib/src/components/ExpandableListItemActions.d.ts +6 -0
- package/lib/src/components/ExpandableListItemInput.d.ts +19 -0
- package/lib/src/components/ExpandableListItemKey.d.ts +8 -0
- package/lib/src/components/ExpandableListItemLink.d.ts +10 -0
- package/lib/src/components/ExpandableListItemNote.d.ts +6 -0
- package/lib/src/components/Feedback.d.ts +2 -0
- package/lib/src/components/FitImage.d.ts +9 -0
- package/lib/src/components/History.d.ts +8 -0
- package/lib/src/components/HistoryHeader.d.ts +6 -0
- package/lib/src/components/Loading.d.ts +2 -0
- package/lib/src/components/Map.d.ts +7 -0
- package/lib/src/components/ProgressIndicator.d.ts +7 -0
- package/lib/src/components/QRCodeModal.d.ts +7 -0
- package/lib/src/components/SideBar.d.ts +2 -0
- package/lib/src/components/SideBarItem.d.ts +10 -0
- package/lib/src/components/SideBarStatus.d.ts +6 -0
- package/lib/src/components/StatusIcon.d.ts +10 -0
- package/lib/src/components/StripedWrapper.d.ts +6 -0
- package/lib/src/components/SwarmButton.d.ts +10 -0
- package/lib/src/components/SwarmDialog.d.ts +6 -0
- package/lib/src/components/SwarmDivider.d.ts +9 -0
- package/lib/src/components/SwarmSelect.d.ts +19 -0
- package/lib/src/components/SwarmTextInput.d.ts +13 -0
- package/lib/src/components/TabsContainer.d.ts +12 -0
- package/lib/src/components/TitleWithClose.d.ts +7 -0
- package/lib/src/components/TopologyStats.d.ts +7 -0
- package/lib/src/components/TroubleshootConnectionCard.d.ts +2 -0
- package/lib/src/components/Waiting.d.ts +2 -0
- package/lib/src/components/WithdrawDepositModal.d.ts +14 -0
- package/lib/src/config.d.ts +16 -0
- package/lib/src/constants.d.ts +7 -0
- package/lib/src/containers/DepositModal.d.ts +2 -0
- package/lib/src/containers/WithdrawModal.d.ts +2 -0
- package/lib/src/hooks/accounting.d.ts +18 -0
- package/lib/src/hooks/apiHooks.d.ts +50 -0
- package/lib/src/hooks/apiHooks.test.d.ts +3 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/layout/Dashboard.d.ts +6 -0
- package/lib/src/layout/ItsBroken.d.ts +6 -0
- package/lib/src/models/BzzToken.d.ts +5 -0
- package/lib/src/models/DaiToken.d.ts +5 -0
- package/lib/src/models/Token.d.ts +27 -0
- package/lib/src/models/Token.test.d.ts +1 -0
- package/lib/src/pages/account/AccountNavigation.d.ts +6 -0
- package/lib/src/pages/account/Header.d.ts +2 -0
- package/lib/src/pages/account/chequebook/AccountChequebook.d.ts +2 -0
- package/lib/src/pages/account/feeds/AccountFeeds.d.ts +2 -0
- package/lib/src/pages/account/stamps/AccountStamps.d.ts +2 -0
- package/lib/src/pages/account/wallet/AccountWallet.d.ts +2 -0
- package/lib/src/pages/accounting/PeerBalances.d.ts +10 -0
- package/lib/src/pages/feeds/CreateNewFeed.d.ts +2 -0
- package/lib/src/pages/feeds/DeleteFeedDialog.d.ts +9 -0
- package/lib/src/pages/feeds/ExportFeedDialog.d.ts +8 -0
- package/lib/src/pages/feeds/FeedPasswordDialog.d.ts +9 -0
- package/lib/src/pages/feeds/FeedSubpage.d.ts +2 -0
- package/lib/src/pages/feeds/ImportFeedDialog.d.ts +6 -0
- package/lib/src/pages/feeds/UpdateFeed.d.ts +2 -0
- package/lib/src/pages/feeds/index.d.ts +2 -0
- package/lib/src/pages/files/AssetIcon.d.ts +6 -0
- package/lib/src/pages/files/AssetPreview.d.ts +7 -0
- package/lib/src/pages/files/AssetSummary.d.ts +7 -0
- package/lib/src/pages/files/Download.d.ts +2 -0
- package/lib/src/pages/files/DownloadActionBar.d.ts +11 -0
- package/lib/src/pages/files/FileNavigation.d.ts +6 -0
- package/lib/src/pages/files/SelectStamp.d.ts +9 -0
- package/lib/src/pages/files/Share.d.ts +2 -0
- package/lib/src/pages/files/StampPreview.d.ts +7 -0
- package/lib/src/pages/files/Upload.d.ts +2 -0
- package/lib/src/pages/files/UploadActionBar.d.ts +16 -0
- package/lib/src/pages/files/UploadArea.d.ts +8 -0
- package/lib/src/pages/files/UploadLander.d.ts +2 -0
- package/lib/src/pages/gift-code/index.d.ts +2 -0
- package/lib/src/pages/info/NodeInfoCard.d.ts +2 -0
- package/lib/src/pages/info/index.d.ts +2 -0
- package/lib/src/pages/restart/LightModeRestart.d.ts +2 -0
- package/lib/src/pages/settings/index.d.ts +2 -0
- package/lib/src/pages/stamps/CreatePostageStampPage.d.ts +2 -0
- package/lib/src/pages/stamps/PostageStamp.d.ts +8 -0
- package/lib/src/pages/stamps/PostageStampCreation.d.ts +6 -0
- package/lib/src/pages/stamps/PostageStampSelector.d.ts +8 -0
- package/lib/src/pages/stamps/SelectPostageStampModal.d.ts +9 -0
- package/lib/src/pages/stamps/StampsTable.d.ts +7 -0
- package/lib/src/pages/stamps/index.d.ts +2 -0
- package/lib/src/pages/status/SetupSteps/ChequebookDeployFund.d.ts +3 -0
- package/lib/src/pages/status/SetupSteps/DebugConnectionCheck.d.ts +2 -0
- package/lib/src/pages/status/SetupSteps/EthereumConnectionCheck.d.ts +2 -0
- package/lib/src/pages/status/SetupSteps/NodeConnectionCheck.d.ts +2 -0
- package/lib/src/pages/status/SetupSteps/PeerConnection.d.ts +2 -0
- package/lib/src/pages/status/SetupSteps/VersionCheck.d.ts +2 -0
- package/lib/src/pages/status/index.d.ts +2 -0
- package/lib/src/pages/top-up/Balance.d.ts +9 -0
- package/lib/src/pages/top-up/BankCardTopUpIndex.d.ts +2 -0
- package/lib/src/pages/top-up/CryptoTopUpIndex.d.ts +2 -0
- package/lib/src/pages/top-up/GiftCardFund.d.ts +2 -0
- package/lib/src/pages/top-up/GiftCardTopUpIndex.d.ts +2 -0
- package/lib/src/pages/top-up/Swap.d.ts +6 -0
- package/lib/src/pages/top-up/TopUpProgressIndicator.d.ts +6 -0
- package/lib/src/pages/top-up/index.d.ts +2 -0
- package/lib/src/providers/Bee.d.ts +56 -0
- package/lib/src/providers/Feeds.d.ts +21 -0
- package/lib/src/providers/File.d.ts +22 -0
- package/lib/src/providers/Platform.d.ts +23 -0
- package/lib/src/providers/Settings.d.ts +33 -0
- package/lib/src/providers/Stamps.d.ts +23 -0
- package/lib/src/providers/TopUp.d.ts +13 -0
- package/lib/src/providers/WalletBalance.d.ts +18 -0
- package/lib/src/reportWebVitals.d.ts +3 -0
- package/lib/src/routes.d.ts +31 -0
- package/lib/src/setupTests.d.ts +1 -0
- package/lib/src/theme.d.ts +7 -0
- package/lib/src/types.d.ts +36 -0
- package/lib/src/utils/bzz-abi.d.ts +16 -0
- package/lib/src/utils/bzz-faucet.d.ts +1 -0
- package/lib/src/utils/chain.d.ts +1 -0
- package/lib/src/utils/date.d.ts +1 -0
- package/lib/src/utils/desktop.d.ts +18 -0
- package/lib/src/utils/file.d.ts +14 -0
- package/lib/src/utils/hash.d.ts +1 -0
- package/lib/src/utils/identity.d.ts +9 -0
- package/lib/src/utils/image.d.ts +27 -0
- package/lib/src/utils/index.d.ts +72 -0
- package/lib/src/utils/index.test.d.ts +1 -0
- package/lib/src/utils/local-storage.d.ts +12 -0
- package/lib/src/utils/net.d.ts +3 -0
- package/lib/src/utils/rpc.d.ts +24 -0
- package/lib/src/utils/sentry.d.ts +1 -0
- package/lib/src/utils/threshold.d.ts +22 -0
- package/lib/src/utils/wallet.d.ts +24 -0
- package/package.json +2 -2
package/lib/App.js
CHANGED
|
@@ -115661,7 +115661,7 @@ function getStampUsage({
|
|
|
115661
115661
|
var semver = __webpack_require__(81249);
|
|
115662
115662
|
var semver_default = /*#__PURE__*/__webpack_require__.n(semver);
|
|
115663
115663
|
;// CONCATENATED MODULE: ./package.json
|
|
115664
|
-
const package_namespaceObject = JSON.parse('{"i8":"0.19.
|
|
115664
|
+
const package_namespaceObject = JSON.parse('{"i8":"0.19.1","h$":{"Mx":">=0.6.0"}}');
|
|
115665
115665
|
// EXTERNAL MODULE: ./node_modules/axios/index.js
|
|
115666
115666
|
var axios = __webpack_require__(9669);
|
|
115667
115667
|
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
package/lib/src/App.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import './App.css';
|
|
3
|
+
interface Props {
|
|
4
|
+
beeApiUrl?: string;
|
|
5
|
+
beeDebugApiUrl?: string;
|
|
6
|
+
lockedApiSettings?: boolean;
|
|
7
|
+
isBeeDesktop?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const App: ({ beeApiUrl, beeDebugApiUrl, lockedApiSettings, isBeeDesktop }: Props) => ReactElement;
|
|
10
|
+
export default App;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { SwarmButtonProps } from './SwarmButton';
|
|
3
|
+
interface Props {
|
|
4
|
+
icon: ReactElement;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
buttonProps: SwarmButtonProps;
|
|
8
|
+
status: 'ok' | 'error';
|
|
9
|
+
}
|
|
10
|
+
export default function Card({ buttonProps, icon, title, subtitle, status }: Props): ReactElement;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, ErrorInfo, ReactElement } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactElement;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
error: Error | null;
|
|
7
|
+
}
|
|
8
|
+
export default class ErrorBoundary extends Component<Props, State> {
|
|
9
|
+
constructor(props: Props);
|
|
10
|
+
static getDerivedStateFromError(error: Error): {
|
|
11
|
+
error: Error;
|
|
12
|
+
};
|
|
13
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
14
|
+
render(): ReactElement;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
expandable: ReactNode;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default function ExpandableElement({ children, expandable, defaultOpen }: Props): ReactElement | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
info?: ReactNode;
|
|
6
|
+
level?: 0 | 1 | 2;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function ExpandableList({ children, label, level, defaultOpen, info }: Props): ReactElement | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { RemixiconReactIconProps } from 'remixicon-react';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
expandedOnly?: boolean;
|
|
9
|
+
confirmLabel?: string;
|
|
10
|
+
confirmLabelDisabled?: boolean;
|
|
11
|
+
confirmIcon?: React.ComponentType<RemixiconReactIconProps>;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
onConfirm?: (value: string) => void;
|
|
15
|
+
mapperFn?: (value: string) => string;
|
|
16
|
+
locked?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export default function ExpandableListItemKey({ label, value, onConfirm, onChange, confirmLabel, confirmLabelDisabled, confirmIcon, expandedOnly, helperText, placeholder, loading, mapperFn, locked, }: Props): ReactElement | null;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
link?: string;
|
|
6
|
+
navigationType?: 'NEW_WINDOW' | 'HISTORY_PUSH';
|
|
7
|
+
allowClipboard?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function ExpandableListItemLink({ label, value, link, navigationType, allowClipboard, }: Props): ReactElement | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { HISTORY_KEYS } from '../utils/local-storage';
|
|
3
|
+
interface Props {
|
|
4
|
+
title: string;
|
|
5
|
+
localStorageKey: HISTORY_KEYS;
|
|
6
|
+
}
|
|
7
|
+
export declare function History({ title, localStorageKey }: Props): ReactElement | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
iconStart?: ReactNode;
|
|
4
|
+
iconEnd?: ReactNode;
|
|
5
|
+
path?: string;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
pathMatcherSubstring?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function SideBarItem({ iconStart, iconEnd, path, label, pathMatcherSubstring }: Props): ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import { CheckState } from '../providers/Bee';
|
|
3
|
+
interface Props {
|
|
4
|
+
checkState: CheckState;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
size?: number | string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function StatusIcon({ checkState, size, className, isLoading }: Props): ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonProps } from '@material-ui/core';
|
|
2
|
+
import React, { ReactElement } from 'react';
|
|
3
|
+
import type { RemixiconReactIconProps } from 'remixicon-react';
|
|
4
|
+
export interface SwarmButtonProps extends ButtonProps {
|
|
5
|
+
iconType: React.ComponentType<RemixiconReactIconProps>;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
cancel?: boolean;
|
|
8
|
+
variant?: 'text' | 'contained' | 'outlined';
|
|
9
|
+
}
|
|
10
|
+
export declare function SwarmButton({ children, onClick, iconType, className, disabled, loading, cancel, variant, style, ...other }: SwarmButtonProps): ReactElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export declare type SelectEvent = React.ChangeEvent<{
|
|
3
|
+
name?: string | undefined;
|
|
4
|
+
value: unknown;
|
|
5
|
+
}>;
|
|
6
|
+
interface Props {
|
|
7
|
+
label?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
options: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
onChange?: (event: SelectEvent) => void;
|
|
14
|
+
formik?: boolean;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function SwarmSelect({ defaultValue, formik, name, options, onChange, label, placeholder, }: Props): ReactElement;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeEvent, ReactElement } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
password?: boolean;
|
|
6
|
+
formik?: boolean;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function SwarmTextInput({ name, label, password, optional, formik, onChange, defaultValue, placeholder, }: Props): ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
interface TabsValues {
|
|
3
|
+
component: ReactNode;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
values: TabsValues[];
|
|
8
|
+
index?: number;
|
|
9
|
+
indexChanged?: (index: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export default function SimpleTabs({ values, index, indexChanged }: Props): ReactElement;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { BigNumber } from 'bignumber.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
successMessage: string;
|
|
5
|
+
errorMessage: string;
|
|
6
|
+
dialogMessage: string;
|
|
7
|
+
label: string;
|
|
8
|
+
max?: BigNumber;
|
|
9
|
+
min?: BigNumber;
|
|
10
|
+
action: (amount: bigint) => Promise<string>;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export default function WithdrawDepositModal({ successMessage, errorMessage, dialogMessage, min, max, label, action, icon, }: Props): ReactElement;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare class Config {
|
|
2
|
+
readonly BEE_API_HOST: string;
|
|
3
|
+
readonly BEE_DEBUG_API_HOST: string;
|
|
4
|
+
readonly BLOCKCHAIN_EXPLORER_URL: string;
|
|
5
|
+
readonly BEE_DOCS_HOST: string;
|
|
6
|
+
readonly BEE_DISCORD_HOST: string;
|
|
7
|
+
readonly GITHUB_REPO_URL: string;
|
|
8
|
+
readonly BEE_DESKTOP_ENABLED: boolean;
|
|
9
|
+
readonly BEE_DESKTOP_URL: string;
|
|
10
|
+
readonly SENTRY_KEY: string | undefined;
|
|
11
|
+
readonly SENTRY_ENVIRONMENT: string | undefined;
|
|
12
|
+
readonly DEFAULT_RPC_URL: string;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
export declare const config: Config;
|
|
16
|
+
export default config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const META_FILE_NAME = ".swarmgatewaymeta.json";
|
|
2
|
+
export declare const PREVIEW_FILE_NAME = ".swarmgatewaypreview.jpeg";
|
|
3
|
+
export declare const PREVIEW_DIMENSIONS: {
|
|
4
|
+
maxWidth: number;
|
|
5
|
+
maxHeight: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const BZZ_LINK_DOMAIN: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BeeDebug } from '@ethersphere/bee-js';
|
|
2
|
+
import { Token } from '../models/Token';
|
|
3
|
+
import { Balance, Settlements } from '../types';
|
|
4
|
+
interface UseAccountingHook {
|
|
5
|
+
isLoadingUncashed: boolean;
|
|
6
|
+
totalUncashed: Token;
|
|
7
|
+
accounting: Accounting[] | null;
|
|
8
|
+
}
|
|
9
|
+
export interface Accounting {
|
|
10
|
+
peer: string;
|
|
11
|
+
uncashedAmount: Token;
|
|
12
|
+
balance: Token;
|
|
13
|
+
received: Token;
|
|
14
|
+
sent: Token;
|
|
15
|
+
total: Token;
|
|
16
|
+
}
|
|
17
|
+
export declare const useAccounting: (beeDebugApi: BeeDebug | null, settlements: Settlements | null, balances: Balance[] | null) => UseAccountingHook;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface LatestBeeReleaseHook {
|
|
2
|
+
latestBeeRelease: LatestBeeRelease | null;
|
|
3
|
+
isLoadingLatestBeeRelease: boolean;
|
|
4
|
+
error: Error | null;
|
|
5
|
+
}
|
|
6
|
+
export interface IsBeeDesktopHook {
|
|
7
|
+
error: Error | null;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
beeDesktopVersion: string;
|
|
10
|
+
desktopAutoUpdateEnabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface NewDesktopVersionHook {
|
|
13
|
+
newBeeDesktopVersion: string;
|
|
14
|
+
}
|
|
15
|
+
interface Config {
|
|
16
|
+
BEE_DESKTOP_URL: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Detect if the dashboard is run within bee-desktop
|
|
20
|
+
*
|
|
21
|
+
* @returns isBeeDesktop true if this is run within bee-desktop
|
|
22
|
+
*/
|
|
23
|
+
export declare const useIsBeeDesktop: (isBeeDesktop?: boolean, conf?: Config) => IsBeeDesktopHook;
|
|
24
|
+
export declare function useNewBeeDesktopVersion(isBeeDesktop: boolean, conf?: Config): NewDesktopVersionHook;
|
|
25
|
+
export interface BeeConfig {
|
|
26
|
+
'api-addr': string;
|
|
27
|
+
'debug-api-addr': string;
|
|
28
|
+
'debug-api-enable': boolean;
|
|
29
|
+
password: string;
|
|
30
|
+
'swap-enable': boolean;
|
|
31
|
+
'swap-initial-deposit': bigint;
|
|
32
|
+
mainnet: boolean;
|
|
33
|
+
'full-node': boolean;
|
|
34
|
+
'chain-enable': boolean;
|
|
35
|
+
'cors-allowed-origins': string;
|
|
36
|
+
'resolver-options': string;
|
|
37
|
+
'use-postage-snapshot': boolean;
|
|
38
|
+
'data-dir': string;
|
|
39
|
+
transaction: string;
|
|
40
|
+
'block-hash': string;
|
|
41
|
+
'swap-endpoint'?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface GetBeeConfig {
|
|
44
|
+
config: BeeConfig | null;
|
|
45
|
+
isLoading: boolean;
|
|
46
|
+
error: Error | null;
|
|
47
|
+
}
|
|
48
|
+
export declare const useGetBeeConfig: (conf?: Config) => GetBeeConfig;
|
|
49
|
+
export declare const useLatestBeeRelease: () => LatestBeeReleaseHook;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.css';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BigNumber } from 'bignumber.js';
|
|
2
|
+
declare const POSSIBLE_DECIMALS: number[];
|
|
3
|
+
declare type digits = typeof POSSIBLE_DECIMALS[number];
|
|
4
|
+
export declare class Token {
|
|
5
|
+
private amount;
|
|
6
|
+
private readonly decimals;
|
|
7
|
+
constructor(amount: BigNumber | string | bigint, decimals?: digits);
|
|
8
|
+
/**
|
|
9
|
+
* Construct new Token from a digit representation
|
|
10
|
+
*
|
|
11
|
+
* @param amount Amount of a token in the digits (1 token = 10^decimals)
|
|
12
|
+
* @param decimals Number of decimals for the token (must be integer)
|
|
13
|
+
*
|
|
14
|
+
* @throws {TypeError} If the decimals is not an integer or the amount after conversion is not an integer
|
|
15
|
+
*
|
|
16
|
+
* @returns new Token
|
|
17
|
+
*/
|
|
18
|
+
static fromDecimal(amount: BigNumber | string | bigint, decimals?: digits): Token | never;
|
|
19
|
+
get toBigInt(): bigint;
|
|
20
|
+
get toString(): string;
|
|
21
|
+
get toBigNumber(): BigNumber;
|
|
22
|
+
get toDecimal(): BigNumber;
|
|
23
|
+
toFixedDecimal(digits?: number): string;
|
|
24
|
+
toSignificantDigits(digits?: number): string;
|
|
25
|
+
minusBaseUnits(amount: string): Token;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|