@enbox/dwn-sdk-js 0.0.8 → 0.1.1

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.
Files changed (90) hide show
  1. package/LICENSE +3 -2
  2. package/dist/browser.mjs +5 -5
  3. package/dist/browser.mjs.map +3 -3
  4. package/dist/esm/generated/precompiled-validators.js +219 -165
  5. package/dist/esm/generated/precompiled-validators.js.map +1 -1
  6. package/dist/esm/src/core/dwn-error.js +3 -0
  7. package/dist/esm/src/core/dwn-error.js.map +1 -1
  8. package/dist/esm/src/core/protocol-authorization-action.js +5 -0
  9. package/dist/esm/src/core/protocol-authorization-action.js.map +1 -1
  10. package/dist/esm/src/core/protocol-authorization-validation.js +24 -0
  11. package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
  12. package/dist/esm/src/core/protocol-authorization.js +3 -1
  13. package/dist/esm/src/core/protocol-authorization.js.map +1 -1
  14. package/dist/esm/src/core/resumable-task-manager.js +2 -0
  15. package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
  16. package/dist/esm/src/dwn.js +19 -5
  17. package/dist/esm/src/dwn.js.map +1 -1
  18. package/dist/esm/src/handlers/records-read.js +5 -1
  19. package/dist/esm/src/handlers/records-read.js.map +1 -1
  20. package/dist/esm/src/handlers/records-write.js +81 -0
  21. package/dist/esm/src/handlers/records-write.js.map +1 -1
  22. package/dist/esm/src/interfaces/protocols-configure.js +9 -1
  23. package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
  24. package/dist/esm/src/interfaces/records-write.js +3 -0
  25. package/dist/esm/src/interfaces/records-write.js.map +1 -1
  26. package/dist/esm/src/store/storage-controller.js +64 -0
  27. package/dist/esm/src/store/storage-controller.js.map +1 -1
  28. package/dist/esm/src/types/protocols-types.js +1 -0
  29. package/dist/esm/src/types/protocols-types.js.map +1 -1
  30. package/dist/esm/tests/features/records-delivery.spec.js +236 -0
  31. package/dist/esm/tests/features/records-delivery.spec.js.map +1 -0
  32. package/dist/esm/tests/features/records-squash.spec.js +1055 -0
  33. package/dist/esm/tests/features/records-squash.spec.js.map +1 -0
  34. package/dist/esm/tests/handlers/records-read.spec.js +6 -2
  35. package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
  36. package/dist/esm/tests/handlers/records-write.spec.js +3 -0
  37. package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
  38. package/dist/esm/tests/test-suite.js +4 -0
  39. package/dist/esm/tests/test-suite.js.map +1 -1
  40. package/dist/esm/tests/utils/test-data-generator.js +1 -0
  41. package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
  42. package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
  43. package/dist/types/src/core/dwn-error.d.ts +3 -0
  44. package/dist/types/src/core/dwn-error.d.ts.map +1 -1
  45. package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -1
  46. package/dist/types/src/core/protocol-authorization-validation.d.ts +9 -0
  47. package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -1
  48. package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
  49. package/dist/types/src/core/resumable-task-manager.d.ts +2 -1
  50. package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
  51. package/dist/types/src/dwn.d.ts +9 -0
  52. package/dist/types/src/dwn.d.ts.map +1 -1
  53. package/dist/types/src/handlers/records-read.d.ts.map +1 -1
  54. package/dist/types/src/handlers/records-write.d.ts +8 -0
  55. package/dist/types/src/handlers/records-write.d.ts.map +1 -1
  56. package/dist/types/src/index.d.ts +1 -1
  57. package/dist/types/src/index.d.ts.map +1 -1
  58. package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
  59. package/dist/types/src/interfaces/records-write.d.ts +6 -0
  60. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  61. package/dist/types/src/store/storage-controller.d.ts +16 -2
  62. package/dist/types/src/store/storage-controller.d.ts.map +1 -1
  63. package/dist/types/src/types/protocols-types.d.ts +29 -2
  64. package/dist/types/src/types/protocols-types.d.ts.map +1 -1
  65. package/dist/types/src/types/records-types.d.ts +7 -0
  66. package/dist/types/src/types/records-types.d.ts.map +1 -1
  67. package/dist/types/tests/features/records-delivery.spec.d.ts +2 -0
  68. package/dist/types/tests/features/records-delivery.spec.d.ts.map +1 -0
  69. package/dist/types/tests/features/records-squash.spec.d.ts +2 -0
  70. package/dist/types/tests/features/records-squash.spec.d.ts.map +1 -0
  71. package/dist/types/tests/handlers/records-read.spec.d.ts.map +1 -1
  72. package/dist/types/tests/handlers/records-write.spec.d.ts.map +1 -1
  73. package/dist/types/tests/test-suite.d.ts.map +1 -1
  74. package/dist/types/tests/utils/test-data-generator.d.ts +1 -0
  75. package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
  76. package/package.json +3 -3
  77. package/src/core/dwn-error.ts +3 -0
  78. package/src/core/protocol-authorization-action.ts +5 -0
  79. package/src/core/protocol-authorization-validation.ts +37 -0
  80. package/src/core/protocol-authorization.ts +4 -0
  81. package/src/core/resumable-task-manager.ts +3 -1
  82. package/src/dwn.ts +30 -5
  83. package/src/handlers/records-read.ts +5 -1
  84. package/src/handlers/records-write.ts +106 -0
  85. package/src/index.ts +1 -1
  86. package/src/interfaces/protocols-configure.ts +12 -1
  87. package/src/interfaces/records-write.ts +10 -0
  88. package/src/store/storage-controller.ts +78 -1
  89. package/src/types/protocols-types.ts +32 -1
  90. package/src/types/records-types.ts +8 -0
