@ethersphere/bee-js 9.8.0 → 10.0.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/dist/cjs/bee.js +819 -364
- package/dist/cjs/manifest/manifest.js +6 -3
- package/dist/cjs/modules/debug/chequebook.js +1 -1
- package/dist/cjs/types/index.js +285 -4
- package/dist/cjs/utils/bytes.js +19 -1
- package/dist/cjs/utils/duration.js +6 -2
- package/dist/cjs/utils/stamps.js +36 -13
- package/dist/cjs/utils/type.js +2 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee.js +818 -364
- package/dist/mjs/manifest/manifest.js +6 -3
- package/dist/mjs/modules/debug/chequebook.js +2 -2
- package/dist/mjs/types/index.js +1275 -4
- package/dist/mjs/utils/bytes.js +17 -0
- package/dist/mjs/utils/duration.js +7 -3
- package/dist/mjs/utils/stamps.js +35 -14
- package/dist/mjs/utils/type.js +6 -0
- package/dist/types/bee.d.ts +701 -249
- package/dist/types/types/debug.d.ts +1 -1
- package/dist/types/types/index.d.ts +108 -6
- package/dist/types/utils/bytes.d.ts +1 -0
- package/dist/types/utils/duration.d.ts +2 -0
- package/dist/types/utils/stamps.d.ts +4 -4
- package/package.json +1 -1
|
@@ -79,9 +79,12 @@ export class Fork {
|
|
|
79
79
|
const type = Binary.uint8ToNumber(reader.read(1));
|
|
80
80
|
const prefixLength = Binary.uint8ToNumber(reader.read(1));
|
|
81
81
|
const prefix = reader.read(prefixLength);
|
|
82
|
-
|
|
82
|
+
if (prefixLength < 30) {
|
|
83
|
+
reader.read(30 - prefixLength);
|
|
84
|
+
}
|
|
83
85
|
const selfAddress = reader.read(addressLength);
|
|
84
86
|
debug('unmarshalling fork', {
|
|
87
|
+
type,
|
|
85
88
|
prefixLength,
|
|
86
89
|
prefix: DECODER.decode(prefix),
|
|
87
90
|
addressLength,
|
|
@@ -223,7 +226,7 @@ export class MantarayNode {
|
|
|
223
226
|
throw new Error('MantarayNode#unmarshal invalid version hash');
|
|
224
227
|
}
|
|
225
228
|
const targetAddressLength = Binary.uint8ToNumber(reader.read(1));
|
|
226
|
-
const targetAddress = targetAddressLength
|
|
229
|
+
const targetAddress = targetAddressLength ? reader.read(targetAddressLength) : NULL_ADDRESS;
|
|
227
230
|
const node = new MantarayNode({
|
|
228
231
|
selfAddress,
|
|
229
232
|
targetAddress,
|
|
@@ -232,7 +235,7 @@ export class MantarayNode {
|
|
|
232
235
|
const forkBitmap = reader.read(32);
|
|
233
236
|
for (let i = 0; i < 256; i++) {
|
|
234
237
|
if (Binary.getBit(forkBitmap, i, 'LE')) {
|
|
235
|
-
const newFork = Fork.unmarshal(reader,
|
|
238
|
+
const newFork = Fork.unmarshal(reader, selfAddress.length);
|
|
236
239
|
node.forks.set(i, newFork);
|
|
237
240
|
newFork.node.parent = node;
|
|
238
241
|
}
|
|
@@ -19,9 +19,9 @@ export async function getChequebookAddress(requestOptions) {
|
|
|
19
19
|
name: 'response.data'
|
|
20
20
|
});
|
|
21
21
|
return {
|
|
22
|
-
chequebookAddress: Types.asString(body.chequebookAddress, {
|
|
22
|
+
chequebookAddress: new EthAddress(Types.asString(body.chequebookAddress, {
|
|
23
23
|
name: 'chequebookAddress'
|
|
24
|
-
})
|
|
24
|
+
}))
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
/**
|