@macula-io/ts 0.22.0 → 0.23.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.
package/README.md CHANGED
@@ -102,6 +102,11 @@ const pool = await Pool.connect(key, [{ host: "2600:3c0e::2000:c2ff:fed0:f20b",
102
102
  // trusted only when the realm key authorizes it, and its station dialed.
103
103
  const answer = await pool.call(realm, "mcl-echo/echo", "hello");
104
104
 
105
+ // A payload this node's key vouches for (ownership proof v2, mcl-om#7): the
106
+ // provider refuses it changed, for another procedure or realm, or sent twice.
107
+ const proven = await key.ownershipProof(realm, "mcl-graph/learn_link", { subject: "a", predicate: "knows", object: "b" });
108
+ await pool.call(realm, "mcl-graph/learn_link", proven);
109
+
105
110
  // Publish and subscribe; topics name a kind of fact, ids go in the payload.
106
111
  const sub = await pool.subscribe(realm, "acme/demo/greeting_sent_v1", (e) => console.log(e.payload));
107
112
  await pool.publish(realm, "acme/demo/greeting_sent_v1", { text: "hi" });
@@ -169,6 +174,7 @@ call and session to JavaScript through a `ThreadSafeFunction`.
169
174
  | Publish/subscribe | ✅ | ✅ | Signed publications, delivered once across links |
170
175
  | DHT (`findRecord`, `findRecords`, `findRecordsByType`, `putRecord`) | ✅ | — | Records verified before they are handed on |
171
176
  | Realm proof v2 (`NodeKey.deviceRequestProof`) | ✅ | — | macula-realm#29: a join session over HTTP (`"http"`, the realm's JSON rule) or a membership UCAN over the mesh (`"mesh"`), with its device_info and ttl_seconds, the realm and the procedure signed, and a nonce; the realm's own vector reproduced through macula-go's encoder |
177
+ | Ownership proof v2 (`NodeKey.ownershipProof`) | ✅ | — | mcl-om#7: the payload's `asserted_by`, binding every field a handler reads, the procedure, the realm, a timestamp and a nonce; a payload carrying `caller` is refused; mcl_om's own vector reproduced, and a payload signed here and delivered through a station accepted by mcl_om 0.32.0's `verify_asserted_by` |
172
178
  | Node-served content (`shareContent`, `unshareContent`, `getContent`) | ✅ | ✅ | macula 12.6.0 (D27): shared on the node's own `~<node_id>/content_v1` and announced; a fetch checks the block, the manifest and every chunk against the content id, bounded, with no realm key; `NotSharedError` / `ContentUnavailableError` |
173
179
 
174
180
  ## Not yet implemented
@@ -199,6 +205,10 @@ both ways with macula 12.x. `scripts/cross-verify-macula.sh` renews those: this
199
205
  SDK signs, macula (from hex, in the image macula's own CI runs in) verifies
200
206
  and signs its own, and this SDK verifies it.
201
207
 
208
+ `src/ownershipproof.test.ts` holds ownership proof v2 to mcl_om 0.32.0's own
209
+ vector (`testdata/ownership_proof_vector`, copied from macula-go at the pinned
210
+ release): the bytes it signs, and an Erlang key's signature over them.
211
+
202
212
  `src/fleet.live.test.ts` runs against one real station and is not part of
203
213
  `npm test`. It needs `MACULA_TS_LIVE_SEED` (host:port), `MACULA_TS_LIVE_STATION_ID`
204
214
  (the station's node_id), `MACULA_TS_LIVE_REALM` and `MACULA_TS_LIVE_REALM_KEY`;
package/dist/binding.d.ts CHANGED
@@ -21,6 +21,8 @@ interface Native {
21
21
  keySign(key: Handle, data: Uint8Array): Promise<Uint8Array>;
22
22
  keyDeviceRequestProof(key: Handle, realm: Uint8Array, procedure: string, requestJson: string, rule: number): Promise<string>;
23
23
  deviceRequestMessage(publicKey: Uint8Array, realm: Uint8Array, procedure: string, timestampMs: number, nonce: Uint8Array, requestJson: string, rule: number): Uint8Array;
24
+ keyOwnershipProof(key: Handle, realm: Uint8Array, procedure: string, payloadJson: string): Promise<string>;
25
+ ownershipProofMessage(identity: Uint8Array, realm: Uint8Array, procedure: string, timestampMs: number, nonce: Uint8Array, fieldsJson: string): Uint8Array;
24
26
  keyFree(key: Handle): void;
25
27
  verify(data: Uint8Array, signature: Uint8Array, publicKey: Uint8Array, profile: string): boolean;
26
28
  poolConnect(key: Handle, seedsJson: string, optionsJson: string): Promise<Handle>;
@@ -1 +1 @@
1
- {"version":3,"file":"binding.js","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,sEAAsE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C;AACV,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CACtC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACpF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { NodeKey, JOIN_SESSION_PROCEDURE, MEMBERSHIP_UCAN_PROCEDURE, type Profile, type DeviceRequestRule, type DeviceRequestProof, } from "./key.js";
1
+ export { NodeKey, JOIN_SESSION_PROCEDURE, MEMBERSHIP_UCAN_PROCEDURE, type Profile, type DeviceRequestRule, type DeviceRequestProof, type AssertedBy, type OwnershipProven, } from "./key.js";
2
2
  export { Pool, Subscription, Served, RecordType, type Seed, type PoolOptions, type LinkStatus, type Provider, type Event, type Request, type DhtRecord, } from "./pool.js";
3
3
  export { NotSharedError, ContentUnavailableError, DEFAULT_CONTENT_TIMEOUT_MS, type ContentOptions, type Mcid, } from "./content.js";
4
4
  export { Stream, StreamMode, type StreamEvent, type StreamRequest } from "./stream.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EACL,OAAO,EACP,sBAAsB,EACtB,yBAAyB,GAI1B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAU,GAQX,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,0BAA0B,GAG3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwC,MAAM,aAAa,CAAC;AACvF,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,uBAAuB,GAIxB,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EACL,OAAO,EACP,sBAAsB,EACtB,yBAAyB,GAM1B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAU,GAQX,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,0BAA0B,GAG3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwC,MAAM,aAAa,CAAC;AACvF,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,uBAAuB,GAIxB,MAAM,WAAW,CAAC"}
package/dist/key.d.ts CHANGED
@@ -20,6 +20,24 @@ export interface DeviceRequestProof {
20
20
  nonce: string;
21
21
  signature: string;
22
22
  }
23
+ /** An ownership proof v2 (mcl-om#7) as it goes on the wire, under a
24
+ * payload's "asserted_by": every byte string as lowercase hex. */
25
+ export interface AssertedBy {
26
+ identity: string;
27
+ proof: {
28
+ v: 2;
29
+ timestamp: number;
30
+ nonce: string;
31
+ signature: string;
32
+ public: string;
33
+ };
34
+ }
35
+ /** A payload with its ownership proof v2 under "asserted_by". */
36
+ export type OwnershipProven = {
37
+ [field: string]: JsonValue;
38
+ } & {
39
+ asserted_by: AssertedBy;
40
+ };
23
41
  export declare class NodeKey {
24
42
  private handle;
25
43
  private constructor();
@@ -57,6 +75,31 @@ export declare class NodeKey {
57
75
  static deviceRequestMessage(publicKey: Uint8Array, realm: Id, procedure: string, timestampMs: number, nonce: Uint8Array, request: {
58
76
  [field: string]: JsonValue;
59
77
  }, rule: DeviceRequestRule): Uint8Array;
78
+ /**
79
+ * payload with an ownership proof v2 (mcl-om#7) in its "asserted_by": this
80
+ * key's node authorises every other field of it for procedure in realm, now
81
+ * and with a fresh nonce, once. Send the result as the call's payload; a
82
+ * provider verifying it (mcl_om's verify_asserted_by) refuses it with any
83
+ * field changed, for another procedure or realm, or sent twice. An
84
+ * asserted_by already in payload is replaced. A payload carrying "caller" is
85
+ * refused (MaculaError invalid_argument): a station replaces it with the
86
+ * caller it authenticated, so it can be neither sent nor signed.
87
+ *
88
+ * The result keeps bytes as {"$bytes": ...}, so it goes to Pool.call as
89
+ * it is. Send the result, not your own object with its asserted_by: the
90
+ * fields are signed as they go on the wire (an integral number is an
91
+ * integer, -0 is 0, NaN is null), and the result carries them so.
92
+ */
93
+ ownershipProof(realm: Id, procedure: string, payload: {
94
+ [field: string]: JsonValue;
95
+ }): Promise<OwnershipProven>;
96
+ /** The exact bytes an ownership proof v2 signs for identity (a node_id), at
97
+ * timestampMs with a 16-byte nonce, over payload's fields: all of it but
98
+ * "asserted_by" and a text "caller", as a verifier reads a delivered
99
+ * payload. What mcl_om's vector is checked against. */
100
+ static ownershipProofMessage(identity: Id, realm: Id, procedure: string, timestampMs: number, nonce: Uint8Array, payload: {
101
+ [field: string]: JsonValue;
102
+ }): Uint8Array;
60
103
  /** Whether signature is valid over data for a public key as carried on the
61
104
  * wire (publicKey()), under profile: ML-DSA-87 in pq_pure, and in pq_hybrid
62
105
  * the LAMPS composite id-MLDSA87-RSA4096-PSS-SHA512 with the empty context,
package/dist/key.js CHANGED
@@ -76,6 +76,32 @@ export class NodeKey {
76
76
  static deviceRequestMessage(publicKey, realm, procedure, timestampMs, nonce, request, rule) {
77
77
  return native.deviceRequestMessage(publicKey, id32(realm, "realm"), procedure, timestampMs, nonce, JSON.stringify(request), ruleNumber(rule));
78
78
  }
79
+ /**
80
+ * payload with an ownership proof v2 (mcl-om#7) in its "asserted_by": this
81
+ * key's node authorises every other field of it for procedure in realm, now
82
+ * and with a fresh nonce, once. Send the result as the call's payload; a
83
+ * provider verifying it (mcl_om's verify_asserted_by) refuses it with any
84
+ * field changed, for another procedure or realm, or sent twice. An
85
+ * asserted_by already in payload is replaced. A payload carrying "caller" is
86
+ * refused (MaculaError invalid_argument): a station replaces it with the
87
+ * caller it authenticated, so it can be neither sent nor signed.
88
+ *
89
+ * The result keeps bytes as {"$bytes": ...}, so it goes to Pool.call as
90
+ * it is. Send the result, not your own object with its asserted_by: the
91
+ * fields are signed as they go on the wire (an integral number is an
92
+ * integer, -0 is 0, NaN is null), and the result carries them so.
93
+ */
94
+ async ownershipProof(realm, procedure, payload) {
95
+ const signed = await native.keyOwnershipProof(this.live(), id32(realm, "realm"), procedure, JSON.stringify(payload));
96
+ return JSON.parse(signed);
97
+ }
98
+ /** The exact bytes an ownership proof v2 signs for identity (a node_id), at
99
+ * timestampMs with a 16-byte nonce, over payload's fields: all of it but
100
+ * "asserted_by" and a text "caller", as a verifier reads a delivered
101
+ * payload. What mcl_om's vector is checked against. */
102
+ static ownershipProofMessage(identity, realm, procedure, timestampMs, nonce, payload) {
103
+ return native.ownershipProofMessage(id32(identity, "identity"), id32(realm, "realm"), procedure, timestampMs, nonce, JSON.stringify(payload));
104
+ }
79
105
  /** Whether signature is valid over data for a public key as carried on the
80
106
  * wire (publicKey()), under profile: ML-DSA-87 in pq_pure, and in pq_hybrid
81
107
  * the LAMPS composite id-MLDSA87-RSA4096-PSS-SHA512 with the empty context,
package/dist/key.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"key.js","sourceRoot":"","sources":["../src/key.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,cAAc;AACd,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAe,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAA2B,MAAM,WAAW,CAAC;AAa/D,4DAA4D;AAC5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAClE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,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AE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACrH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAoB,CAAC;IAC/C,CAAC;IAED;;;2DAGuD;IACvD,MAAM,CAAC,qBAAqB,CAAC,QAAY,EAAE,KAAS,EAAE,SAAiB,EAAE,WAAmB,EAAE,KAAiB,EAC7G,OAAuC;QACvC,OAAO,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EACjH,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7B,CAAC;IAED;;;4DAGwD;IACxD,MAAM,CAAC,MAAM,CAAC,IAAgB,EAAE,SAAqB,EAAE,SAAqB,EAAE,OAAO,GAAY,WAAW;QAC1G,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,2DAA2D;IAC3D,IAAI;QACF,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,gBAAgB;IAChB,IAAI;QACF,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAC/E,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macula-io/ts",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "TypeScript SDK for the Macula mesh, over macula-go's shared C ABI",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [