@sideband/secure-relay 0.2.2 → 0.3.0
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 +6 -4
- package/dist/.tsbuildinfo +1 -0
- package/dist/constants.d.ts +49 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +51 -0
- package/dist/constants.js.map +1 -0
- package/dist/crypto.d.ts +70 -0
- package/dist/crypto.d.ts.map +1 -0
- package/dist/crypto.js +144 -0
- package/dist/crypto.js.map +1 -0
- package/dist/frame.d.ts +219 -0
- package/dist/frame.d.ts.map +1 -0
- package/dist/frame.js +554 -0
- package/dist/frame.js.map +1 -0
- package/dist/handshake.d.ts +39 -0
- package/dist/handshake.d.ts.map +1 -0
- package/dist/handshake.js +93 -0
- package/dist/handshake.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/replay.d.ts +32 -0
- package/dist/replay.d.ts.map +1 -0
- package/dist/replay.js +88 -0
- package/dist/replay.js.map +1 -0
- package/dist/session.d.ts +67 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +122 -0
- package/dist/session.js.map +1 -0
- package/dist/types.d.ts +120 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +81 -0
- package/dist/types.js.map +1 -0
- package/package.json +1 -1
- package/src/constants.ts +3 -3
- package/src/crypto.test.ts +5 -5
- package/src/frame.test.ts +113 -47
- package/src/frame.ts +119 -86
- package/src/handshake.test.ts +29 -41
- package/src/handshake.ts +25 -27
- package/src/index.ts +4 -10
- package/src/integration.test.ts +97 -138
- package/src/session.test.ts +12 -10
- package/src/types.ts +4 -14
- /package/{dist/LICENSE → LICENSE} +0 -0
package/README.md
CHANGED
|
@@ -71,24 +71,24 @@ const daemonId = asDaemonId("my-daemon");
|
|
|
71
71
|
const { message: init, ephemeralKeyPair } = createHandshakeInit();
|
|
72
72
|
|
|
73
73
|
// Daemon: process init, create accept
|
|
74
|
-
const { message: accept,
|
|
74
|
+
const { message: accept, sessionKeys } = processHandshakeInit(
|
|
75
75
|
init,
|
|
76
76
|
daemonId,
|
|
77
77
|
identity,
|
|
78
78
|
);
|
|
79
79
|
const clientSession = createClientSession(
|
|
80
80
|
asClientId("client-123"),
|
|
81
|
-
|
|
81
|
+
sessionKeys,
|
|
82
82
|
);
|
|
83
83
|
|
|
84
84
|
// Client: verify signature against TOFU-pinned key, derive session
|
|
85
|
-
const
|
|
85
|
+
const clientKeys = processHandshakeAccept(
|
|
86
86
|
accept,
|
|
87
87
|
daemonId,
|
|
88
88
|
pinnedIdentityKey, // from local storage
|
|
89
89
|
ephemeralKeyPair,
|
|
90
90
|
);
|
|
91
|
-
const daemonSession = createDaemonSession(
|
|
91
|
+
const daemonSession = createDaemonSession(clientKeys);
|
|
92
92
|
|
|
93
93
|
// Encrypt/decrypt messages (sessions are stateful — do not clone)
|
|
94
94
|
const encrypted = encryptClientToDaemon(daemonSession, plaintext);
|
|
@@ -114,6 +114,7 @@ import {
|
|
|
114
114
|
SbrpError,
|
|
115
115
|
SbrpErrorCode,
|
|
116
116
|
} from "@sideband/secure-relay";
|
|
117
|
+
import { equalBytes } from "@noble/hashes/utils";
|
|
117
118
|
|
|
118
119
|
// Load pinned key from storage (null on first connection)
|
|
119
120
|
const pinnedKey = await storage.get(`tofu:${daemonId}`);
|
|
@@ -148,6 +149,7 @@ All errors throw `SbrpError` with a specific `code`:
|
|
|
148
149
|
| ---------------------- | ----------------------------------------- | ------------------------- |
|
|
149
150
|
| `identity_key_changed` | Pinned key doesn't match (potential MITM) | Close session, alert user |
|
|
150
151
|
| `handshake_failed` | Signature verification failed | Close session |
|
|
152
|
+
| `handshake_timeout` | Handshake exceeded time limit | Close session, retry |
|
|
151
153
|
| `decrypt_failed` | Message authentication failed | Close session |
|
|
152
154
|
| `sequence_error` | Replay detected or sequence out of window | Close session |
|
|
153
155
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/constants.ts","../../../node_modules/.bun/@noble+ciphers@2.1.1/node_modules/@noble/ciphers/utils.d.ts","../../../node_modules/.bun/@noble+ciphers@2.1.1/node_modules/@noble/ciphers/_arx.d.ts","../../../node_modules/.bun/@noble+ciphers@2.1.1/node_modules/@noble/ciphers/chacha.d.ts","../../../node_modules/.bun/@noble+hashes@2.0.1/node_modules/@noble/hashes/utils.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/utils.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/abstract/modular.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/abstract/curve.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/abstract/edwards.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/abstract/montgomery.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/abstract/oprf.d.ts","../../../node_modules/.bun/@noble+curves@2.0.1/node_modules/@noble/curves/ed25519.d.ts","../../../node_modules/.bun/@noble+hashes@2.0.1/node_modules/@noble/hashes/hkdf.d.ts","../../../node_modules/.bun/@noble+hashes@2.0.1/node_modules/@noble/hashes/_md.d.ts","../../../node_modules/.bun/@noble+hashes@2.0.1/node_modules/@noble/hashes/sha2.d.ts","../src/types.ts","../src/crypto.ts","../src/frame.ts","../src/handshake.ts","../src/replay.ts","../src/session.ts","../src/index.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/utility.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/header.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/readable.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/globals.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/blob.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/console.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/encoding.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/importmeta.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/messaging.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/performance.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/timers.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/web-globals/url.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/assert.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/buffer.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/child_process.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/cluster.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/console.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/constants.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/crypto.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/dgram.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/dns.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/domain.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/events.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/fs.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/http.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/http2.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/https.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/inspector.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/inspector/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/module.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/net.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/os.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/path.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/path/posix.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/path/win32.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/process.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/punycode.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/querystring.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/quic.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/readline.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/repl.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/sea.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/stream.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/test.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/test/reporters.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/timers.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/tls.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/tty.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/url.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/util.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/util/types.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/v8.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/vm.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/wasi.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/zlib.d.ts","../../../node_modules/.bun/@types+node@25.3.0/node_modules/@types/node/index.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/fetch.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/formdata.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/connector.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/client-stats.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/client.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/errors.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/handlers.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/h2c-client.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/api.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/util.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/cookies.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/patch.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/websocket.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/content-type.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/cache.d.ts","../../../node_modules/.bun/undici-types@7.18.2/node_modules/undici-types/index.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/globals.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/s3.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/fetch.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/jsx.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/bun.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/extensions.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/devserver.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/ffi.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/html-rewriter.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/jsc.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/sqlite.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/vendor/expect-type/utils.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/vendor/expect-type/overloads.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/vendor/expect-type/branding.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/vendor/expect-type/messages.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/vendor/expect-type/index.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/test.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/wasm.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/overrides.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/deprecated.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/redis.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/shell.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/serve.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/sql.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/security.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/bundle.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/bun.ns.d.ts","../../../node_modules/.bun/bun-types@1.3.9/node_modules/bun-types/index.d.ts","../../../node_modules/.bun/@types+bun@1.3.9/node_modules/@types/bun/index.d.ts"],"fileIdsList":[[82,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[82,83,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[86,87,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[86,87,88,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[88,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[86,88,90,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[87,88,89,90,91,92,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[85,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[85,95,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250,253],[109,127,128,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,129,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,169,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,131,136,138,141,142,145,147,148,149,151,161,166,178,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,131,132,138,141,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,133,138,142,145,147,148,149,161,179,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,134,135,138,142,145,147,148,149,152,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,145,147,148,149,161,166,175,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,136,138,141,142,145,147,148,149,151,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,129,130,137,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,139,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,140,141,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,129,130,138,141,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,143,145,147,148,149,161,166,178,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,141,142,143,145,147,148,149,161,166,169,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,141,142,144,145,147,148,149,151,161,166,178,225,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,144,145,147,148,149,151,161,166,175,178,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,144,145,146,147,148,149,161,166,175,178,226,227,228,230,232,243,244,245,246,247,248,249,250],[107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,150,161,178,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,145,147,148,149,151,161,166,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,152,161,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,153,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,145,147,148,149,156,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,158,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,159,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,145,147,148,149,151,161,169,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,145,147,148,149,161,162,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,163,179,182,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,145,147,148,149,161,166,168,169,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,167,169,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,169,179,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,170,226,227,228,230,232,243,245,246,247,248,249,250],[109,127,130,138,142,145,147,148,149,161,166,172,178,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,166,171,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,145,147,148,149,161,173,174,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,173,174,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,145,147,148,149,151,161,166,175,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,176,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,151,161,177,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,144,145,147,148,149,159,161,178,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,179,180,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,145,147,148,149,161,180,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,166,181,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,150,161,182,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,183,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,133,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,179,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,225,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,178,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,184,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,156,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,169,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,174,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,141,142,143,145,147,148,149,156,161,166,169,178,181,182,184,225,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,166,185,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,144,145,147,148,149,161,175,179,184,225,226,227,228,229,232,233,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,225,226,227,230,232,243,245,246,247,248,249,250],[109,130,135,138,142,145,147,148,149,156,161,166,169,175,179,184,225,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,186,226,227,228,230,231,232,233,234,235,236,242,243,244,245,246,247,248,249,250,251,252],[109,130,133,135,138,142,143,145,147,148,149,152,161,169,175,178,185,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,236,243,245,246,247,248,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,241,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,237,238,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,237,238,239,240,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,237,239,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,237,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,226,227,228,230,232,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,178,190,193,196,197,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,166,178,193,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,178,193,197,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,166,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,187,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,191,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,178,189,190,193,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,151,161,175,226,227,228,230,232,243,244,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,186,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,186,187,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,151,161,178,189,193,226,227,228,230,232,243,245,246,247,248,249,250],[104,105,106,109,130,138,141,142,145,147,148,149,161,166,178,188,192,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,202,210,226,227,228,230,232,243,245,246,247,248,249,250],[105,109,130,138,142,145,147,148,149,161,191,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,219,220,226,227,228,230,232,243,245,246,247,248,249,250],[105,109,130,138,142,145,147,148,149,161,169,178,186,188,193,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,178,189,193,226,227,228,230,232,243,245,246,247,248,249,250],[104,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,187,188,189,191,192,193,194,195,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,220,221,222,223,224,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,212,215,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,202,203,204,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,191,193,203,205,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,192,226,227,228,230,232,243,245,246,247,248,249,250],[105,109,130,138,142,145,147,148,149,161,187,193,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,197,203,205,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,197,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,178,191,193,196,226,227,228,230,232,243,245,246,247,248,249,250],[105,109,130,138,142,145,147,148,149,161,189,193,202,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,193,212,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,205,226,227,228,230,232,243,245,246,247,248,249,250],[109,130,138,142,145,147,148,149,161,169,184,186,187,193,219,226,227,228,230,232,243,245,246,247,248,249,250],[81,84,85,93,94,96,97,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[81,97,98,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[97,98,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[81,97,98,99,100,101,102,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[81,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250],[97,98,101,109,130,138,142,145,147,148,149,161,226,227,228,230,232,243,245,246,247,248,249,250]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"2ab096661c711e4a81cc464fa1e6feb929a54f5340b46b0a07ac6bbf857471f0","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"73f78680d4c08509933daf80947902f6ff41b6230f94dd002ae372620adb0f60","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5239f5c01bcfa9cd32f37c496cf19c61d69d37e48be9de612b541aac915805b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2536226e4151919ee5c8303b09b08f565f7e5dd1d5da2771efa5ad568c33b168","signature":"ad30d6683360dbb1fc79e4e392134d2ae2448a872bf671a575a0bc6ad06a9387"},{"version":"08816fd68670b0818422d25ffcba5e8a3843e081d69cc9de60fcb91c19f873e0","impliedFormat":99},{"version":"de2a2473321dddc7e6300ff15c0329e6feac12e0b6854da7798888cb8ea335ce","impliedFormat":99},{"version":"4d936f5a6cd18605189570e6c111941009a6111a0279254ad0c646554bcf21e4","impliedFormat":99},{"version":"79766c737b0a94c9d47424412054f0193d78dbfd3b71cfe2ec4f5efce419c081","impliedFormat":99},{"version":"c249b95e5d5907f5dfe1e5d2703484dc3acafc5bdb4132a23c1a5b32852c7232","impliedFormat":99},{"version":"bdb7b1fa2cabe27c8d9a97e16cf965f91f4328e11ae6271f5b4a1b61c805e312","impliedFormat":99},{"version":"a8f145f7327ccb58aca55eb7a1d6fe837ac03f1a16c7c4ba4987ce76e6e76ad5","impliedFormat":99},{"version":"8809b66099132204e286eb3f633bd068b64d6a84e16c2eb0e422d9a38abe5744","impliedFormat":99},{"version":"23c629ef8b88ae0b9ace6f904848adf85412c715a5db4022c3755b88d735b3ae","impliedFormat":99},{"version":"2b2ab16b17c20b37eeecb5739489093323f12338f835e0e433a842a28d3ea351","impliedFormat":99},{"version":"837ae55c67a792ea5fad4324b0562b344f0edf06abcefc9acb3e8c6c668ba1a5","impliedFormat":99},{"version":"9ee9463d2d72a650e30a4f9553004997fa47612ac720e5edc4b1307d36bc0692","impliedFormat":99},{"version":"332cf99045e23a2dfe4d34d46eed5c10ef32ac905ebf52e7783374581fd85819","impliedFormat":99},{"version":"c207c3e805c2fca690f1a0628623766aba3e21cde58fab152cdb10beea1a178e","impliedFormat":99},{"version":"3918416335105bf8ad5e12d03f896348439f837088a6fe91536fab5e1753b18c","impliedFormat":99},{"version":"eb706b8015f35915771af23f37fcd90a42c638c304f9febff5445906e031fa28","signature":"41ddc7e3b7c86e21f6ec1cddf04b6ac8cc0ec5b52e4fa1f95212480465826a53"},{"version":"f024c7eb82dbe4e728579c4c3a0a03a8c5429360b58e1ae5dd5423ab38f1f4a6","signature":"21b2d0b1326ddadd6721b43006e2495095843da03c89a590b07d1150c70581e6"},{"version":"ef50a816f7e2b8746dcddf35fd16f184fb6f4893aa01cc3577967c6c80ce740e","signature":"f73abfaacb0fedda357ea3f1dc8d071120d95f405aa8cede4844bcb7e9d88553"},{"version":"770e8dc68897c8f94ce0d9794375f564da33f5d8c7ebfd7b18786d15bda1d5bd","signature":"3a731789271a5117c43a9ae1087e963d05fb1567df9e67f45988d16ba303b0f2"},{"version":"68a77a95965636a635b2549a83ed9c33ce0c872b87c4a0f803c382e8062ecd3b","signature":"8c916ca89b50d25502b94f421a8680625b411552328d109e61dc7e1992d31c08"},{"version":"de5715e95a1b5f15e3d4dcdee1dbe60575474524383358ba3f86f292d15a1041","signature":"619b3bdd9cf2b8d64c95a9aadb73acaae4f6559967ad006c37f8cd375898688e"},{"version":"4ff3ba78932a230f7c1591a8b5129a9c1b259e3c5d831f65d5b914c235bd3248","signature":"3b33d49f5d6132ff8d3d64a833ef603754fd916b9dafd9da73e17ffc7a15fb30"},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"438b41419b1df9f1fbe33b5e1b18f5853432be205991d1b19f5b7f351675541e","affectsGlobalScope":true,"impliedFormat":1},{"version":"096116f8fedc1765d5bd6ef360c257b4a9048e5415054b3bf3c41b07f8951b0b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"435b3711465425770ed2ee2f1cf00ce071835265e0851a7dc4600ab4b007550e","impliedFormat":1},{"version":"7e49f52a159435fc8df4de9dc377ef5860732ca2dc9efec1640531d3cf5da7a3","impliedFormat":1},{"version":"dd4bde4bdc2e5394aed6855e98cf135dfdf5dd6468cad842e03116d31bbcc9bc","impliedFormat":1},{"version":"4d4e879009a84a47c05350b8dca823036ba3a29a3038efed1be76c9f81e45edf","affectsGlobalScope":true,"impliedFormat":1},{"version":"237ba5ac2a95702a114a309e39c53a5bddff5f6333b325db9764df9b34f3502b","impliedFormat":1},{"version":"9ba13b47cb450a438e3076c4a3f6afb9dc85e17eae50f26d4b2d72c0688c9251","impliedFormat":1},{"version":"b64cd4401633ea4ecadfd700ddc8323a13b63b106ac7127c1d2726f32424622c","impliedFormat":1},{"version":"37c6e5fe5715814412b43cc9b50b24c67a63c4e04e753e0d1305970d65417a60","impliedFormat":1},{"version":"1d024184fb57c58c5c91823f9d10b4915a4867b7934e89115fd0d861a9df27c8","impliedFormat":1},{"version":"ee0e4946247f842c6dd483cbb60a5e6b484fee07996e3a7bc7343dfb68a04c5d","impliedFormat":1},{"version":"ef051f42b7e0ef5ca04552f54c4552eac84099d64b6c5ad0ef4033574b6035b8","impliedFormat":1},{"version":"853a43154f1d01b0173d9cbd74063507ece57170bad7a3b68f3fa1229ad0a92f","impliedFormat":1},{"version":"56231e3c39a031bfb0afb797690b20ed4537670c93c0318b72d5180833d98b72","impliedFormat":1},{"version":"5cc7c39031bfd8b00ad58f32143d59eb6ffc24f5d41a20931269011dccd36c5e","impliedFormat":1},{"version":"b0b69c61b0f0ec8ca15db4c8c41f6e77f4cacb784d42bca948f42dea33e8757e","affectsGlobalScope":true,"impliedFormat":1},{"version":"f96a48183254c00d24575401f1a761b4ce4927d927407e7862a83e06ce5d6964","impliedFormat":1},{"version":"cc25940cfb27aa538e60d465f98bb5068d4d7d33131861ace43f04fe6947d68f","impliedFormat":1},{"version":"f83fb2b1338afbb3f9d733c7d6e8b135826c41b0518867df0c0ace18ae1aa270","impliedFormat":1},{"version":"01ff95aa1443e3f7248974e5a771f513cb2ac158c8898f470a1792f817bee497","impliedFormat":1},{"version":"757227c8b345c57d76f7f0e3bbad7a91ffca23f1b2547cbed9e10025816c9cb7","impliedFormat":1},{"version":"42a05d8f239f74587d4926aba8cc54792eed8e8a442c7adc9b38b516642aadfe","impliedFormat":1},{"version":"5d21b58d60383cc6ab9ad3d3e265d7d25af24a2c9b506247e0e50b0a884920be","impliedFormat":1},{"version":"101f482fd48cb4c7c0468dcc6d62c843d842977aea6235644b1edd05e81fbf22","impliedFormat":1},{"version":"ae6757460f37078884b1571a3de3ebaf724d827d7e1d53626c02b3c2a408ac63","affectsGlobalScope":true,"impliedFormat":1},{"version":"9451a46a89ed209e2e08329e6cac59f89356eae79a7230f916d8cc38725407c7","impliedFormat":1},{"version":"3ef397f12387eff17f550bc484ea7c27d21d43816bbe609d495107f44b97e933","impliedFormat":1},{"version":"1023282e2ba810bc07905d3668349fbd37a26411f0c8f94a70ef3c05fe523fcf","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"e236b5eba291f51bdf32c231673e6cab81b5410850e61f51a7a524dddadc0f95","impliedFormat":1},{"version":"f7ba0e839daa0702e3ff1a1a871c0d8ea2d586ce684dd8a72c786c36a680b1d9","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f2c62938251b45715fd2a9887060ec4fbc8724727029d1cbce373747252bdd7","impliedFormat":1},{"version":"e3ace08b6bbd84655d41e244677b474fd995923ffef7149ddb68af8848b60b05","impliedFormat":1},{"version":"132580b0e86c48fab152bab850fc57a4b74fe915c8958d2ccb052b809a44b61c","impliedFormat":1},{"version":"af4ab0aa8908fc9a655bb833d3bc28e117c4f0e1038c5a891546158beb25accb","impliedFormat":1},{"version":"69c9a5a9392e8564bd81116e1ed93b13205201fb44cb35a7fde8c9f9e21c4b23","impliedFormat":1},{"version":"5f8fc37f8434691ffac1bfd8fc2634647da2c0e84253ab5d2dd19a7718915b35","impliedFormat":1},{"version":"5981c2340fd8b076cae8efbae818d42c11ffc615994cb060b1cd390795f1be2b","impliedFormat":1},{"version":"f64deb26664af64dc274637343bde8d82f930c77af05a412c7d310b77207a448","impliedFormat":1},{"version":"ed4f674fc8c0c993cc7e145069ac44129e03519b910c62be206a0cc777bdc60b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0250da3eb85c99624f974e77ef355cdf86f43980251bc371475c2b397ba55bcd","impliedFormat":1},{"version":"f1c93e046fb3d9b7f8249629f4b63dc068dd839b824dd0aa39a5e68476dc9420","impliedFormat":1},{"version":"3d3a5f27ffbc06c885dd4d5f9ee20de61faf877fe2c3a7051c4825903d9a7fdc","impliedFormat":1},{"version":"12806f9f085598ef930edaf2467a5fa1789a878fba077cd27e85dc5851e11834","impliedFormat":1},{"version":"bce309f4d9b67c18d4eeff5bba6cf3e67b2b0aead9f03f75d6060c553974d7ba","impliedFormat":1},{"version":"a43fe41c33d0a192a0ecaf9b92e87bef3709c9972e6d53c42c49251ccb962d69","impliedFormat":1},{"version":"a177959203c017fad3ecc4f3d96c8757a840957a4959a3ae00dab9d35961ca6c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc727ccf9b36e257ff982ea0badeffbfc2c151802f741bddff00c6af3b784cf","impliedFormat":1},{"version":"2a00d005e3af99cd1cfa75220e60c61b04bfb6be7ca7453bfe2ef6cca37cc03c","impliedFormat":1},{"version":"4844a4c9b4b1e812b257676ed8a80b3f3be0e29bf05e742cc2ea9c3c6865e6c6","impliedFormat":1},{"version":"064878a60367e0407c42fb7ba02a2ea4d83257357dc20088e549bd4d89433e9c","impliedFormat":1},{"version":"14d4bd22d1b05824971b98f7e91b2484c90f1a684805c330476641417c3d9735","impliedFormat":1},{"version":"c3877fef8a43cd434f9728f25a97575b0eb73d92f38b5c87c840daccc3e21d97","impliedFormat":1},{"version":"b484ec11ba00e3a2235562a41898d55372ccabe607986c6fa4f4aba72093749f","impliedFormat":1},{"version":"1dbd83860e7634f9c236647f45dbc5d3c4f9eba8827d87209d6e9826fdf4dbd5","impliedFormat":1},{"version":"41ef7992c555671a8fe54db302788adefa191ded810a50329b79d20a6772d14c","impliedFormat":1},{"version":"041a7781b9127ab568d2cdcce62c58fdea7c7407f40b8c50045d7866a2727130","impliedFormat":1},{"version":"b37f83e7deea729aa9ce5593f78905afb45b7532fdff63041d374f60059e7852","impliedFormat":1},{"version":"e1cb68f3ef3a8dd7b2a9dfb3de482ed6c0f1586ba0db4e7d73c1d2147b6ffc51","impliedFormat":1},{"version":"55cdbeebe76a1fa18bbd7e7bf73350a2173926bd3085bb050cf5a5397025ee4e","impliedFormat":1},{"version":"10ec5e82144dfac6f04fa5d1d6c11763b3e4dbbac6d99101427219ab3e2ae887","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"074de5b2fdead0165a2757e3aaef20f27a6347b1c36adea27d51456795b37682","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"24371e69a38fc33e268d4a8716dbcda430d6c2c414a99ff9669239c4b8f40dea","impliedFormat":1},{"version":"ccab02f3920fc75c01174c47fcf67882a11daf16baf9e81701d0a94636e94556","impliedFormat":1},{"version":"3e11fce78ad8c0e1d1db4ba5f0652285509be3acdd519529bc8fcef85f7dafd9","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"9c32412007b5662fd34a8eb04292fb5314ec370d7016d1c2fb8aa193c807fe22","impliedFormat":1},{"version":"7fd1b31fd35876b0aa650811c25ec2c97a3c6387e5473eb18004bed86cdd76b6","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"6ebe8ebb8659aaa9d1acbf3710d7dae3e923e97610238b9511c25dc39023a166","impliedFormat":1},{"version":"e85d7f8068f6a26710bff0cc8c0fc5e47f71089c3780fbede05857331d2ddec9","impliedFormat":1},{"version":"7befaf0e76b5671be1d47b77fcc65f2b0aad91cc26529df1904f4a7c46d216e9","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"5b03a034c72146b61573aab280f295b015b9168470f2df05f6080a2122f9b4df","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"c63b9ada8c72f95aac5db92aea07e5e87ec810353cdf63b2d78f49a58662cf6c","impliedFormat":1},{"version":"1cc2a09e1a61a5222d4174ab358a9f9de5e906afe79dbf7363d871a7edda3955","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"b64d4d1c5f877f9c666e98e833f0205edb9384acc46e98a1fef344f64d6aba44","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"c9381908473a1c92cb8c516b184e75f4d226dad95c3a85a5af35f670064d9a2f","impliedFormat":1},{"version":"6e215dac8b234548d91b718f9c07d5b09473cd5cabb29053fcd8be0af190acb6","affectsGlobalScope":true,"impliedFormat":1},{"version":"dbecf494aac7d3ee1b23cdaafae0d0bfea8590567fc153db58fe00ed9fa66c24","impliedFormat":1},{"version":"f3d3e999a323c85c8a63ce90c6e4624ff89fe137a0e2508fddc08e0556d08abf","impliedFormat":1},{"version":"314607151cc203975193d5f44765f38597be3b0a43f466d3c1bfb17176dd3bd3","impliedFormat":1},{"version":"e155d961d69d5a5a5d1492a0a69d2a8f3b40a7197989484ba8c62e26e4ecd213","impliedFormat":1},{"version":"f40aad6c91017f20fc542f5701ec41e0f6aeba63c61bbf7aa13266ec29a50a3b","impliedFormat":1},{"version":"fc9e630f9302d0414ccd6c8ed2706659cff5ae454a56560c6122fa4a3fac5bbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"aa0a44af370a2d7c1aac988a17836f57910a6c52689f52f5b3ac1d4c6cadcb23","impliedFormat":1},{"version":"0ac74c7586880e26b6a599c710b59284a284e084a2bbc82cd40fb3fbfdea71ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ce12357dadbb8efc4e4ec4dab709c8071bf992722fc9adfea2fe0bd5b50923f","impliedFormat":1},{"version":"b5a907deaba678e5083ccdd7cc063a3a8c3413c688098f6de29d6e4cefabc85f","impliedFormat":1},{"version":"ffd344731abee98a0a85a735b19052817afd2156d97d1410819cd9bcd1bd575e","impliedFormat":1},{"version":"475e07c959f4766f90678425b45cf58ac9b95e50de78367759c1e5118e85d5c3","impliedFormat":1},{"version":"a524ae401b30a1b0814f1bbcdae459da97fa30ae6e22476e506bb3f82e3d9456","impliedFormat":1},{"version":"7375e803c033425e27cb33bae21917c106cb37b508fd242cccd978ef2ee244c7","impliedFormat":1},{"version":"eeb890c7e9218afdad2f30ad8a76b0b0b5161d11ce13b6723879de408e6bc47a","impliedFormat":1},{"version":"998da6b85ebace9ebea67040dd1a640f0156064e3d28dbe9bd9c0229b6f72347","impliedFormat":1},{"version":"dfbcc400ac6d20b941ccc7bd9031b9d9f54e4d495dd79117334e771959df4805","affectsGlobalScope":true,"impliedFormat":1},{"version":"944d65951e33a13068be5cd525ec42bf9bc180263ba0b723fa236970aa21f611","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b386c7b6ce6f369d18246904fa5eac73566167c88fb6508feba74fa7501a384","affectsGlobalScope":true,"impliedFormat":1},{"version":"592a109e67b907ffd2078cd6f727d5c326e06eaada169eef8fb18546d96f6797","impliedFormat":1},{"version":"f2eb1e35cae499d57e34b4ac3650248776fe7dbd9a3ec34b23754cfd8c22fceb","impliedFormat":1},{"version":"fbed43a6fcf5b675f5ec6fc960328114777862b58a2bb19c109e8fc1906caa09","impliedFormat":1},{"version":"9e98bd421e71f70c75dae7029e316745c89fa7b8bc8b43a91adf9b82c206099c","impliedFormat":1},{"version":"fc803e6b01f4365f71f51f9ce13f71396766848204d4f7a1b2b6154434b84b15","impliedFormat":1},{"version":"f3afcc0d6f77a9ca2d2c5c92eb4b89cd38d6fa4bdc1410d626bd701760a977ec","impliedFormat":1},{"version":"c8109fe76467db6e801d0edfbc50e6826934686467c9418ce6b246232ce7f109","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6f803e4e45915d58e721c04ec17830c6e6678d1e3e00e28edf3d52720909cea","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be812b06e518320ba82e2aff3ac2ca37370a9df917db708f081b9043fa3315","impliedFormat":1}],"root":[81,[97,103]],"options":{"allowJs":true,"composite":true,"declaration":true,"declarationMap":true,"jsx":4,"module":200,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":false,"noUncheckedIndexedAccess":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[83,1],[84,2],[82,3],[88,4],[89,5],[90,5],[87,3],[91,6],[92,7],[93,8],[86,9],[95,9],[94,9],[96,10],[85,3],[254,11],[127,12],[128,12],[129,13],[109,14],[130,15],[131,16],[132,17],[107,3],[133,18],[134,19],[135,20],[136,21],[137,22],[138,23],[139,23],[140,24],[141,25],[142,26],[143,27],[110,3],[108,3],[144,28],[145,29],[146,30],[186,31],[147,32],[148,33],[149,32],[150,34],[151,35],[152,36],[153,37],[154,37],[155,37],[156,38],[157,39],[158,40],[159,41],[160,42],[161,43],[162,43],[163,44],[164,3],[165,3],[166,45],[167,46],[168,45],[169,47],[170,48],[171,49],[172,50],[173,51],[174,52],[175,53],[176,54],[177,55],[178,56],[179,57],[180,58],[181,59],[182,60],[183,61],[111,32],[112,3],[113,62],[114,63],[115,3],[116,64],[117,3],[118,65],[119,66],[120,67],[121,67],[122,68],[123,3],[124,69],[125,70],[126,66],[184,71],[185,72],[230,73],[252,3],[251,3],[245,74],[232,75],[231,3],[228,76],[233,3],[226,77],[234,3],[253,78],[235,3],[229,3],[244,79],[246,80],[227,81],[250,82],[248,83],[247,84],[249,85],[236,3],[242,86],[239,87],[241,88],[240,89],[238,90],[237,3],[243,91],[79,3],[80,3],[14,3],[13,3],[2,3],[15,3],[16,3],[17,3],[18,3],[19,3],[20,3],[21,3],[22,3],[3,3],[23,3],[24,3],[4,3],[25,3],[29,3],[26,3],[27,3],[28,3],[30,3],[31,3],[32,3],[5,3],[33,3],[34,3],[35,3],[36,3],[6,3],[40,3],[37,3],[38,3],[39,3],[41,3],[7,3],[42,3],[47,3],[48,3],[43,3],[44,3],[45,3],[46,3],[8,3],[52,3],[49,3],[50,3],[51,3],[53,3],[9,3],[54,3],[55,3],[56,3],[58,3],[57,3],[59,3],[60,3],[10,3],[61,3],[62,3],[63,3],[11,3],[64,3],[65,3],[66,3],[67,3],[68,3],[1,3],[69,3],[70,3],[12,3],[74,3],[72,3],[77,3],[76,3],[71,3],[75,3],[73,3],[78,3],[202,92],[214,93],[199,94],[215,95],[224,96],[190,97],[191,98],[189,99],[223,100],[218,101],[222,102],[193,103],[211,104],[192,105],[221,106],[187,107],[188,101],[194,108],[195,3],[201,109],[198,108],[105,110],[225,111],[216,112],[205,113],[204,108],[206,114],[209,115],[203,116],[207,117],[219,100],[196,118],[197,119],[210,120],[106,95],[213,121],[212,108],[200,119],[208,122],[217,3],[104,3],[220,123],[81,3],[98,124],[99,125],[100,126],[103,127],[101,128],[102,129],[97,3]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol constants for Sideband Relay Protocol (SBRP).
|
|
3
|
+
*/
|
|
4
|
+
/** Domain separation context for handshake signature payload */
|
|
5
|
+
export declare const SBRP_HANDSHAKE_CONTEXT = "sbrp-v1-handshake";
|
|
6
|
+
/** Domain separation context for transcript hash (HKDF salt) */
|
|
7
|
+
export declare const SBRP_TRANSCRIPT_CONTEXT = "sbrp-v1-transcript";
|
|
8
|
+
/** HKDF info string for session key derivation */
|
|
9
|
+
export declare const SBRP_SESSION_KEYS_INFO = "sbrp-session-keys";
|
|
10
|
+
/** Length of session keys in bytes (clientToDaemon + daemonToClient) */
|
|
11
|
+
export declare const SESSION_KEYS_LENGTH = 64;
|
|
12
|
+
/** Length of a single symmetric key in bytes */
|
|
13
|
+
export declare const SYMMETRIC_KEY_LENGTH = 32;
|
|
14
|
+
/** Length of Ed25519 public key in bytes */
|
|
15
|
+
export declare const ED25519_PUBLIC_KEY_LENGTH = 32;
|
|
16
|
+
/** Length of Ed25519 private key seed in bytes */
|
|
17
|
+
export declare const ED25519_PRIVATE_KEY_LENGTH = 32;
|
|
18
|
+
/** Length of Ed25519 signature in bytes */
|
|
19
|
+
export declare const ED25519_SIGNATURE_LENGTH = 64;
|
|
20
|
+
/** Length of X25519 public key in bytes */
|
|
21
|
+
export declare const X25519_PUBLIC_KEY_LENGTH = 32;
|
|
22
|
+
/** Length of X25519 private key in bytes */
|
|
23
|
+
export declare const X25519_PRIVATE_KEY_LENGTH = 32;
|
|
24
|
+
/** Length of ChaCha20-Poly1305 nonce in bytes */
|
|
25
|
+
export declare const NONCE_LENGTH = 12;
|
|
26
|
+
/** Length of Poly1305 auth tag in bytes */
|
|
27
|
+
export declare const AUTH_TAG_LENGTH = 16;
|
|
28
|
+
/** Default replay window size (bits). Spec requires ≥64, recommends ≥128. */
|
|
29
|
+
export declare const DEFAULT_REPLAY_WINDOW_SIZE = 128n;
|
|
30
|
+
/** Direction bytes in nonce (4 bytes, big-endian) */
|
|
31
|
+
export declare const DIRECTION_CLIENT_TO_DAEMON: Uint8Array<ArrayBuffer>;
|
|
32
|
+
export declare const DIRECTION_DAEMON_TO_CLIENT: Uint8Array<ArrayBuffer>;
|
|
33
|
+
/** Frame header size: type (1) + length (4) + sessionId (8) */
|
|
34
|
+
export declare const FRAME_HEADER_SIZE = 13;
|
|
35
|
+
/** Maximum payload size in bytes (64 KB) */
|
|
36
|
+
export declare const MAX_PAYLOAD_SIZE = 65536;
|
|
37
|
+
/** HandshakeInit payload: X25519 ephemeral public key */
|
|
38
|
+
export declare const HANDSHAKE_INIT_PAYLOAD_SIZE = 32;
|
|
39
|
+
/** HandshakeAccept payload: Ed25519 identity key (32) + X25519 ephemeral (32) + Ed25519 signature (64) */
|
|
40
|
+
export declare const HANDSHAKE_ACCEPT_PAYLOAD_SIZE = 128;
|
|
41
|
+
/** Minimum encrypted payload: nonce (12) + authTag (16), no plaintext */
|
|
42
|
+
export declare const MIN_ENCRYPTED_PAYLOAD_SIZE: number;
|
|
43
|
+
/** Control payload minimum: code (2 bytes) */
|
|
44
|
+
export declare const MIN_CONTROL_PAYLOAD_SIZE = 2;
|
|
45
|
+
/** Signal payload size: signal (1) + reason (1) */
|
|
46
|
+
export declare const SIGNAL_PAYLOAD_SIZE = 2;
|
|
47
|
+
/** Maximum Ping/Pong payload size (0-8 bytes for RTT nonce) */
|
|
48
|
+
export declare const MAX_PING_PAYLOAD_SIZE = 8;
|
|
49
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D,gEAAgE;AAChE,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D,kDAAkD;AAClD,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,gDAAgD;AAChD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,4CAA4C;AAC5C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,kDAAkD;AAClD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,2CAA2C;AAC3C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,2CAA2C;AAC3C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,4CAA4C;AAC5C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,iDAAiD;AACjD,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,2CAA2C;AAC3C,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,qDAAqD;AACrD,eAAO,MAAM,0BAA0B,yBAA+B,CAAC;AACvE,eAAO,MAAM,0BAA0B,yBAA+B,CAAC;AAIvE,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC,yDAAyD;AACzD,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,0GAA0G;AAC1G,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,QAAiC,CAAC;AAEzE,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,IAAI,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Protocol constants for Sideband Relay Protocol (SBRP).
|
|
4
|
+
*/
|
|
5
|
+
/** Domain separation context for handshake signature payload */
|
|
6
|
+
export const SBRP_HANDSHAKE_CONTEXT = "sbrp-v1-handshake";
|
|
7
|
+
/** Domain separation context for transcript hash (HKDF salt) */
|
|
8
|
+
export const SBRP_TRANSCRIPT_CONTEXT = "sbrp-v1-transcript";
|
|
9
|
+
/** HKDF info string for session key derivation */
|
|
10
|
+
export const SBRP_SESSION_KEYS_INFO = "sbrp-session-keys";
|
|
11
|
+
/** Length of session keys in bytes (clientToDaemon + daemonToClient) */
|
|
12
|
+
export const SESSION_KEYS_LENGTH = 64;
|
|
13
|
+
/** Length of a single symmetric key in bytes */
|
|
14
|
+
export const SYMMETRIC_KEY_LENGTH = 32;
|
|
15
|
+
/** Length of Ed25519 public key in bytes */
|
|
16
|
+
export const ED25519_PUBLIC_KEY_LENGTH = 32;
|
|
17
|
+
/** Length of Ed25519 private key seed in bytes */
|
|
18
|
+
export const ED25519_PRIVATE_KEY_LENGTH = 32;
|
|
19
|
+
/** Length of Ed25519 signature in bytes */
|
|
20
|
+
export const ED25519_SIGNATURE_LENGTH = 64;
|
|
21
|
+
/** Length of X25519 public key in bytes */
|
|
22
|
+
export const X25519_PUBLIC_KEY_LENGTH = 32;
|
|
23
|
+
/** Length of X25519 private key in bytes */
|
|
24
|
+
export const X25519_PRIVATE_KEY_LENGTH = 32;
|
|
25
|
+
/** Length of ChaCha20-Poly1305 nonce in bytes */
|
|
26
|
+
export const NONCE_LENGTH = 12;
|
|
27
|
+
/** Length of Poly1305 auth tag in bytes */
|
|
28
|
+
export const AUTH_TAG_LENGTH = 16;
|
|
29
|
+
/** Default replay window size (bits). Spec requires ≥64, recommends ≥128. */
|
|
30
|
+
export const DEFAULT_REPLAY_WINDOW_SIZE = 128n;
|
|
31
|
+
/** Direction bytes in nonce (4 bytes, big-endian) */
|
|
32
|
+
export const DIRECTION_CLIENT_TO_DAEMON = new Uint8Array([0, 0, 0, 1]);
|
|
33
|
+
export const DIRECTION_DAEMON_TO_CLIENT = new Uint8Array([0, 0, 0, 2]);
|
|
34
|
+
// Wire format constants (§13)
|
|
35
|
+
/** Frame header size: type (1) + length (4) + sessionId (8) */
|
|
36
|
+
export const FRAME_HEADER_SIZE = 13;
|
|
37
|
+
/** Maximum payload size in bytes (64 KB) */
|
|
38
|
+
export const MAX_PAYLOAD_SIZE = 65536;
|
|
39
|
+
/** HandshakeInit payload: X25519 ephemeral public key */
|
|
40
|
+
export const HANDSHAKE_INIT_PAYLOAD_SIZE = 32;
|
|
41
|
+
/** HandshakeAccept payload: Ed25519 identity key (32) + X25519 ephemeral (32) + Ed25519 signature (64) */
|
|
42
|
+
export const HANDSHAKE_ACCEPT_PAYLOAD_SIZE = 128;
|
|
43
|
+
/** Minimum encrypted payload: nonce (12) + authTag (16), no plaintext */
|
|
44
|
+
export const MIN_ENCRYPTED_PAYLOAD_SIZE = NONCE_LENGTH + AUTH_TAG_LENGTH;
|
|
45
|
+
/** Control payload minimum: code (2 bytes) */
|
|
46
|
+
export const MIN_CONTROL_PAYLOAD_SIZE = 2;
|
|
47
|
+
/** Signal payload size: signal (1) + reason (1) */
|
|
48
|
+
export const SIGNAL_PAYLOAD_SIZE = 2;
|
|
49
|
+
/** Maximum Ping/Pong payload size (0-8 bytes for RTT nonce) */
|
|
50
|
+
export const MAX_PING_PAYLOAD_SIZE = 8;
|
|
51
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;GAEG;AAEH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE5D,kDAAkD;AAClD,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D,wEAAwE;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,kDAAkD;AAClD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,2CAA2C;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,2CAA2C;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,iDAAiD;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,2CAA2C;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE/C,qDAAqD;AACrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEvE,8BAA8B;AAE9B,+DAA+D;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC,yDAAyD;AACzD,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAE9C,0GAA0G;AAC1G,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,yEAAyE;AACzE,MAAM,CAAC,MAAM,0BAA0B,GAAG,YAAY,GAAG,eAAe,CAAC;AAEzE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE1C,mDAAmD;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC"}
|
package/dist/crypto.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { randomBytes } from "@noble/hashes/utils.js";
|
|
2
|
+
import type { DaemonId, EphemeralKeyPair, IdentityKeyPair, SessionKeys } from "./types.js";
|
|
3
|
+
import { Direction } from "./types.js";
|
|
4
|
+
/** Generate a new Ed25519 identity keypair */
|
|
5
|
+
export declare function generateIdentityKeyPair(): IdentityKeyPair;
|
|
6
|
+
/** Generate a new X25519 ephemeral keypair */
|
|
7
|
+
export declare function generateEphemeralKeyPair(): EphemeralKeyPair;
|
|
8
|
+
/** Compute SHA-256 fingerprint of an identity public key */
|
|
9
|
+
export declare function computeFingerprint(identityPublicKey: Uint8Array): string;
|
|
10
|
+
/**
|
|
11
|
+
* Create the signature payload for handshake authentication.
|
|
12
|
+
*
|
|
13
|
+
* payload = SHA256("sbrp-v1-handshake" || daemonId || clientPublicKey || daemonEphemeralPublicKey)
|
|
14
|
+
*/
|
|
15
|
+
export declare function createSignaturePayload(daemonId: DaemonId, clientPublicKey: Uint8Array, daemonEphemeralPublicKey: Uint8Array): Uint8Array;
|
|
16
|
+
/** Sign a payload with an Ed25519 identity private key */
|
|
17
|
+
export declare function signPayload(payload: Uint8Array, identityPrivateKey: Uint8Array): Uint8Array;
|
|
18
|
+
/** Verify an Ed25519 signature */
|
|
19
|
+
export declare function verifySignature(payload: Uint8Array, signature: Uint8Array, identityPublicKey: Uint8Array): boolean;
|
|
20
|
+
/** Compute X25519 shared secret */
|
|
21
|
+
export declare function computeSharedSecret(myPrivateKey: Uint8Array, peerPublicKey: Uint8Array): Uint8Array;
|
|
22
|
+
/**
|
|
23
|
+
* Create the transcript hash for key derivation.
|
|
24
|
+
*
|
|
25
|
+
* transcript = SHA256("sbrp-v1-transcript" || daemonId || clientPublicKey || daemonPublicKey || signature)
|
|
26
|
+
*/
|
|
27
|
+
export declare function createTranscriptHash(daemonId: DaemonId, clientPublicKey: Uint8Array, daemonPublicKey: Uint8Array, signature: Uint8Array): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* Derive session keys using HKDF-SHA256.
|
|
30
|
+
*
|
|
31
|
+
* Keys are derived with transcript hash as salt to bind to the authenticated session.
|
|
32
|
+
*/
|
|
33
|
+
export declare function deriveSessionKeys(sharedSecret: Uint8Array, transcriptHash: Uint8Array): SessionKeys;
|
|
34
|
+
/**
|
|
35
|
+
* Construct a nonce for ChaCha20-Poly1305.
|
|
36
|
+
*
|
|
37
|
+
* Nonce format (12 bytes):
|
|
38
|
+
* - Bytes 0-3: Direction (0x00000001 = client→daemon, 0x00000002 = daemon→client)
|
|
39
|
+
* - Bytes 4-11: Sequence number (big-endian uint64)
|
|
40
|
+
*/
|
|
41
|
+
export declare function constructNonce(direction: Direction, seq: bigint): Uint8Array;
|
|
42
|
+
/**
|
|
43
|
+
* Encrypt a message using ChaCha20-Poly1305.
|
|
44
|
+
*
|
|
45
|
+
* Returns: nonce (12 bytes) || ciphertext || authTag (16 bytes)
|
|
46
|
+
*/
|
|
47
|
+
export declare function encrypt(key: Uint8Array, direction: Direction, seq: bigint, plaintext: Uint8Array): Uint8Array;
|
|
48
|
+
/**
|
|
49
|
+
* Decrypt a message using ChaCha20-Poly1305.
|
|
50
|
+
*
|
|
51
|
+
* Input format: nonce (12 bytes) || ciphertext || authTag (16 bytes)
|
|
52
|
+
* Returns the plaintext, or throws on decryption failure.
|
|
53
|
+
*/
|
|
54
|
+
export declare function decrypt(key: Uint8Array, data: Uint8Array): Uint8Array;
|
|
55
|
+
/**
|
|
56
|
+
* Extract sequence number from encrypted message data.
|
|
57
|
+
*
|
|
58
|
+
* Reads bytes 4-11 of the nonce as big-endian uint64.
|
|
59
|
+
*/
|
|
60
|
+
export declare function extractSequence(data: Uint8Array): bigint;
|
|
61
|
+
/**
|
|
62
|
+
* Best-effort zeroization of sensitive key material.
|
|
63
|
+
*
|
|
64
|
+
* Note: JavaScript/GC limitations mean this is not guaranteed to prevent
|
|
65
|
+
* key material from remaining in memory.
|
|
66
|
+
*/
|
|
67
|
+
export declare function zeroize(data: Uint8Array): void;
|
|
68
|
+
/** Generate random bytes */
|
|
69
|
+
export { randomBytes };
|
|
70
|
+
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAcA,OAAO,EAAe,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAYlE,OAAO,KAAK,EACV,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,8CAA8C;AAC9C,wBAAgB,uBAAuB,IAAI,eAAe,CAIzD;AAED,8CAA8C;AAC9C,wBAAgB,wBAAwB,IAAI,gBAAgB,CAI3D;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,iBAAiB,EAAE,UAAU,GAAG,MAAM,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,UAAU,EAC3B,wBAAwB,EAAE,UAAU,GACnC,UAAU,CASZ;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CACzB,OAAO,EAAE,UAAU,EACnB,kBAAkB,EAAE,UAAU,GAC7B,UAAU,CAEZ;AAED,kCAAkC;AAClC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,UAAU,EACrB,iBAAiB,EAAE,UAAU,GAC5B,OAAO,CAET;AAED,mCAAmC;AACnC,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,UAAU,EACxB,aAAa,EAAE,UAAU,GACxB,UAAU,CAEZ;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,UAAU,EAC3B,eAAe,EAAE,UAAU,EAC3B,SAAS,EAAE,UAAU,GACpB,UAAU,CAUZ;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,UAAU,EACxB,cAAc,EAAE,UAAU,GACzB,WAAW,CAab;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAc5E;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,UAAU,GACpB,UAAU,CAMZ;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,UAAU,CAUrE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAMxD;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAE9C;AAED,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/crypto.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Cryptographic primitives for Sideband Relay Protocol (SBRP).
|
|
4
|
+
*
|
|
5
|
+
* Uses @noble/curves for Ed25519/X25519, @noble/ciphers for ChaCha20-Poly1305,
|
|
6
|
+
* and @noble/hashes for SHA-256/HKDF.
|
|
7
|
+
*/
|
|
8
|
+
import { chacha20poly1305 } from "@noble/ciphers/chacha.js";
|
|
9
|
+
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
10
|
+
import { x25519 } from "@noble/curves/ed25519.js";
|
|
11
|
+
import { hkdf } from "@noble/hashes/hkdf.js";
|
|
12
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
13
|
+
import { concatBytes, randomBytes } from "@noble/hashes/utils.js";
|
|
14
|
+
import { AUTH_TAG_LENGTH, DIRECTION_CLIENT_TO_DAEMON, DIRECTION_DAEMON_TO_CLIENT, NONCE_LENGTH, SBRP_HANDSHAKE_CONTEXT, SBRP_SESSION_KEYS_INFO, SBRP_TRANSCRIPT_CONTEXT, SESSION_KEYS_LENGTH, SYMMETRIC_KEY_LENGTH, } from "./constants.js";
|
|
15
|
+
import { Direction } from "./types.js";
|
|
16
|
+
const textEncoder = new TextEncoder();
|
|
17
|
+
/** Generate a new Ed25519 identity keypair */
|
|
18
|
+
export function generateIdentityKeyPair() {
|
|
19
|
+
const privateKey = ed25519.utils.randomSecretKey();
|
|
20
|
+
const publicKey = ed25519.getPublicKey(privateKey);
|
|
21
|
+
return { publicKey, privateKey };
|
|
22
|
+
}
|
|
23
|
+
/** Generate a new X25519 ephemeral keypair */
|
|
24
|
+
export function generateEphemeralKeyPair() {
|
|
25
|
+
const privateKey = x25519.utils.randomSecretKey();
|
|
26
|
+
const publicKey = x25519.getPublicKey(privateKey);
|
|
27
|
+
return { publicKey, privateKey };
|
|
28
|
+
}
|
|
29
|
+
/** Compute SHA-256 fingerprint of an identity public key */
|
|
30
|
+
export function computeFingerprint(identityPublicKey) {
|
|
31
|
+
const hash = sha256(identityPublicKey);
|
|
32
|
+
const hex = Array.from(hash)
|
|
33
|
+
.map((b) => b.toString(16).padStart(2, "0").toUpperCase())
|
|
34
|
+
.join(":");
|
|
35
|
+
return `SHA256:${hex}`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create the signature payload for handshake authentication.
|
|
39
|
+
*
|
|
40
|
+
* payload = SHA256("sbrp-v1-handshake" || daemonId || clientPublicKey || daemonEphemeralPublicKey)
|
|
41
|
+
*/
|
|
42
|
+
export function createSignaturePayload(daemonId, clientPublicKey, daemonEphemeralPublicKey) {
|
|
43
|
+
return sha256(concatBytes(textEncoder.encode(SBRP_HANDSHAKE_CONTEXT), textEncoder.encode(daemonId), clientPublicKey, daemonEphemeralPublicKey));
|
|
44
|
+
}
|
|
45
|
+
/** Sign a payload with an Ed25519 identity private key */
|
|
46
|
+
export function signPayload(payload, identityPrivateKey) {
|
|
47
|
+
return ed25519.sign(payload, identityPrivateKey);
|
|
48
|
+
}
|
|
49
|
+
/** Verify an Ed25519 signature */
|
|
50
|
+
export function verifySignature(payload, signature, identityPublicKey) {
|
|
51
|
+
return ed25519.verify(signature, payload, identityPublicKey);
|
|
52
|
+
}
|
|
53
|
+
/** Compute X25519 shared secret */
|
|
54
|
+
export function computeSharedSecret(myPrivateKey, peerPublicKey) {
|
|
55
|
+
return x25519.getSharedSecret(myPrivateKey, peerPublicKey);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create the transcript hash for key derivation.
|
|
59
|
+
*
|
|
60
|
+
* transcript = SHA256("sbrp-v1-transcript" || daemonId || clientPublicKey || daemonPublicKey || signature)
|
|
61
|
+
*/
|
|
62
|
+
export function createTranscriptHash(daemonId, clientPublicKey, daemonPublicKey, signature) {
|
|
63
|
+
return sha256(concatBytes(textEncoder.encode(SBRP_TRANSCRIPT_CONTEXT), textEncoder.encode(daemonId), clientPublicKey, daemonPublicKey, signature));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Derive session keys using HKDF-SHA256.
|
|
67
|
+
*
|
|
68
|
+
* Keys are derived with transcript hash as salt to bind to the authenticated session.
|
|
69
|
+
*/
|
|
70
|
+
export function deriveSessionKeys(sharedSecret, transcriptHash) {
|
|
71
|
+
const keys = hkdf(sha256, sharedSecret, transcriptHash, textEncoder.encode(SBRP_SESSION_KEYS_INFO), SESSION_KEYS_LENGTH);
|
|
72
|
+
return {
|
|
73
|
+
clientToDaemon: keys.slice(0, SYMMETRIC_KEY_LENGTH),
|
|
74
|
+
daemonToClient: keys.slice(SYMMETRIC_KEY_LENGTH, SESSION_KEYS_LENGTH),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Construct a nonce for ChaCha20-Poly1305.
|
|
79
|
+
*
|
|
80
|
+
* Nonce format (12 bytes):
|
|
81
|
+
* - Bytes 0-3: Direction (0x00000001 = client→daemon, 0x00000002 = daemon→client)
|
|
82
|
+
* - Bytes 4-11: Sequence number (big-endian uint64)
|
|
83
|
+
*/
|
|
84
|
+
export function constructNonce(direction, seq) {
|
|
85
|
+
const nonce = new Uint8Array(NONCE_LENGTH);
|
|
86
|
+
const directionBytes = direction === Direction.ClientToDaemon
|
|
87
|
+
? DIRECTION_CLIENT_TO_DAEMON
|
|
88
|
+
: DIRECTION_DAEMON_TO_CLIENT;
|
|
89
|
+
nonce.set(directionBytes, 0);
|
|
90
|
+
// Write sequence number as big-endian uint64 (bytes 4-11)
|
|
91
|
+
const view = new DataView(nonce.buffer);
|
|
92
|
+
view.setBigUint64(4, seq, false); // false = big-endian
|
|
93
|
+
return nonce;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Encrypt a message using ChaCha20-Poly1305.
|
|
97
|
+
*
|
|
98
|
+
* Returns: nonce (12 bytes) || ciphertext || authTag (16 bytes)
|
|
99
|
+
*/
|
|
100
|
+
export function encrypt(key, direction, seq, plaintext) {
|
|
101
|
+
const nonce = constructNonce(direction, seq);
|
|
102
|
+
const cipher = chacha20poly1305(key, nonce);
|
|
103
|
+
const ciphertext = cipher.encrypt(plaintext);
|
|
104
|
+
return concatBytes(nonce, ciphertext);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Decrypt a message using ChaCha20-Poly1305.
|
|
108
|
+
*
|
|
109
|
+
* Input format: nonce (12 bytes) || ciphertext || authTag (16 bytes)
|
|
110
|
+
* Returns the plaintext, or throws on decryption failure.
|
|
111
|
+
*/
|
|
112
|
+
export function decrypt(key, data) {
|
|
113
|
+
if (data.length < NONCE_LENGTH + AUTH_TAG_LENGTH) {
|
|
114
|
+
throw new Error("Invalid encrypted message: too short");
|
|
115
|
+
}
|
|
116
|
+
const nonce = data.slice(0, NONCE_LENGTH);
|
|
117
|
+
const ciphertext = data.slice(NONCE_LENGTH);
|
|
118
|
+
const cipher = chacha20poly1305(key, nonce);
|
|
119
|
+
return cipher.decrypt(ciphertext);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Extract sequence number from encrypted message data.
|
|
123
|
+
*
|
|
124
|
+
* Reads bytes 4-11 of the nonce as big-endian uint64.
|
|
125
|
+
*/
|
|
126
|
+
export function extractSequence(data) {
|
|
127
|
+
if (data.length < NONCE_LENGTH) {
|
|
128
|
+
throw new Error("Invalid encrypted message: too short");
|
|
129
|
+
}
|
|
130
|
+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
131
|
+
return view.getBigUint64(4, false); // false = big-endian
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Best-effort zeroization of sensitive key material.
|
|
135
|
+
*
|
|
136
|
+
* Note: JavaScript/GC limitations mean this is not guaranteed to prevent
|
|
137
|
+
* key material from remaining in memory.
|
|
138
|
+
*/
|
|
139
|
+
export function zeroize(data) {
|
|
140
|
+
data.fill(0);
|
|
141
|
+
}
|
|
142
|
+
/** Generate random bytes */
|
|
143
|
+
export { randomBytes };
|
|
144
|
+
//# sourceMappingURL=crypto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"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"}
|