@spacesprotocol/libveritas 0.0.0-dev.20260323124800 → 0.0.0-dev.20260323225724
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/libveritas.d.ts +6 -2
- package/libveritas.js +24 -12
- package/libveritas_bg.wasm +0 -0
- package/package.json +1 -1
package/libveritas.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export class Anchors {
|
|
5
5
|
free(): void;
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
|
-
|
|
7
|
+
computeTrustSet(): any;
|
|
8
8
|
constructor(json: string);
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -232,6 +232,10 @@ export class VerifiedMessage {
|
|
|
232
232
|
* Get the verified message as borsh bytes.
|
|
233
233
|
*/
|
|
234
234
|
message_bytes(): Uint8Array;
|
|
235
|
+
/**
|
|
236
|
+
* The root id this message was verified against.
|
|
237
|
+
*/
|
|
238
|
+
rootId(): Uint8Array;
|
|
235
239
|
/**
|
|
236
240
|
* All verified zones as plain JS objects.
|
|
237
241
|
*/
|
|
@@ -241,7 +245,7 @@ export class VerifiedMessage {
|
|
|
241
245
|
export class Veritas {
|
|
242
246
|
free(): void;
|
|
243
247
|
[Symbol.dispose](): void;
|
|
244
|
-
|
|
248
|
+
computeTrustSet(): any;
|
|
245
249
|
is_finalized(commitment_height: number): boolean;
|
|
246
250
|
constructor(anchors: Anchors);
|
|
247
251
|
newest_anchor(): number;
|
package/libveritas.js
CHANGED
|
@@ -12,13 +12,14 @@ class Anchors {
|
|
|
12
12
|
wasm.__wbg_anchors_free(ptr, 0);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* @returns {
|
|
15
|
+
* @returns {any}
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
const ret = wasm.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
computeTrustSet() {
|
|
18
|
+
const ret = wasm.anchors_computeTrustSet(this.__wbg_ptr);
|
|
19
|
+
if (ret[2]) {
|
|
20
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
21
|
+
}
|
|
22
|
+
return takeFromExternrefTable0(ret[0]);
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* @param {string} json
|
|
@@ -636,6 +637,16 @@ class VerifiedMessage {
|
|
|
636
637
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
637
638
|
return v1;
|
|
638
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* The root id this message was verified against.
|
|
642
|
+
* @returns {Uint8Array}
|
|
643
|
+
*/
|
|
644
|
+
rootId() {
|
|
645
|
+
const ret = wasm.verifiedmessage_rootId(this.__wbg_ptr);
|
|
646
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
647
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
648
|
+
return v1;
|
|
649
|
+
}
|
|
639
650
|
/**
|
|
640
651
|
* All verified zones as plain JS objects.
|
|
641
652
|
* @returns {any}
|
|
@@ -663,13 +674,14 @@ class Veritas {
|
|
|
663
674
|
wasm.__wbg_veritas_free(ptr, 0);
|
|
664
675
|
}
|
|
665
676
|
/**
|
|
666
|
-
* @returns {
|
|
677
|
+
* @returns {any}
|
|
667
678
|
*/
|
|
668
|
-
|
|
669
|
-
const ret = wasm.
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
679
|
+
computeTrustSet() {
|
|
680
|
+
const ret = wasm.veritas_computeTrustSet(this.__wbg_ptr);
|
|
681
|
+
if (ret[2]) {
|
|
682
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
683
|
+
}
|
|
684
|
+
return takeFromExternrefTable0(ret[0]);
|
|
673
685
|
}
|
|
674
686
|
/**
|
|
675
687
|
* @param {number} commitment_height
|
package/libveritas_bg.wasm
CHANGED
|
Binary file
|