@@ -1 +1 @@
1
- {"version":3,"file":"records-types.d.ts","sourceRoot":"","sources":["../../../../src/types/records-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,UAAU,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AC;CACrC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC;IACpC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAA;CACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function testRecordsDelivery(): void;
2
+ //# sourceMappingURL=records-delivery.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records-delivery.spec.d.ts","sourceRoot":"","sources":["../../../../tests/features/records-delivery.spec.ts"],"names":[],"mappings":"AAiBA,wBAAgB,mBAAmB,IAAI,IAAI,CAmQ1C"}
@@ -0,0 +1,2 @@
1
+ export declare function testRecordsSquash(): void;
2
+ //# sourceMappingURL=records-squash.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records-squash.spec.d.ts","sourceRoot":"","sources":["../../../../tests/features/records-squash.spec.ts"],"names":[],"mappings":"AAqBA,wBAAgB,iBAAiB,IAAI,IAAI,CA4oCxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"records-read.spec.d.ts","sourceRoot":"","sources":["../../../../tests/handlers/records-read.spec.ts"],"names":[],"mappings":"AAgCA,wBAAgB,sBAAsB,IAAI,IAAI,CAknE7C"}
1
+ {"version":3,"file":"records-read.spec.d.ts","sourceRoot":"","sources":["../../../../tests/handlers/records-read.spec.ts"],"names":[],"mappings":"AAgCA,wBAAgB,sBAAsB,IAAI,IAAI,CAsnE7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"records-write.spec.d.ts","sourceRoot":"","sources":["../../../../tests/handlers/records-write.spec.ts"],"names":[],"mappings":"AAmDA,wBAAgB,uBAAuB,IAAI,IAAI,CAu/I9C"}
1
+ {"version":3,"file":"records-write.spec.d.ts","sourceRoot":"","sources":["../../../../tests/handlers/records-write.spec.ts"],"names":[],"mappings":"AAmDA,wBAAgB,uBAAuB,IAAI,IAAI,CA2/I9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"test-suite.d.ts","sourceRoot":"","sources":["../../../tests/test-suite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAqCzG;;GAEG;AACH,qBAAa,SAAS;IAEpB;;;OAGG;WACW,2BAA2B,CAAC,SAAS,CAAC,EAAE;QACpD,YAAY,CAAC,EAAE,YAAY,CAAC;QAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;KACzC,GAAG,IAAI;CA4CT"}
1
+ {"version":3,"file":"test-suite.d.ts","sourceRoot":"","sources":["../../../tests/test-suite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAuCzG;;GAEG;AACH,qBAAa,SAAS;IAEpB;;;OAGG;WACW,2BAA2B,CAAC,SAAS,CAAC,EAAE;QACpD,YAAY,CAAC,EAAE,YAAY,CAAC;QAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;KACzC,GAAG,IAAI;CA8CT"}
@@ -105,6 +105,7 @@ export type GenerateRecordsWriteInput = {
105
105
  datePublished?: string;
106
106
  encryptionInput?: EncryptionInput;
107
107
  permissionGrantId?: string;
108
+ squash?: true;
108
109
  };
109
110
  export type GenerateFromRecordsWriteInput = {
110
111
  author: Persona;
@@ -1 +1 @@
1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EG;WACiB,yBAAyB,CAAC,KAAK,CAAC,EAAE,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC;WAuB3G,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAmB/G;;OAEG;WACW,qBAAqB,IAAI,kBAAkB;IAMzD;;OAEG;WACW,8BAA8B,IAAI,UAAU;IAU1D;;OAEG;WACiB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAQ5D;;OAEG;WACW,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAYlD;;OAEG;WACW,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU;IASrD;;OAEG;WACiB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC;IAO1D;;;;OAIG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzD;;;;OAIG;WACW,eAAe,CAAC,OAAO,CAAC,EAAE;QACtC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KACzI,GAAG,MAAM;IAcV;;OAEG;WACW,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,mBAAmB;IAiB9E;;OAEG;WACiB,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;CAgC9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enbox/dwn-sdk-js",
3
- "version": "0.0.8",
3
+ "version": "0.1.1",
4
4
  "description": "A reference implementation of https://identity.foundation/decentralized-web-node/spec/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,8 +64,8 @@
64
64
  },
65
65
  "react-native": "./dist/esm/src/index.js",
66
66
  "dependencies": {
67
- "@enbox/crypto": "0.0.5",
68
- "@enbox/dids": "0.0.6",
67
+ "@enbox/crypto": "0.0.7",
68
+ "@enbox/dids": "0.0.8",
69
69
  "@ipld/dag-cbor": "9.0.3",
70
70
  "@js-temporal/polyfill": "0.4.4",
71
71
  "@noble/ciphers": "0.5.3",
@@ -86,6 +86,9 @@ export enum DwnErrorCode {
86
86
  ProtocolAuthorizationMinSizeInvalid = 'ProtocolAuthorizationMinSizeInvalid',
87
87
  ProtocolAuthorizationRecordLimitExceeded = 'ProtocolAuthorizationRecordLimitExceeded',
88
88
  ProtocolAuthorizationRecordLimitStrategyNotImplemented = 'ProtocolAuthorizationRecordLimitStrategyNotImplemented',
89
+ ProtocolAuthorizationSquashNotEnabled = 'ProtocolAuthorizationSquashNotEnabled',
90
+ ProtocolAuthorizationSquashNotInitialWrite = 'ProtocolAuthorizationSquashNotInitialWrite',
91
+ ProtocolAuthorizationSquashBackstop = 'ProtocolAuthorizationSquashBackstop',
89
92
  ProtocolAuthorizationMissingContextId = 'ProtocolAuthorizationMissingContextId',
90
93
  ProtocolAuthorizationMissingRuleSet = 'ProtocolAuthorizationMissingRuleSet',
91
94
  ProtocolAuthorizationParentlessIncorrectProtocolPath = 'ProtocolAuthorizationParentlessIncorrectProtocolPath',
@@ -191,6 +191,11 @@ export async function getActionsSeekingARuleMatch(
191
191
  const incomingRecordsWrite = incomingMessage as RecordsWrite;
192
192
 
193
193
  if (await incomingRecordsWrite.isInitialWrite()) {
194
+ // A squash write seeks the `squash` action first, with fallback to `create`.
195
+ // This means any DID authorized to `create` can also squash when no explicit `squash` rule exists.
196
+ if (incomingRecordsWrite.message.descriptor.squash === true) {
197
+ return [ProtocolAction.Squash, ProtocolAction.Create];
198
+ }
194
199
  return [ProtocolAction.Create];
195
200
  } else {
196
201
  // else incoming RecordsWrite not an initial write
@@ -459,6 +459,43 @@ export async function verifyRecordLimit(
459
459
  }
460
460
  }
461
461
 
462
+ /**
463
+ * Verifies that a `RecordsWrite` with `squash: true` is eligible:
464
+ * 1. The protocol rule set at the record's `protocolPath` must have `$squash: true`.
465
+ * 2. The squash write must be an initial write (a new record, not an update).
466
+ *
467
+ * @throws {DwnError} with `ProtocolAuthorizationSquashNotEnabled` if `$squash` is not enabled.
468
+ * @throws {DwnError} with `ProtocolAuthorizationSquashNotInitialWrite` if the squash write is not an initial write.
469
+ */
470
+ export async function verifySquashEligibility(
471
+ incomingMessage: RecordsWrite,
472
+ ruleSet: ProtocolRuleSet,
473
+ ): Promise<void> {
474
+ const squash = incomingMessage.message.descriptor.squash;
475
+
476
+ if (squash !== true) {
477
+ return;
478
+ }
479
+
480
+ // squash write must be at a protocol path with $squash: true
481
+ if (ruleSet.$squash !== true) {
482
+ throw new DwnError(
483
+ DwnErrorCode.ProtocolAuthorizationSquashNotEnabled,
484
+ `squash writes are not enabled at protocol path '${incomingMessage.message.descriptor.protocolPath}': ` +
485
+ `rule set must have $squash: true.`
486
+ );
487
+ }
488
+
489
+ // squash write must be an initial write (a new record, not an update)
490
+ const isInitialWrite = await incomingMessage.isInitialWrite();
491
+ if (!isInitialWrite) {
492
+ throw new DwnError(
493
+ DwnErrorCode.ProtocolAuthorizationSquashNotInitialWrite,
494
+ `squash write must be an initial write (a new record): updates cannot be squash writes.`
495
+ );
496
+ }
497
+ }
498
+
462
499
  /**
463
500
  * Verifies that an update is not attempted on a record whose protocol path has `$immutable: true`.
464
501
  *
@@ -23,6 +23,7 @@ import {
23
23
  verifyProtocolPathAndContextId,
24
24
  verifyRecordLimit,
25
25
  verifySizeLimit,
26
+ verifySquashEligibility,
26
27
  verifyTagsIfNeeded,
27
28
  verifyTypeWithComposition,
28
29
  } from './protocol-authorization-validation.js';
@@ -105,6 +106,9 @@ export class ProtocolAuthorization {
105
106
  // Verify immutability — reject updates to write-once records
106
107
  await verifyImmutability(incomingMessage, ruleSet);
107
108
 
109
+ // Verify squash eligibility — ensure squash writes are at $squash: true paths and are initial writes
110
+ await verifySquashEligibility(incomingMessage, ruleSet);
111
+
108
112
  // Verify record count limit
109
113
  await verifyRecordLimit(tenant, incomingMessage, ruleSet, messageStore);
110
114
  }
@@ -3,6 +3,7 @@ import type { ManagedResumableTask, ResumableTaskStore } from '../types/resumabl
3
3
 
4
4
  export enum ResumableTaskName {
5
5
  RecordsDelete = 'RecordsDelete',
6
+ RecordsSquash = 'RecordsSquash',
6
7
  }
7
8
 
8
9
  export type ResumableTask = {
@@ -26,7 +27,8 @@ export class ResumableTaskManager {
26
27
  this.resumableTaskHandlers = {
27
28
  // NOTE: The arrow function is IMPORTANT here, else the `this` context will be lost within the invoked method.
28
29
  // e.g. code within performRecordsDelete() won't know `this` refers to the `storageController` instance.
29
- [ResumableTaskName.RecordsDelete]: async (task): Promise<void> => await storageController.performRecordsDelete(task),
30
+ [ResumableTaskName.RecordsDelete] : async (task): Promise<void> => await storageController.performRecordsDelete(task),
31
+ [ResumableTaskName.RecordsSquash] : async (task): Promise<void> => await storageController.performRecordsSquash(task),
30
32
  };
31
33
  }
32
34
 
package/src/dwn.ts CHANGED
@@ -30,7 +30,7 @@ import { RecordsSubscribeHandler } from './handlers/records-subscribe.js';
30
30
  import { RecordsWriteHandler } from './handlers/records-write.js';
31
31
  import { ResumableTaskManager } from './core/resumable-task-manager.js';
32
32
  import { StorageController } from './store/storage-controller.js';
33
- import { DidDht, DidJwk, DidKey, DidResolverCacheLevel, DidWeb, UniversalResolver } from '@enbox/dids';
33
+ import { DidDht, DidJwk, DidKey, DidResolverCacheMemory, DidWeb, UniversalResolver } from '@enbox/dids';
34
34
  import { DwnInterfaceName, DwnMethodName } from './enums/dwn-interface-method.js';
35
35
 
36
36
  export class Dwn {
@@ -46,8 +46,12 @@ export class Dwn {
46
46
  private resumableTaskManager: ResumableTaskManager;
47
47
  private _coreProtocols: CoreProtocolRegistry;
48
48
 
49
+ /** Whether the DWN owns the resolver's lifecycle (i.e., created it via defaults). */
50
+ private ownsResolver: boolean;
51
+
49
52
  private constructor(config: DwnConfig) {
50
53
  this.didResolver = config.didResolver!;
54
+ this.ownsResolver = config.ownsResolver ?? false;
51
55
  this.tenantGate = config.tenantGate!;
52
56
  this.messageStore = config.messageStore;
53
57
  this.dataStore = config.dataStore;
@@ -102,10 +106,13 @@ export class Dwn {
102
106
  * Creates an instance of the DWN.
103
107
  */
104
108
  public static async create(config: DwnConfig): Promise<Dwn> {
105
- config.didResolver ??= new UniversalResolver({
106
- didResolvers : [ DidDht, DidJwk, DidKey, DidWeb ],
107
- cache : new DidResolverCacheLevel({ location: 'RESOLVERCACHE' }),
108
- });
109
+ if (!config.didResolver) {
110
+ config.didResolver = new UniversalResolver({
111
+ didResolvers : [ DidDht, DidJwk, DidKey, DidWeb ],
112
+ cache : new DidResolverCacheMemory(),
113
+ });
114
+ config.ownsResolver = true;
115
+ }
109
116
  config.tenantGate ??= new AllowAllTenantGate();
110
117
 
111
118
  const dwn = new Dwn(config);
@@ -117,6 +124,11 @@ export class Dwn {
117
124
  * Initializes the DWN instance and opens the connection to it.
118
125
  */
119
126
  public async open(): Promise<void> {
127
+ // Open the resolver's cache if the DWN owns it (created via defaults).
128
+ if (this.ownsResolver && typeof (this.didResolver as any).open === 'function') {
129
+ await (this.didResolver as any).open();
130
+ }
131
+
120
132
  await this.messageStore.open();
121
133
  await this.dataStore.open();
122
134
  await this.resumableTaskStore.open();
@@ -132,6 +144,11 @@ export class Dwn {
132
144
  await this.dataStore.close();
133
145
  await this.resumableTaskStore.close();
134
146
  await this.stateIndex.close();
147
+
148
+ // Close the resolver's cache if the DWN owns it.
149
+ if (this.ownsResolver && typeof (this.didResolver as any).close === 'function') {
150
+ await (this.didResolver as any).close();
151
+ }
135
152
  }
136
153
 
137
154
  /**
@@ -256,6 +273,14 @@ export type DwnConfig = {
256
273
  didResolver?: DidResolver;
257
274
  tenantGate?: TenantGate;
258
275
 
276
+ /**
277
+ * Internal flag indicating the DWN created and owns the resolver's lifecycle.
278
+ * When true, the DWN will call open()/close() on the resolver during its own lifecycle.
279
+ * Set automatically by `Dwn.create()` when it creates a default resolver.
280
+ * @internal
281
+ */
282
+ ownsResolver?: boolean;
283
+
259
284
  /**
260
285
  * Persistent event log with cursor-based reads and in-process subscriptions.
261
286
  * Optional — if not provided, subscriptions will not be supported.
@@ -122,8 +122,12 @@ export class RecordsReadHandler implements MethodHandler {
122
122
  } else {
123
123
  const result = await this.deps.dataStore!.get(tenant, matchedRecordsWrite.recordId, matchedRecordsWrite.descriptor.dataCid);
124
124
  if (result?.dataStream === undefined) {
125
+ // The message envelope exists but the record data is unavailable (e.g., evicted
126
+ // by a storage-constrained node, or read proxying to peer endpoints failed).
127
+ // Return 410 with the recordsWrite so the requester can try an alternative endpoint.
125
128
  return {
126
- status: { code: 404, detail: 'Not Found' }
129
+ status : { code: 410, detail: 'Record data not available' },
130
+ entry : { recordsWrite: matchedRecordsWrite },
127
131
  };
128
132
  }
129
133
  data = result.dataStream;
@@ -1,3 +1,4 @@
1
+ import type { Filter } from '../types/query-types.js';
1
2
  import type { GenericMessageReply } from '../types/message-types.js';
2
3
  import type { MessageStore } from '../types/message-store.js';
3
4
  import type { HandlerDependencies, MethodHandler } from '../types/method-handler.js';
@@ -8,12 +9,16 @@ import { Cid } from '../utils/cid.js';
8
9
  import { DataStream } from '../utils/data-stream.js';
9
10
  import { DwnConstant } from '../core/dwn-constant.js';
10
11
  import { Encoder } from '../utils/encoder.js';
12
+ import { FilterUtility } from '../utils/filter.js';
11
13
  import { Message } from '../core/message.js';
12
14
  import { messageReplyFromError } from '../core/message-reply.js';
13
15
  import { PermissionsProtocol } from '../protocols/permissions.js';
14
16
  import { ProtocolAuthorization } from '../core/protocol-authorization.js';
17
+ import { Records } from '../utils/records.js';
15
18
  import { RecordsGrantAuthorization } from '../core/records-grant-authorization.js';
16
19
  import { RecordsWrite } from '../interfaces/records-write.js';
20
+ import { ResumableTaskName } from '../core/resumable-task-manager.js';
21
+ import { SortDirection } from '../types/query-types.js';
17
22
  import { StorageController } from '../store/storage-controller.js';
18
23
  import { DwnError, DwnErrorCode } from '../core/dwn-error.js';
19
24
  import { DwnInterfaceName, DwnMethodName } from '../enums/dwn-interface-method.js';
@@ -65,6 +70,15 @@ export class RecordsWriteHandler implements MethodHandler {
65
70
  }
66
71
  }
67
72
 
73
+ // Squash backstop: if the protocol path has $squash: true, reject any write whose
74
+ // messageTimestamp is <= the most recent squash record at the same path and parent context.
75
+ // The squash record acts as a temporal floor — no record older than the latest squash can exist.
76
+ try {
77
+ await this.enforceSquashBackstop(tenant, message);
78
+ } catch (e) {
79
+ return messageReplyFromError(e, 409);
80
+ }
81
+
68
82
  const newestExistingMessage = await Message.getNewestMessage(existingMessages);
69
83
 
70
84
  let incomingMessageIsNewest = false;
@@ -167,6 +181,15 @@ export class RecordsWriteHandler implements MethodHandler {
167
181
  tenant, existingMessages, newestMessage, this.deps.messageStore, this.deps.dataStore!, this.deps.stateIndex!
168
182
  );
169
183
 
184
+ // Squash processing: if the incoming write is a squash, delete all older sibling records
185
+ // at the same protocol path and parent context. Uses the resumable task system for crash safety.
186
+ if (message.descriptor.squash === true) {
187
+ await this.deps.resumableTaskManager!.run({
188
+ name : ResumableTaskName.RecordsSquash,
189
+ data : { tenant, message }
190
+ });
191
+ }
192
+
170
193
  // Dispatch post-processing hooks to the core protocol, if applicable.
171
194
  // This allows core protocols to perform cascading side effects after a successful write
172
195
  // (e.g. deleting messages authorized by a revoked grant).
@@ -306,6 +329,89 @@ export class RecordsWriteHandler implements MethodHandler {
306
329
  }
307
330
  }
308
331
 
332
+ /**
333
+ * Enforces the squash backstop: if the incoming message is at a protocol path with `$squash: true`,
334
+ * and there exists a squash record at the same protocol path and parent context whose
335
+ * `messageTimestamp` is >= the incoming message's `messageTimestamp`, reject with 409.
336
+ *
337
+ * This check only applies to protocol-based records at `$squash: true` paths.
338
+ */
339
+ private async enforceSquashBackstop(tenant: string, message: RecordsWriteMessage): Promise<void> {
340
+ // Only applies to protocol-based records
341
+ if (message.descriptor.protocol === undefined || message.descriptor.protocolPath === undefined) {
342
+ return;
343
+ }
344
+
345
+ // Fetch the protocol definition to check if $squash is enabled at this path.
346
+ // Pass coreProtocols so that core protocols (e.g. permissions) are resolved from the registry.
347
+ let protocolDefinition;
348
+ try {
349
+ protocolDefinition = await ProtocolAuthorization.fetchProtocolDefinition(
350
+ tenant,
351
+ message.descriptor.protocol,
352
+ this.deps.messageStore,
353
+ undefined,
354
+ this.deps.coreProtocols,
355
+ );
356
+ } catch (error) {
357
+ // If the protocol definition can't be found, skip the backstop check.
358
+ // Authorization will handle the missing protocol error later.
359
+ console.warn(`enforceSquashBackstop: failed to fetch protocol definition for '${message.descriptor.protocol}':`, error);
360
+ return;
361
+ }
362
+
363
+ // Walk the structure to find the rule set for this protocol path
364
+ const pathSegments = message.descriptor.protocolPath.split('/');
365
+ let ruleSet = protocolDefinition.structure[pathSegments[0]];
366
+ for (let i = 1; i < pathSegments.length && ruleSet !== undefined; i++) {
367
+ ruleSet = ruleSet[pathSegments[i]] as typeof ruleSet;
368
+ }
369
+
370
+ if (ruleSet === undefined || ruleSet.$squash !== true) {
371
+ return;
372
+ }
373
+
374
+ // Find the most recent squash record at the same protocol path and parent context
375
+ const filter: Filter = {
376
+ interface : DwnInterfaceName.Records,
377
+ method : DwnMethodName.Write,
378
+ isLatestBaseState : true,
379
+ protocol : message.descriptor.protocol,
380
+ protocolPath : message.descriptor.protocolPath,
381
+ squash : true,
382
+ };
383
+
384
+ // Scope by parent context for nested records
385
+ const parentContextId = Records.getParentContextFromOfContextId(message.contextId);
386
+ if (parentContextId !== undefined && parentContextId !== '') {
387
+ const prefixFilter = FilterUtility.constructPrefixFilterAsRangeFilter(parentContextId);
388
+ filter.contextId = prefixFilter;
389
+ }
390
+
391
+ const { messages: squashMessages } = await this.deps.messageStore.query(
392
+ tenant,
393
+ [filter],
394
+ { messageTimestamp: SortDirection.Descending },
395
+ { limit: 1 },
396
+ );
397
+
398
+ if (squashMessages.length === 0) {
399
+ return;
400
+ }
401
+
402
+ const newestSquash = squashMessages[0] as RecordsWriteMessage;
403
+
404
+ // Reject if the incoming message's timestamp is <= the squash record's timestamp
405
+ if (message.descriptor.messageTimestamp <= newestSquash.descriptor.messageTimestamp) {
406
+ throw new DwnError(
407
+ DwnErrorCode.ProtocolAuthorizationSquashBackstop,
408
+ `incoming message timestamp '${message.descriptor.messageTimestamp}' is not newer than ` +
409
+ `the most recent squash record timestamp '${newestSquash.descriptor.messageTimestamp}' ` +
410
+ `at protocol path '${message.descriptor.protocolPath}'.`
411
+ );
412
+ }
413
+ }
414
+
309
415
  private async authorizeRecordsWrite(tenant: string, recordsWrite: RecordsWrite, messageStore: MessageStore): Promise<void> {
310
416
  // if owner signature is given (`owner` is not `undefined`), it must be the same as the tenant DID
311
417
  if (recordsWrite.owner !== undefined && recordsWrite.owner !== tenant) {
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ export type { EventListener, EventLog, EventLogEntry, EventLogReadOptions, Event
4
4
  export type { AuthorizationModel, Descriptor, DelegatedGrantRecordsWriteMessage, GenericMessage, GenericMessageReply, GenericSignaturePayload, MessageSort, MessageSubscription, Pagination, QueryResultEntry, Status } from './types/message-types.js';
5
5
  export type { MessagesFilter, MessagesReadMessage as MessagesReadMessage, MessagesReadReply as MessagesReadReply, MessagesReadReplyEntry as MessagesReadReplyEntry, MessagesReadDescriptor, MessagesSubscribeDescriptor, MessagesSubscribeMessage, MessagesSubscribeReply, MessageSubscriptionHandler, MessagesSubscribeMessageOptions, MessagesSyncAction, MessagesSyncDescriptor, MessagesSyncMessage, MessagesSyncReply } from './types/messages-types.js';
6
6
  export type { GT, LT, Filter, FilterValue, KeyValues, EqualFilter, OneOfFilter, RangeFilter, RangeCriterion, PaginationCursor, QueryOptions, RangeValue, StartsWithFilter } from './types/query-types.js';
7
- export type { ProtocolsConfigureDescriptor, ProtocolDefinition, ProtocolTypes, ProtocolRuleSet, ProtocolsQueryFilter, ProtocolsConfigureMessage, ProtocolsQueryMessage, ProtocolsQueryReply, ProtocolActionRule, ProtocolPathEncryption, ProtocolsQueryDescriptor, ProtocolRecordLimitDefinition, ProtocolSizeDefinition, ProtocolTagsDefinition, ProtocolTagSchema, ProtocolType, ProtocolUses } from './types/protocols-types.js';
7
+ export type { ProtocolsConfigureDescriptor, ProtocolDefinition, ProtocolTypes, ProtocolRuleSet, ProtocolsQueryFilter, ProtocolsConfigureMessage, ProtocolsQueryMessage, ProtocolsQueryReply, ProtocolActionRule, ProtocolDeliveryStrategy, ProtocolPathEncryption, ProtocolsQueryDescriptor, ProtocolRecordLimitDefinition, ProtocolSizeDefinition, ProtocolTagsDefinition, ProtocolTagSchema, ProtocolType, ProtocolUses } from './types/protocols-types.js';
8
8
  export { ProtocolRecordLimitStrategy } from './types/protocols-types.js';
9
9
  export type { DataEncodedRecordsWriteMessage, RecordsCountDescriptor, RecordsCountMessage, RecordsCountReply, RecordsDeleteMessage, RecordsFilter, RecordsQueryMessage, RecordsQueryReply, RecordsQueryReplyEntry, RecordsReadMessage, RecordsReadReply, RecordsSubscribeDescriptor, RecordsSubscribeMessage, RecordsSubscribeReply, RecordSubscriptionHandler, RecordsWriteDescriptor, RecordsWriteTags, RecordsWriteTagValue, RecordsWriteMessage, RecordsWriteSignaturePayload, RecordsDeleteDescriptor, RecordsQueryDescriptor, RecordsReadDescriptor, RecordsSubscribeMessageOptions, RecordsWriteMessageOptions, InternalRecordsWriteMessage, RecordEvent, RecordsWriteTagsFilter } from './types/records-types.js';
10
10
  export type { GeneralJws, SignatureEntry } from './types/jws-types.js';
@@ -418,6 +418,17 @@ export class ProtocolsConfigure extends AbstractMessage<ProtocolsConfigureMessag
418
418
  }
419
419
  }
420
420
 
421
+ // Warn when `$delivery` is set without `$actions`.
422
+ // Delivery targets are determined from `$actions` role records and actor rules.
423
+ // Without `$actions`, the server cannot determine who to deliver records to.
424
+ if (ruleSet.$delivery !== undefined && (ruleSet.$actions === undefined || ruleSet.$actions.length === 0)) {
425
+ console.warn(
426
+ `ProtocolsConfigure: protocol path '${ruleSetProtocolPath}' has $delivery: '${ruleSet.$delivery}' ` +
427
+ `but no $actions rules. The server uses $actions to determine delivery targets — ` +
428
+ `without $actions, no participants can be resolved for delivery.`
429
+ );
430
+ }
431
+
421
432
  // Warn when `$immutable: true` is combined with `$actions` that include `update` or `co-update`.
422
433
  // The `$immutable` directive overrides any update permission — updates are always rejected.
423
434
  if (ruleSet.$immutable === true && actionRules.length > 0) {
@@ -494,7 +505,7 @@ export class ProtocolsConfigure extends AbstractMessage<ProtocolsConfigureMessag
494
505
  }
495
506
 
496
507
  // validate that `$ref` nodes do not have other directives
497
- const forbiddenDirectives = ['$actions', '$role', '$size', '$tags', '$encryption', '$recordLimit', '$immutable'] as const;
508
+ const forbiddenDirectives = ['$actions', '$role', '$size', '$tags', '$encryption', '$recordLimit', '$immutable', '$delivery', '$squash'] as const;
498
509
  for (const directive of forbiddenDirectives) {
499
510
  if (ruleSet[directive] !== undefined) {
500
511
  throw new DwnError(
@@ -79,6 +79,13 @@ export type RecordsWriteOptions = {
79
79
  encryptionInput?: EncryptionInput;
80
80
  permissionGrantId?: string;
81
81
 
82
+ /**
83
+ * When `true`, this record is a squash (snapshot) write that atomically creates a snapshot
84
+ * and deletes all older sibling records at the same protocol path within the same parent context.
85
+ * Only valid at protocol paths with `$squash: true`. Must be an initial write (new record).
86
+ */
87
+ squash?: true;
88
+
82
89
  /**
83
90
  * The author's ProtocolPath-derived public key for key delivery.
84
91
  * When set, this is attached to the authorization model so the DWN owner
@@ -325,6 +332,7 @@ export class RecordsWrite implements MessageInterface<RecordsWriteMessage> {
325
332
  datePublished : options.datePublished,
326
333
  dataFormat : options.dataFormat,
327
334
  permissionGrantId : options.permissionGrantId,
335
+ squash : options.squash,
328
336
  };
329
337
 
330
338
  // generate `datePublished` if the message is to be published but `datePublished` is not given
@@ -742,11 +750,13 @@ export class RecordsWrite implements MessageInterface<RecordsWriteMessage> {
742
750
  // we want to process tags separately from the rest of descriptors as it is an object and not a primitive KeyValue type.
743
751
  const { tags, ...descriptor } = message.descriptor;
744
752
  delete descriptor.published; // handle `published` specifically further down
753
+ delete descriptor.squash; // handle `squash` specifically further down
745
754
 
746
755
  let indexes: KeyValues = {
747
756
  ...descriptor,
748
757
  isLatestBaseState,
749
758
  published : !!message.descriptor.published,
759
+ squash : !!message.descriptor.squash,
750
760
  author : this.author!, //author will not be undefined when indexes are constructed as it's been authorized
751
761
  recordId : message.recordId,
752
762
  entryId : await RecordsWrite.getEntryId(this.author, this.message.descriptor)