@spacesprotocol/libveritas 0.0.0-dev.20260322184924 → 0.0.0-dev.20260322225540

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 CHANGED
@@ -262,6 +262,13 @@ export class Veritas {
262
262
  verifyWithOptions(ctx: QueryContext, msg: Message, options: number): VerifiedMessage;
263
263
  }
264
264
 
265
+ /**
266
+ * Create a .spacecert file from a subject name and certificate bytes.
267
+ *
268
+ * Collects certificates from multiple verified messages into a single chain.
269
+ */
270
+ export function createCertificateChain(subject: string, cert_bytes_list: Uint8Array[]): Uint8Array;
271
+
265
272
  /**
266
273
  * Decode stored zone bytes to a plain JS object.
267
274
  */
package/libveritas.js CHANGED
@@ -773,6 +773,29 @@ class Veritas {
773
773
  if (Symbol.dispose) Veritas.prototype[Symbol.dispose] = Veritas.prototype.free;
774
774
  exports.Veritas = Veritas;
775
775
 
776
+ /**
777
+ * Create a .spacecert file from a subject name and certificate bytes.
778
+ *
779
+ * Collects certificates from multiple verified messages into a single chain.
780
+ * @param {string} subject
781
+ * @param {Uint8Array[]} cert_bytes_list
782
+ * @returns {Uint8Array}
783
+ */
784
+ function createCertificateChain(subject, cert_bytes_list) {
785
+ const ptr0 = passStringToWasm0(subject, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
786
+ const len0 = WASM_VECTOR_LEN;
787
+ const ptr1 = passArrayJsValueToWasm0(cert_bytes_list, wasm.__wbindgen_malloc);
788
+ const len1 = WASM_VECTOR_LEN;
789
+ const ret = wasm.createCertificateChain(ptr0, len0, ptr1, len1);
790
+ if (ret[3]) {
791
+ throw takeFromExternrefTable0(ret[2]);
792
+ }
793
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
794
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
795
+ return v3;
796
+ }
797
+ exports.createCertificateChain = createCertificateChain;
798
+
776
799
  /**
777
800
  * Decode stored zone bytes to a plain JS object.
778
801
  * @param {Uint8Array} bytes
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spacesprotocol/libveritas",
3
- "version": "0.0.0-dev.20260322184924",
3
+ "version": "0.0.0-dev.20260322225540",
4
4
  "files": [
5
5
  "libveritas_bg.wasm",
6
6
  "libveritas.js",