@ethersphere/bee-js 12.3.2-upcoming.116 → 13.0.0-upcoming.gc013bdf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/balance.js +24 -0
- package/dist/cjs/api/batches.js +26 -0
- package/dist/cjs/{modules → api}/bytes.js +4 -29
- package/dist/cjs/{modules → api}/bzz.js +6 -34
- package/dist/cjs/{modules/debug → api}/chequebook.js +48 -87
- package/dist/cjs/api/chunk.js +43 -0
- package/dist/cjs/api/connectivity.js +86 -0
- package/dist/cjs/api/consumed.js +24 -0
- package/dist/cjs/{modules → api}/envelope.js +3 -2
- package/dist/cjs/api/feed.js +55 -0
- package/dist/cjs/api/grantee.js +62 -0
- package/dist/cjs/{modules/pinning.js → api/pin.js} +13 -34
- package/dist/cjs/api/pss.js +19 -0
- package/dist/cjs/api/redistributionstate.js +17 -0
- package/dist/cjs/{modules/debug/settlements.js → api/settlement.js} +3 -11
- package/dist/cjs/api/soc.js +34 -0
- package/dist/cjs/{modules/debug → api}/stake.js +15 -43
- package/dist/cjs/{modules/debug/stamps.js → api/stamp.js} +41 -57
- package/dist/cjs/api/status.js +67 -0
- package/dist/cjs/{modules → api}/stewardship.js +1 -6
- package/dist/cjs/api/tag.js +51 -0
- package/dist/cjs/{modules/debug/transactions.js → api/transaction.js} +10 -31
- package/dist/cjs/{modules/debug/states.js → api/wallet.js} +4 -36
- package/dist/cjs/bee.js +115 -1978
- package/dist/cjs/chunk/soc.js +23 -65
- package/dist/cjs/feed/identifier.js +3 -4
- package/dist/cjs/feed/index.js +20 -22
- package/dist/cjs/feed/retrievable.js +3 -3
- package/dist/cjs/index.js +18 -8
- package/dist/cjs/manifest/manifest.js +99 -335
- package/dist/cjs/modules/balance.js +86 -0
- package/dist/cjs/modules/cheque.js +92 -0
- package/dist/cjs/modules/chequebook.js +90 -0
- package/dist/cjs/modules/chunk.js +87 -53
- package/dist/cjs/modules/collection.js +145 -0
- package/dist/cjs/modules/connectivity.js +141 -0
- package/dist/cjs/modules/context.js +2 -0
- package/dist/cjs/modules/data.js +119 -0
- package/dist/cjs/modules/feed.js +94 -70
- package/dist/cjs/modules/file.js +113 -0
- package/dist/cjs/modules/grantee.js +86 -55
- package/dist/cjs/modules/messaging.js +248 -0
- package/dist/cjs/modules/pin.js +100 -0
- package/dist/cjs/modules/settlement.js +67 -0
- package/dist/cjs/modules/soc.js +39 -36
- package/dist/cjs/modules/stake.js +110 -0
- package/dist/cjs/modules/stamp.js +199 -0
- package/dist/cjs/modules/status.js +128 -20
- package/dist/cjs/modules/storage.js +191 -0
- package/dist/cjs/modules/tag.js +97 -71
- package/dist/cjs/modules/transaction.js +92 -0
- package/dist/cjs/modules/wallet.js +82 -0
- package/dist/cjs/types/schema/chequebook.js +5 -5
- package/dist/cjs/types/schema/connectivity.js +5 -5
- package/dist/cjs/types/schema/envelope.js +5 -5
- package/dist/cjs/types/schema/grantee.js +4 -4
- package/dist/cjs/types/schema/stake.js +2 -2
- package/dist/cjs/types/schema/stamps.js +4 -4
- package/dist/cjs/types/schema/states.js +2 -2
- package/dist/cjs/types/schema/transactions.js +3 -3
- package/dist/cjs/types/schema/upload.js +2 -2
- package/dist/cjs/utils/chunk-stream.browser.js +24 -16
- package/dist/cjs/utils/chunk-stream.js +17 -9
- package/dist/cjs/utils/constants.js +3 -3
- package/dist/cjs/utils/expose.js +4 -4
- package/dist/cjs/utils/headers.js +4 -4
- package/dist/cjs/utils/pss.js +2 -2
- package/dist/cjs/utils/resource-locator.js +2 -2
- package/dist/cjs/utils/schema.js +4 -4
- package/dist/cjs/utils/stamps.js +15 -130
- package/dist/index.browser.min.js +2 -1
- package/dist/index.browser.min.js.LICENSE.txt +3 -0
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/api/balance.js +20 -0
- package/dist/mjs/api/batches.js +22 -0
- package/dist/mjs/{modules → api}/bytes.js +2 -27
- package/dist/mjs/{modules → api}/bzz.js +2 -30
- package/dist/mjs/{modules/debug → api}/chequebook.js +50 -89
- package/dist/mjs/api/chunk.js +37 -0
- package/dist/mjs/api/connectivity.js +76 -0
- package/dist/mjs/api/consumed.js +20 -0
- package/dist/mjs/{modules → api}/envelope.js +3 -2
- package/dist/mjs/api/feed.js +52 -0
- package/dist/mjs/api/grantee.js +59 -0
- package/dist/mjs/{modules/pinning.js → api/pin.js} +14 -35
- package/dist/mjs/api/pss.js +18 -0
- package/dist/mjs/api/redistributionstate.js +14 -0
- package/dist/mjs/{modules/debug/settlements.js → api/settlement.js} +3 -11
- package/dist/mjs/api/soc.js +31 -0
- package/dist/mjs/{modules/debug → api}/stake.js +14 -41
- package/dist/mjs/{modules/debug/stamps.js → api/stamp.js} +37 -51
- package/dist/mjs/api/status.js +59 -0
- package/dist/mjs/{modules → api}/stewardship.js +1 -6
- package/dist/mjs/api/tag.js +49 -0
- package/dist/mjs/api/transaction.js +41 -0
- package/dist/mjs/api/wallet.js +38 -0
- package/dist/mjs/bee.js +115 -1965
- package/dist/mjs/chunk/soc.js +13 -51
- package/dist/mjs/feed/identifier.js +2 -3
- package/dist/mjs/feed/index.js +9 -11
- package/dist/mjs/feed/retrievable.js +2 -2
- package/dist/mjs/index.js +2 -5
- package/dist/mjs/manifest/manifest.js +97 -341
- package/dist/mjs/modules/balance.js +49 -0
- package/dist/mjs/modules/cheque.js +55 -0
- package/dist/mjs/modules/chequebook.js +65 -0
- package/dist/mjs/modules/chunk.js +52 -49
- package/dist/mjs/modules/collection.js +108 -0
- package/dist/mjs/modules/connectivity.js +102 -0
- package/dist/mjs/modules/context.js +1 -0
- package/dist/mjs/modules/data.js +82 -0
- package/dist/mjs/modules/feed.js +89 -67
- package/dist/mjs/modules/file.js +78 -0
- package/dist/mjs/modules/grantee.js +52 -55
- package/dist/mjs/modules/messaging.js +213 -0
- package/dist/mjs/modules/pin.js +63 -0
- package/dist/mjs/modules/settlement.js +30 -0
- package/dist/mjs/modules/soc.js +36 -34
- package/dist/mjs/modules/stake.js +76 -0
- package/dist/mjs/modules/stamp.js +170 -0
- package/dist/mjs/modules/status.js +98 -18
- package/dist/mjs/modules/storage.js +185 -0
- package/dist/mjs/modules/tag.js +61 -68
- package/dist/mjs/modules/transaction.js +58 -0
- package/dist/mjs/modules/wallet.js +45 -0
- package/dist/mjs/types/schema/chequebook.js +1 -1
- package/dist/mjs/types/schema/connectivity.js +1 -1
- package/dist/mjs/types/schema/envelope.js +5 -5
- package/dist/mjs/types/schema/grantee.js +1 -1
- package/dist/mjs/types/schema/stake.js +1 -1
- package/dist/mjs/types/schema/stamps.js +1 -1
- package/dist/mjs/types/schema/states.js +1 -1
- package/dist/mjs/types/schema/transactions.js +1 -1
- package/dist/mjs/types/schema/upload.js +1 -1
- package/dist/mjs/utils/chunk-stream.browser.js +28 -18
- package/dist/mjs/utils/chunk-stream.js +21 -11
- package/dist/mjs/utils/constants.js +1 -1
- package/dist/mjs/utils/expose.js +1 -1
- package/dist/mjs/utils/headers.js +1 -1
- package/dist/mjs/utils/pss.js +1 -1
- package/dist/mjs/utils/resource-locator.js +1 -1
- package/dist/mjs/utils/schema.js +1 -1
- package/dist/mjs/utils/stamps.js +5 -99
- package/dist/types/api/balance.d.ts +7 -0
- package/dist/types/api/batches.d.ts +7 -0
- package/dist/types/api/bytes.d.ts +11 -0
- package/dist/types/api/bzz.d.ts +12 -0
- package/dist/types/api/chequebook.d.ts +21 -0
- package/dist/types/api/chunk.d.ts +7 -0
- package/dist/types/api/connectivity.d.ts +22 -0
- package/dist/types/api/consumed.d.ts +7 -0
- package/dist/types/{modules → api}/envelope.d.ts +1 -1
- package/dist/types/api/feed.d.ts +40 -0
- package/dist/types/api/grantee.d.ts +11 -0
- package/dist/types/api/pin.d.ts +10 -0
- package/dist/types/api/pss.d.ts +6 -0
- package/dist/types/api/redistributionstate.d.ts +5 -0
- package/dist/types/api/settlement.d.ts +7 -0
- package/dist/types/api/soc.d.ts +6 -0
- package/dist/types/api/stake.d.ts +11 -0
- package/dist/types/api/stamp.d.ts +12 -0
- package/dist/types/api/status.d.ts +11 -0
- package/dist/types/api/stewardship.d.ts +7 -0
- package/dist/types/api/tag.d.ts +12 -0
- package/dist/types/api/transaction.d.ts +9 -0
- package/dist/types/api/wallet.d.ts +9 -0
- package/dist/types/bee.d.ts +71 -1199
- package/dist/types/chunk/soc.d.ts +3 -48
- package/dist/types/feed/identifier.d.ts +1 -1
- package/dist/types/feed/index.d.ts +2 -4
- package/dist/types/feed/retrievable.d.ts +1 -1
- package/dist/types/index.d.ts +17 -20
- package/dist/types/manifest/manifest.d.ts +25 -34
- package/dist/types/modules/balance.d.ts +38 -0
- package/dist/types/modules/cheque.d.ts +40 -0
- package/dist/types/modules/chequebook.d.ts +41 -0
- package/dist/types/modules/chunk.d.ts +30 -20
- package/dist/types/modules/collection.d.ts +77 -0
- package/dist/types/modules/connectivity.d.ts +74 -0
- package/dist/types/modules/context.d.ts +24 -0
- package/dist/types/modules/data.d.ts +55 -0
- package/dist/types/modules/feed.d.ts +47 -49
- package/dist/types/modules/file.d.ts +43 -0
- package/dist/types/modules/grantee.d.ts +40 -8
- package/dist/types/modules/messaging.d.ts +79 -0
- package/dist/types/modules/pin.d.ts +47 -0
- package/dist/types/modules/settlement.d.ts +25 -0
- package/dist/types/modules/soc.d.ts +23 -11
- package/dist/types/modules/stake.d.ts +55 -0
- package/dist/types/modules/stamp.d.ts +96 -0
- package/dist/types/modules/status.d.ts +66 -5
- package/dist/types/modules/storage.d.ts +107 -0
- package/dist/types/modules/tag.d.ts +44 -33
- package/dist/types/modules/transaction.d.ts +42 -0
- package/dist/types/modules/wallet.d.ts +35 -0
- package/dist/types/types/debug.d.ts +1 -1
- package/dist/types/types/index.d.ts +3 -12
- package/dist/types/types/schema/chequebook.d.ts +1 -1
- package/dist/types/types/schema/connectivity.d.ts +1 -1
- package/dist/types/types/schema/grantee.d.ts +1 -1
- package/dist/types/types/schema/stake.d.ts +1 -1
- package/dist/types/types/schema/stamps.d.ts +1 -1
- package/dist/types/types/schema/states.d.ts +1 -1
- package/dist/types/types/schema/transactions.d.ts +1 -1
- package/dist/types/types/schema/upload.d.ts +1 -1
- package/dist/types/utils/chunk-stream.browser.d.ts +1 -1
- package/dist/types/utils/chunk-stream.d.ts +2 -2
- package/dist/types/utils/constants.d.ts +1 -1
- package/dist/types/utils/expose.d.ts +1 -1
- package/dist/types/utils/headers.d.ts +1 -1
- package/dist/types/utils/pss.d.ts +1 -1
- package/dist/types/utils/resource-locator.d.ts +1 -1
- package/dist/types/utils/schema.d.ts +1 -1
- package/dist/types/utils/stamps.d.ts +2 -27
- package/dist/types/utils/tar-uploader.browser.d.ts +1 -1
- package/dist/types/utils/tar-uploader.d.ts +1 -1
- package/package.json +4 -2
- package/dist/cjs/chunk/bmt.js +0 -37
- package/dist/cjs/chunk/cac.js +0 -43
- package/dist/cjs/modules/debug/balance.js +0 -60
- package/dist/cjs/modules/debug/connectivity.js +0 -54
- package/dist/cjs/modules/debug/status.js +0 -104
- package/dist/cjs/modules/gsoc.js +0 -23
- package/dist/cjs/modules/pss.js +0 -48
- package/dist/cjs/stamper/stamper.js +0 -44
- package/dist/cjs/utils/bytes.js +0 -116
- package/dist/cjs/utils/cid.js +0 -37
- package/dist/cjs/utils/redundancy.js +0 -133
- package/dist/cjs/utils/typed-bytes.js +0 -186
- package/dist/mjs/chunk/bmt.js +0 -34
- package/dist/mjs/chunk/cac.js +0 -34
- package/dist/mjs/modules/debug/balance.js +0 -54
- package/dist/mjs/modules/debug/connectivity.js +0 -46
- package/dist/mjs/modules/debug/states.js +0 -68
- package/dist/mjs/modules/debug/status.js +0 -99
- package/dist/mjs/modules/debug/transactions.js +0 -62
- package/dist/mjs/modules/gsoc.js +0 -16
- package/dist/mjs/modules/pss.js +0 -43
- package/dist/mjs/stamper/stamper.js +0 -40
- package/dist/mjs/utils/bytes.js +0 -102
- package/dist/mjs/utils/cid.js +0 -32
- package/dist/mjs/utils/redundancy.js +0 -98
- package/dist/mjs/utils/typed-bytes.js +0 -167
- package/dist/types/chunk/bmt.d.ts +0 -16
- package/dist/types/chunk/cac.d.ts +0 -40
- package/dist/types/modules/bytes.d.ts +0 -35
- package/dist/types/modules/bzz.d.ts +0 -40
- package/dist/types/modules/debug/balance.d.ts +0 -28
- package/dist/types/modules/debug/chequebook.d.ts +0 -60
- package/dist/types/modules/debug/connectivity.d.ts +0 -9
- package/dist/types/modules/debug/settlements.d.ts +0 -15
- package/dist/types/modules/debug/stake.d.ts +0 -30
- package/dist/types/modules/debug/stamps.d.ts +0 -11
- package/dist/types/modules/debug/states.d.ts +0 -23
- package/dist/types/modules/debug/status.d.ts +0 -46
- package/dist/types/modules/debug/transactions.d.ts +0 -30
- package/dist/types/modules/gsoc.d.ts +0 -6
- package/dist/types/modules/pinning.d.ts +0 -30
- package/dist/types/modules/pss.d.ts +0 -22
- package/dist/types/modules/stewardship.d.ts +0 -10
- package/dist/types/stamper/stamper.d.ts +0 -15
- package/dist/types/utils/bytes.d.ts +0 -19
- package/dist/types/utils/cid.d.ts +0 -10
- package/dist/types/utils/redundancy.d.ts +0 -21
- package/dist/types/utils/typed-bytes.d.ts +0 -69
- /package/dist/cjs/{modules → api}/rchash.js +0 -0
- /package/dist/mjs/{modules → api}/rchash.js +0 -0
- /package/dist/types/{modules → api}/rchash.d.ts +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BeeRequestOptions, GlobalPostageBatch, NumberString, PostageBatch, PostageBatchBuckets, PostageBatchOptions, RedundancyLevel } from '../../types';
|
|
2
|
-
import { BatchId } from '../../utils/typed-bytes';
|
|
3
|
-
export declare function getGlobalPostageBatches(requestOptions: BeeRequestOptions): Promise<GlobalPostageBatch[]>;
|
|
4
|
-
export declare function getGlobalPostageBatch(requestOptions: BeeRequestOptions, postageBatchId: BatchId): Promise<GlobalPostageBatch>;
|
|
5
|
-
export declare function getAllPostageBatches(requestOptions: BeeRequestOptions): Promise<PostageBatch[]>;
|
|
6
|
-
export declare function getPostageBatch(requestOptions: BeeRequestOptions, postageBatchId: BatchId, encryption?: boolean, erasureCodeLevel?: RedundancyLevel): Promise<PostageBatch>;
|
|
7
|
-
export declare function getPostageBatchBuckets(requestOptions: BeeRequestOptions, postageBatchId: BatchId): Promise<PostageBatchBuckets>;
|
|
8
|
-
export declare function createPostageBatch(requestOptions: BeeRequestOptions, amount: NumberString, depth: number, options?: PostageBatchOptions): Promise<BatchId>;
|
|
9
|
-
export declare function updatePostageBatchLabel(requestOptions: BeeRequestOptions, id: BatchId, label: string): Promise<void>;
|
|
10
|
-
export declare function topUpBatch(requestOptions: BeeRequestOptions, id: BatchId, amount: NumberString): Promise<BatchId>;
|
|
11
|
-
export declare function diluteBatch(requestOptions: BeeRequestOptions, id: BatchId, depth: number): Promise<BatchId>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BeeRequestOptions, ChainState, ReserveState, WalletBalance } from '../../types';
|
|
2
|
-
import { BZZ, DAI } from '../../utils/tokens';
|
|
3
|
-
import { EthAddress, TransactionId } from '../../utils/typed-bytes';
|
|
4
|
-
/**
|
|
5
|
-
* Get state of reserve
|
|
6
|
-
*
|
|
7
|
-
* @param requestOptions Options for making requests
|
|
8
|
-
*/
|
|
9
|
-
export declare function getReserveState(requestOptions: BeeRequestOptions): Promise<ReserveState>;
|
|
10
|
-
/**
|
|
11
|
-
* Get state of reserve
|
|
12
|
-
*
|
|
13
|
-
* @param requestOptions Options for making requests
|
|
14
|
-
*/
|
|
15
|
-
export declare function getChainState(requestOptions: BeeRequestOptions): Promise<ChainState>;
|
|
16
|
-
/**
|
|
17
|
-
* Get wallet balances for xDai and BZZ of the node
|
|
18
|
-
*
|
|
19
|
-
* @param requestOptions Options for making requests
|
|
20
|
-
*/
|
|
21
|
-
export declare function getWalletBalance(requestOptions: BeeRequestOptions): Promise<WalletBalance>;
|
|
22
|
-
export declare function withdrawBZZ(requestOptions: BeeRequestOptions, amount: BZZ, address: EthAddress): Promise<TransactionId>;
|
|
23
|
-
export declare function withdrawDAI(requestOptions: BeeRequestOptions, amount: DAI, address: EthAddress): Promise<TransactionId>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { BeeRequestOptions } from '../../index';
|
|
2
|
-
import type { DebugStatus, Health, NodeInfo, Readiness } from '../../types/debug';
|
|
3
|
-
import { BeeVersions } from '../../types/debug';
|
|
4
|
-
export declare function getDebugStatus(requestOptions: BeeRequestOptions): Promise<DebugStatus>;
|
|
5
|
-
/**
|
|
6
|
-
* Get health of node
|
|
7
|
-
*
|
|
8
|
-
* @param requestOptions Options for making requests
|
|
9
|
-
*/
|
|
10
|
-
export declare function getHealth(requestOptions: BeeRequestOptions): Promise<Health>;
|
|
11
|
-
/**
|
|
12
|
-
* Get readiness of node
|
|
13
|
-
*
|
|
14
|
-
* @param requestOptions Options for making requests
|
|
15
|
-
*/
|
|
16
|
-
export declare function getReadiness(requestOptions: BeeRequestOptions): Promise<Readiness>;
|
|
17
|
-
/**
|
|
18
|
-
* Get information about Bee node
|
|
19
|
-
*
|
|
20
|
-
* @param requestOptions Options for making requests
|
|
21
|
-
*/
|
|
22
|
-
export declare function getNodeInfo(requestOptions: BeeRequestOptions): Promise<NodeInfo>;
|
|
23
|
-
/**
|
|
24
|
-
* Connects to a node and checks if its version matches with the one that bee-js supports.
|
|
25
|
-
*
|
|
26
|
-
* This is the most strict version check and most probably you will
|
|
27
|
-
* want to use the relaxed API-versions check `isSupportedApiVersion`.
|
|
28
|
-
*
|
|
29
|
-
* @param requestOptions Options for making requests
|
|
30
|
-
*/
|
|
31
|
-
export declare function isSupportedExactVersion(requestOptions: BeeRequestOptions): Promise<boolean>;
|
|
32
|
-
/**
|
|
33
|
-
* Connects to a node and checks if its Main API versions matches with the one that bee-js supports.
|
|
34
|
-
*
|
|
35
|
-
* This should be the main way how to check compatibility for your app and Bee node.
|
|
36
|
-
*
|
|
37
|
-
* @param requestOptions Options for making requests
|
|
38
|
-
*/
|
|
39
|
-
export declare function isSupportedApiVersion(requestOptions: BeeRequestOptions): Promise<boolean>;
|
|
40
|
-
/**
|
|
41
|
-
* Returns object with all versions specified by the connected Bee node (properties prefixed with `bee*`)
|
|
42
|
-
* and versions that bee-js supports (properties prefixed with `supported*`).
|
|
43
|
-
*
|
|
44
|
-
* @param requestOptions Options for making requests
|
|
45
|
-
*/
|
|
46
|
-
export declare function getVersions(requestOptions: BeeRequestOptions): Promise<BeeVersions>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { BeeRequestOptions, NumberString, TransactionInfo } from '../../types';
|
|
2
|
-
import { TransactionId } from '../../utils/typed-bytes';
|
|
3
|
-
/**
|
|
4
|
-
* Get list of all pending transactions
|
|
5
|
-
*
|
|
6
|
-
* @param requestOptions Options for making requests
|
|
7
|
-
*/
|
|
8
|
-
export declare function getAllTransactions(requestOptions: BeeRequestOptions): Promise<TransactionInfo[]>;
|
|
9
|
-
/**
|
|
10
|
-
* Get information for specific pending transactions
|
|
11
|
-
*
|
|
12
|
-
* @param requestOptions Options for making requests
|
|
13
|
-
* @param transactionHash Hash of the transaction
|
|
14
|
-
*/
|
|
15
|
-
export declare function getTransaction(requestOptions: BeeRequestOptions, transactionHash: TransactionId): Promise<TransactionInfo>;
|
|
16
|
-
/**
|
|
17
|
-
* Rebroadcast existing transaction
|
|
18
|
-
*
|
|
19
|
-
* @param requestOptions Options for making requests
|
|
20
|
-
* @param transactionHash Hash of the transaction
|
|
21
|
-
*/
|
|
22
|
-
export declare function rebroadcastTransaction(requestOptions: BeeRequestOptions, transactionHash: TransactionId): Promise<TransactionId>;
|
|
23
|
-
/**
|
|
24
|
-
* Cancel existing transaction
|
|
25
|
-
*
|
|
26
|
-
* @param requestOptions Options for making requests
|
|
27
|
-
* @param transactionHash Hash of the transaction
|
|
28
|
-
* @param gasPrice Optional gas price
|
|
29
|
-
*/
|
|
30
|
-
export declare function cancelTransaction(requestOptions: BeeRequestOptions, transactionHash: TransactionId, gasPrice?: NumberString | string | bigint): Promise<TransactionId>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import WebSocket from 'isomorphic-ws';
|
|
2
|
-
import { BeeRequestOptions, UploadOptions } from '..';
|
|
3
|
-
import { SingleOwnerChunk } from '../chunk/soc';
|
|
4
|
-
import { BatchId, Reference } from '../utils/typed-bytes';
|
|
5
|
-
export declare function send(requestOptions: BeeRequestOptions, soc: SingleOwnerChunk, stamp: BatchId, options?: UploadOptions): Promise<import("..").UploadResult>;
|
|
6
|
-
export declare function subscribe(url: string, reference: Reference, headers?: Record<string, string>): WebSocket;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { BeeRequestOptions, Pin } from '../types';
|
|
2
|
-
import { Reference } from '../utils/typed-bytes';
|
|
3
|
-
/**
|
|
4
|
-
* Pin data with given reference
|
|
5
|
-
*
|
|
6
|
-
* @param requestOptions Options for making requests
|
|
7
|
-
* @param reference Bee data reference
|
|
8
|
-
*/
|
|
9
|
-
export declare function pin(requestOptions: BeeRequestOptions, reference: Reference): Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* Unpin data with given reference
|
|
12
|
-
*
|
|
13
|
-
* @param requestOptions Options for making requests
|
|
14
|
-
* @param reference Bee data reference
|
|
15
|
-
*/
|
|
16
|
-
export declare function unpin(requestOptions: BeeRequestOptions, reference: Reference): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Get pin status for specific address.
|
|
19
|
-
*
|
|
20
|
-
* @param requestOptions Options for making requests
|
|
21
|
-
* @param reference
|
|
22
|
-
* @throws Error if given address is not pinned
|
|
23
|
-
*/
|
|
24
|
-
export declare function getPin(requestOptions: BeeRequestOptions, reference: Reference): Promise<Pin>;
|
|
25
|
-
/**
|
|
26
|
-
* Get list of all pins
|
|
27
|
-
*
|
|
28
|
-
* @param requestOptions Options for making requests
|
|
29
|
-
*/
|
|
30
|
-
export declare function getAllPins(requestOptions: BeeRequestOptions): Promise<Reference[]>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import WebSocket from 'isomorphic-ws';
|
|
2
|
-
import type { BeeRequestOptions } from '../types';
|
|
3
|
-
import { BatchId, PublicKey, Topic } from '../utils/typed-bytes';
|
|
4
|
-
/**
|
|
5
|
-
* Send to recipient or target with Postal Service for Swarm
|
|
6
|
-
*
|
|
7
|
-
* @param requestOptions Options for making requests
|
|
8
|
-
* @param topic Topic name
|
|
9
|
-
* @param target Target message address prefix
|
|
10
|
-
* @param data
|
|
11
|
-
* @param postageBatchId Postage BatchId that will be assigned to sent message
|
|
12
|
-
* @param recipient Recipient public key
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export declare function send(requestOptions: BeeRequestOptions, topic: Topic, target: string, data: string | Uint8Array, postageBatchId: BatchId, recipient?: PublicKey): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Subscribe for messages on the given topic
|
|
18
|
-
*
|
|
19
|
-
* @param url Bee node URL
|
|
20
|
-
* @param topic Topic name
|
|
21
|
-
*/
|
|
22
|
-
export declare function subscribe(url: string, topic: Topic, headers?: Record<string, string>): WebSocket;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BeeRequestOptions } from '../types';
|
|
2
|
-
import { BatchId, Reference } from '../utils/typed-bytes';
|
|
3
|
-
/**
|
|
4
|
-
* Reupload locally pinned data
|
|
5
|
-
* @param requestOptions Options for making requests
|
|
6
|
-
* @param reference
|
|
7
|
-
* @throws BeeResponseError if not locally pinned or invalid data
|
|
8
|
-
*/
|
|
9
|
-
export declare function reupload(requestOptions: BeeRequestOptions, stamp: BatchId, reference: Reference): Promise<void>;
|
|
10
|
-
export declare function isRetrievable(requestOptions: BeeRequestOptions, reference: Reference | Uint8Array | string): Promise<boolean>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Chunk } from 'cafe-utility';
|
|
2
|
-
import { EnvelopeWithBatchId } from '../types';
|
|
3
|
-
import { BatchId, PrivateKey } from '../utils/typed-bytes';
|
|
4
|
-
export declare class Stamper {
|
|
5
|
-
signer: PrivateKey;
|
|
6
|
-
batchId: BatchId;
|
|
7
|
-
buckets: Uint32Array;
|
|
8
|
-
depth: number;
|
|
9
|
-
maxSlot: number;
|
|
10
|
-
private constructor();
|
|
11
|
-
static fromBlank(signer: PrivateKey | Uint8Array | string, batchId: BatchId | Uint8Array | string, depth: number): Stamper;
|
|
12
|
-
static fromState(signer: PrivateKey | Uint8Array | string, batchId: BatchId | Uint8Array | string, buckets: Uint32Array, depth: number): Stamper;
|
|
13
|
-
stamp(chunk: Chunk): EnvelopeWithBatchId;
|
|
14
|
-
getState(): Uint32Array;
|
|
15
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class Bytes {
|
|
2
|
-
protected readonly bytes: Uint8Array;
|
|
3
|
-
readonly length: number;
|
|
4
|
-
constructor(bytes: Uint8Array | ArrayBuffer | string | Bytes, byteLength?: number | number[]);
|
|
5
|
-
static keccak256(bytes: Uint8Array | ArrayBuffer | string | Bytes): Bytes;
|
|
6
|
-
static fromUtf8(utf8: string): Bytes;
|
|
7
|
-
static fromSlice(bytes: Uint8Array, start: number, length?: number): Bytes;
|
|
8
|
-
offset(index: number): Uint8Array;
|
|
9
|
-
toUint8Array(): Uint8Array;
|
|
10
|
-
toHex(): string;
|
|
11
|
-
toBase64(): string;
|
|
12
|
-
toBase32(): string;
|
|
13
|
-
toString(): string;
|
|
14
|
-
toUtf8(): string;
|
|
15
|
-
toJSON(): unknown;
|
|
16
|
-
equals(other: Bytes | Uint8Array | string): boolean;
|
|
17
|
-
represent(): string;
|
|
18
|
-
}
|
|
19
|
-
export declare function parseSizeToBytes(sizeStr: string): number;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Bytes } from './bytes';
|
|
2
|
-
import { Reference } from './typed-bytes';
|
|
3
|
-
export declare const SWARM_MANIFEST_CODEC = 250;
|
|
4
|
-
export declare const SWARM_FEED_CODEC = 251;
|
|
5
|
-
export type DecodedCID = {
|
|
6
|
-
type: 'feed' | 'manifest';
|
|
7
|
-
reference: Reference;
|
|
8
|
-
};
|
|
9
|
-
export declare function convertReferenceToCid(reference: string | Uint8Array | Bytes, type: 'feed' | 'manifest'): string;
|
|
10
|
-
export declare function convertCidToReference(cid: string): DecodedCID;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { RedundancyLevel } from '..';
|
|
2
|
-
/**
|
|
3
|
-
* Returns an approximate multiplier for the overhead of a given redundancy level.
|
|
4
|
-
* Redundancy level is a tradeoff between storage overhead and fault tolerance.
|
|
5
|
-
* Use this number to estimate the amount of chunks that will be stored for a given
|
|
6
|
-
* redundancy level.
|
|
7
|
-
*/
|
|
8
|
-
export declare function approximateOverheadForRedundancyLevel(chunks: number, level: RedundancyLevel, encrypted: boolean): number;
|
|
9
|
-
interface RedundancyStats {
|
|
10
|
-
label: string;
|
|
11
|
-
value: RedundancyLevel;
|
|
12
|
-
errorTolerance: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function getRedundancyStats(): {
|
|
15
|
-
medium: RedundancyStats;
|
|
16
|
-
strong: RedundancyStats;
|
|
17
|
-
insane: RedundancyStats;
|
|
18
|
-
paranoid: RedundancyStats;
|
|
19
|
-
};
|
|
20
|
-
export declare function getRedundancyStat(level?: string | RedundancyLevel): RedundancyStats;
|
|
21
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Bytes } from './bytes';
|
|
2
|
-
export declare class PrivateKey extends Bytes {
|
|
3
|
-
static readonly LENGTH = 32;
|
|
4
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
5
|
-
publicKey(): PublicKey;
|
|
6
|
-
sign(data: Uint8Array | string): Signature;
|
|
7
|
-
}
|
|
8
|
-
export declare class PublicKey extends Bytes {
|
|
9
|
-
static readonly LENGTH = 64;
|
|
10
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
11
|
-
address(): EthAddress;
|
|
12
|
-
toCompressedUint8Array(): Uint8Array;
|
|
13
|
-
toCompressedHex(): string;
|
|
14
|
-
}
|
|
15
|
-
export declare class EthAddress extends Bytes {
|
|
16
|
-
static readonly LENGTH = 20;
|
|
17
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
18
|
-
toChecksum(): string;
|
|
19
|
-
}
|
|
20
|
-
export declare class Identifier extends Bytes {
|
|
21
|
-
static readonly LENGTH = 32;
|
|
22
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
23
|
-
static fromString(value: string): Identifier;
|
|
24
|
-
}
|
|
25
|
-
export declare class Reference extends Bytes {
|
|
26
|
-
static readonly LENGTH = 32;
|
|
27
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
28
|
-
toCid(type: 'feed' | 'manifest'): string;
|
|
29
|
-
static isValid(value: string): boolean;
|
|
30
|
-
}
|
|
31
|
-
export declare class TransactionId extends Bytes {
|
|
32
|
-
static readonly LENGTH = 32;
|
|
33
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
34
|
-
}
|
|
35
|
-
export declare class Span extends Bytes {
|
|
36
|
-
static readonly LENGTH = 8;
|
|
37
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
38
|
-
static fromBigInt(number: bigint): Span;
|
|
39
|
-
toBigInt(): bigint;
|
|
40
|
-
static fromSlice(bytes: Uint8Array, start: number): Span;
|
|
41
|
-
}
|
|
42
|
-
export declare class PeerAddress extends Bytes {
|
|
43
|
-
static readonly LENGTH = 32;
|
|
44
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
45
|
-
}
|
|
46
|
-
export declare class BatchId extends Bytes {
|
|
47
|
-
static readonly LENGTH = 32;
|
|
48
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
49
|
-
}
|
|
50
|
-
export declare class Signature extends Bytes {
|
|
51
|
-
static readonly LENGTH = 65;
|
|
52
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
53
|
-
static fromSlice(bytes: Uint8Array, start: number): Signature;
|
|
54
|
-
recoverPublicKey(digest: Uint8Array | string): PublicKey;
|
|
55
|
-
isValid(digest: Uint8Array | string, expectedAddress: EthAddress | Uint8Array | string): boolean;
|
|
56
|
-
}
|
|
57
|
-
export declare class Topic extends Bytes {
|
|
58
|
-
static readonly LENGTH = 32;
|
|
59
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
60
|
-
static fromString(value: string): Topic;
|
|
61
|
-
}
|
|
62
|
-
export declare class FeedIndex extends Bytes {
|
|
63
|
-
static readonly LENGTH = 8;
|
|
64
|
-
static readonly MINUS_ONE: FeedIndex;
|
|
65
|
-
constructor(bytes: Uint8Array | string | Bytes);
|
|
66
|
-
static fromBigInt(number: bigint): FeedIndex;
|
|
67
|
-
toBigInt(): bigint;
|
|
68
|
-
next(): FeedIndex;
|
|
69
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|