@derec-alliance/nodejs 0.0.1 → 0.0.2

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
@@ -224,9 +224,8 @@ The orchestrator handles the whole chain automatically:
224
224
  keys published by the peer do not match the commitment the scanner
225
225
  originally accepted.
226
226
 
227
- End-to-end orchestrator-level coverage is in
228
- `bindings/nodejs/protocol.ts::runHashedKeysPairingFlow` (happy path +
229
- tampered-hash assertion).
227
+ This flow is covered end to end — happy path and tampered-hash — for every
228
+ SDK. See [End-to-end test coverage](https://github.com/derecalliance/lib-derec#end-to-end-test-coverage).
230
229
 
231
230
  ---
232
231
 
@@ -430,8 +429,8 @@ typed `ReplicaSecretReceived` event:
430
429
  `secret` + `shares` give the Destination everything it needs to act in the
431
430
  Source's place during recovery.
432
431
 
433
- End-to-end coverage lives in
434
- [`runReplicaPairingAndSecretSyncFlow`](../../bindings/nodejs/protocol.ts).
432
+ End-to-end coverage lives in the repository's tests — see
433
+ [End-to-end test coverage](https://github.com/derecalliance/lib-derec#end-to-end-test-coverage).
435
434
 
436
435
  ---
437
436
 
@@ -130,7 +130,7 @@ export class DeRecProtocolBuilder {
130
130
  /**
131
131
  * Higher-level DeRec protocol orchestrator for TypeScript/JavaScript consumers.
132
132
  *
133
- * Wraps [`DeRecProtocol`](crate::protocol::DeRecProtocol) with JS-side store
133
+ * Wraps [`crate::protocol::DeRecProtocol`] with JS-side store
134
134
  * and transport adapters so that a TypeScript application can drive all five
135
135
  * protocol flows without routing raw bytes manually.
136
136
  *
package/derec_library.js CHANGED
@@ -305,7 +305,7 @@ exports.DeRecProtocolBuilder = DeRecProtocolBuilder;
305
305
  /**
306
306
  * Higher-level DeRec protocol orchestrator for TypeScript/JavaScript consumers.
307
307
  *
308
- * Wraps [`DeRecProtocol`](crate::protocol::DeRecProtocol) with JS-side store
308
+ * Wraps [`crate::protocol::DeRecProtocol`] with JS-side store
309
309
  * and transport adapters so that a TypeScript application can drive all five
310
310
  * protocol flows without routing raw bytes manually.
311
311
  *
@@ -1725,7 +1725,7 @@ function __wbg_get_imports() {
1725
1725
  return ret;
1726
1726
  },
1727
1727
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1728
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 373, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1728
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 376, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1729
1729
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h379e0770a020d351);
1730
1730
  return ret;
1731
1731
  },
Binary file
@@ -36,22 +36,19 @@ export const derecprotocolwasm_setOwnTransport: (a: number, b: number, c: number
36
36
  export const derecprotocolwasm_start: (a: number, b: number, c: any) => any;
37
37
  export const derecprotocolwasm_tick: (a: number) => any;
38
38
  export const derecprotocolwasm_verifyFingerprint: (a: number, b: any, c: number, d: number) => any;
39
- export const recovery_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
40
- export const recovery_response_produce: (a: bigint, b: any, c: any, d: number, e: number) => [number, number, number];
41
- export const recovery_response_recover: (a: bigint, b: number, c: any) => [number, number, number];
42
- export const verification_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
43
- export const verification_response_process: (a: any, b: any, c: number, d: number) => [number, number, number];
44
- export const verification_response_produce: (a: bigint, b: any, c: number, d: number, e: number, f: number) => [number, number, number];
45
- export const sharing_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
46
- export const sharing_request_produce: (a: bigint, b: number, c: bigint, d: any, e: any, f: number, g: number, h: number, i: number, j: any) => [number, number, number];
47
- export const sharing_request_split: (a: any, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
48
39
  export const unpairing_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
49
40
  export const unpairing_request_produce: (a: bigint, b: number, c: number, d: number, e: number, f: any) => [number, number, number];
50
41
  export const verification_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
51
42
  export const verification_request_produce: (a: bigint, b: bigint, c: number, d: number, e: number, f: any) => [number, number, number];
43
+ export const recovery_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
44
+ export const recovery_response_produce: (a: bigint, b: any, c: any, d: number, e: number) => [number, number, number];
45
+ export const recovery_response_recover: (a: bigint, b: number, c: any) => [number, number, number];
52
46
  export const unpairing_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
53
47
  export const unpairing_response_process: (a: any) => [number, number, number];
54
48
  export const unpairing_response_produce: (a: bigint, b: number, c: number) => [number, number, number];
49
+ export const sharing_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
50
+ export const sharing_request_produce: (a: bigint, b: number, c: bigint, d: any, e: any, f: number, g: number, h: number, i: number, j: any) => [number, number, number];
51
+ export const sharing_request_split: (a: any, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
55
52
  export const discovery_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
56
53
  export const discovery_request_produce: (a: bigint, b: number, c: number, d: any) => [number, number, number];
57
54
  export const discovery_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
@@ -73,12 +70,15 @@ export const pairing_response_process: (a: any, b: any, c: number, d: number) =>
73
70
  export const pairing_response_process_pre_pair: (a: any, b: any) => [number, number, number];
74
71
  export const pairing_response_produce: (a: bigint, b: any, c: number, d: number, e: any, f: any) => [number, number, number];
75
72
  export const pairing_response_produce_pre_pair: (a: bigint, b: any, c: number, d: number) => [number, number, number];
76
- export const recovery_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
77
- export const recovery_request_produce: (a: bigint, b: bigint, c: number, d: number, e: number, f: any) => [number, number, number];
78
73
  export const sharing_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
79
74
  export const sharing_response_process: (a: number, b: any) => [number, number];
80
75
  export const sharing_response_produce: (a: bigint, b: any, c: number, d: number) => [number, number, number];
76
+ export const verification_response_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
77
+ export const verification_response_process: (a: any, b: any, c: number, d: number) => [number, number, number];
78
+ export const verification_response_produce: (a: bigint, b: any, c: number, d: number, e: number, f: number) => [number, number, number];
81
79
  export const wasm_start: () => void;
80
+ export const recovery_request_extract: (a: number, b: number, c: number, d: number) => [number, number, number];
81
+ export const recovery_request_produce: (a: bigint, b: bigint, c: number, d: number, e: number, f: any) => [number, number, number];
82
82
  export const wasm_bindgen__convert__closures_____invoke__h379e0770a020d351: (a: number, b: number, c: any) => [number, number];
83
83
  export const wasm_bindgen__convert__closures_____invoke__h037700d3f721a480: (a: number, b: number, c: any, d: any) => void;
84
84
  export const __wbindgen_malloc: (a: number, b: number) => number;
package/index.d.ts CHANGED
@@ -62,7 +62,7 @@ export interface SecretStore {
62
62
  *
63
63
  * Do not `JSON.parse` and re-serialise. Every id in these records is a `u64`,
64
64
  * and `JSON.parse` silently rounds anything above 2^53 — the corruption only
65
- * appears once a real id happens to be large. `bindings/web` implements this.
65
+ * appears once a real id happens to be large.
66
66
  */
67
67
  export interface ChannelStore {
68
68
  load(
@@ -1018,6 +1018,8 @@ export interface GetSecretIdsVersionsRequestMessage {
1018
1018
  /** Ephemeral endpoint where the requester wants the response routed.
1019
1019
  * Absent means "use the channel's stored peer endpoint". */
1020
1020
  reply_to?: TransportProtocol;
1021
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1022
+ replica_id?: bigint;
1021
1023
  }
1022
1024
 
1023
1025
  export interface VersionList {
@@ -1034,6 +1036,8 @@ export interface GetSecretIdsVersionsResponseMessage {
1034
1036
  result?: DeRecResult;
1035
1037
  secret_list: VersionList[];
1036
1038
  timestamp?: Timestamp;
1039
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1040
+ replica_id?: bigint;
1037
1041
  }
1038
1042
 
1039
1043
  export interface VersionEntry {
@@ -1128,6 +1132,8 @@ export interface GetShareRequestMessage {
1128
1132
  timestamp?: Timestamp;
1129
1133
  /** Ephemeral response endpoint; see `replyTo` semantics. */
1130
1134
  reply_to?: TransportProtocol;
1135
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1136
+ replica_id?: bigint;
1131
1137
  }
1132
1138
 
1133
1139
  export interface GetShareResponseMessage {
@@ -1141,6 +1147,8 @@ export interface GetShareResponseMessage {
1141
1147
  secret_id: bigint;
1142
1148
  /** Echoed from the request for the same correlation reasons as `secret_id`. */
1143
1149
  version: number;
1150
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1151
+ replica_id?: bigint;
1144
1152
  }
1145
1153
 
1146
1154
  export interface SiblingHash {
@@ -1166,6 +1174,8 @@ export interface StoreShareRequestMessage {
1166
1174
  secret_id: bigint;
1167
1175
  /** Ephemeral response endpoint; see `replyTo` semantics. */
1168
1176
  reply_to?: TransportProtocol;
1177
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1178
+ replica_id?: bigint;
1169
1179
  }
1170
1180
 
1171
1181
  export interface StoreShareResponseMessage {
@@ -1173,6 +1183,8 @@ export interface StoreShareResponseMessage {
1173
1183
  version: number;
1174
1184
  timestamp?: Timestamp;
1175
1185
  secret_id: bigint;
1186
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1187
+ replica_id?: bigint;
1176
1188
  }
1177
1189
 
1178
1190
  export interface UnpairRequestMessage {
@@ -1180,6 +1192,8 @@ export interface UnpairRequestMessage {
1180
1192
  timestamp?: Timestamp;
1181
1193
  /** Ephemeral response endpoint; see `replyTo` semantics. */
1182
1194
  reply_to?: TransportProtocol;
1195
+ /** Replica-group member that sent this; see `replicaId` semantics. */
1196
+ replica_id?: bigint;
1183
1197
  }
1184
1198
 
1185
1199
  export interface UnpairResponseMessage {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@derec-alliance/nodejs",
3
3
  "description": "Node.js WebAssembly bindings for derec-library, the Rust SDK for the DeRec protocol.",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",