@open-e2ee/signal-protocol-sdk 13.4.0 → 13.5.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.
- package/CHANGELOG.md +423 -0
- package/README.md +4 -8
- package/SECURITY.md +2 -2
- package/TROUBLESHOOTING.md +55 -27
- package/dist/client/binary-send.d.ts +28 -0
- package/dist/client/binary-send.d.ts.map +1 -0
- package/dist/client/binary-send.js +26 -0
- package/dist/client/binary-send.js.map +1 -0
- package/dist/client/client.d.ts +46 -6
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +181 -66
- package/dist/client/client.js.map +1 -1
- package/dist/client/content-adapter.d.ts +18 -0
- package/dist/client/content-adapter.d.ts.map +1 -1
- package/dist/client/content-adapter.js.map +1 -1
- package/dist/client/device-set-reconciliation.d.ts +23 -8
- package/dist/client/device-set-reconciliation.d.ts.map +1 -1
- package/dist/client/device-set-reconciliation.js +25 -11
- package/dist/client/device-set-reconciliation.js.map +1 -1
- package/dist/client/event-hooks.d.ts +88 -8
- package/dist/client/event-hooks.d.ts.map +1 -1
- package/dist/client/event-hooks.js +1 -0
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/group-outbox.d.ts +45 -10
- package/dist/client/group-outbox.d.ts.map +1 -1
- package/dist/client/group-outbox.js +246 -154
- package/dist/client/group-outbox.js.map +1 -1
- package/dist/client/group-receive-authorization.d.ts +10 -1
- package/dist/client/group-receive-authorization.d.ts.map +1 -1
- package/dist/client/group-receive-authorization.js.map +1 -1
- package/dist/client/hosted-anonymous-delivery.d.ts +18 -1
- package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
- package/dist/client/hosted-anonymous-delivery.js +84 -12
- package/dist/client/hosted-anonymous-delivery.js.map +1 -1
- package/dist/client/hosted-connection.js +1 -1
- package/dist/client/hosted-connection.js.map +1 -1
- package/dist/client/hosted-group-authority.d.ts +6 -2
- package/dist/client/hosted-group-authority.d.ts.map +1 -1
- package/dist/client/hosted-group-authority.js +11 -7
- package/dist/client/hosted-group-authority.js.map +1 -1
- package/dist/client/hosted-groups.d.ts +5 -1
- package/dist/client/hosted-groups.d.ts.map +1 -1
- package/dist/client/hosted-groups.js +8 -4
- package/dist/client/hosted-groups.js.map +1 -1
- package/dist/client/hosted-http-error.d.ts +5 -1
- package/dist/client/hosted-http-error.d.ts.map +1 -1
- package/dist/client/hosted-http-error.js +5 -1
- package/dist/client/hosted-http-error.js.map +1 -1
- package/dist/client/hosted-mailbox-subscription.d.ts +2 -0
- package/dist/client/hosted-mailbox-subscription.d.ts.map +1 -1
- package/dist/client/hosted-mailbox-subscription.js +5 -5
- package/dist/client/hosted-mailbox-subscription.js.map +1 -1
- package/dist/client/hosted-transport.d.ts +11 -1
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +75 -30
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/client/hosted.d.ts.map +1 -1
- package/dist/client/hosted.js +1 -1
- package/dist/client/hosted.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/receive-queue.d.ts +5 -2
- package/dist/client/receive-queue.d.ts.map +1 -1
- package/dist/client/receive-queue.js +55 -18
- package/dist/client/receive-queue.js.map +1 -1
- package/dist/client/relay-acceptance.d.ts +49 -6
- package/dist/client/relay-acceptance.d.ts.map +1 -1
- package/dist/client/relay-acceptance.js +49 -3
- package/dist/client/relay-acceptance.js.map +1 -1
- package/dist/client/relay-protocol.d.ts +37 -7
- package/dist/client/relay-protocol.d.ts.map +1 -1
- package/dist/client/relay-protocol.js +53 -10
- package/dist/client/relay-protocol.js.map +1 -1
- package/dist/client/retry-family.d.ts +3 -3
- package/dist/client/retry-family.js +1 -1
- package/dist/client/retry-family.js.map +1 -1
- package/dist/client/retry-request-envelope.d.ts +18 -8
- package/dist/client/retry-request-envelope.d.ts.map +1 -1
- package/dist/client/retry-request-envelope.js +57 -29
- package/dist/client/retry-request-envelope.js.map +1 -1
- package/dist/client/retry-request-lifecycle.d.ts +24 -11
- package/dist/client/retry-request-lifecycle.d.ts.map +1 -1
- package/dist/client/retry-request-lifecycle.js +46 -20
- package/dist/client/retry-request-lifecycle.js.map +1 -1
- package/dist/client/retry-terminal-recovery.d.ts +11 -8
- package/dist/client/retry-terminal-recovery.d.ts.map +1 -1
- package/dist/client/retry-terminal-recovery.js +18 -12
- package/dist/client/retry-terminal-recovery.js.map +1 -1
- package/dist/client/retry.d.ts +8 -7
- package/dist/client/retry.d.ts.map +1 -1
- package/dist/client/retry.js +30 -22
- package/dist/client/retry.js.map +1 -1
- package/dist/client/send-deadline.d.ts +308 -0
- package/dist/client/send-deadline.d.ts.map +1 -0
- package/dist/client/send-deadline.js +914 -0
- package/dist/client/send-deadline.js.map +1 -0
- package/dist/client/send-intent-driver.d.ts +116 -0
- package/dist/client/send-intent-driver.d.ts.map +1 -0
- package/dist/client/send-intent-driver.js +373 -0
- package/dist/client/send-intent-driver.js.map +1 -0
- package/dist/client/signal-service-cipher.d.ts +257 -27
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +1274 -283
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/types.d.ts +48 -5
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local/store/conformance/cases/metadata.d.ts +3 -2
- package/dist/local/store/conformance/cases/metadata.d.ts.map +1 -1
- package/dist/local/store/conformance/cases/metadata.js +153 -2
- package/dist/local/store/conformance/cases/metadata.js.map +1 -1
- package/dist/local/store/key-value/adapter.d.ts +2 -1
- package/dist/local/store/key-value/adapter.d.ts.map +1 -1
- package/dist/local/store/key-value/adapter.js +9 -0
- package/dist/local/store/key-value/adapter.js.map +1 -1
- package/dist/local/store/memory/adapter.d.ts +2 -1
- package/dist/local/store/memory/adapter.d.ts.map +1 -1
- package/dist/local/store/memory/adapter.js +4 -0
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/metadata-keys.d.ts +13 -0
- package/dist/local/store/metadata-keys.d.ts.map +1 -0
- package/dist/local/store/metadata-keys.js +20 -0
- package/dist/local/store/metadata-keys.js.map +1 -0
- package/dist/local/store/receive-work.d.ts.map +1 -1
- package/dist/local/store/receive-work.js +12 -1
- package/dist/local/store/receive-work.js.map +1 -1
- package/dist/local/store/reliability.d.ts +482 -33
- package/dist/local/store/reliability.d.ts.map +1 -1
- package/dist/local/store/reliability.js +690 -48
- package/dist/local/store/reliability.js.map +1 -1
- package/dist/local/store/sqlite/key-storage/index.d.ts +2 -1
- package/dist/local/store/sqlite/key-storage/index.d.ts.map +1 -1
- package/dist/local/store/sqlite/key-storage/index.js +3 -0
- package/dist/local/store/sqlite/key-storage/index.js.map +1 -1
- package/dist/local/store/sqlite/key-storage/metadata.d.ts +9 -0
- package/dist/local/store/sqlite/key-storage/metadata.d.ts.map +1 -1
- package/dist/local/store/sqlite/key-storage/metadata.js +12 -0
- package/dist/local/store/sqlite/key-storage/metadata.js.map +1 -1
- package/dist/local/store/sqlite/store.d.ts +2 -1
- package/dist/local/store/sqlite/store.d.ts.map +1 -1
- package/dist/local/store/sqlite/store.js +3 -0
- package/dist/local/store/sqlite/store.js.map +1 -1
- package/dist/local/store/web/adapter.d.ts +8 -1
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +18 -0
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/remote/relay/request-admission.d.ts +49 -0
- package/dist/remote/relay/request-admission.d.ts.map +1 -0
- package/dist/remote/relay/request-admission.js +74 -0
- package/dist/remote/relay/request-admission.js.map +1 -0
- package/dist/types/api.d.ts +77 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +144 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +146 -1
- package/dist/types/errors.js.map +1 -1
- package/docs/ASSURANCE.md +31 -15
- package/docs/DEVIATIONS.md +34 -4
- package/docs/ERROR_HANDLING.md +134 -7
- package/docs/GETTING_STARTED.md +30 -23
- package/docs/PROTOCOL_POLICY.md +31 -20
- package/groups/README.md +1 -1
- package/hooks/README.md +6 -3
- package/local/store/react-native/README.md +9 -10
- package/local/store/web/README.md +1 -1
- package/package.json +1 -1
- package/safety/README.md +48 -11
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The binary attachment of a send. The intent of a binary send stores it, so
|
|
3
|
+
* a repeat of the send reuses its one upload and its one serialized message.
|
|
4
|
+
*
|
|
5
|
+
* A binary send uploads the file and then sends a serialized attachment
|
|
6
|
+
* message that points to the upload. The intent keeps that message and the
|
|
7
|
+
* digest of the file. A send that repeats a stored `clientMessageId` with the
|
|
8
|
+
* same file sends the stored message again under the stored timestamp, and
|
|
9
|
+
* uploads nothing.
|
|
10
|
+
*
|
|
11
|
+
* The client marks the options of a new binary send with the attachment, and
|
|
12
|
+
* the direct and group intent builders copy the mark into the intent. The mark
|
|
13
|
+
* has a symbol key that no package subpath exports, and the client sets it
|
|
14
|
+
* after it spreads the application's options, so an application cannot set it.
|
|
15
|
+
*/
|
|
16
|
+
/** The key of the binary attachment mark. No package subpath exports it. */
|
|
17
|
+
export const SEND_BINARY_ATTACHMENT = Symbol('sendBinaryAttachment');
|
|
18
|
+
/**
|
|
19
|
+
* The `binaryAttachment` field of a new intent: the mark of the options, or
|
|
20
|
+
* no field when the options have no mark.
|
|
21
|
+
*/
|
|
22
|
+
export function intentBinaryAttachment(options) {
|
|
23
|
+
const binaryAttachment = options[SEND_BINARY_ATTACHMENT];
|
|
24
|
+
return binaryAttachment ? { binaryAttachment } : {};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=binary-send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-send.js","sourceRoot":"","sources":["../../client/binary-send.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,sBAAsB,GAAkB,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAOpF;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAe;IAEf,MAAM,gBAAgB,GAAI,OAAgC,CAAC,sBAAsB,CAAC,CAAC;IACnF,OAAO,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC"}
|
package/dist/client/client.d.ts
CHANGED
|
@@ -191,6 +191,17 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
|
|
|
191
191
|
private readonly resendJobs;
|
|
192
192
|
/** Ends the subscription of the resend job driver to relay connection states. */
|
|
193
193
|
private resendJobsOnConnect;
|
|
194
|
+
/**
|
|
195
|
+
* Replays the open sends of the outbox, and ends each at its posting
|
|
196
|
+
* deadline. It starts with the retry request scheduler, at each relay
|
|
197
|
+
* transition to connected, and at the earliest deadline of an open send,
|
|
198
|
+
* and stop() stops it. Each pass is relay work, so its hooks run through
|
|
199
|
+
* that work. A replay runs the send path of an application call, so it
|
|
200
|
+
* takes the intent lock of the send.
|
|
201
|
+
*/
|
|
202
|
+
private readonly sendIntents;
|
|
203
|
+
/** Ends the subscription of the send driver to relay connection states. */
|
|
204
|
+
private sendDriverOnConnect;
|
|
194
205
|
/**
|
|
195
206
|
* The stop() in progress. It is set before a step of stop() runs, so a
|
|
196
207
|
* stop() call that overlaps it, also from a step, waits for it, and a
|
|
@@ -298,9 +309,9 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
|
|
|
298
309
|
private waitForStopReceiptSends;
|
|
299
310
|
/**
|
|
300
311
|
* The session reset steps of a retry request that ended as
|
|
301
|
-
* `expired-content`. Their session hooks run through
|
|
302
|
-
* and its stop signal stops their lock waits and relay
|
|
303
|
-
* none without a relay.
|
|
312
|
+
* `expired-content` or `posting-deadline`. Their session hooks run through
|
|
313
|
+
* the given context, and its stop signal stops their lock waits and relay
|
|
314
|
+
* requests. There are none without a relay.
|
|
304
315
|
*/
|
|
305
316
|
private retryTerminalReset;
|
|
306
317
|
/**
|
|
@@ -932,6 +943,25 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
|
|
|
932
943
|
*
|
|
933
944
|
* The client normalizes all inputs to Uint8Array before they reach the cipher layer.
|
|
934
945
|
*
|
|
946
|
+
* A direct or group send has a posting deadline: the earlier of 24 hours
|
|
947
|
+
* after the SDK first stores the send and 24 hours after its timestamp. A
|
|
948
|
+
* replay with the same `clientMessageId` or a restart never moves it. At or
|
|
949
|
+
* after the deadline, the SDK starts no relay request for the send. A
|
|
950
|
+
* request that started before it still counts when its answer arrives
|
|
951
|
+
* later. When the deadline ends with a device of unknown acceptance, the
|
|
952
|
+
* send throws `SendAcceptanceUnknownError`. Otherwise the send ends failed:
|
|
953
|
+
* when the call raised a refusal (a thrown refusal or a refusal in the
|
|
954
|
+
* receipt of a shared body), it throws the first such refusal. Otherwise it
|
|
955
|
+
* throws an `Error` with the stored code of the first refused device that
|
|
956
|
+
* has one, in the order of the destinations. Otherwise it throws
|
|
957
|
+
* `SendNeverAcceptedByRelayError` with code `SEND_NEVER_ACCEPTED`. A send
|
|
958
|
+
* error before the deadline gives `deadlineAt`, and `retryable` is true
|
|
959
|
+
* when a replay can still post the send.
|
|
960
|
+
*
|
|
961
|
+
* A backdated `timestamp` shortens the deadline. A send with a timestamp
|
|
962
|
+
* 23 hours old has at most 1 hour to post. A send with a timestamp 24 hours
|
|
963
|
+
* old posts nothing and throws `SendNeverAcceptedByRelayError`.
|
|
964
|
+
*
|
|
935
965
|
* @param recipientId - User ID or group ID (groups use the package group ID prefix)
|
|
936
966
|
* @param content - DataMessageInput, string, or Uint8Array to encrypt and send
|
|
937
967
|
* @param options - Optional send options (isBinary for blob encryption, etc.)
|
|
@@ -958,10 +988,18 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
|
|
|
958
988
|
/**
|
|
959
989
|
* Send with session callbacks whose hooks run through the given context.
|
|
960
990
|
* The stop signal of relay work ends a wait for the recipient's lock.
|
|
991
|
+
*
|
|
992
|
+
* The send driver gives a driven `report`: the end write of the send then
|
|
993
|
+
* marks the intent, and the driver reports the end. For an application
|
|
994
|
+
* call, the end write or the completion write of this call records the end
|
|
995
|
+
* in memory, and `onSendOutcome` runs once before the call returns or
|
|
996
|
+
* throws.
|
|
961
997
|
*/
|
|
962
998
|
private sendWithContext;
|
|
963
999
|
/** Send under a logical-send identifier that the caller already chose. */
|
|
964
1000
|
private sendIdentified;
|
|
1001
|
+
/** @see SignalProtocolClient.resendMessage */
|
|
1002
|
+
resendMessage(clientMessageId: string): Promise<SendResult>;
|
|
965
1003
|
/** @see SignalProtocolClient.forgetSentContent */
|
|
966
1004
|
forgetSentContent(clientMessageId: string): Promise<boolean>;
|
|
967
1005
|
/** @see SignalProtocolClient.getPendingRecipients */
|
|
@@ -1067,9 +1105,11 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
|
|
|
1067
1105
|
*/
|
|
1068
1106
|
private startRetryRequests;
|
|
1069
1107
|
/**
|
|
1070
|
-
* Start the retry request scheduler
|
|
1071
|
-
* pass in the background. Each relay transition to
|
|
1072
|
-
* resend jobs again until stop().
|
|
1108
|
+
* Start the retry request scheduler, the resend job driver and the send
|
|
1109
|
+
* driver, each with a pass in the background. Each relay transition to
|
|
1110
|
+
* connected runs the resend jobs and the send driver again until stop().
|
|
1111
|
+
* On a store with no `listMetadataKeys`, the send driver logs one line and
|
|
1112
|
+
* stays disabled, with no subscription.
|
|
1073
1113
|
*/
|
|
1074
1114
|
private startRetryLifecycle;
|
|
1075
1115
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../client/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;A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WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;OAEG;IACG,wBAAwB,CAC5B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC,CAEf;IAED;;OAEG;IACG,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAEpF;IAED;;OAEG;IACG,sBAAsB,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,UAAU,GACzB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAA;KAAE,CAAC,CAEtE;IAMD;;OAEG;IACH,OAAO,CAAC,cAAc;CAQvB"}
|
package/dist/client/client.js
CHANGED
|
@@ -89,7 +89,9 @@ import { receiveInRetryFamily } from './retry-family.js';
|
|
|
89
89
|
import { RetryRequestScheduler } from './retry-request-lifecycle.js';
|
|
90
90
|
import { ResendJobDriver } from './recovery-driver.js';
|
|
91
91
|
import { retryRequestPost } from './retry-request-envelope.js';
|
|
92
|
-
import { getOutgoingMessageIntent, migrateRetryRequestRecords } from '../local/store/reliability.js';
|
|
92
|
+
import { getOutgoingMessageIntent, migrateOutgoingIntentRecords, migrateRetryRequestRecords, } from '../local/store/reliability.js';
|
|
93
|
+
import { manualResendOutcomeEvent, SEND_END_REPORT, sendOutcomeEvent, } from './send-deadline.js';
|
|
94
|
+
import { intentContent, SendIntentDriver } from './send-intent-driver.js';
|
|
93
95
|
import { checkNewSendTimestamp, SEND_TIMESTAMP_ORIGIN, } from './send-timestamp.js';
|
|
94
96
|
import { deliveredEnvelopeFingerprint } from '../local/store/received-content.js';
|
|
95
97
|
import { RECEIVE_WORK_DEFAULT_LIMIT, sizedReceiveWork } from '../local/store/receive-work.js';
|
|
@@ -320,6 +322,17 @@ export class DefaultSignalProtocolClient {
|
|
|
320
322
|
});
|
|
321
323
|
/** Ends the subscription of the resend job driver to relay connection states. */
|
|
322
324
|
resendJobsOnConnect;
|
|
325
|
+
/**
|
|
326
|
+
* Replays the open sends of the outbox, and ends each at its posting
|
|
327
|
+
* deadline. It starts with the retry request scheduler, at each relay
|
|
328
|
+
* transition to connected, and at the earliest deadline of an open send,
|
|
329
|
+
* and stop() stops it. Each pass is relay work, so its hooks run through
|
|
330
|
+
* that work. A replay runs the send path of an application call, so it
|
|
331
|
+
* takes the intent lock of the send.
|
|
332
|
+
*/
|
|
333
|
+
sendIntents;
|
|
334
|
+
/** Ends the subscription of the send driver to relay connection states. */
|
|
335
|
+
sendDriverOnConnect;
|
|
323
336
|
/**
|
|
324
337
|
* The stop() in progress. It is set before a step of stop() runs, so a
|
|
325
338
|
* stop() call that overlaps it, also from a step, waits for it, and a
|
|
@@ -369,6 +382,26 @@ export class DefaultSignalProtocolClient {
|
|
|
369
382
|
throw new Error('Storage must be provided by DefaultSignalProtocolClient.create() callers');
|
|
370
383
|
}
|
|
371
384
|
this._storage = config.storage;
|
|
385
|
+
this.sendIntents = new SendIntentDriver(this.state.relayWork, this._storage, this.logger, (work) => {
|
|
386
|
+
const context = this.relayWorkContext(work);
|
|
387
|
+
return {
|
|
388
|
+
end: (clientMessageId, report) => this.cipher.endPastDeadlineIntent(clientMessageId, report),
|
|
389
|
+
replay: async (intent, content, report) => {
|
|
390
|
+
await this.sendWithContext(intent.kind === 'group' ? createGroupId(intent.recipientId) : intent.recipientId, content, {
|
|
391
|
+
clientMessageId: intent.clientMessageId,
|
|
392
|
+
timestamp: intent.clientTimestamp,
|
|
393
|
+
...(intent.contentHint !== undefined && { contentHint: intent.contentHint }),
|
|
394
|
+
...(intent.kind === 'group' && { groupMemberUserIds: intent.groupMemberUserIds }),
|
|
395
|
+
}, context, work.stopSignal, report);
|
|
396
|
+
},
|
|
397
|
+
resend: (clientMessageId, report) => this.cipher.replayManualResend(clientMessageId, {
|
|
398
|
+
...(work.stopSignal && { stopSignal: work.stopSignal }),
|
|
399
|
+
report,
|
|
400
|
+
}),
|
|
401
|
+
endResend: (clientMessageId, manualMessageId) => this.cipher.endPastDeadlineManualResend(clientMessageId, manualMessageId),
|
|
402
|
+
report: (event) => callHook(context.hooks, 'onSendOutcome', event),
|
|
403
|
+
};
|
|
404
|
+
});
|
|
372
405
|
// The store declares its protection. The policy decides from it whether
|
|
373
406
|
// the client keeps resendable content.
|
|
374
407
|
this.contentRecoveryPolicy = resolveContentRecoveryPolicy(config.protocol?.contentRecovery);
|
|
@@ -911,9 +944,9 @@ export class DefaultSignalProtocolClient {
|
|
|
911
944
|
}
|
|
912
945
|
/**
|
|
913
946
|
* The session reset steps of a retry request that ended as
|
|
914
|
-
* `expired-content`. Their session hooks run through
|
|
915
|
-
* and its stop signal stops their lock waits and relay
|
|
916
|
-
* none without a relay.
|
|
947
|
+
* `expired-content` or `posting-deadline`. Their session hooks run through
|
|
948
|
+
* the given context, and its stop signal stops their lock waits and relay
|
|
949
|
+
* requests. There are none without a relay.
|
|
917
950
|
*/
|
|
918
951
|
retryTerminalReset(context) {
|
|
919
952
|
const relay = this.relay;
|
|
@@ -1206,6 +1239,7 @@ export class DefaultSignalProtocolClient {
|
|
|
1206
1239
|
await client.initialize(retained);
|
|
1207
1240
|
await client.hydratePersistedState();
|
|
1208
1241
|
await migrateRetryRequestRecords(client._storage);
|
|
1242
|
+
await migrateOutgoingIntentRecords(client._storage);
|
|
1209
1243
|
await client.applyContentRecoveryDecision();
|
|
1210
1244
|
// A failed sweep fails the start and runs again at the next start.
|
|
1211
1245
|
await removeDistributionsFromMessageRecords(client._storage, client.contentAdapter, client.logger);
|
|
@@ -2495,6 +2529,25 @@ export class DefaultSignalProtocolClient {
|
|
|
2495
2529
|
*
|
|
2496
2530
|
* The client normalizes all inputs to Uint8Array before they reach the cipher layer.
|
|
2497
2531
|
*
|
|
2532
|
+
* A direct or group send has a posting deadline: the earlier of 24 hours
|
|
2533
|
+
* after the SDK first stores the send and 24 hours after its timestamp. A
|
|
2534
|
+
* replay with the same `clientMessageId` or a restart never moves it. At or
|
|
2535
|
+
* after the deadline, the SDK starts no relay request for the send. A
|
|
2536
|
+
* request that started before it still counts when its answer arrives
|
|
2537
|
+
* later. When the deadline ends with a device of unknown acceptance, the
|
|
2538
|
+
* send throws `SendAcceptanceUnknownError`. Otherwise the send ends failed:
|
|
2539
|
+
* when the call raised a refusal (a thrown refusal or a refusal in the
|
|
2540
|
+
* receipt of a shared body), it throws the first such refusal. Otherwise it
|
|
2541
|
+
* throws an `Error` with the stored code of the first refused device that
|
|
2542
|
+
* has one, in the order of the destinations. Otherwise it throws
|
|
2543
|
+
* `SendNeverAcceptedByRelayError` with code `SEND_NEVER_ACCEPTED`. A send
|
|
2544
|
+
* error before the deadline gives `deadlineAt`, and `retryable` is true
|
|
2545
|
+
* when a replay can still post the send.
|
|
2546
|
+
*
|
|
2547
|
+
* A backdated `timestamp` shortens the deadline. A send with a timestamp
|
|
2548
|
+
* 23 hours old has at most 1 hour to post. A send with a timestamp 24 hours
|
|
2549
|
+
* old posts nothing and throws `SendNeverAcceptedByRelayError`.
|
|
2550
|
+
*
|
|
2498
2551
|
* @param recipientId - User ID or group ID (groups use the package group ID prefix)
|
|
2499
2552
|
* @param content - DataMessageInput, string, or Uint8Array to encrypt and send
|
|
2500
2553
|
* @param options - Optional send options (isBinary for blob encryption, etc.)
|
|
@@ -2523,20 +2576,32 @@ export class DefaultSignalProtocolClient {
|
|
|
2523
2576
|
/**
|
|
2524
2577
|
* Send with session callbacks whose hooks run through the given context.
|
|
2525
2578
|
* The stop signal of relay work ends a wait for the recipient's lock.
|
|
2579
|
+
*
|
|
2580
|
+
* The send driver gives a driven `report`: the end write of the send then
|
|
2581
|
+
* marks the intent, and the driver reports the end. For an application
|
|
2582
|
+
* call, the end write or the completion write of this call records the end
|
|
2583
|
+
* in memory, and `onSendOutcome` runs once before the call returns or
|
|
2584
|
+
* throws.
|
|
2526
2585
|
*/
|
|
2527
|
-
async sendWithContext(recipientId, content, options, context, stopSignal) {
|
|
2586
|
+
async sendWithContext(recipientId, content, options, context, stopSignal, report = { driven: false }) {
|
|
2528
2587
|
// Every send error carries the logical-send identifier, also an error
|
|
2529
2588
|
// before the encryption, such as a failed content serialization.
|
|
2530
2589
|
const clientMessageId = options?.clientMessageId ?? (await generateUuidV4());
|
|
2531
2590
|
try {
|
|
2532
|
-
return await this.sendIdentified(recipientId, content, options, context, stopSignal, clientMessageId);
|
|
2591
|
+
return await this.sendIdentified(recipientId, content, options, context, stopSignal, clientMessageId, report);
|
|
2533
2592
|
}
|
|
2534
2593
|
catch (error) {
|
|
2535
2594
|
throw attachClientMessageId(error, clientMessageId);
|
|
2536
2595
|
}
|
|
2596
|
+
finally {
|
|
2597
|
+
// An internal send, such as a sender key distribution, is never reported.
|
|
2598
|
+
if (!report.driven && !report.internal && report.ended && !report.ended.internal) {
|
|
2599
|
+
await callHook(context.hooks, 'onSendOutcome', sendOutcomeEvent(report.ended));
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2537
2602
|
}
|
|
2538
2603
|
/** Send under a logical-send identifier that the caller already chose. */
|
|
2539
|
-
async sendIdentified(recipientId, content, options, context, stopSignal, clientMessageId) {
|
|
2604
|
+
async sendIdentified(recipientId, content, options, context, stopSignal, clientMessageId, report) {
|
|
2540
2605
|
// Normalize all inputs to Uint8Array before calling cipher.encrypt()
|
|
2541
2606
|
let plaintextBytes;
|
|
2542
2607
|
let clientTimestamp;
|
|
@@ -2549,61 +2614,75 @@ export class DefaultSignalProtocolClient {
|
|
|
2549
2614
|
const applicationTimestamp = isDataMessage(content)
|
|
2550
2615
|
? content.timestamp
|
|
2551
2616
|
: options?.timestamp;
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
try {
|
|
2559
|
-
checkNewSendTimestamp({ timestamp: applicationTimestamp });
|
|
2560
|
-
timestampOrigin = 'checked';
|
|
2561
|
-
}
|
|
2562
|
-
catch (error) {
|
|
2563
|
-
const existing = await getOutgoingMessageIntent(this._storage, clientMessageId);
|
|
2564
|
-
if (existing?.clientTimestamp !== applicationTimestamp)
|
|
2565
|
-
throw error;
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
// A 1:1 send to a contact carries this account's profile key when an exchange is bound.
|
|
2569
|
-
const profileKeys = isGroupId(recipientId) || recipientId === this.userId ? undefined : profileKeyExchange(this);
|
|
2617
|
+
// A 1:1 send to a contact carries this account's profile key when an
|
|
2618
|
+
// exchange is bound. A replay of the send driver sends the stored
|
|
2619
|
+
// content, so it does no profile key work.
|
|
2620
|
+
const profileKeys = report.driven || isGroupId(recipientId) || recipientId === this.userId
|
|
2621
|
+
? undefined
|
|
2622
|
+
: profileKeyExchange(this);
|
|
2570
2623
|
let profileKey;
|
|
2571
|
-
|
|
2572
|
-
// DataMessage path: build Content, set timestamp, serialize to protobuf (application send-pipeline ordering)
|
|
2573
|
-
const timestamp = content.timestamp ?? Date.now();
|
|
2574
|
-
clientTimestamp = timestamp;
|
|
2575
|
-
profileKey = await profileKeys?.outgoing();
|
|
2576
|
-
const dm = { ...content, timestamp, ...(profileKey && { profileKey }) };
|
|
2577
|
-
plaintextBytes = this.contentAdapter.serializeDataMessage(dm);
|
|
2578
|
-
}
|
|
2579
|
-
else if (typeof content === 'string') {
|
|
2580
|
-
await profileKeys?.offer(recipientId);
|
|
2581
|
-
plaintextBytes = new TextEncoder().encode(content);
|
|
2582
|
-
}
|
|
2583
|
-
else {
|
|
2584
|
-
await profileKeys?.offer(recipientId);
|
|
2585
|
-
plaintextBytes = content; // already Uint8Array
|
|
2586
|
-
}
|
|
2587
|
-
const contentHint = isGroupId(recipientId)
|
|
2588
|
-
? this.groupContentHint(options?.contentHint, clientTimestamp !== undefined)
|
|
2589
|
-
: options?.contentHint;
|
|
2590
|
-
if (isGroupId(recipientId) && contentHint === ContentHint.Resendable) {
|
|
2591
|
-
await this.sweepResendableContentDaily();
|
|
2592
|
-
}
|
|
2593
|
-
// The public options type of the cipher has no mark, so the marked
|
|
2594
|
-
// options go in as a value of that type.
|
|
2595
|
-
const sendOptions = {
|
|
2596
|
-
...options,
|
|
2597
|
-
clientMessageId,
|
|
2598
|
-
...(clientTimestamp !== undefined && { timestamp: clientTimestamp }),
|
|
2599
|
-
[SEND_TIMESTAMP_ORIGIN]: timestampOrigin,
|
|
2600
|
-
...(contentHint !== undefined && { contentHint }),
|
|
2601
|
-
};
|
|
2602
|
-
const encrypt = (sendContext) => this.cipher.encrypt(recipientId, plaintextBytes, sendOptions, this.sendSessionCallbacks(() => sendContext, stopSignal), stopSignal);
|
|
2603
|
-
// A receipt for this send waits until the send resolves.
|
|
2604
|
-
this.deliveries.beginSend(clientMessageId);
|
|
2624
|
+
let timestampOrigin;
|
|
2605
2625
|
let result;
|
|
2626
|
+
// A receipt for this send waits until the send resolves. The hold starts
|
|
2627
|
+
// before the stored-intent read, so a receipt for a replay of a sent
|
|
2628
|
+
// message also waits.
|
|
2629
|
+
this.deliveries.beginSend(clientMessageId);
|
|
2606
2630
|
try {
|
|
2631
|
+
// A send that names its identifier can repeat a stored intent. A
|
|
2632
|
+
// DataMessage replay then takes the stored timestamp, so it serializes
|
|
2633
|
+
// the same plaintext. The read is outside the intent lock: the locked
|
|
2634
|
+
// send reads the intent again and compares the plaintext digest.
|
|
2635
|
+
const stored = options?.clientMessageId !== undefined
|
|
2636
|
+
? await getOutgoingMessageIntent(this._storage, clientMessageId)
|
|
2637
|
+
: null;
|
|
2638
|
+
if (applicationTimestamp == null) {
|
|
2639
|
+
if (isDataMessage(content))
|
|
2640
|
+
timestampOrigin = stored ? 'checked' : 'sdk-clock';
|
|
2641
|
+
}
|
|
2642
|
+
else {
|
|
2643
|
+
try {
|
|
2644
|
+
checkNewSendTimestamp({ timestamp: applicationTimestamp });
|
|
2645
|
+
timestampOrigin = 'checked';
|
|
2646
|
+
}
|
|
2647
|
+
catch (error) {
|
|
2648
|
+
if (stored?.clientTimestamp !== applicationTimestamp)
|
|
2649
|
+
throw error;
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
if (isDataMessage(content)) {
|
|
2653
|
+
// DataMessage path: build Content, set timestamp, serialize to protobuf (application send-pipeline ordering)
|
|
2654
|
+
const timestamp = content.timestamp ?? stored?.clientTimestamp ?? Date.now();
|
|
2655
|
+
clientTimestamp = timestamp;
|
|
2656
|
+
profileKey = await profileKeys?.outgoing();
|
|
2657
|
+
const dm = { ...content, timestamp, ...(profileKey && { profileKey }) };
|
|
2658
|
+
plaintextBytes = this.contentAdapter.serializeDataMessage(dm);
|
|
2659
|
+
}
|
|
2660
|
+
else if (typeof content === 'string') {
|
|
2661
|
+
await profileKeys?.offer(recipientId);
|
|
2662
|
+
plaintextBytes = new TextEncoder().encode(content);
|
|
2663
|
+
}
|
|
2664
|
+
else {
|
|
2665
|
+
await profileKeys?.offer(recipientId);
|
|
2666
|
+
plaintextBytes = content; // already Uint8Array
|
|
2667
|
+
}
|
|
2668
|
+
// A replay of the send driver gives the stored content hint.
|
|
2669
|
+
const contentHint = isGroupId(recipientId) && !report.driven
|
|
2670
|
+
? this.groupContentHint(options?.contentHint, clientTimestamp !== undefined)
|
|
2671
|
+
: options?.contentHint;
|
|
2672
|
+
if (isGroupId(recipientId) && !report.driven && contentHint === ContentHint.Resendable) {
|
|
2673
|
+
await this.sweepResendableContentDaily();
|
|
2674
|
+
}
|
|
2675
|
+
// The public options type of the cipher has no marks, so the marked
|
|
2676
|
+
// options go in as a value of that type.
|
|
2677
|
+
const sendOptions = {
|
|
2678
|
+
...options,
|
|
2679
|
+
clientMessageId,
|
|
2680
|
+
...(clientTimestamp !== undefined && { timestamp: clientTimestamp }),
|
|
2681
|
+
[SEND_TIMESTAMP_ORIGIN]: timestampOrigin,
|
|
2682
|
+
[SEND_END_REPORT]: report,
|
|
2683
|
+
...(contentHint !== undefined && { contentHint }),
|
|
2684
|
+
};
|
|
2685
|
+
const encrypt = (sendContext) => this.cipher.encrypt(recipientId, plaintextBytes, sendOptions, this.sendSessionCallbacks(() => sendContext, stopSignal), stopSignal);
|
|
2607
2686
|
// A group send sets up sessions while it holds the group's Sender Key lock.
|
|
2608
2687
|
result = await (isGroupId(recipientId)
|
|
2609
2688
|
? this.withDeferredHooks(context, encrypt)
|
|
@@ -2622,6 +2701,26 @@ export class DefaultSignalProtocolClient {
|
|
|
2622
2701
|
await callHook(context.hooks, 'onRelayProtocolError', protocolError);
|
|
2623
2702
|
return clientTimestamp !== undefined ? { ...result, clientTimestamp } : result;
|
|
2624
2703
|
}
|
|
2704
|
+
/** @see SignalProtocolClient.resendMessage */
|
|
2705
|
+
async resendMessage(clientMessageId) {
|
|
2706
|
+
const report = {};
|
|
2707
|
+
try {
|
|
2708
|
+
const intent = await getOutgoingMessageIntent(this._storage, clientMessageId);
|
|
2709
|
+
if (!intent)
|
|
2710
|
+
throw new Error('No stored send has this clientMessageId');
|
|
2711
|
+
// An open resend posts its stored bytes, so only a new one reads the content.
|
|
2712
|
+
const content = await intentContent(this._storage, intent, (plaintext) => this.cipher.withoutGroupContext(plaintext));
|
|
2713
|
+
return await this.cipher.resendOutgoingMessage(clientMessageId, content, { report });
|
|
2714
|
+
}
|
|
2715
|
+
catch (error) {
|
|
2716
|
+
throw attachClientMessageId(error, clientMessageId);
|
|
2717
|
+
}
|
|
2718
|
+
finally {
|
|
2719
|
+
if (report.ended) {
|
|
2720
|
+
await callHook(this.ctx.hooks, 'onSendOutcome', manualResendOutcomeEvent(report.ended.intent, report.ended.resend));
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2625
2724
|
/** @see SignalProtocolClient.forgetSentContent */
|
|
2626
2725
|
async forgetSentContent(clientMessageId) {
|
|
2627
2726
|
return this.resendableContent.forget(clientMessageId);
|
|
@@ -2854,9 +2953,11 @@ export class DefaultSignalProtocolClient {
|
|
|
2854
2953
|
void this.receiveQueue.start(() => this.startRetryLifecycle());
|
|
2855
2954
|
}
|
|
2856
2955
|
/**
|
|
2857
|
-
* Start the retry request scheduler
|
|
2858
|
-
* pass in the background. Each relay transition to
|
|
2859
|
-
* resend jobs again until stop().
|
|
2956
|
+
* Start the retry request scheduler, the resend job driver and the send
|
|
2957
|
+
* driver, each with a pass in the background. Each relay transition to
|
|
2958
|
+
* connected runs the resend jobs and the send driver again until stop().
|
|
2959
|
+
* On a store with no `listMetadataKeys`, the send driver logs one line and
|
|
2960
|
+
* stays disabled, with no subscription.
|
|
2860
2961
|
*/
|
|
2861
2962
|
startRetryLifecycle() {
|
|
2862
2963
|
void this.retryRequests.start();
|
|
@@ -2874,6 +2975,13 @@ export class DefaultSignalProtocolClient {
|
|
|
2874
2975
|
void this.resendJobs.start();
|
|
2875
2976
|
});
|
|
2876
2977
|
}
|
|
2978
|
+
void this.sendIntents.start();
|
|
2979
|
+
if (this.sendDriverOnConnect === undefined && relay && this.sendIntents.enabled) {
|
|
2980
|
+
this.sendDriverOnConnect = relay.subscribeRelayConnectionState((connection) => {
|
|
2981
|
+
if (connection.state === 'connected')
|
|
2982
|
+
void this.sendIntents.start();
|
|
2983
|
+
});
|
|
2984
|
+
}
|
|
2877
2985
|
}
|
|
2878
2986
|
/**
|
|
2879
2987
|
* Stop the relay subscription
|
|
@@ -3142,15 +3250,18 @@ export class DefaultSignalProtocolClient {
|
|
|
3142
3250
|
// for this run and does not start a second run. A subscription start
|
|
3143
3251
|
// from a step is refused
|
|
3144
3252
|
await Promise.resolve();
|
|
3145
|
-
// 0. Stop the retry request scheduler, the resend job driver, the
|
|
3146
|
-
// fetcher, and the receive queue, so no pass starts.
|
|
3147
|
-
// pass in progress, as for other relay work
|
|
3253
|
+
// 0. Stop the retry request scheduler, the resend job driver, the send
|
|
3254
|
+
// driver, the group fetcher, and the receive queue, so no pass starts.
|
|
3255
|
+
// Step 4 waits for a pass in progress, as for other relay work
|
|
3148
3256
|
this.retryRequests.stop();
|
|
3149
3257
|
this.resendJobs.stop();
|
|
3258
|
+
this.sendIntents.stop();
|
|
3150
3259
|
this.groupFetcher?.stop();
|
|
3151
3260
|
this.receiveQueue.stop();
|
|
3152
3261
|
this.resendJobsOnConnect?.();
|
|
3153
3262
|
this.resendJobsOnConnect = undefined;
|
|
3263
|
+
this.sendDriverOnConnect?.();
|
|
3264
|
+
this.sendDriverOnConnect = undefined;
|
|
3154
3265
|
// 1. Start the receipt deadline, 5 s from now. Take the receipt sends in
|
|
3155
3266
|
// progress, except a send that an earlier stop() stopped, and start the
|
|
3156
3267
|
// send of the batched delivery receipts, once each, as relay work. Until
|
|
@@ -3602,7 +3713,11 @@ export class DefaultSignalProtocolClient {
|
|
|
3602
3713
|
}
|
|
3603
3714
|
async sendSenderKeyDistribution(groupId, recipientUserId, distribution, context) {
|
|
3604
3715
|
const payload = this.contentAdapter.serializeSenderKeyDistributionText(groupId, distribution);
|
|
3605
|
-
|
|
3716
|
+
// An internal send: its intent stores `internal`, so no end reaches onSendOutcome.
|
|
3717
|
+
await this.sendWithContext(recipientUserId, payload, undefined, context, undefined, {
|
|
3718
|
+
driven: false,
|
|
3719
|
+
internal: true,
|
|
3720
|
+
});
|
|
3606
3721
|
this.logger.debug('Distributed sender key to user', {
|
|
3607
3722
|
category: 'E2EE',
|
|
3608
3723
|
data: { groupId, recipientUserId, generation: distribution.generation },
|