@ethersphere/bee-js
Version:
Javascript client for Bee
45 lines • 2.1 kB
JavaScript
export * from "./debug.js";
export const SECTION_SIZE = 32;
export const BRANCHES = 128;
export const CHUNK_SIZE = SECTION_SIZE * BRANCHES;
export const PSS_TARGET_HEX_LENGTH_MAX = 4;
/**
* Minimal depth that can be used for creation of postage batch
*/
export const STAMPS_DEPTH_MIN = 17;
/**
* Maximal depth that can be used for creation of postage batch
*/
export const STAMPS_DEPTH_MAX = 255;
export const TAGS_LIMIT_MIN = 1;
export const TAGS_LIMIT_MAX = 1000;
export const FEED_INDEX_HEX_LENGTH = 16;
/**
* Add redundancy to the data being uploaded so that downloaders can download it with better UX.
* 0 value is default and does not add any redundancy to the file.
*/
export var RedundancyLevel;
(function (RedundancyLevel) {
RedundancyLevel[RedundancyLevel["OFF"] = 0] = "OFF";
RedundancyLevel[RedundancyLevel["MEDIUM"] = 1] = "MEDIUM";
RedundancyLevel[RedundancyLevel["STRONG"] = 2] = "STRONG";
RedundancyLevel[RedundancyLevel["INSANE"] = 3] = "INSANE";
RedundancyLevel[RedundancyLevel["PARANOID"] = 4] = "PARANOID";
})(RedundancyLevel || (RedundancyLevel = {}));
/**
* Specify the retrieve strategy on redundant data.
* The possible values are NONE, DATA, PROX and RACE.
* Strategy NONE means no prefetching takes place.
* Strategy DATA means only data chunks are prefetched.
* Strategy PROX means only chunks that are close to the node are prefetched.
* Strategy RACE means all chunks are prefetched: n data chunks and k parity chunks. The first n chunks to arrive are used to reconstruct the file.
* Multiple strategies can be used in a fallback cascade if the swarm redundancy fallback mode is set to true.
* The default strategy is NONE, DATA, falling back to PROX, falling back to RACE
*/
export var RedundancyStrategy;
(function (RedundancyStrategy) {
RedundancyStrategy[RedundancyStrategy["NONE"] = 0] = "NONE";
RedundancyStrategy[RedundancyStrategy["DATA"] = 1] = "DATA";
RedundancyStrategy[RedundancyStrategy["PROX"] = 2] = "PROX";
RedundancyStrategy[RedundancyStrategy["RACE"] = 3] = "RACE";
})(RedundancyStrategy || (RedundancyStrategy = {}));