@upcoming/bee-js 0.5.2 → 0.5.3
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.
|
@@ -128,8 +128,8 @@ class MantarayNode {
|
|
|
128
128
|
: this.targetAddress, forkBitmap, ...forks), this.obfuscationKey);
|
|
129
129
|
return cafe_utility_1.Binary.concatBytes(this.obfuscationKey, data);
|
|
130
130
|
}
|
|
131
|
-
static async unmarshal(bee, reference) {
|
|
132
|
-
const data = (await bee.downloadData(reference)).toUint8Array();
|
|
131
|
+
static async unmarshal(bee, reference, options, requestOptions) {
|
|
132
|
+
const data = (await bee.downloadData(reference, options, requestOptions)).toUint8Array();
|
|
133
133
|
const obfuscationKey = data.subarray(0, 32);
|
|
134
134
|
const decrypted = cafe_utility_1.Binary.xorCypher(data.subarray(32), obfuscationKey);
|
|
135
135
|
const reader = new cafe_utility_1.Uint8ArrayReader(decrypted);
|
|
@@ -219,13 +219,14 @@ class MantarayNode {
|
|
|
219
219
|
this.selfAddress = result.reference.toUint8Array();
|
|
220
220
|
return new typed_bytes_1.Reference(this.selfAddress);
|
|
221
221
|
}
|
|
222
|
-
async loadRecursively(bee) {
|
|
222
|
+
async loadRecursively(bee, options, requestOptions) {
|
|
223
223
|
for (const fork of this.forks.values()) {
|
|
224
|
-
const node = await MantarayNode.unmarshal(bee, fork.node.targetAddress);
|
|
224
|
+
const node = await MantarayNode.unmarshal(bee, fork.node.targetAddress, options, requestOptions);
|
|
225
225
|
fork.node.targetAddress = node.targetAddress;
|
|
226
226
|
fork.node.forks = node.forks;
|
|
227
227
|
fork.node.path = fork.prefix;
|
|
228
|
-
|
|
228
|
+
fork.node.parent = this;
|
|
229
|
+
await fork.node.loadRecursively(bee, options, requestOptions);
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
232
|
find(path) {
|