@xyo-network/diviner-address-chain-memory 2.57.4 → 2.57.6
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/MemoryDiviner.js +4 -4
- package/dist/cjs/MemoryDiviner.js.map +1 -1
- package/dist/docs.json +12216 -2870
- package/dist/esm/MemoryDiviner.js +2 -2
- package/dist/esm/MemoryDiviner.js.map +1 -1
- package/dist/types/MemoryDiviner.d.ts.map +1 -1
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1367 -0
- package/docs/classes/MemoryAddressChainDiviner.html +980 -0
- package/docs/index.html +53 -0
- package/docs/modules.html +47 -0
- package/docs/types/MemoryAddressChainDivinerParams.html +42 -0
- package/package.json +12 -13
- package/src/MemoryDiviner.ts +2 -3
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MemoryAddressChainDiviner = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const assert_1 = require("@xylabs/assert");
|
|
6
|
-
const archivist_model_1 = require("@xyo-network/archivist-model");
|
|
7
6
|
const archivist_wrapper_1 = require("@xyo-network/archivist-wrapper");
|
|
8
7
|
const boundwitness_wrapper_1 = require("@xyo-network/boundwitness-wrapper");
|
|
9
8
|
const diviner_address_chain_abstract_1 = require("@xyo-network/diviner-address-chain-abstract");
|
|
@@ -13,13 +12,14 @@ class MemoryAddressChainDiviner extends diviner_address_chain_abstract_1.Address
|
|
|
13
12
|
return (0, assert_1.assertEx)(this.config.address, 'Missing address');
|
|
14
13
|
}
|
|
15
14
|
divine(payloads) {
|
|
16
|
-
var _a
|
|
15
|
+
var _a;
|
|
17
16
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
17
|
const result = [];
|
|
19
18
|
(0, assert_1.assertEx)(!(payloads === null || payloads === void 0 ? void 0 : payloads.length), 'MemoryAddressChainDiviner.divine does not allow payloads to be sent');
|
|
20
|
-
const
|
|
19
|
+
const archivistMod = (0, assert_1.assertEx)(yield this.readArchivist(), 'Unable to resolve archivist');
|
|
20
|
+
const archivists = [archivist_wrapper_1.ArchivistWrapper.wrap(archivistMod, this.account)];
|
|
21
21
|
let currentHash = (0, assert_1.assertEx)(this.config.startHash, 'Missing startHash');
|
|
22
|
-
while (currentHash && result.length < ((
|
|
22
|
+
while (currentHash && result.length < ((_a = this.config.maxResults) !== null && _a !== void 0 ? _a : 1000)) {
|
|
23
23
|
const bwPayload = yield this.archivistFindHash(archivists, currentHash);
|
|
24
24
|
const bw = boundwitness_wrapper_1.BoundWitnessWrapper.parse(bwPayload);
|
|
25
25
|
if (bw) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryDiviner.js","sourceRoot":"","sources":["../../src/MemoryDiviner.ts"],"names":[],"mappings":";;;;AAAA,2CAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"MemoryDiviner.js","sourceRoot":"","sources":["../../src/MemoryDiviner.ts"],"names":[],"mappings":";;;;AAAA,2CAAyC;AACzC,sEAAiE;AAEjE,4EAAuE;AACvE,gGAAiF;AACjF,0FAAqH;AASrH,MAAa,yBAEX,SAAQ,oDAA4B;IAGpC,IAAI,YAAY;QACd,OAAO,IAAA,iBAAQ,EAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA;IACzD,CAAC;IAEK,MAAM,CAAC,QAAoB;;;YAC/B,MAAM,MAAM,GAAc,EAAE,CAAA;YAC5B,IAAA,iBAAQ,EAAC,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA,EAAE,qEAAqE,CAAC,CAAA;YAClG,MAAM,YAAY,GAAG,IAAA,iBAAQ,EAAC,MAAM,IAAI,CAAC,aAAa,EAAE,EAAE,6BAA6B,CAAC,CAAA;YACxF,MAAM,UAAU,GAAG,CAAC,o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