@xyo-network/archivist-wrapper 2.59.0 → 2.60.0-rc.2
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/ArchivistWrapper.js +5 -4
- package/dist/cjs/ArchivistWrapper.js.map +1 -1
- package/dist/docs.json +344 -614
- package/dist/esm/ArchivistWrapper.js +5 -4
- package/dist/esm/ArchivistWrapper.js.map +1 -1
- package/dist/types/ArchivistWrapper.d.ts.map +1 -1
- package/docs/classes/ArchivistWrapper.html +20 -20
- package/package.json +9 -7
- package/src/ArchivistWrapper.ts +5 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ArchivistAllQuerySchema, ArchivistClearQuerySchema, ArchivistCommitQuerySchema, ArchivistDeleteQuerySchema, ArchivistGetQuerySchema, ArchivistInsertQuerySchema, } from '@xyo-network/archivist-model';
|
|
2
2
|
import { BoundWitnessSchema, isBoundWitnessPayload } from '@xyo-network/boundwitness-model';
|
|
3
|
+
import { PayloadHasher } from '@xyo-network/core';
|
|
3
4
|
import { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module';
|
|
4
5
|
import { PayloadWrapper } from '@xyo-network/payload-wrapper';
|
|
5
6
|
import compact from 'lodash/compact';
|
|
@@ -25,7 +26,7 @@ export class ArchivistWrapper extends ModuleWrapper {
|
|
|
25
26
|
const queryPayload = PayloadWrapper.parse({ hashes, schema: ArchivistDeleteQuerySchema });
|
|
26
27
|
const query = await this.bindQuery(queryPayload);
|
|
27
28
|
const result = await this.module.query(query[0], query[1]);
|
|
28
|
-
this.throwErrors(query, result);
|
|
29
|
+
await this.throwErrors(query, result);
|
|
29
30
|
return result[0].payload_hashes.map(() => true);
|
|
30
31
|
}
|
|
31
32
|
async get(hashes) {
|
|
@@ -35,13 +36,13 @@ export class ArchivistWrapper extends ModuleWrapper {
|
|
|
35
36
|
}
|
|
36
37
|
async insert(payloads) {
|
|
37
38
|
const queryPayload = PayloadWrapper.parse({
|
|
38
|
-
payloads:
|
|
39
|
+
payloads: await PayloadHasher.hashes(payloads),
|
|
39
40
|
schema: ArchivistInsertQuerySchema,
|
|
40
41
|
});
|
|
41
42
|
const query = await this.bindQuery(queryPayload, payloads);
|
|
42
|
-
const result = await this.module.query(query[0], [queryPayload.payload, ...payloads]);
|
|
43
|
+
const result = await this.module.query(query[0], [queryPayload.payload(), ...payloads]);
|
|
43
44
|
const innerBoundWitnesses = result[1]?.filter((payload) => payload?.schema === BoundWitnessSchema) ?? [];
|
|
44
|
-
this.throwErrors(query, result);
|
|
45
|
+
await this.throwErrors(query, result);
|
|
45
46
|
return [result[0], ...innerBoundWitnesses];
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArchivistWrapper.js","sourceRoot":"","sources":["../../src/ArchivistWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EAEvB,yBAAyB,EAEzB,0BAA0B,EAE1B,0BAA0B,EAE1B,uBAAuB,EAEvB,0BAA0B,GAE3B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAgB,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACzG,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAE/E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D,OAAO,OAAO,MAAM,gBAAgB,CAAA;AAEpC,0BAA0B,EAAE,CAAA;AAC5B,MAAM,OAAO,gBACX,SAAQ,aAA6B;IAGrC,MAAM,CAAU,eAAe,GAAG,CAAC,uBAAuB,EAAE,GAAG,KAAK,CAAC,eAAe,CAAC,CAAA;IAErF,KAAK,CAAuC;IAE5C,KAAK,CAAC,GAAG;QACP,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAoB,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC,CAAA;QACjG,MAAM,MAAM,GAAG,MAAM,IAA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I,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QACrC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,mBAAmB,CAAC,CAAA;IAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArchivistWrapper.d.ts","sourceRoot":"","sources":["../../src/ArchivistWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,eAAe,EAChB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,YAAY,EAA6C,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"ArchivistWrapper.d.ts","sourceRoot":"","sources":["../../src/ArchivistWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,eAAe,EAChB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,YAAY,EAA6C,MAAM,iCAAiC,CAAA;AAEzG,OAAO,EAA8B,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAIjD,qBAAa,gBAAgB,CAAC,cAAc,SAAS,eAAe,GAAG,eAAe,CACpF,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,eAAe;IAE1B,OAAgB,eAAe,WAAsD;IAErF,KAAK,CAAC,EAAE,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAA;IAEtC,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAMzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtB,MAAM,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAMjC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE;IAQvB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAMzC,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAW3D"}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<ul class="tsd-hierarchy">
|
|
32
32
|
<li><span class="tsd-signature-type ">ArchivistModule</span></li></ul></section><aside class="tsd-sources">
|
|
33
33
|
<ul>
|
|
34
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
34
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L25">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:25</a></li></ul></aside>
|
|
35
35
|
<section class="tsd-panel-group tsd-index-group">
|
|
36
36
|
<section class="tsd-panel tsd-index-panel">
|
|
37
37
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promisable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">never</span><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><aside class="tsd-sources">
|
|
147
147
|
<p>Implementation of ArchivistModule.start</p>
|
|
148
148
|
<ul>
|
|
149
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
149
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L31">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:31</a></li></ul></aside></section>
|
|
150
150
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="wrapperParams" class="tsd-anchor"></a>
|
|
151
151
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>wrapper<wbr/>Params</span><a href="#wrapperParams" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
152
152
|
<div class="tsd-signature"><span class="tsd-kind-property">wrapper<wbr/>Params</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">BaseParamsFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">account</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type ">AccountInstance</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">module</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">TWrappedModule</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources">
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
<div class="tsd-signature"><span class="tsd-kind-property">required<wbr/>Queries</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
165
165
|
<p>Overrides ModuleWrapper.requiredQueries</p>
|
|
166
166
|
<ul>
|
|
167
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
167
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L29">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:29</a></li></ul></aside></section></section>
|
|
168
168
|
<section class="tsd-panel-group tsd-member-group">
|
|
169
169
|
<h2>Accessors</h2>
|
|
170
170
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="account" class="tsd-anchor"></a>
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
255
255
|
<p>Implementation of ArchivistModule.all</p>
|
|
256
256
|
<ul>
|
|
257
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
257
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L33">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:33</a></li></ul></aside></li></ul></section>
|
|
258
258
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="bindQuery" class="tsd-anchor"></a>
|
|
259
259
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>bind<wbr/>Query</span><a href="#bindQuery" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
260
260
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
310
310
|
<p>Implementation of ArchivistModule.clear</p>
|
|
311
311
|
<ul>
|
|
312
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
312
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L39">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:39</a></li></ul></aside></li></ul></section>
|
|
313
313
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clearListeners" class="tsd-anchor"></a>
|
|
314
314
|
<h3 class="tsd-anchor-link"><span>clear<wbr/>Listeners</span><a href="#clearListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
315
315
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">BoundWitnessFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"network.xyo.boundwitness"</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
334
334
|
<p>Implementation of ArchivistModule.commit</p>
|
|
335
335
|
<ul>
|
|
336
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
336
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L44">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:44</a></li></ul></aside></li></ul></section>
|
|
337
337
|
<section class="tsd-panel tsd-member"><a id="delete" class="tsd-anchor"></a>
|
|
338
338
|
<h3 class="tsd-anchor-link"><span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
339
339
|
<ul class="tsd-signatures">
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
348
348
|
<p>Implementation of ArchivistModule.delete</p>
|
|
349
349
|
<ul>
|
|
350
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
350
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L50">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:50</a></li></ul></aside></li></ul></section>
|
|
351
351
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="describe" class="tsd-anchor"></a>
|
|
352
352
|
<h3 class="tsd-anchor-link"><span>describe</span><a href="#describe" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
353
353
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -403,16 +403,14 @@
|
|
|
403
403
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="filterErrors" class="tsd-anchor"></a>
|
|
404
404
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>filter<wbr/>Errors</span><a href="#filterErrors" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
405
405
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
406
|
-
<li class="tsd-signature tsd-anchor-link" id="filterErrors.filterErrors-1"><span class="tsd-kind-call-signature">filter<wbr/>Errors</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">
|
|
406
|
+
<li class="tsd-signature tsd-anchor-link" id="filterErrors.filterErrors-1"><span class="tsd-kind-call-signature">filter<wbr/>Errors</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">result</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"network.xyo.error.module"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">sources</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#filterErrors.filterErrors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
407
407
|
<li class="tsd-description">
|
|
408
408
|
<div class="tsd-parameters">
|
|
409
409
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
410
410
|
<ul class="tsd-parameter-list">
|
|
411
411
|
<li>
|
|
412
|
-
<h5><span class="tsd-kind-parameter">
|
|
413
|
-
<
|
|
414
|
-
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">ModuleQueryResult</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
415
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"network.xyo.error.module"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">sources</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
412
|
+
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-type ">ModuleQueryResult</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
413
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"network.xyo.error.module"</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">sources</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
416
414
|
<p>Inherited from ModuleWrapper.filterErrors</p>
|
|
417
415
|
<ul>
|
|
418
416
|
<li>Defined in modules/packages/module/packages/wrapper/dist/types/Wrapper.d.ts:73</li></ul></aside></li></ul></section>
|
|
@@ -429,7 +427,7 @@
|
|
|
429
427
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
430
428
|
<p>Implementation of ArchivistModule.get</p>
|
|
431
429
|
<ul>
|
|
432
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
430
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L58">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:58</a></li></ul></aside></li></ul></section>
|
|
433
431
|
<section class="tsd-panel tsd-member"><a id="insert" class="tsd-anchor"></a>
|
|
434
432
|
<h3 class="tsd-anchor-link"><span>insert</span><a href="#insert" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
435
433
|
<ul class="tsd-signatures">
|
|
@@ -443,7 +441,7 @@
|
|
|
443
441
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">BoundWitnessFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"network.xyo.boundwitness"</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
444
442
|
<p>Implementation of ArchivistModule.insert</p>
|
|
445
443
|
<ul>
|
|
446
|
-
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/
|
|
444
|
+
<li>Defined in <a href="https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/07894923abf1/packages/modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts#L64">modules/packages/archivist/packages/wrapper/src/ArchivistWrapper.ts:64</a></li></ul></aside></li></ul></section>
|
|
447
445
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listenerCount" class="tsd-anchor"></a>
|
|
448
446
|
<h3 class="tsd-anchor-link"><span>listener<wbr/>Count</span><a href="#listenerCount" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
449
447
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -698,18 +696,20 @@ the underlying modules matching the supplied filter</p>
|
|
|
698
696
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="sendQuery" class="tsd-anchor"></a>
|
|
699
697
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>send<wbr/>Query</span><a href="#sendQuery" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
700
698
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
701
|
-
<li class="tsd-signature tsd-anchor-link" id="sendQuery.sendQuery-1"><span class="tsd-kind-call-signature">send<wbr/>Query</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">queryPayload</span>, <span class="tsd-kind-parameter">payloads</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#sendQuery.sendQuery-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
699
|
+
<li class="tsd-signature tsd-anchor-link" id="sendQuery.sendQuery-1"><span class="tsd-kind-call-signature">send<wbr/>Query</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">W</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">queryPayload</span>, <span class="tsd-kind-parameter">payloads</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#sendQuery.sendQuery-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
702
700
|
<li class="tsd-description">
|
|
703
701
|
<section class="tsd-panel">
|
|
704
702
|
<h4>Type Parameters</h4>
|
|
705
703
|
<ul class="tsd-type-parameter-list">
|
|
706
704
|
<li>
|
|
707
|
-
<h4><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol"> extends </span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">QueryFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span
|
|
705
|
+
<h4><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol"> extends </span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">QueryFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4></li>
|
|
706
|
+
<li>
|
|
707
|
+
<h4><span class="tsd-kind-type-parameter">W</span><span class="tsd-signature-symbol"> extends </span><span class="tsd-signature-type ">PayloadWrapper</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">W</span><span class="tsd-signature-symbol">></span> = <span class="tsd-signature-type ">PayloadWrapper</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
708
708
|
<div class="tsd-parameters">
|
|
709
709
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
710
710
|
<ul class="tsd-parameter-list">
|
|
711
711
|
<li>
|
|
712
|
-
<h5><span class="tsd-kind-parameter">queryPayload</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li>
|
|
712
|
+
<h5><span class="tsd-kind-parameter">queryPayload</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">W</span></h5></li>
|
|
713
713
|
<li>
|
|
714
714
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">payloads</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
715
715
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
@@ -719,7 +719,7 @@ the underlying modules matching the supplied filter</p>
|
|
|
719
719
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="throwErrors" class="tsd-anchor"></a>
|
|
720
720
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>throw<wbr/>Errors</span><a href="#throwErrors" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
721
721
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
722
|
-
<li class="tsd-signature tsd-anchor-link" id="throwErrors.throwErrors-1"><span class="tsd-kind-call-signature">throw<wbr/>Errors</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">query</span>, <span class="tsd-kind-parameter">result</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#throwErrors.throwErrors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
722
|
+
<li class="tsd-signature tsd-anchor-link" id="throwErrors.throwErrors-1"><span class="tsd-kind-call-signature">throw<wbr/>Errors</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">query</span>, <span class="tsd-kind-parameter">result</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#throwErrors.throwErrors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
|
723
723
|
<li class="tsd-description">
|
|
724
724
|
<div class="tsd-parameters">
|
|
725
725
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
@@ -727,8 +727,8 @@ the underlying modules matching the supplied filter</p>
|
|
|
727
727
|
<li>
|
|
728
728
|
<h5><span class="tsd-kind-parameter">query</span>: <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">BoundWitnessFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">resultSet</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"network.xyo.boundwitness"</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">]</span></h5></li>
|
|
729
729
|
<li>
|
|
730
|
-
<h5><
|
|
731
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
730
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-type ">ModuleQueryResult</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">SchemaFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type ">PayloadFields</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">schema</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
731
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
732
732
|
<p>Inherited from ModuleWrapper.throwErrors</p>
|
|
733
733
|
<ul>
|
|
734
734
|
<li>Defined in modules/packages/module/packages/wrapper/dist/types/Wrapper.d.ts:75</li></ul></aside></li></ul></section>
|
package/package.json
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@xyo-network/archivist-model": "^2.
|
|
13
|
-
"@xyo-network/boundwitness-model": "^2.
|
|
14
|
-
"@xyo-network/
|
|
15
|
-
"@xyo-network/
|
|
16
|
-
"@xyo-network/payload-
|
|
17
|
-
"@xyo-network/
|
|
12
|
+
"@xyo-network/archivist-model": "^2.60.0-rc.2",
|
|
13
|
+
"@xyo-network/boundwitness-model": "^2.60.0-rc.2",
|
|
14
|
+
"@xyo-network/core": "^2.60.0-rc.2",
|
|
15
|
+
"@xyo-network/module": "^2.60.0-rc.2",
|
|
16
|
+
"@xyo-network/payload-model": "^2.60.0-rc.2",
|
|
17
|
+
"@xyo-network/payload-wrapper": "^2.60.0-rc.2",
|
|
18
|
+
"@xyo-network/promise": "^2.60.0-rc.2",
|
|
18
19
|
"lodash": "^4.17.21"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
@@ -57,5 +58,6 @@
|
|
|
57
58
|
},
|
|
58
59
|
"sideEffects": false,
|
|
59
60
|
"types": "dist/types/index.d.ts",
|
|
60
|
-
"version": "2.
|
|
61
|
+
"version": "2.60.0-rc.2",
|
|
62
|
+
"stableVersion": "2.59.0"
|
|
61
63
|
}
|
package/src/ArchivistWrapper.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
ArchivistModule,
|
|
15
15
|
} from '@xyo-network/archivist-model'
|
|
16
16
|
import { BoundWitness, BoundWitnessSchema, isBoundWitnessPayload } from '@xyo-network/boundwitness-model'
|
|
17
|
+
import { PayloadHasher } from '@xyo-network/core'
|
|
17
18
|
import { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module'
|
|
18
19
|
import { Payload } from '@xyo-network/payload-model'
|
|
19
20
|
import { PayloadWrapper } from '@xyo-network/payload-wrapper'
|
|
@@ -50,7 +51,7 @@ export class ArchivistWrapper<TWrappedModule extends ArchivistModule = Archivist
|
|
|
50
51
|
const queryPayload = PayloadWrapper.parse<ArchivistDeleteQuery>({ hashes, schema: ArchivistDeleteQuerySchema })
|
|
51
52
|
const query = await this.bindQuery(queryPayload)
|
|
52
53
|
const result = await this.module.query(query[0], query[1])
|
|
53
|
-
this.throwErrors(query, result)
|
|
54
|
+
await this.throwErrors(query, result)
|
|
54
55
|
return result[0].payload_hashes.map(() => true)
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -62,13 +63,13 @@ export class ArchivistWrapper<TWrappedModule extends ArchivistModule = Archivist
|
|
|
62
63
|
|
|
63
64
|
async insert(payloads: Payload[]): Promise<BoundWitness[]> {
|
|
64
65
|
const queryPayload = PayloadWrapper.parse<ArchivistInsertQuery>({
|
|
65
|
-
payloads:
|
|
66
|
+
payloads: await PayloadHasher.hashes(payloads),
|
|
66
67
|
schema: ArchivistInsertQuerySchema,
|
|
67
68
|
})
|
|
68
69
|
const query = await this.bindQuery(queryPayload, payloads)
|
|
69
|
-
const result = await this.module.query(query[0], [queryPayload.payload, ...payloads])
|
|
70
|
+
const result = await this.module.query(query[0], [queryPayload.payload(), ...payloads])
|
|
70
71
|
const innerBoundWitnesses = result[1]?.filter<BoundWitness>((payload): payload is BoundWitness => payload?.schema === BoundWitnessSchema) ?? []
|
|
71
|
-
this.throwErrors(query, result)
|
|
72
|
+
await this.throwErrors(query, result)
|
|
72
73
|
return [result[0], ...innerBoundWitnesses]
|
|
73
74
|
}
|
|
74
75
|
}
|