@calimero-network/mero-js 21.0.0 → 21.2.0

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.
@@ -369,6 +369,47 @@ export interface Namespace {
369
369
  * cannot resolve it (raw-wasm app, legacy key, blob not retained locally).
370
370
  */
371
371
  appVersion?: string;
372
+ /**
373
+ * What the namespace id was derived from, on nodes that hold it: every
374
+ * replica of a namespace founded with a derived id. Absent for namespaces
375
+ * created before ids were derived, and on nodes that predate it.
376
+ */
377
+ founding?: NamespaceFounding;
378
+ /**
379
+ * The founder and genesis op of a namespace created BEFORE ids were derived,
380
+ * on this node's copy. A separate field from `founding`, never inside it: it
381
+ * proves nothing about the id, so it must not be accepted where a derived-id
382
+ * founding is checked. Absent for derived namespaces, and on nodes that
383
+ * predate it.
384
+ */
385
+ legacyFounding?: NamespaceLegacyFounding;
386
+ }
387
+ /**
388
+ * The founder a pre-derivation namespace's plain genesis names, and the hash
389
+ * of that genesis op (its id in the namespace governance DAG). Lets a client
390
+ * see which founder and which exact genesis a replica's copy was founded by,
391
+ * and compare replicas — not a proof of founding: a random id commits to no
392
+ * founder.
393
+ */
394
+ export interface NamespaceLegacyFounding {
395
+ /** Hex `AccountId` of the founder the genesis names. */
396
+ founderAccountId: string;
397
+ /** Lowercase hex 32-byte content hash of the genesis op. */
398
+ genesisOpHash: string;
399
+ }
400
+ /**
401
+ * The founder and salt a namespace id was derived from:
402
+ * `domain_hash("calimero.namespace.id.v1", [founder, salt]) === namespaceId`.
403
+ *
404
+ * Anyone holding both can confirm which account founded the namespace without
405
+ * holding any of its state. Neither is secret, and the salt cannot be replayed
406
+ * for another account: the id commits to the founder.
407
+ */
408
+ export interface NamespaceFounding {
409
+ /** Hex `AccountId` of the founder. */
410
+ founderAccountId: string;
411
+ /** Hex 32-byte salt. */
412
+ salt: string;
372
413
  }
373
414
  export type ListNamespacesResponseData = Namespace[];
374
415
  /**
@@ -596,6 +637,8 @@ export interface CreateNamespaceRequest {
596
637
  }
597
638
  export interface CreateNamespaceResponseData {
598
639
  namespaceId: string;
640
+ /** What the id was derived from. Absent on nodes that predate derived ids. */
641
+ founding?: NamespaceFounding;
599
642
  }
600
643
  export interface DeleteNamespaceResponseData {
601
644
  isDeleted: boolean;