@novasamatech/statement-store 0.8.12 → 0.9.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/dist/crypto.js +2 -1
- package/dist/helpers.d.ts +0 -1
- package/dist/helpers.js +0 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -0
- package/dist/model/session.d.ts +1 -1
- package/dist/model/session.js +1 -1
- package/dist/model/sessionAccount.js +2 -1
- package/dist/session/codec/decoder.d.ts +68 -0
- package/dist/session/codec/decoder.js +96 -0
- package/dist/session/codec/decoder.spec.d.ts +1 -0
- package/dist/session/codec/decoder.spec.js +161 -0
- package/dist/session/codec/envelope.d.ts +55 -0
- package/dist/session/codec/envelope.js +115 -0
- package/dist/session/codec/envelope.spec.d.ts +1 -0
- package/dist/session/codec/envelope.spec.js +114 -0
- package/dist/session/codec/incomingTopics.d.ts +46 -0
- package/dist/session/codec/incomingTopics.js +69 -0
- package/dist/session/codec/outgoingBody.d.ts +46 -0
- package/dist/session/codec/outgoingBody.js +64 -0
- package/dist/session/core.d.ts +58 -0
- package/dist/session/core.js +609 -0
- package/dist/session/encyption.js +7 -7
- package/dist/session/encyption.spec.d.ts +1 -0
- package/dist/session/encyption.spec.js +43 -0
- package/dist/session/messageMapper.d.ts +3 -3
- package/dist/session/messageMapper.js +8 -8
- package/dist/session/multiDeviceSession.d.ts +49 -0
- package/dist/session/multiDeviceSession.js +62 -0
- package/dist/session/multiDeviceSession.spec.d.ts +6 -0
- package/dist/session/multiDeviceSession.spec.js +354 -0
- package/dist/session/scale/statementData.d.ts +40 -0
- package/dist/session/scale/statementData.js +34 -1
- package/dist/session/session.d.ts +15 -5
- package/dist/session/session.js +31 -633
- package/dist/session/session.spec.js +24 -7
- package/dist/session/stateMachine.d.ts +135 -0
- package/dist/session/stateMachine.js +203 -0
- package/dist/session/stateMachine.spec.d.ts +1 -0
- package/dist/session/stateMachine.spec.js +276 -0
- package/package.json +4 -3
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-device session (base-spec.md): the pairwise Request/Response transport used by
|
|
3
|
+
* SSO and any peer known to run exactly one device.
|
|
4
|
+
*
|
|
5
|
+
* See `multiDeviceSession.ts` for the mds.md variant, and `core.ts` for the shared driver.
|
|
6
|
+
*/
|
|
1
7
|
import type { StatementStoreAdapter } from '../adapter/types.js';
|
|
2
8
|
import type { LocalSessionAccount, RemoteSessionAccount } from '../model/sessionAccount.js';
|
|
3
9
|
import type { ExpiryAllocator } from '../submit/allocator.js';
|
|
@@ -31,13 +37,17 @@ export type SessionParams = {
|
|
|
31
37
|
* identical to the previous per-session behavior.
|
|
32
38
|
*/
|
|
33
39
|
allocator?: ExpiryAllocator;
|
|
40
|
+
/**
|
|
41
|
+
* Statement size budget in bytes; the batch is sized against
|
|
42
|
+
* `maxRequestSize - STATEMENT_OVERHEAD`. Defaults to
|
|
43
|
+
* {@link DEFAULT_MAX_REQUEST_SIZE} — override only to be MORE conservative than the
|
|
44
|
+
* chain, never less.
|
|
45
|
+
*/
|
|
34
46
|
maxRequestSize?: number;
|
|
35
47
|
};
|
|
36
48
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* `maxStatementSize - overhead` rather than the raw statement limit.
|
|
49
|
+
* Single-device session (base-spec.md). Wire output is unchanged from before the
|
|
50
|
+
* multi-device seams existed: `StatementData.request`/`.response` on
|
|
51
|
+
* `SessionId(A, B)`, listening on `SessionId(B, A)`.
|
|
41
52
|
*/
|
|
42
|
-
export declare const STATEMENT_OVERHEAD: number;
|
|
43
53
|
export declare function createSession({ localAccount, remoteAccount, statementStore, encryption, prover, sessionKey, allocator, maxRequestSize, }: SessionParams): Session;
|