@upcoming/bee-js 0.16.1 → 9.4.0
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/README.md +8 -3
- package/dist/cjs/bee.js +39 -14
- package/dist/cjs/feed/index.js +3 -0
- package/dist/cjs/manifest/manifest.js +26 -6
- package/dist/cjs/modules/rchash.js +15 -0
- package/dist/cjs/utils/bytes.js +3 -0
- package/dist/cjs/utils/duration.js +7 -0
- package/dist/cjs/utils/http.js +7 -0
- package/dist/cjs/utils/size.js +9 -0
- package/dist/cjs/utils/stamps.js +36 -36
- package/dist/cjs/utils/type.js +1 -0
- package/dist/cjs/utils/typed-bytes.js +8 -1
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee.js +39 -14
- package/dist/mjs/feed/index.js +6 -3
- package/dist/mjs/manifest/manifest.js +26 -5
- package/dist/mjs/modules/rchash.js +15 -0
- package/dist/mjs/utils/bytes.js +3 -0
- package/dist/mjs/utils/duration.js +7 -0
- package/dist/mjs/utils/http.js +7 -0
- package/dist/mjs/utils/size.js +9 -0
- package/dist/mjs/utils/stamps.js +19 -25
- package/dist/mjs/utils/type.js +1 -0
- package/dist/mjs/utils/typed-bytes.js +8 -1
- package/dist/types/bee.d.ts +27 -6
- package/dist/types/manifest/manifest.d.ts +1 -1
- package/dist/types/modules/rchash.d.ts +2 -0
- package/dist/types/types/debug.d.ts +2 -2
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/utils/bytes.d.ts +1 -0
- package/dist/types/utils/duration.d.ts +2 -0
- package/dist/types/utils/size.d.ts +3 -0
- package/dist/types/utils/stamps.d.ts +2 -2
- package/dist/types/utils/typed-bytes.d.ts +2 -1
- package/package.json +5 -7
|
@@ -40,7 +40,7 @@ export declare function getStampCost(depth: number, amount: NumberString | strin
|
|
|
40
40
|
*
|
|
41
41
|
* @returns {number} The TTL of the postage batch.
|
|
42
42
|
*/
|
|
43
|
-
export declare function getStampDuration(amount: NumberString | string | bigint, pricePerBlock: number, blockTime
|
|
43
|
+
export declare function getStampDuration(amount: NumberString | string | bigint, pricePerBlock: number, blockTime: number): Duration;
|
|
44
44
|
/**
|
|
45
45
|
* Get the postage batch `amount` required for a given `duration`.
|
|
46
46
|
*
|
|
@@ -48,7 +48,7 @@ export declare function getStampDuration(amount: NumberString | string | bigint,
|
|
|
48
48
|
* @param pricePerBlock The price per block in PLUR.
|
|
49
49
|
* @param blockTime The block time in seconds.
|
|
50
50
|
*/
|
|
51
|
-
export declare function getAmountForDuration(duration: Duration, pricePerBlock: number, blockTime
|
|
51
|
+
export declare function getAmountForDuration(duration: Duration, pricePerBlock: number, blockTime: number): bigint;
|
|
52
52
|
/**
|
|
53
53
|
* Utility function that calculates the depth required for a postage batch to achieve the specified effective size
|
|
54
54
|
*
|
|
@@ -35,7 +35,7 @@ export declare class TransactionId extends Bytes {
|
|
|
35
35
|
export declare class Span extends Bytes {
|
|
36
36
|
static readonly LENGTH = 8;
|
|
37
37
|
constructor(bytes: Uint8Array | string | Bytes);
|
|
38
|
-
static fromBigInt(number: bigint):
|
|
38
|
+
static fromBigInt(number: bigint): Span;
|
|
39
39
|
toBigInt(): bigint;
|
|
40
40
|
static fromSlice(bytes: Uint8Array, start: number): Span;
|
|
41
41
|
}
|
|
@@ -65,4 +65,5 @@ export declare class FeedIndex extends Bytes {
|
|
|
65
65
|
constructor(bytes: Uint8Array | string | Bytes);
|
|
66
66
|
static fromBigInt(number: bigint): FeedIndex;
|
|
67
67
|
toBigInt(): bigint;
|
|
68
|
+
next(): FeedIndex;
|
|
68
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upcoming/bee-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Javascript client for Bee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bee",
|
|
@@ -56,14 +56,13 @@
|
|
|
56
56
|
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist/types",
|
|
57
57
|
"build:browser": "webpack --progress",
|
|
58
58
|
"test": "jest --config=jest.config.ts --runInBand --verbose",
|
|
59
|
-
"check
|
|
60
|
-
"lint": "eslint
|
|
61
|
-
"lint:check": "eslint \"src/**/*.ts\" \"test/**/*.ts\" && prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
59
|
+
"check": "tsc --project tsconfig.test.json",
|
|
60
|
+
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\" && prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
62
61
|
"depcheck": "depcheck ."
|
|
63
62
|
},
|
|
64
63
|
"dependencies": {
|
|
65
|
-
"axios": "^0.
|
|
66
|
-
"cafe-utility": "^
|
|
64
|
+
"axios": "^0.30.0",
|
|
65
|
+
"cafe-utility": "^28.1.0",
|
|
67
66
|
"isomorphic-ws": "^4.0.1",
|
|
68
67
|
"semver": "^7.3.5",
|
|
69
68
|
"ws": "^8.7.0"
|
|
@@ -95,7 +94,6 @@
|
|
|
95
94
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
96
95
|
"husky": "^8.0.1",
|
|
97
96
|
"jest": "^29.7.0",
|
|
98
|
-
"jest-puppeteer": "^11.0.0",
|
|
99
97
|
"prettier": "^2.6.2",
|
|
100
98
|
"rimraf": "^3.0.2",
|
|
101
99
|
"terser-webpack-plugin": "^5.3.1",
|