@calimero-network/mero-js 22.0.0 → 22.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.
@@ -14,8 +14,14 @@
14
14
  * op, which is what the e2e does.
15
15
  */
16
16
  import type { SignedGroupOpenInvitation } from '../admin-api/admin-types.js';
17
- /** Core's `SIGNED_NAMESPACE_OP_SCHEMA_VERSION`. A node refuses any other value. */
18
- export declare const SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 11;
17
+ /**
18
+ * Core's `SIGNED_NAMESPACE_OP_SCHEMA_VERSION`. A node refuses any other value.
19
+ *
20
+ * 12: core gained the `RelayTee` role and the TEE admission policy's
21
+ * replica/relay mode. No layout this module signs changed; the version moves
22
+ * with core's so a v11 node and a v12 node never share a namespace.
23
+ */
24
+ export declare const SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 12;
19
25
  /**
20
26
  * Borsh-encode a `SignedGroupOpenInvitation`.
21
27
  *
@@ -1,6 +1,12 @@
1
1
  import { concat, derivePublicKey, fromHex, hex, importSigningKey, u32le, u64le, } from '../crypto/internal.js';
2
- /** Core's `SIGNED_NAMESPACE_OP_SCHEMA_VERSION`. A node refuses any other value. */
3
- export const SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 11;
2
+ /**
3
+ * Core's `SIGNED_NAMESPACE_OP_SCHEMA_VERSION`. A node refuses any other value.
4
+ *
5
+ * 12: core gained the `RelayTee` role and the TEE admission policy's
6
+ * replica/relay mode. No layout this module signs changed; the version moves
7
+ * with core's so a v11 node and a v12 node never share a namespace.
8
+ */
9
+ export const SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 12;
4
10
  /** Domain prefixed to the signable bytes; core's `NAMESPACE_GOVERNANCE_SIGN_DOMAIN`. */
5
11
  const NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode('calimero.namespace.v1');
6
12
  /** `NamespaceOp::Root` is the first variant. */
@@ -95,10 +95,13 @@ export interface IntentResult<T = unknown> {
95
95
  * Thrown when a relay refuses an intent, carrying which precondition failed.
96
96
  *
97
97
  * The distinction is the whole reason this type exists. A `403` from this
98
- * endpoint means one of three unrelated things — no grant on the relay, the
99
- * author is not a member, or the nonce was already spent — and they send a
100
- * caller somewhere completely different: ask an admin, ask for an invitation,
101
- * or just retry. Collapsing them into "forbidden" makes a retryable replay look
98
+ * endpoint means one of several unrelated things — no grant on the relay, the
99
+ * relay is a TEE replica (`ReadOnlyTee`) or a `ReadOnly` member (neither ever
100
+ * relays), the author is
101
+ * not a member or is read-only in the context, or the nonce was already spent
102
+ * — and they send a caller somewhere completely different: ask an admin, pick
103
+ * a relay the namespace admits in `relay` mode, ask for an invitation, or just
104
+ * retry. Collapsing them into "forbidden" makes a retryable replay look
102
105
  * like a permissions bug.
103
106
  */
104
107
  export declare class IntentRefusedError extends Error {
@@ -35,10 +35,13 @@ const DEFAULT_TTL_SECONDS = 300;
35
35
  * Thrown when a relay refuses an intent, carrying which precondition failed.
36
36
  *
37
37
  * The distinction is the whole reason this type exists. A `403` from this
38
- * endpoint means one of three unrelated things — no grant on the relay, the
39
- * author is not a member, or the nonce was already spent — and they send a
40
- * caller somewhere completely different: ask an admin, ask for an invitation,
41
- * or just retry. Collapsing them into "forbidden" makes a retryable replay look
38
+ * endpoint means one of several unrelated things — no grant on the relay, the
39
+ * relay is a TEE replica (`ReadOnlyTee`) or a `ReadOnly` member (neither ever
40
+ * relays), the author is
41
+ * not a member or is read-only in the context, or the nonce was already spent
42
+ * — and they send a caller somewhere completely different: ask an admin, pick
43
+ * a relay the namespace admits in `relay` mode, ask for an invitation, or just
44
+ * retry. Collapsing them into "forbidden" makes a retryable replay look
42
45
  * like a permissions bug.
43
46
  */
44
47
  export class IntentRefusedError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calimero-network/mero-js",
3
- "version": "22.0.0",
3
+ "version": "22.2.0",
4
4
  "description": "Pure JavaScript SDK for Calimero",
5
5
  "type": "module",
6
6
  "exports": {