@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { NodeAddresses, Topology } from '@ethersphere/bee-js';
|
|
2
|
+
import type { Token } from './models/Token';
|
|
3
|
+
import { CheckState } from './providers/Bee';
|
|
4
|
+
export interface StatusHookCommon {
|
|
5
|
+
checkState: CheckState;
|
|
6
|
+
}
|
|
7
|
+
export interface StatusNodeVersionHook extends StatusHookCommon {
|
|
8
|
+
userVersion?: string;
|
|
9
|
+
latestVersion?: string;
|
|
10
|
+
latestUrl: string;
|
|
11
|
+
isLatestBeeVersion: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface StatusEthereumConnectionHook extends StatusHookCommon {
|
|
14
|
+
nodeAddresses: NodeAddresses | null;
|
|
15
|
+
}
|
|
16
|
+
export interface StatusTopologyHook extends StatusHookCommon {
|
|
17
|
+
topology: Topology | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ChequebookBalance {
|
|
20
|
+
totalBalance: Token;
|
|
21
|
+
availableBalance: Token;
|
|
22
|
+
}
|
|
23
|
+
export interface Balance {
|
|
24
|
+
peer: string;
|
|
25
|
+
balance: Token;
|
|
26
|
+
}
|
|
27
|
+
export interface Settlement {
|
|
28
|
+
peer: string;
|
|
29
|
+
received: Token;
|
|
30
|
+
sent: Token;
|
|
31
|
+
}
|
|
32
|
+
export interface Settlements {
|
|
33
|
+
totalReceived: Token;
|
|
34
|
+
totalSent: Token;
|
|
35
|
+
settlements: Settlement[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const BZZ_TOKEN_ADDRESS = "0xdBF3Ea6F5beE45c02255B2c26a16F300502F68da";
|
|
2
|
+
export declare const bzzABI: {
|
|
3
|
+
type: string;
|
|
4
|
+
stateMutability: string;
|
|
5
|
+
payable: boolean;
|
|
6
|
+
outputs: {
|
|
7
|
+
type: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}[];
|
|
10
|
+
name: string;
|
|
11
|
+
inputs: {
|
|
12
|
+
type: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}[];
|
|
15
|
+
constant: boolean;
|
|
16
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestBzz(address: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function chainIdToName(chainId: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPrettyDateString(date: Date): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Token } from '../models/Token';
|
|
2
|
+
interface DesktopStatus {
|
|
3
|
+
status: 0 | 1 | 2;
|
|
4
|
+
address: string | null;
|
|
5
|
+
config: Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ethersphere/bee-desktop/releases/latest";
|
|
8
|
+
export declare function getDesktopStatus(): Promise<DesktopStatus>;
|
|
9
|
+
export declare function getBzzPriceAsDai(): Promise<Token>;
|
|
10
|
+
export declare function upgradeToLightNode(rpcProvider: string): Promise<void>;
|
|
11
|
+
export declare function setJsonRpcInDesktop(value: string): Promise<void>;
|
|
12
|
+
export declare function restartBeeNode(): Promise<void>;
|
|
13
|
+
export declare function createGiftWallet(address: string): Promise<void>;
|
|
14
|
+
export declare function performSwap(daiAmount: string): Promise<void>;
|
|
15
|
+
export declare function getBeeDesktopLogs(): Promise<string>;
|
|
16
|
+
export declare function getBeeLogs(): Promise<string>;
|
|
17
|
+
export declare function getLatestBeeDesktopVersion(): Promise<string>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface DetectedIndex {
|
|
2
|
+
indexPath: string;
|
|
3
|
+
commonPrefix?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function detectIndexHtml(files: FilePath[]): DetectedIndex | false;
|
|
6
|
+
export declare function getHumanReadableFileSize(bytes: number): string;
|
|
7
|
+
export declare function getAssetNameFromFiles(files: FilePath[]): string;
|
|
8
|
+
export declare function getMetadata(files: FilePath[]): Metadata;
|
|
9
|
+
export declare function getPath(file: FilePath): string;
|
|
10
|
+
/**
|
|
11
|
+
* Utility function that is needed to have correct directory structure as webkitRelativePath is read only
|
|
12
|
+
*/
|
|
13
|
+
export declare function packageFile(file: FilePath, pathOverwrite?: string): FilePath;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shortenHash(hash: string, sliceLength?: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Bee, BeeDebug } from '@ethersphere/bee-js';
|
|
2
|
+
import { Wallet } from 'ethers';
|
|
3
|
+
import { Identity, IdentityType } from '../providers/Feeds';
|
|
4
|
+
export declare function generateWallet(): Wallet;
|
|
5
|
+
export declare function persistIdentity(identities: Identity[], identity: Identity): void;
|
|
6
|
+
export declare function persistIdentitiesWithoutUpdate(identities: Identity[]): void;
|
|
7
|
+
export declare function convertWalletToIdentity(identity: Wallet, type: IdentityType, name: string, password?: string): Promise<Identity>;
|
|
8
|
+
export declare function importIdentity(name: string, data: string): Promise<Identity | null>;
|
|
9
|
+
export declare function updateFeed(beeApi: Bee, beeDebugApi: BeeDebug | null, identity: Identity, hash: string, stamp: string, password?: string): Promise<void>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface Dimensions {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Get the dimensions of the image after resize
|
|
7
|
+
*
|
|
8
|
+
* @param imgWidth Current image width
|
|
9
|
+
* @param imgHeight Current image height
|
|
10
|
+
* @param maxWidth Desired max width
|
|
11
|
+
* @param maxHeight Desired max height
|
|
12
|
+
*
|
|
13
|
+
* @returns Downscaled dimensions of the image to fit in the bounding box
|
|
14
|
+
*/
|
|
15
|
+
export declare function getDimensions(imgWidth: number, imgHeight: number, maxWidth?: number, maxHeight?: number): Dimensions;
|
|
16
|
+
/**
|
|
17
|
+
* Resize image passed to fit in the bounding box defined with maxWidth and maxHeight.
|
|
18
|
+
* Note that one or both of the bounding box dimensions may be omitted
|
|
19
|
+
*
|
|
20
|
+
* @param file Image file to be resized
|
|
21
|
+
* @param maxWidth Maximal image width
|
|
22
|
+
* @param maxHeight Maximal image height
|
|
23
|
+
*
|
|
24
|
+
* @returns Promise that resolves into the resized image blob
|
|
25
|
+
*/
|
|
26
|
+
export declare function resize(file: File, maxWidth?: number, maxHeight?: number): Promise<Blob>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { BatchId, BeeDebug, PostageBatch } from '@ethersphere/bee-js';
|
|
2
|
+
import { BigNumber } from 'bignumber.js';
|
|
3
|
+
import { Token } from '../models/Token';
|
|
4
|
+
/**
|
|
5
|
+
* Test if value is an integer
|
|
6
|
+
*
|
|
7
|
+
* @param value Value to be tested if it is an integer
|
|
8
|
+
*
|
|
9
|
+
* @returns True if the passed in value is integer
|
|
10
|
+
*/
|
|
11
|
+
export declare function isInteger(value: unknown): value is BigNumber | bigint;
|
|
12
|
+
/**
|
|
13
|
+
*Convert value into a BigNumber if not already
|
|
14
|
+
*
|
|
15
|
+
* @param value Value to be converted
|
|
16
|
+
*
|
|
17
|
+
* @throws {TypeError} if the value is not convertible to a BigNumber
|
|
18
|
+
*
|
|
19
|
+
* @returns BigNumber - but it may still be NaN or Infinite
|
|
20
|
+
*/
|
|
21
|
+
export declare function makeBigNumber(value: BigNumber | bigint | number | string): BigNumber | never;
|
|
22
|
+
export declare type PromiseSettlements<T> = {
|
|
23
|
+
fulfilled: PromiseFulfilledResult<T>[];
|
|
24
|
+
rejected: PromiseRejectedResult[];
|
|
25
|
+
};
|
|
26
|
+
export declare type UnwrappedPromiseSettlements<T> = {
|
|
27
|
+
fulfilled: T[];
|
|
28
|
+
rejected: string[];
|
|
29
|
+
};
|
|
30
|
+
export declare function sleepMs(ms: number): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Maps the returned results of `Promise.allSettled` to an object
|
|
33
|
+
* with `fulfilled` and `rejected` arrays for easy access.
|
|
34
|
+
*
|
|
35
|
+
* The results still need to be unwrapped to get the fulfilled values or rejection reasons.
|
|
36
|
+
*/
|
|
37
|
+
export declare function mapPromiseSettlements<T>(promises: PromiseSettledResult<T>[]): PromiseSettlements<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Maps the returned values of `Promise.allSettled` to an object
|
|
40
|
+
* with `fulfilled` and `rejected` arrays for easy access.
|
|
41
|
+
*
|
|
42
|
+
* For rejected promises, the value is the stringified `reason`,
|
|
43
|
+
* or `'Unknown error'` string when it is unavailable.
|
|
44
|
+
*/
|
|
45
|
+
export declare function unwrapPromiseSettlements<T>(promiseSettledResults: PromiseSettledResult<T>[]): UnwrappedPromiseSettlements<T>;
|
|
46
|
+
/**
|
|
47
|
+
* Wraps a `Promise<T>` or async function inside a new `Promise<T>`,
|
|
48
|
+
* which retries the original function up to `maxRetries` times,
|
|
49
|
+
* waiting `delayMs` milliseconds between failed attempts.
|
|
50
|
+
*
|
|
51
|
+
* If all attempts fail, then this `Promise<T>` also rejects.
|
|
52
|
+
*/
|
|
53
|
+
export declare function makeRetriablePromise<T>(fn: () => Promise<T>, maxRetries?: number, delayMs?: number): Promise<T>;
|
|
54
|
+
export declare function extractSwarmHash(string: string): string | undefined;
|
|
55
|
+
export declare function extractSwarmCid(s: string): string | undefined;
|
|
56
|
+
export declare const regexpEns: RegExp;
|
|
57
|
+
export declare function extractEns(value: string): string | undefined;
|
|
58
|
+
export declare function recognizeEnsOrSwarmHash(value: string): string;
|
|
59
|
+
export declare function uuidV4(): string;
|
|
60
|
+
export declare function formatEnum(string: string): string;
|
|
61
|
+
export declare function secondsToTimeString(seconds: number): string;
|
|
62
|
+
export declare function convertDepthToBytes(depth: number): number;
|
|
63
|
+
export declare function convertAmountToSeconds(amount: number, pricePerBlock: number): number;
|
|
64
|
+
export declare function calculateStampPrice(depth: number, amount: bigint): Token;
|
|
65
|
+
export declare function shortenText(text: string, length?: number, separator?: string): string;
|
|
66
|
+
interface Options {
|
|
67
|
+
pollingFrequency?: number;
|
|
68
|
+
timeout?: number;
|
|
69
|
+
}
|
|
70
|
+
export declare function waitUntilStampUsable(batchId: BatchId, beeDebug: BeeDebug, options?: Options): Promise<PostageBatch>;
|
|
71
|
+
export declare function waitUntilStampExists(batchId: BatchId, beeDebug: BeeDebug, options?: Options): Promise<PostageBatch>;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum HISTORY_KEYS {
|
|
2
|
+
UPLOAD_HISTORY = "UPLOAD_HISTORY",
|
|
3
|
+
DOWNLOAD_HISTORY = "DOWNLOAD_HISTORY"
|
|
4
|
+
}
|
|
5
|
+
export interface HistoryItem {
|
|
6
|
+
createdAt: number;
|
|
7
|
+
name: string;
|
|
8
|
+
hash: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function putHistory(key: string, hash: string, name: string): void;
|
|
11
|
+
export declare function getHistorySafe(key: string): HistoryItem[];
|
|
12
|
+
export declare function determineHistoryName(hash: string, indexDocument?: string | null): string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function getJson<T extends Record<string, any>>(url: string): Promise<T>;
|
|
2
|
+
export declare function postJson<T extends Record<string, any>>(url: string, data?: T): Promise<T>;
|
|
3
|
+
export declare function sendRequest(url: string, method: 'GET' | 'POST', data?: Record<string, unknown>): Promise<Record<string, any>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { providers, BigNumber as BN } from 'ethers';
|
|
2
|
+
declare function eth_getBalance(address: string, provider: providers.JsonRpcProvider): Promise<string>;
|
|
3
|
+
declare function eth_getBlockByNumber(provider: providers.JsonRpcProvider): Promise<string>;
|
|
4
|
+
declare function eth_getBalanceERC20(address: string, provider: providers.JsonRpcProvider, tokenAddress?: string): Promise<string>;
|
|
5
|
+
interface TransferResponse {
|
|
6
|
+
transaction: providers.TransactionResponse;
|
|
7
|
+
receipt: providers.TransactionReceipt;
|
|
8
|
+
}
|
|
9
|
+
export declare function estimateNativeTransferTransactionCost(privateKey: string, jsonRpcProvider: string): Promise<{
|
|
10
|
+
gasPrice: BN;
|
|
11
|
+
totalCost: BN;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function sendNativeTransaction(privateKey: string, to: string, value: string, jsonRpcProvider: string, externalGasPrice?: BN): Promise<TransferResponse>;
|
|
14
|
+
export declare function sendBzzTransaction(privateKey: string, to: string, value: string, jsonRpcProvider: string): Promise<TransferResponse>;
|
|
15
|
+
export declare const Rpc: {
|
|
16
|
+
sendNativeTransaction: typeof sendNativeTransaction;
|
|
17
|
+
sendBzzTransaction: typeof sendBzzTransaction;
|
|
18
|
+
_eth_getBalance: typeof eth_getBalance;
|
|
19
|
+
_eth_getBalanceERC20: typeof eth_getBalanceERC20;
|
|
20
|
+
eth_getBalance: typeof eth_getBalance & import("@material-ui/core/utils/debounce").Cancelable;
|
|
21
|
+
eth_getBalanceERC20: typeof eth_getBalanceERC20 & import("@material-ui/core/utils/debounce").Cancelable;
|
|
22
|
+
eth_getBlockByNumber: typeof eth_getBlockByNumber;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initSentry(): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface Threshold {
|
|
2
|
+
minimumValue: number;
|
|
3
|
+
explanation: string;
|
|
4
|
+
score: number;
|
|
5
|
+
}
|
|
6
|
+
declare type Thresholds = {
|
|
7
|
+
connectedPeers: Threshold[];
|
|
8
|
+
population: Threshold[];
|
|
9
|
+
depth: Threshold[];
|
|
10
|
+
};
|
|
11
|
+
declare type ThresholdValue = {
|
|
12
|
+
score: number;
|
|
13
|
+
maximumScore: number;
|
|
14
|
+
explanation: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type ThresholdValues = {
|
|
17
|
+
connectedPeers: ThresholdValue;
|
|
18
|
+
population: ThresholdValue;
|
|
19
|
+
depth: ThresholdValue;
|
|
20
|
+
};
|
|
21
|
+
export declare function pickThreshold(key: keyof Thresholds, value: number): ThresholdValue;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { providers, Wallet } from 'ethers';
|
|
2
|
+
import { BzzToken } from '../models/BzzToken';
|
|
3
|
+
import { DaiToken } from '../models/DaiToken';
|
|
4
|
+
export declare class WalletAddress {
|
|
5
|
+
address: string;
|
|
6
|
+
bzz: BzzToken;
|
|
7
|
+
dai: DaiToken;
|
|
8
|
+
provider: providers.JsonRpcProvider;
|
|
9
|
+
private constructor();
|
|
10
|
+
static make(address: string, provider: providers.JsonRpcProvider): Promise<WalletAddress>;
|
|
11
|
+
refresh(): Promise<WalletAddress>;
|
|
12
|
+
}
|
|
13
|
+
export declare class ResolvedWallet {
|
|
14
|
+
wallet: Wallet;
|
|
15
|
+
bzz: BzzToken;
|
|
16
|
+
dai: DaiToken;
|
|
17
|
+
provider: providers.JsonRpcProvider;
|
|
18
|
+
address: string;
|
|
19
|
+
privateKey: string;
|
|
20
|
+
private constructor();
|
|
21
|
+
static make(privateKeyOrWallet: string | Wallet, provider: providers.JsonRpcProvider): Promise<ResolvedWallet>;
|
|
22
|
+
refresh(): Promise<ResolvedWallet>;
|
|
23
|
+
transfer(destination: string, jsonRpcProvider: string): Promise<void>;
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethersphere/bee-dashboard",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bee",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"start": "react-scripts start",
|
|
130
130
|
"desktop": "node ./desktop.mjs",
|
|
131
131
|
"build": "react-scripts build",
|
|
132
|
-
"build:component": "rimraf ./lib && webpack --mode=production",
|
|
132
|
+
"build:component": "rimraf ./lib && webpack --mode=production && npm run compile:types",
|
|
133
133
|
"compile:types": "tsc --project tsconfig.lib.json --emitDeclarationOnly --declaration",
|
|
134
134
|
"test": "react-scripts test",
|
|
135
135
|
"test:ui": "node ui-test/index.js",
|