@spacesprotocol/libveritas 0.0.0-dev.20260330202221 → 0.0.0-dev.20260401060144

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
@@ -40,18 +40,19 @@ export class Message {
40
40
  free(): void;
41
41
  [Symbol.dispose](): void;
42
42
  /**
43
- * Decode a message from borsh bytes.
43
+ * Decode a message from bytes.
44
44
  */
45
45
  constructor(bytes: Uint8Array);
46
46
  /**
47
- * Set the signature on an unsigned record set.
48
- *
49
- * `signer` is the canonical signer name from the unsigned record.
50
- * `signature` is the 64-byte Schnorr signature.
47
+ * Set delegate records on the message for a canonical name.
48
+ */
49
+ setDelegateRecords(canonical: string, records_bytes: Uint8Array): void;
50
+ /**
51
+ * Set records on the message for a canonical name.
51
52
  */
52
- setSignature(signer: string, signature: Uint8Array): void;
53
+ setRecords(canonical: string, records_bytes: Uint8Array): void;
53
54
  /**
54
- * Serialize the message to borsh bytes.
55
+ * Serialize the message to bytes.
55
56
  */
56
57
  toBytes(): Uint8Array;
57
58
  /**
@@ -87,23 +88,20 @@ export class MessageBuilder {
87
88
  /**
88
89
  * Add a .spacecert chain with records (sip7 wire bytes).
89
90
  */
90
- addHandle(chain_bytes: Uint8Array, records_bytes: Uint8Array, rev: boolean): void;
91
+ addHandle(chain_bytes: Uint8Array, records_bytes: Uint8Array): void;
91
92
  /**
92
93
  * Add records for a handle (sip7 wire bytes).
93
94
  */
94
- addRecords(handle: string, records_bytes: Uint8Array, rev: boolean): void;
95
+ addRecords(handle: string, records_bytes: Uint8Array): void;
95
96
  /**
96
97
  * Add a full data update (records + optional delegate records).
97
98
  */
98
99
  addUpdate(entry: any): void;
99
100
  /**
100
- * Build the message from a borsh-encoded ChainProof.
101
+ * Build the message from a ChainProof.
101
102
  *
102
103
  * Consumes the builder — cannot be called twice.
103
- *
104
- * Returns `{ message, unsigned }` where `unsigned` is an array of
105
- * `{ handle, signer, signingId }` for each record set that needs signing.
106
- * After signing, call `message.setSignature(signer, sig)` for each.
104
+ * Returns `{ message, unsigned }` with unsigned record sets that need signing.
107
105
  */
108
106
  build(chain_proof: Uint8Array): any;
109
107
  /**
@@ -154,9 +152,10 @@ export class Record {
154
152
  private constructor();
155
153
  free(): void;
156
154
  [Symbol.dispose](): void;
155
+ static addr(key: string, value: any): any;
157
156
  static blob(key: string, value: Uint8Array): any;
158
157
  static seq(version: bigint): any;
159
- static sig(signer: string, rev: string, sig: Uint8Array): any;
158
+ static sig(canonical: string, handle: string, flags: number, sig: Uint8Array): any;
160
159
  static txt(key: string, value: any): any;
161
160
  static unknown(rtype: number, rdata: Uint8Array): any;
162
161
  }
@@ -200,6 +199,49 @@ export class RecordSet {
200
199
  unpack(): any;
201
200
  }
202
201
 
202
+ export function SIG_PRIMARY_ZONE(): number;
203
+
204
+ /**
205
+ * An unsigned record set pending signature.
206
+ */
207
+ export class UnsignedRecordSet {
208
+ private constructor();
209
+ free(): void;
210
+ [Symbol.dispose](): void;
211
+ /**
212
+ * The canonical/flattened name.
213
+ */
214
+ canonical(): string;
215
+ /**
216
+ * Current sig flags.
217
+ */
218
+ flags(): number;
219
+ /**
220
+ * The original handle name (before flattening).
221
+ */
222
+ handle(): string;
223
+ /**
224
+ * Whether these are delegate records.
225
+ */
226
+ isDelegate(): boolean;
227
+ /**
228
+ * Pack the Sig record with the given signature. Returns signed RecordSet wire bytes.
229
+ */
230
+ packSig(signature: Uint8Array): Uint8Array;
231
+ /**
232
+ * Set sig flags (e.g. `SIG_PRIMARY_ZONE`).
233
+ */
234
+ setFlags(flags: number): void;
235
+ /**
236
+ * The raw signable bytes (before hashing). Use when the signer doesn't take a digest.
237
+ */
238
+ signableBytes(): Uint8Array;
239
+ /**
240
+ * The 32-byte signing hash (Spaces signed-message prefix + SHA256).
241
+ */
242
+ signingId(): Uint8Array;
243
+ }
244
+
203
245
  export function VERIFY_DEFAULT(): number;
204
246
 
205
247
  export function VERIFY_DEV_MODE(): number;
@@ -222,7 +264,7 @@ export class VerifiedMessage {
222
264
  */
223
265
  message(): Message;
224
266
  /**
225
- * Get the verified message as borsh bytes.
267
+ * Get the verified message as bytes.
226
268
  */
227
269
  messageBytes(): Uint8Array;
228
270
  /**
@@ -293,7 +335,7 @@ export function verifySpacesMessage(msg: Uint8Array, signature: Uint8Array, pubk
293
335
  export function zoneIsBetterThan(a: any, b: any): boolean;
294
336
 
295
337
  /**
296
- * Serialize a zone JS object to borsh bytes for storage.
338
+ * Serialize a zone JS object to bytes for storage.
297
339
  */
298
340
  export function zoneToBytes(zone: any): Uint8Array;
299
341
 
@@ -301,8 +343,8 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
301
343
 
302
344
  export interface InitOutput {
303
345
  readonly memory: WebAssembly.Memory;
346
+ readonly SIG_PRIMARY_ZONE: () => number;
304
347
  readonly VERIFY_DEFAULT: () => number;
305
- readonly VERIFY_DEV_MODE: () => number;
306
348
  readonly VERIFY_ENABLE_SNARK: () => number;
307
349
  readonly __wbg_anchors_free: (a: number, b: number) => void;
308
350
  readonly __wbg_lookup_free: (a: number, b: number) => void;
@@ -311,6 +353,7 @@ export interface InitOutput {
311
353
  readonly __wbg_querycontext_free: (a: number, b: number) => void;
312
354
  readonly __wbg_record_free: (a: number, b: number) => void;
313
355
  readonly __wbg_recordset_free: (a: number, b: number) => void;
356
+ readonly __wbg_unsignedrecordset_free: (a: number, b: number) => void;
314
357
  readonly __wbg_verifiedmessage_free: (a: number, b: number) => void;
315
358
  readonly __wbg_veritas_free: (a: number, b: number) => void;
316
359
  readonly anchors_computeTrustSet: (a: number) => [number, number, number];
@@ -324,13 +367,14 @@ export interface InitOutput {
324
367
  readonly lookup_new: (a: number, b: number) => [number, number, number];
325
368
  readonly lookup_start: (a: number) => [number, number];
326
369
  readonly message_from_bytes: (a: number, b: number) => [number, number, number];
327
- readonly message_setSignature: (a: number, b: number, c: number, d: number, e: number) => [number, number];
370
+ readonly message_setDelegateRecords: (a: number, b: number, c: number, d: number, e: number) => [number, number];
371
+ readonly message_setRecords: (a: number, b: number, c: number, d: number, e: number) => [number, number];
328
372
  readonly message_toBytes: (a: number) => [number, number];
329
373
  readonly message_update: (a: number, b: any) => [number, number];
330
374
  readonly messagebuilder_addCert: (a: number, b: number, c: number) => [number, number];
331
375
  readonly messagebuilder_addChain: (a: number, b: number, c: number) => [number, number];
332
- readonly messagebuilder_addHandle: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
333
- readonly messagebuilder_addRecords: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
376
+ readonly messagebuilder_addHandle: (a: number, b: number, c: number, d: number, e: number) => [number, number];
377
+ readonly messagebuilder_addRecords: (a: number, b: number, c: number, d: number, e: number) => [number, number];
334
378
  readonly messagebuilder_addUpdate: (a: number, b: any) => [number, number];
335
379
  readonly messagebuilder_build: (a: number, b: number, c: number) => [number, number, number];
336
380
  readonly messagebuilder_chainProofRequest: (a: number) => [number, number, number];
@@ -338,9 +382,10 @@ export interface InitOutput {
338
382
  readonly querycontext_addRequest: (a: number, b: number, c: number) => [number, number];
339
383
  readonly querycontext_addZone: (a: number, b: number, c: number) => [number, number];
340
384
  readonly querycontext_new: () => number;
385
+ readonly record_addr: (a: number, b: number, c: any) => any;
341
386
  readonly record_blob: (a: number, b: number, c: number, d: number) => any;
342
387
  readonly record_seq: (a: bigint) => any;
343
- readonly record_sig: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
388
+ readonly record_sig: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
344
389
  readonly record_txt: (a: number, b: number, c: any) => any;
345
390
  readonly record_unknown: (a: number, b: number, c: number) => any;
346
391
  readonly recordset_isEmpty: (a: number) => number;
@@ -349,6 +394,14 @@ export interface InitOutput {
349
394
  readonly recordset_signingId: (a: number) => [number, number];
350
395
  readonly recordset_toBytes: (a: number) => [number, number];
351
396
  readonly recordset_unpack: (a: number) => [number, number, number];
397
+ readonly unsignedrecordset_canonical: (a: number) => [number, number];
398
+ readonly unsignedrecordset_flags: (a: number) => number;
399
+ readonly unsignedrecordset_handle: (a: number) => [number, number];
400
+ readonly unsignedrecordset_isDelegate: (a: number) => number;
401
+ readonly unsignedrecordset_packSig: (a: number, b: number, c: number) => [number, number];
402
+ readonly unsignedrecordset_setFlags: (a: number, b: number) => void;
403
+ readonly unsignedrecordset_signableBytes: (a: number) => [number, number];
404
+ readonly unsignedrecordset_signingId: (a: number) => [number, number];
352
405
  readonly verifiedmessage_certificates: (a: number) => [number, number];
353
406
  readonly verifiedmessage_message: (a: number) => number;
354
407
  readonly verifiedmessage_messageBytes: (a: number) => [number, number];
@@ -411,6 +464,7 @@ export interface InitOutput {
411
464
  readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
412
465
  readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
413
466
  readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
467
+ readonly VERIFY_DEV_MODE: () => number;
414
468
  readonly sys_panic: (a: number, b: number) => void;
415
469
  readonly sys_verify_integrity2: (a: number, b: number) => void;
416
470
  readonly sys_read_words: (a: number, b: number, c: number) => number;
package/libveritas.js CHANGED
@@ -129,7 +129,7 @@ export class Message {
129
129
  wasm.__wbg_message_free(ptr, 0);
130
130
  }
131
131
  /**
132
- * Decode a message from borsh bytes.
132
+ * Decode a message from bytes.
133
133
  * @param {Uint8Array} bytes
134
134
  */
135
135
  constructor(bytes) {
@@ -144,25 +144,37 @@ export class Message {
144
144
  return this;
145
145
  }
146
146
  /**
147
- * Set the signature on an unsigned record set.
148
- *
149
- * `signer` is the canonical signer name from the unsigned record.
150
- * `signature` is the 64-byte Schnorr signature.
151
- * @param {string} signer
152
- * @param {Uint8Array} signature
147
+ * Set delegate records on the message for a canonical name.
148
+ * @param {string} canonical
149
+ * @param {Uint8Array} records_bytes
153
150
  */
154
- setSignature(signer, signature) {
155
- const ptr0 = passStringToWasm0(signer, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
151
+ setDelegateRecords(canonical, records_bytes) {
152
+ const ptr0 = passStringToWasm0(canonical, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
156
153
  const len0 = WASM_VECTOR_LEN;
157
- const ptr1 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
154
+ const ptr1 = passArray8ToWasm0(records_bytes, wasm.__wbindgen_malloc);
158
155
  const len1 = WASM_VECTOR_LEN;
159
- const ret = wasm.message_setSignature(this.__wbg_ptr, ptr0, len0, ptr1, len1);
156
+ const ret = wasm.message_setDelegateRecords(this.__wbg_ptr, ptr0, len0, ptr1, len1);
160
157
  if (ret[1]) {
161
158
  throw takeFromExternrefTable0(ret[0]);
162
159
  }
163
160
  }
164
161
  /**
165
- * Serialize the message to borsh bytes.
162
+ * Set records on the message for a canonical name.
163
+ * @param {string} canonical
164
+ * @param {Uint8Array} records_bytes
165
+ */
166
+ setRecords(canonical, records_bytes) {
167
+ const ptr0 = passStringToWasm0(canonical, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
168
+ const len0 = WASM_VECTOR_LEN;
169
+ const ptr1 = passArray8ToWasm0(records_bytes, wasm.__wbindgen_malloc);
170
+ const len1 = WASM_VECTOR_LEN;
171
+ const ret = wasm.message_setRecords(this.__wbg_ptr, ptr0, len0, ptr1, len1);
172
+ if (ret[1]) {
173
+ throw takeFromExternrefTable0(ret[0]);
174
+ }
175
+ }
176
+ /**
177
+ * Serialize the message to bytes.
166
178
  * @returns {Uint8Array}
167
179
  */
168
180
  toBytes() {
@@ -236,14 +248,13 @@ export class MessageBuilder {
236
248
  * Add a .spacecert chain with records (sip7 wire bytes).
237
249
  * @param {Uint8Array} chain_bytes
238
250
  * @param {Uint8Array} records_bytes
239
- * @param {boolean} rev
240
251
  */
241
- addHandle(chain_bytes, records_bytes, rev) {
252
+ addHandle(chain_bytes, records_bytes) {
242
253
  const ptr0 = passArray8ToWasm0(chain_bytes, wasm.__wbindgen_malloc);
243
254
  const len0 = WASM_VECTOR_LEN;
244
255
  const ptr1 = passArray8ToWasm0(records_bytes, wasm.__wbindgen_malloc);
245
256
  const len1 = WASM_VECTOR_LEN;
246
- const ret = wasm.messagebuilder_addHandle(this.__wbg_ptr, ptr0, len0, ptr1, len1, rev);
257
+ const ret = wasm.messagebuilder_addHandle(this.__wbg_ptr, ptr0, len0, ptr1, len1);
247
258
  if (ret[1]) {
248
259
  throw takeFromExternrefTable0(ret[0]);
249
260
  }
@@ -252,14 +263,13 @@ export class MessageBuilder {
252
263
  * Add records for a handle (sip7 wire bytes).
253
264
  * @param {string} handle
254
265
  * @param {Uint8Array} records_bytes
255
- * @param {boolean} rev
256
266
  */
257
- addRecords(handle, records_bytes, rev) {
267
+ addRecords(handle, records_bytes) {
258
268
  const ptr0 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
259
269
  const len0 = WASM_VECTOR_LEN;
260
270
  const ptr1 = passArray8ToWasm0(records_bytes, wasm.__wbindgen_malloc);
261
271
  const len1 = WASM_VECTOR_LEN;
262
- const ret = wasm.messagebuilder_addRecords(this.__wbg_ptr, ptr0, len0, ptr1, len1, rev);
272
+ const ret = wasm.messagebuilder_addRecords(this.__wbg_ptr, ptr0, len0, ptr1, len1);
263
273
  if (ret[1]) {
264
274
  throw takeFromExternrefTable0(ret[0]);
265
275
  }
@@ -275,13 +285,10 @@ export class MessageBuilder {
275
285
  }
276
286
  }
277
287
  /**
278
- * Build the message from a borsh-encoded ChainProof.
288
+ * Build the message from a ChainProof.
279
289
  *
280
290
  * Consumes the builder — cannot be called twice.
281
- *
282
- * Returns `{ message, unsigned }` where `unsigned` is an array of
283
- * `{ handle, signer, signingId }` for each record set that needs signing.
284
- * After signing, call `message.setSignature(signer, sig)` for each.
291
+ * Returns `{ message, unsigned }` with unsigned record sets that need signing.
285
292
  * @param {Uint8Array} chain_proof
286
293
  * @returns {any}
287
294
  */
@@ -392,6 +399,17 @@ export class Record {
392
399
  const ptr = this.__destroy_into_raw();
393
400
  wasm.__wbg_record_free(ptr, 0);
394
401
  }
402
+ /**
403
+ * @param {string} key
404
+ * @param {any} value
405
+ * @returns {any}
406
+ */
407
+ static addr(key, value) {
408
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
409
+ const len0 = WASM_VECTOR_LEN;
410
+ const ret = wasm.record_addr(ptr0, len0, value);
411
+ return ret;
412
+ }
395
413
  /**
396
414
  * @param {string} key
397
415
  * @param {Uint8Array} value
@@ -414,19 +432,20 @@ export class Record {
414
432
  return ret;
415
433
  }
416
434
  /**
417
- * @param {string} signer
418
- * @param {string} rev
435
+ * @param {string} canonical
436
+ * @param {string} handle
437
+ * @param {number} flags
419
438
  * @param {Uint8Array} sig
420
439
  * @returns {any}
421
440
  */
422
- static sig(signer, rev, sig) {
423
- const ptr0 = passStringToWasm0(signer, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
441
+ static sig(canonical, handle, flags, sig) {
442
+ const ptr0 = passStringToWasm0(canonical, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
424
443
  const len0 = WASM_VECTOR_LEN;
425
- const ptr1 = passStringToWasm0(rev, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
444
+ const ptr1 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
426
445
  const len1 = WASM_VECTOR_LEN;
427
446
  const ptr2 = passArray8ToWasm0(sig, wasm.__wbindgen_malloc);
428
447
  const len2 = WASM_VECTOR_LEN;
429
- const ret = wasm.record_sig(ptr0, len0, ptr1, len1, ptr2, len2);
448
+ const ret = wasm.record_sig(ptr0, len0, ptr1, len1, flags, ptr2, len2);
430
449
  return ret;
431
450
  }
432
451
  /**
@@ -550,6 +569,126 @@ export class RecordSet {
550
569
  }
551
570
  if (Symbol.dispose) RecordSet.prototype[Symbol.dispose] = RecordSet.prototype.free;
552
571
 
572
+ /**
573
+ * @returns {number}
574
+ */
575
+ export function SIG_PRIMARY_ZONE() {
576
+ const ret = wasm.SIG_PRIMARY_ZONE();
577
+ return ret;
578
+ }
579
+
580
+ /**
581
+ * An unsigned record set pending signature.
582
+ */
583
+ export class UnsignedRecordSet {
584
+ static __wrap(ptr) {
585
+ ptr = ptr >>> 0;
586
+ const obj = Object.create(UnsignedRecordSet.prototype);
587
+ obj.__wbg_ptr = ptr;
588
+ UnsignedRecordSetFinalization.register(obj, obj.__wbg_ptr, obj);
589
+ return obj;
590
+ }
591
+ __destroy_into_raw() {
592
+ const ptr = this.__wbg_ptr;
593
+ this.__wbg_ptr = 0;
594
+ UnsignedRecordSetFinalization.unregister(this);
595
+ return ptr;
596
+ }
597
+ free() {
598
+ const ptr = this.__destroy_into_raw();
599
+ wasm.__wbg_unsignedrecordset_free(ptr, 0);
600
+ }
601
+ /**
602
+ * The canonical/flattened name.
603
+ * @returns {string}
604
+ */
605
+ canonical() {
606
+ let deferred1_0;
607
+ let deferred1_1;
608
+ try {
609
+ const ret = wasm.unsignedrecordset_canonical(this.__wbg_ptr);
610
+ deferred1_0 = ret[0];
611
+ deferred1_1 = ret[1];
612
+ return getStringFromWasm0(ret[0], ret[1]);
613
+ } finally {
614
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
615
+ }
616
+ }
617
+ /**
618
+ * Current sig flags.
619
+ * @returns {number}
620
+ */
621
+ flags() {
622
+ const ret = wasm.unsignedrecordset_flags(this.__wbg_ptr);
623
+ return ret;
624
+ }
625
+ /**
626
+ * The original handle name (before flattening).
627
+ * @returns {string}
628
+ */
629
+ handle() {
630
+ let deferred1_0;
631
+ let deferred1_1;
632
+ try {
633
+ const ret = wasm.unsignedrecordset_handle(this.__wbg_ptr);
634
+ deferred1_0 = ret[0];
635
+ deferred1_1 = ret[1];
636
+ return getStringFromWasm0(ret[0], ret[1]);
637
+ } finally {
638
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
639
+ }
640
+ }
641
+ /**
642
+ * Whether these are delegate records.
643
+ * @returns {boolean}
644
+ */
645
+ isDelegate() {
646
+ const ret = wasm.unsignedrecordset_isDelegate(this.__wbg_ptr);
647
+ return ret !== 0;
648
+ }
649
+ /**
650
+ * Pack the Sig record with the given signature. Returns signed RecordSet wire bytes.
651
+ * @param {Uint8Array} signature
652
+ * @returns {Uint8Array}
653
+ */
654
+ packSig(signature) {
655
+ const ptr0 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
656
+ const len0 = WASM_VECTOR_LEN;
657
+ const ret = wasm.unsignedrecordset_packSig(this.__wbg_ptr, ptr0, len0);
658
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
659
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
660
+ return v2;
661
+ }
662
+ /**
663
+ * Set sig flags (e.g. `SIG_PRIMARY_ZONE`).
664
+ * @param {number} flags
665
+ */
666
+ setFlags(flags) {
667
+ wasm.unsignedrecordset_setFlags(this.__wbg_ptr, flags);
668
+ }
669
+ /**
670
+ * The raw signable bytes (before hashing). Use when the signer doesn't take a digest.
671
+ * @returns {Uint8Array}
672
+ */
673
+ signableBytes() {
674
+ const ret = wasm.unsignedrecordset_signableBytes(this.__wbg_ptr);
675
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
676
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
677
+ return v1;
678
+ }
679
+ /**
680
+ * The 32-byte signing hash (Spaces signed-message prefix + SHA256).
681
+ * @returns {Uint8Array}
682
+ */
683
+ signingId() {
684
+ const ret = wasm.unsignedrecordset_signingId(this.__wbg_ptr);
685
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
686
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
687
+ return v1;
688
+ }
689
+ }
690
+ if (Symbol.dispose) UnsignedRecordSet.prototype[Symbol.dispose] = UnsignedRecordSet.prototype.free;
691
+
553
692
  /**
554
693
  * @returns {number}
555
694
  */
@@ -614,7 +753,7 @@ export class VerifiedMessage {
614
753
  return Message.__wrap(ret);
615
754
  }
616
755
  /**
617
- * Get the verified message as borsh bytes.
756
+ * Get the verified message as bytes.
618
757
  * @returns {Uint8Array}
619
758
  */
620
759
  messageBytes() {
@@ -873,7 +1012,7 @@ export function zoneIsBetterThan(a, b) {
873
1012
  }
874
1013
 
875
1014
  /**
876
- * Serialize a zone JS object to borsh bytes for storage.
1015
+ * Serialize a zone JS object to bytes for storage.
877
1016
  * @param {any} zone
878
1017
  * @returns {Uint8Array}
879
1018
  */
@@ -890,55 +1029,50 @@ export function zoneToBytes(zone) {
890
1029
  function __wbg_get_imports() {
891
1030
  const import0 = {
892
1031
  __proto__: null,
893
- __wbg_Error_55538483de6e3abe: function(arg0, arg1) {
1032
+ __wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
894
1033
  const ret = Error(getStringFromWasm0(arg0, arg1));
895
1034
  return ret;
896
1035
  },
897
- __wbg___wbindgen_bigint_get_as_i64_a738e80c0fe6f6a7: function(arg0, arg1) {
1036
+ __wbg___wbindgen_bigint_get_as_i64_2c5082002e4826e2: function(arg0, arg1) {
898
1037
  const v = arg1;
899
1038
  const ret = typeof(v) === 'bigint' ? v : undefined;
900
1039
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
901
1040
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
902
1041
  },
903
- __wbg___wbindgen_boolean_get_fe2a24fdfdb4064f: function(arg0) {
904
- const v = arg0;
905
- const ret = typeof(v) === 'boolean' ? v : undefined;
906
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
907
- },
908
- __wbg___wbindgen_debug_string_d89627202d0155b7: function(arg0, arg1) {
1042
+ __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
909
1043
  const ret = debugString(arg1);
910
1044
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
911
1045
  const len1 = WASM_VECTOR_LEN;
912
1046
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
913
1047
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
914
1048
  },
915
- __wbg___wbindgen_is_bigint_ca270ac12ef71091: function(arg0) {
1049
+ __wbg___wbindgen_is_bigint_6c98f7e945dacdde: function(arg0) {
916
1050
  const ret = typeof(arg0) === 'bigint';
917
1051
  return ret;
918
1052
  },
919
- __wbg___wbindgen_is_null_8d90524c9e0af183: function(arg0) {
1053
+ __wbg___wbindgen_is_null_344c8750a8525473: function(arg0) {
920
1054
  const ret = arg0 === null;
921
1055
  return ret;
922
1056
  },
923
- __wbg___wbindgen_is_string_624d5244bb2bc87c: function(arg0) {
1057
+ __wbg___wbindgen_is_string_b29b5c5a8065ba1a: function(arg0) {
924
1058
  const ret = typeof(arg0) === 'string';
925
1059
  return ret;
926
1060
  },
927
- __wbg___wbindgen_is_undefined_87a3a837f331fef5: function(arg0) {
1061
+ __wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
928
1062
  const ret = arg0 === undefined;
929
1063
  return ret;
930
1064
  },
931
- __wbg___wbindgen_jsval_eq_eedd705f9f2a4f35: function(arg0, arg1) {
1065
+ __wbg___wbindgen_jsval_eq_7d430e744a913d26: function(arg0, arg1) {
932
1066
  const ret = arg0 === arg1;
933
1067
  return ret;
934
1068
  },
935
- __wbg___wbindgen_number_get_769f3676dc20c1d7: function(arg0, arg1) {
1069
+ __wbg___wbindgen_number_get_7579aab02a8a620c: function(arg0, arg1) {
936
1070
  const obj = arg1;
937
1071
  const ret = typeof(obj) === 'number' ? obj : undefined;
938
1072
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
939
1073
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
940
1074
  },
941
- __wbg___wbindgen_string_get_f1161390414f9b59: function(arg0, arg1) {
1075
+ __wbg___wbindgen_string_get_914df97fcfa788f2: function(arg0, arg1) {
942
1076
  const obj = arg1;
943
1077
  const ret = typeof(obj) === 'string' ? obj : undefined;
944
1078
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -946,30 +1080,30 @@ function __wbg_get_imports() {
946
1080
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
947
1081
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
948
1082
  },
949
- __wbg___wbindgen_throw_5549492daedad139: function(arg0, arg1) {
1083
+ __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
950
1084
  throw new Error(getStringFromWasm0(arg0, arg1));
951
1085
  },
952
- __wbg_from_45cebbf5e49a6ac6: function(arg0) {
1086
+ __wbg_from_741da0f916ab74aa: function(arg0) {
953
1087
  const ret = Array.from(arg0);
954
1088
  return ret;
955
1089
  },
956
- __wbg_get_94f5fc088edd3138: function(arg0, arg1) {
1090
+ __wbg_get_4848e350b40afc16: function(arg0, arg1) {
957
1091
  const ret = arg0[arg1 >>> 0];
958
1092
  return ret;
959
1093
  },
960
- __wbg_get_ff5f1fb220233477: function() { return handleError(function (arg0, arg1) {
1094
+ __wbg_get_f96702c6245e4ef9: function() { return handleError(function (arg0, arg1) {
961
1095
  const ret = Reflect.get(arg0, arg1);
962
1096
  return ret;
963
1097
  }, arguments); },
964
- __wbg_isArray_867202cf8f195ed8: function(arg0) {
1098
+ __wbg_isArray_db61795ad004c139: function(arg0) {
965
1099
  const ret = Array.isArray(arg0);
966
1100
  return ret;
967
1101
  },
968
- __wbg_length_e6e1633fbea6cfa9: function(arg0) {
1102
+ __wbg_length_0c32cb8543c8e4c8: function(arg0) {
969
1103
  const ret = arg0.length;
970
1104
  return ret;
971
1105
  },
972
- __wbg_length_fae3e439140f48a4: function(arg0) {
1106
+ __wbg_length_6e821edde497a532: function(arg0) {
973
1107
  const ret = arg0.length;
974
1108
  return ret;
975
1109
  },
@@ -977,44 +1111,48 @@ function __wbg_get_imports() {
977
1111
  const ret = Message.__wrap(arg0);
978
1112
  return ret;
979
1113
  },
980
- __wbg_new_4370be21fa2b2f80: function() {
981
- const ret = new Array();
1114
+ __wbg_new_4f9fafbb3909af72: function() {
1115
+ const ret = new Object();
982
1116
  return ret;
983
1117
  },
984
- __wbg_new_48e1d86cfd30c8e7: function() {
985
- const ret = new Object();
1118
+ __wbg_new_f3c9df4f38f3f798: function() {
1119
+ const ret = new Array();
986
1120
  return ret;
987
1121
  },
988
- __wbg_new_from_slice_0bc58e36f82a1b50: function(arg0, arg1) {
1122
+ __wbg_new_from_slice_2580ff33d0d10520: function(arg0, arg1) {
989
1123
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
990
1124
  return ret;
991
1125
  },
992
- __wbg_new_with_length_0f3108b57e05ed7c: function(arg0) {
1126
+ __wbg_new_with_length_9cedd08484b73942: function(arg0) {
993
1127
  const ret = new Uint8Array(arg0 >>> 0);
994
1128
  return ret;
995
1129
  },
996
- __wbg_parse_e5703fd52211e688: function() { return handleError(function (arg0, arg1) {
1130
+ __wbg_parse_545d11396395fbbd: function() { return handleError(function (arg0, arg1) {
997
1131
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
998
1132
  return ret;
999
1133
  }, arguments); },
1000
- __wbg_prototypesetcall_3875d54d12ef2eec: function(arg0, arg1, arg2) {
1134
+ __wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
1001
1135
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1002
1136
  },
1003
- __wbg_push_d0006a37f9fcda6d: function(arg0, arg1) {
1137
+ __wbg_push_6bdbc990be5ac37b: function(arg0, arg1) {
1004
1138
  const ret = arg0.push(arg1);
1005
1139
  return ret;
1006
1140
  },
1007
- __wbg_set_295bad3b5ead4e99: function(arg0, arg1, arg2) {
1141
+ __wbg_set_16a9c1a07b3d38ec: function(arg0, arg1, arg2) {
1008
1142
  arg0.set(getArrayU8FromWasm0(arg1, arg2));
1009
1143
  },
1010
- __wbg_set_991082a7a49971cf: function() { return handleError(function (arg0, arg1, arg2) {
1144
+ __wbg_set_8ee2d34facb8466e: function() { return handleError(function (arg0, arg1, arg2) {
1011
1145
  const ret = Reflect.set(arg0, arg1, arg2);
1012
1146
  return ret;
1013
1147
  }, arguments); },
1014
- __wbg_stringify_b67e2c8c60b93f69: function() { return handleError(function (arg0) {
1148
+ __wbg_stringify_a2c39d991e1bf91d: function() { return handleError(function (arg0) {
1015
1149
  const ret = JSON.stringify(arg0);
1016
1150
  return ret;
1017
1151
  }, arguments); },
1152
+ __wbg_unsignedrecordset_new: function(arg0) {
1153
+ const ret = UnsignedRecordSet.__wrap(arg0);
1154
+ return ret;
1155
+ },
1018
1156
  __wbindgen_cast_0000000000000001: function(arg0) {
1019
1157
  // Cast intrinsic for `F64 -> Externref`.
1020
1158
  const ret = arg0;
@@ -1067,6 +1205,9 @@ const RecordFinalization = (typeof FinalizationRegistry === 'undefined')
1067
1205
  const RecordSetFinalization = (typeof FinalizationRegistry === 'undefined')
1068
1206
  ? { register: () => {}, unregister: () => {} }
1069
1207
  : new FinalizationRegistry(ptr => wasm.__wbg_recordset_free(ptr >>> 0, 1));
1208
+ const UnsignedRecordSetFinalization = (typeof FinalizationRegistry === 'undefined')
1209
+ ? { register: () => {}, unregister: () => {} }
1210
+ : new FinalizationRegistry(ptr => wasm.__wbg_unsignedrecordset_free(ptr >>> 0, 1));
1070
1211
  const VerifiedMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1071
1212
  ? { register: () => {}, unregister: () => {} }
1072
1213
  : new FinalizationRegistry(ptr => wasm.__wbg_verifiedmessage_free(ptr >>> 0, 1));
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spacesprotocol/libveritas",
3
3
  "type": "module",
4
- "version": "0.0.0-dev.20260330202221",
4
+ "version": "0.0.0-dev.20260401060144",
5
5
  "files": [
6
6
  "libveritas_bg.wasm",
7
7
  "libveritas.js",