@peerbit/shared-log 16.0.14 → 16.0.15

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.
@@ -1167,4 +1167,18 @@ export class NativeBackboneWriteThroughBlockStore {
1167
1167
  // callers that gate durable-only behavior on this flag behave correctly.
1168
1168
  return true;
1169
1169
  }
1170
+
1171
+ get crashSafeDurability() {
1172
+ const durable = this.durable.crashSafeDurability;
1173
+ if (!durable) {
1174
+ return undefined;
1175
+ }
1176
+ return {
1177
+ crashSafe: true as const,
1178
+ barrier: async () => {
1179
+ await this.drainDurable();
1180
+ await durable.barrier();
1181
+ },
1182
+ };
1183
+ }
1170
1184
  }
@@ -88,6 +88,28 @@ export class ConfirmEntriesMessage extends TransportMessage {
88
88
  }
89
89
  }
90
90
 
91
+ /**
92
+ * Correlated request for a point-in-time persisted-entry receipt.
93
+ *
94
+ * `expectedReceiverSession` binds the request to the transport session that
95
+ * advertised support. Unknown/legacy peers ignore this variant and therefore
96
+ * can never be counted as persisted replicas.
97
+ */
98
+ @variant([0, 13])
99
+ export class RequestPersistedEntriesV1 extends TransportMessage {
100
+ @field({ type: "u64" })
101
+ expectedReceiverSession: bigint;
102
+
103
+ @field({ type: vec("string") })
104
+ hashes: string[];
105
+
106
+ constructor(props: { expectedReceiverSession: bigint; hashes: string[] }) {
107
+ super();
108
+ this.expectedReceiverSession = props.expectedReceiverSession;
109
+ this.hashes = props.hashes;
110
+ }
111
+ }
112
+
91
113
  export const SIMPLE_SYNC_RAW_EXCHANGE_HEADS_CAPABILITY = 1;
92
114
 
93
115
  @variant([0, 8])