@noy-db/hub 0.2.0-pre.1 → 0.2.0-pre.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.js +2 -2
- package/dist/attestation/index.cjs +305 -0
- package/dist/attestation/index.cjs.map +1 -0
- package/dist/attestation/index.d.cts +52 -0
- package/dist/attestation/index.d.ts +52 -0
- package/dist/attestation/index.js +36 -0
- package/dist/attestation/index.js.map +1 -0
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +4 -3
- package/dist/blobs/index.d.ts +4 -3
- package/dist/blobs/index.js +10 -8
- package/dist/blobs/index.js.map +1 -1
- package/dist/bundle/index.cjs +17940 -129
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +172 -3
- package/dist/bundle/index.d.ts +172 -3
- package/dist/bundle/index.js +533 -5
- package/dist/bundle/index.js.map +1 -1
- package/dist/{chunk-CBAHB2BF.js → chunk-2EYC3WDT.js} +7 -70
- package/dist/chunk-2EYC3WDT.js.map +1 -0
- package/dist/{chunk-P7EQ2S5O.js → chunk-2XLVPKXG.js} +2 -2
- package/dist/chunk-4OQWR46B.js +79 -0
- package/dist/chunk-4OQWR46B.js.map +1 -0
- package/dist/{chunk-23TTQXVO.js → chunk-4UBOTYP5.js} +2 -2
- package/dist/chunk-4X2S7PBF.js +251 -0
- package/dist/chunk-4X2S7PBF.js.map +1 -0
- package/dist/{chunk-MKSA2V7A.js → chunk-5YHWBPOT.js} +2 -2
- package/dist/{chunk-DYBQG5PQ.js → chunk-6S3LLAQ5.js} +2 -2
- package/dist/{chunk-UA4RI7OT.js → chunk-74JEQFMT.js} +5 -5
- package/dist/chunk-75QDHSE4.js +59 -0
- package/dist/chunk-75QDHSE4.js.map +1 -0
- package/dist/chunk-A6SWRXUQ.js +118 -0
- package/dist/chunk-A6SWRXUQ.js.map +1 -0
- package/dist/{chunk-UZXLQCHP.js → chunk-BFI3RS42.js} +2 -2
- package/dist/{chunk-EGQYGYIU.js → chunk-EMEX37ZN.js} +2 -2
- package/dist/{chunk-PEULZC6M.js → chunk-EPK6A3WJ.js} +8 -1
- package/dist/chunk-EPK6A3WJ.js.map +1 -0
- package/dist/{chunk-VMIO4IXG.js → chunk-FBMXWVGP.js} +6 -229
- package/dist/chunk-FBMXWVGP.js.map +1 -0
- package/dist/{chunk-ZNOEIM6Y.js → chunk-FCDO7UAO.js} +2 -2
- package/dist/{chunk-5SCJ5UEF.js → chunk-FS7A4XNF.js} +3 -3
- package/dist/{chunk-YS3POABP.js → chunk-FXQYZNOW.js} +1 -1
- package/dist/chunk-FXQYZNOW.js.map +1 -0
- package/dist/{chunk-SIZWEV2Y.js → chunk-G7PAZ3TD.js} +4 -4
- package/dist/{chunk-SIZWEV2Y.js.map → chunk-G7PAZ3TD.js.map} +1 -1
- package/dist/{chunk-537VFZTR.js → chunk-GAUBWHAF.js} +4 -4
- package/dist/{chunk-FCXOFQAJ.js → chunk-GD3BGKAR.js} +2 -2
- package/dist/{chunk-DPMFBCV6.js → chunk-GDTCGIPX.js} +2 -2
- package/dist/{chunk-DPMFBCV6.js.map → chunk-GDTCGIPX.js.map} +1 -1
- package/dist/{chunk-6HPZY4ON.js → chunk-GVXBHCZ2.js} +8 -3
- package/dist/chunk-GVXBHCZ2.js.map +1 -0
- package/dist/{chunk-HB3Z2GCR.js → chunk-HGZ7DC5H.js} +2 -2
- package/dist/{chunk-MIQHZESA.js → chunk-IS5HWQO7.js} +5 -5
- package/dist/{chunk-MIQHZESA.js.map → chunk-IS5HWQO7.js.map} +1 -1
- package/dist/{chunk-5DWL3JBF.js → chunk-K5PVGKE4.js} +2 -2
- package/dist/{chunk-NIOHFJPJ.js → chunk-KMI2NBBF.js} +7 -119
- package/dist/chunk-KMI2NBBF.js.map +1 -0
- package/dist/{chunk-XGSOTWYX.js → chunk-KYKMKLJ6.js} +2 -2
- package/dist/chunk-LOL725S4.js +233 -0
- package/dist/chunk-LOL725S4.js.map +1 -0
- package/dist/{chunk-4TFSM22V.js → chunk-LS3JLEIB.js} +4 -4
- package/dist/{chunk-2AXFIYHT.js → chunk-NCO2JGKK.js} +1 -1
- package/dist/chunk-NCO2JGKK.js.map +1 -0
- package/dist/{chunk-Z72JH4KG.js → chunk-NGSPBLLE.js} +4 -34
- package/dist/chunk-NGSPBLLE.js.map +1 -0
- package/dist/{chunk-OMLIZL2P.js → chunk-NSLTPGEN.js} +2 -2
- package/dist/{chunk-7H6DOO3E.js → chunk-P6256WTJ.js} +211 -36
- package/dist/chunk-P6256WTJ.js.map +1 -0
- package/dist/{chunk-KESP7GOK.js → chunk-QAU5HM6Q.js} +3 -3
- package/dist/{chunk-34YSDCDP.js → chunk-SAVQ6E2O.js} +2 -2
- package/dist/chunk-T6HQMVML.js +9960 -0
- package/dist/chunk-T6HQMVML.js.map +1 -0
- package/dist/{chunk-PA6R5ZCI.js → chunk-TLFUDXVV.js} +4 -4
- package/dist/{chunk-WCA2NROQ.js → chunk-UOF74WQY.js} +2 -2
- package/dist/chunk-UVPGJXVO.js +83 -0
- package/dist/chunk-UVPGJXVO.js.map +1 -0
- package/dist/{chunk-DYECX3IX.js → chunk-WRLHNG6H.js} +2 -2
- package/dist/{chunk-ADQ5MQ54.js → chunk-YDLAFP36.js} +71 -1
- package/dist/chunk-YDLAFP36.js.map +1 -0
- package/dist/{chunk-I6MX32UC.js → chunk-YK72A4IT.js} +4 -4
- package/dist/chunk-YL2DR3HY.js +36 -0
- package/dist/chunk-YL2DR3HY.js.map +1 -0
- package/dist/{chunk-RD5LYKD6.js → chunk-ZC2AAE6J.js} +2 -2
- package/dist/chunk-ZUMGGHRB.js +57 -0
- package/dist/chunk-ZUMGGHRB.js.map +1 -0
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +4 -3
- package/dist/consent/index.d.ts +4 -3
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-A7FRXYHC.js → crypto-H2Y3DDFW.js} +3 -3
- package/dist/{delegation-YBA4X4JN.js → delegation-QSC7G5QC.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +5 -4
- package/dist/derivations/index.d.ts +5 -4
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-D9s-loPr.d.ts → dev-unlock-Cf2B7Kih.d.ts} +1 -1
- package/dist/{dev-unlock-DRwVSy2S.d.cts → dev-unlock-De3mjQWv.d.cts} +1 -1
- package/dist/executor-BZKFZVRC.js +8 -0
- package/dist/executor-GFZFDQXV.js +8 -0
- package/dist/executor-KT2IOZVP.js +11 -0
- package/dist/{fanout-sidecar-VJ52RIEY.js → fanout-sidecar-NRBWSLRK.js} +2 -2
- package/dist/guards/index.cjs +7 -0
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +5 -4
- package/dist/guards/index.d.ts +5 -4
- package/dist/guards/index.js +4 -4
- package/dist/{hash-DXXXusyk.d.ts → hash-gVn_uKhp.d.ts} +1 -1
- package/dist/{hash-DtRih9MQ.d.cts → hash-vBCB0-Ps.d.cts} +1 -1
- package/dist/history/index.cjs +2 -2
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +5 -4
- package/dist/history/index.d.ts +5 -4
- package/dist/history/index.js +6 -6
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +4 -3
- package/dist/i18n/index.d.ts +4 -3
- package/dist/i18n/index.js +14 -12
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-CNwA-B6-.d.ts → index-BF1B2HB9.d.ts} +53 -1
- package/dist/{index-CmVgTkqk.d.cts → index-DVkvrgpm.d.cts} +53 -1
- package/dist/index.cjs +1780 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -12
- package/dist/index.d.ts +34 -12
- package/dist/index.js +160 -8804
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/issue-BAJ7ZB4S.js +12 -0
- package/dist/{ledger-3TXNP47J.js → ledger-WOEJUYTP.js} +6 -6
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +6 -5
- package/dist/materialized-views/index.d.ts +6 -5
- package/dist/materialized-views/index.js +6 -6
- package/dist/noydb-XNQSKXGO.js +34 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +5 -4
- package/dist/overlay-views/index.d.ts +5 -4
- package/dist/overlay-views/index.js +6 -4
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +4 -3
- package/dist/periods/index.d.ts +4 -3
- package/dist/periods/index.js +6 -6
- package/dist/{public-envelope-PY6NKFLI.js → public-envelope-OHQ5UZFM.js} +4 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +3 -3
- package/dist/registry-2IEARCGT.js +7 -0
- package/dist/{registry-3L3N3PTG.js → registry-CDHASH73.js} +3 -3
- package/dist/registry-EMGLZGR6.js +8 -0
- package/dist/registry-NQALYR77.js +8 -0
- package/dist/registry-NQALYR77.js.map +1 -0
- package/dist/revoke-7JOVLZFD.js +17 -0
- package/dist/revoke-7JOVLZFD.js.map +1 -0
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +5 -4
- package/dist/session/index.d.ts +5 -4
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +4 -3
- package/dist/shadow/index.d.ts +4 -3
- package/dist/shadow/index.js +2 -2
- package/dist/signer-M4K5HBLD.js +18 -0
- package/dist/signer-M4K5HBLD.js.map +1 -0
- package/dist/{stale-HSC5YO2O.js → stale-PAGCS4K5.js} +2 -2
- package/dist/stale-PAGCS4K5.js.map +1 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +4 -3
- package/dist/store/index.d.ts +4 -3
- package/dist/store/index.js +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +3 -2
- package/dist/sync/index.d.ts +3 -2
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +4 -3
- package/dist/team/index.d.ts +4 -3
- package/dist/team/index.js +13 -11
- package/dist/tx/index.cjs +81 -1
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +5 -4
- package/dist/tx/index.d.ts +5 -4
- package/dist/tx/index.js +56 -3
- package/dist/tx/index.js.map +1 -1
- package/dist/{types-C4lwMKKF.d.cts → types-CSLcfytP.d.cts} +644 -5
- package/dist/{types-DW9RGSSs.d.ts → types-D9eB0Rvh.d.ts} +644 -5
- package/dist/{index-4agOpzqd.d.ts → ulid-CG2YvAbg.d.cts} +51 -33
- package/dist/{index-hdFvZkBP.d.cts → ulid-CiM2OAeM.d.ts} +51 -33
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{with-derivation-g-pGoMzL.d.ts → with-derivation-Bzpj6UTv.d.ts} +1 -1
- package/dist/{with-derivation-C8LDlV7t.d.cts → with-derivation-DWajFh4K.d.cts} +1 -1
- package/dist/{with-guard-jI1x9Z3k.d.cts → with-guard-DF_Ul3DT.d.cts} +1 -1
- package/dist/{with-guard-DWOCK4Ca.d.ts → with-guard-DR7U-l4v.d.ts} +1 -1
- package/dist/{with-materialized-view-DcTx4H3j.d.cts → with-materialized-view-_piodoIz.d.cts} +1 -1
- package/dist/{with-materialized-view-DaKR-N6J.d.ts → with-materialized-view-qtoJ3xKJ.d.ts} +1 -1
- package/dist/{with-overlayed-view-N7jYuNOS.d.ts → with-overlayed-view-DFaRfgMr.d.ts} +1 -1
- package/dist/{with-overlayed-view-D-6oWAgM.d.cts → with-overlayed-view-DwzCKxn2.d.cts} +1 -1
- package/package.json +15 -3
- package/dist/chunk-2AXFIYHT.js.map +0 -1
- package/dist/chunk-6HPZY4ON.js.map +0 -1
- package/dist/chunk-7H6DOO3E.js.map +0 -1
- package/dist/chunk-ADQ5MQ54.js.map +0 -1
- package/dist/chunk-CBAHB2BF.js.map +0 -1
- package/dist/chunk-NIOHFJPJ.js.map +0 -1
- package/dist/chunk-PEULZC6M.js.map +0 -1
- package/dist/chunk-VMIO4IXG.js.map +0 -1
- package/dist/chunk-YS3POABP.js.map +0 -1
- package/dist/chunk-Z72JH4KG.js.map +0 -1
- package/dist/executor-7E3VFGW7.js +0 -11
- package/dist/executor-CEWX2FQI.js +0 -8
- package/dist/executor-X4SQ3ZLC.js +0 -8
- package/dist/registry-O47PUPSY.js +0 -8
- package/dist/registry-RFGGMVNJ.js +0 -7
- package/dist/registry-WLLMODKN.js +0 -8
- /package/dist/{chunk-P7EQ2S5O.js.map → chunk-2XLVPKXG.js.map} +0 -0
- /package/dist/{chunk-23TTQXVO.js.map → chunk-4UBOTYP5.js.map} +0 -0
- /package/dist/{chunk-MKSA2V7A.js.map → chunk-5YHWBPOT.js.map} +0 -0
- /package/dist/{chunk-DYBQG5PQ.js.map → chunk-6S3LLAQ5.js.map} +0 -0
- /package/dist/{chunk-UA4RI7OT.js.map → chunk-74JEQFMT.js.map} +0 -0
- /package/dist/{chunk-UZXLQCHP.js.map → chunk-BFI3RS42.js.map} +0 -0
- /package/dist/{chunk-EGQYGYIU.js.map → chunk-EMEX37ZN.js.map} +0 -0
- /package/dist/{chunk-ZNOEIM6Y.js.map → chunk-FCDO7UAO.js.map} +0 -0
- /package/dist/{chunk-5SCJ5UEF.js.map → chunk-FS7A4XNF.js.map} +0 -0
- /package/dist/{chunk-537VFZTR.js.map → chunk-GAUBWHAF.js.map} +0 -0
- /package/dist/{chunk-FCXOFQAJ.js.map → chunk-GD3BGKAR.js.map} +0 -0
- /package/dist/{chunk-HB3Z2GCR.js.map → chunk-HGZ7DC5H.js.map} +0 -0
- /package/dist/{chunk-5DWL3JBF.js.map → chunk-K5PVGKE4.js.map} +0 -0
- /package/dist/{chunk-XGSOTWYX.js.map → chunk-KYKMKLJ6.js.map} +0 -0
- /package/dist/{chunk-4TFSM22V.js.map → chunk-LS3JLEIB.js.map} +0 -0
- /package/dist/{chunk-OMLIZL2P.js.map → chunk-NSLTPGEN.js.map} +0 -0
- /package/dist/{chunk-KESP7GOK.js.map → chunk-QAU5HM6Q.js.map} +0 -0
- /package/dist/{chunk-34YSDCDP.js.map → chunk-SAVQ6E2O.js.map} +0 -0
- /package/dist/{chunk-PA6R5ZCI.js.map → chunk-TLFUDXVV.js.map} +0 -0
- /package/dist/{chunk-WCA2NROQ.js.map → chunk-UOF74WQY.js.map} +0 -0
- /package/dist/{chunk-DYECX3IX.js.map → chunk-WRLHNG6H.js.map} +0 -0
- /package/dist/{chunk-I6MX32UC.js.map → chunk-YK72A4IT.js.map} +0 -0
- /package/dist/{chunk-RD5LYKD6.js.map → chunk-ZC2AAE6J.js.map} +0 -0
- /package/dist/{crypto-A7FRXYHC.js.map → crypto-H2Y3DDFW.js.map} +0 -0
- /package/dist/{delegation-YBA4X4JN.js.map → delegation-QSC7G5QC.js.map} +0 -0
- /package/dist/{executor-7E3VFGW7.js.map → executor-BZKFZVRC.js.map} +0 -0
- /package/dist/{executor-CEWX2FQI.js.map → executor-GFZFDQXV.js.map} +0 -0
- /package/dist/{executor-X4SQ3ZLC.js.map → executor-KT2IOZVP.js.map} +0 -0
- /package/dist/{fanout-sidecar-VJ52RIEY.js.map → fanout-sidecar-NRBWSLRK.js.map} +0 -0
- /package/dist/{ledger-3TXNP47J.js.map → issue-BAJ7ZB4S.js.map} +0 -0
- /package/dist/{public-envelope-PY6NKFLI.js.map → ledger-WOEJUYTP.js.map} +0 -0
- /package/dist/{registry-3L3N3PTG.js.map → noydb-XNQSKXGO.js.map} +0 -0
- /package/dist/{registry-O47PUPSY.js.map → public-envelope-OHQ5UZFM.js.map} +0 -0
- /package/dist/{registry-RFGGMVNJ.js.map → registry-2IEARCGT.js.map} +0 -0
- /package/dist/{registry-WLLMODKN.js.map → registry-CDHASH73.js.map} +0 -0
- /package/dist/{stale-HSC5YO2O.js.map → registry-EMGLZGR6.js.map} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './index-CNwA-B6-.js';
|
|
1
|
+
import { ba as PublicEnvelope, bb as SealingKeyProvider, bc as BundleRecipient, bd as RecipientSealer, be as RecipientHint, bf as Vault } from './types-CSLcfytP.cjs';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* `.noydb` container format — byte layout, header schema, validators.
|
|
@@ -140,6 +139,22 @@ interface NoydbBundleHeader {
|
|
|
140
139
|
* pre-#197 shape; back-compatible).
|
|
141
140
|
*/
|
|
142
141
|
readonly autoUnlock?: 'unsealed' | 'sealed';
|
|
142
|
+
/**
|
|
143
|
+
* Bundle's role in the source → destination lifecycle (#203).
|
|
144
|
+
* - omitted / 'snapshot' (default): backup/copy of an existing vault.
|
|
145
|
+
* - 'extracted-partition': re-keyed projection awaiting adoption.
|
|
146
|
+
*/
|
|
147
|
+
readonly bundleKind?: 'snapshot' | 'extracted-partition';
|
|
148
|
+
/**
|
|
149
|
+
* Transfer-seal INDICATOR (#206) — metadata only, no payload (the
|
|
150
|
+
* sealed DEKs live in the body). Present iff
|
|
151
|
+
* bundleKind === 'extracted-partition'.
|
|
152
|
+
*/
|
|
153
|
+
readonly transferSeal?: {
|
|
154
|
+
readonly v: 1;
|
|
155
|
+
readonly alg: 'aes-256-gcm-pre-shared';
|
|
156
|
+
readonly sealId: string;
|
|
157
|
+
};
|
|
143
158
|
}
|
|
144
159
|
/**
|
|
145
160
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
@@ -328,9 +343,15 @@ interface WriteNoydbBundleOptions {
|
|
|
328
343
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
329
344
|
* `provider.id`) to auto-unseal on import.
|
|
330
345
|
*
|
|
331
|
-
* `mode: 'self-target'`
|
|
332
|
-
*
|
|
333
|
-
*
|
|
346
|
+
* `mode: 'self-target'` — sender and recipient share the same
|
|
347
|
+
* provider identity (same iCloud Keychain entry, same
|
|
348
|
+
* MDM-provisioned bundle id, same KMS account, etc.).
|
|
349
|
+
*
|
|
350
|
+
* `mode: 'recipient-target'` — asymmetric sealing via a
|
|
351
|
+
* {@link RecipientSealer}. Each user entry carries a
|
|
352
|
+
* `credential` and a `hint` (the recipient's public material).
|
|
353
|
+
* The bundle can only be unsealed by the holder of the matching
|
|
354
|
+
* private key.
|
|
334
355
|
*
|
|
335
356
|
* Mutually exclusive with `autoCredentials`, `autoPassphrases`,
|
|
336
357
|
* and `sealedPassphrases`.
|
|
@@ -339,6 +360,13 @@ interface WriteNoydbBundleOptions {
|
|
|
339
360
|
readonly mode: 'self-target';
|
|
340
361
|
readonly provider: SealingKeyProvider;
|
|
341
362
|
readonly perUser: Record<string, AutoCredential>;
|
|
363
|
+
} | {
|
|
364
|
+
readonly mode: 'recipient-target';
|
|
365
|
+
readonly provider: RecipientSealer;
|
|
366
|
+
readonly perUser: Record<string, {
|
|
367
|
+
readonly credential: AutoCredential;
|
|
368
|
+
readonly hint: RecipientHint;
|
|
369
|
+
}>;
|
|
342
370
|
};
|
|
343
371
|
/**
|
|
344
372
|
* @deprecated Use `autoCredentials` instead (#215).
|
|
@@ -371,11 +399,11 @@ interface WriteNoydbBundleOptions {
|
|
|
371
399
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
372
400
|
* `provider.id`) to auto-unseal on import.
|
|
373
401
|
*
|
|
374
|
-
* `mode: 'self-target'` is the only mode
|
|
375
|
-
* recipient share the same provider identity (same iCloud Keychain
|
|
402
|
+
* `mode: 'self-target'` is the only mode for `sealedPassphrases` — sender
|
|
403
|
+
* and recipient share the same provider identity (same iCloud Keychain
|
|
376
404
|
* entry, same MDM-provisioned bundle id, same KMS account, etc.).
|
|
377
|
-
*
|
|
378
|
-
*
|
|
405
|
+
* For recipient-target sealing via the `RecipientSealer` interface,
|
|
406
|
+
* use `sealedCredentials` with `mode: 'recipient-target'` (§11.4).
|
|
379
407
|
*
|
|
380
408
|
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
381
409
|
* and `autoPassphrases`.
|
|
@@ -440,31 +468,21 @@ interface ReadNoydbBundleOptions {
|
|
|
440
468
|
*/
|
|
441
469
|
readonly attemptUnsealAcrossProviders?: boolean;
|
|
442
470
|
}
|
|
443
|
-
/** Test-only: reset the brotli detection cache between tests. */
|
|
444
|
-
declare function resetBrotliSupportCache(): void;
|
|
445
471
|
/**
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
* via `vault.getBundleHandle()` — same handle on
|
|
451
|
-
* every export from the same vault instance, so cloud
|
|
452
|
-
* adapters can use it as a primary key.
|
|
453
|
-
* 2. `vault.dump()` → JSON string with encrypted records
|
|
454
|
-
* inside.
|
|
455
|
-
* 3. UTF-8 encode the dump string.
|
|
456
|
-
* 4. Compress (brotli if available, gzip fallback by default).
|
|
457
|
-
* 5. Compute SHA-256 of the compressed body for integrity.
|
|
458
|
-
* 6. Build the minimum-disclosure header from format version,
|
|
459
|
-
* handle, body length, body sha.
|
|
460
|
-
* 7. Serialize: magic (4) + flags (1) + algo (1) + headerLen (4)
|
|
461
|
-
* + header JSON (N) + compressed body (M).
|
|
462
|
-
*
|
|
463
|
-
* The output is a single `Uint8Array`. Consumers writing to disk
|
|
464
|
-
* pass it to `fs.writeFile`; consumers uploading to cloud storage
|
|
465
|
-
* pass it as the request body. The `@noy-db/file` adapter wraps
|
|
466
|
-
* this with a `saveBundle(path, vault)` helper.
|
|
472
|
+
* Transfer-seal payload (#206). The destination DEKs, exported to raw
|
|
473
|
+
* bytes and AES-256-GCM-sealed *as a set* under the one-time transfer
|
|
474
|
+
* key. `adoptPartition` (#207) unseals this; `createOwnerOnAdoptedPartition`
|
|
475
|
+
* (#208) re-wraps the raw DEKs under the recipient's KEK.
|
|
467
476
|
*/
|
|
477
|
+
interface TransferSealPayload {
|
|
478
|
+
readonly v: 1;
|
|
479
|
+
readonly alg: 'aes-256-gcm-pre-shared';
|
|
480
|
+
readonly sealId: string;
|
|
481
|
+
/** base64(AES-256-GCM(transferKey, JSON of { collection: base64(rawDEK) })) — iv ‖ ct ‖ tag. */
|
|
482
|
+
readonly payload: string;
|
|
483
|
+
}
|
|
484
|
+
/** Test-only: reset the brotli detection cache between tests. */
|
|
485
|
+
declare function resetBrotliSupportCache(): void;
|
|
468
486
|
declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
|
|
469
487
|
/**
|
|
470
488
|
* Read just the bundle header — no body decompression, no
|
|
@@ -582,4 +600,4 @@ declare function generateULID(): string;
|
|
|
582
600
|
*/
|
|
583
601
|
declare function isULID(value: string): boolean;
|
|
584
602
|
|
|
585
|
-
export { type AutoCredential as A,
|
|
603
|
+
export { type AutoCredential as A, COMPRESSION_BROTLI as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, encodeBundleHeader as i, generateULID as j, isULID as k, readNoydbBundleHeader as l, resetBrotliSupportCache as m, type AutoCredentialKind as n, hasNoydbBundleMagic as o, readNoydbBundlePublicEnvelope as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './index-CmVgTkqk.cjs';
|
|
1
|
+
import { ba as PublicEnvelope, bb as SealingKeyProvider, bc as BundleRecipient, bd as RecipientSealer, be as RecipientHint, bf as Vault } from './types-D9eB0Rvh.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* `.noydb` container format — byte layout, header schema, validators.
|
|
@@ -140,6 +139,22 @@ interface NoydbBundleHeader {
|
|
|
140
139
|
* pre-#197 shape; back-compatible).
|
|
141
140
|
*/
|
|
142
141
|
readonly autoUnlock?: 'unsealed' | 'sealed';
|
|
142
|
+
/**
|
|
143
|
+
* Bundle's role in the source → destination lifecycle (#203).
|
|
144
|
+
* - omitted / 'snapshot' (default): backup/copy of an existing vault.
|
|
145
|
+
* - 'extracted-partition': re-keyed projection awaiting adoption.
|
|
146
|
+
*/
|
|
147
|
+
readonly bundleKind?: 'snapshot' | 'extracted-partition';
|
|
148
|
+
/**
|
|
149
|
+
* Transfer-seal INDICATOR (#206) — metadata only, no payload (the
|
|
150
|
+
* sealed DEKs live in the body). Present iff
|
|
151
|
+
* bundleKind === 'extracted-partition'.
|
|
152
|
+
*/
|
|
153
|
+
readonly transferSeal?: {
|
|
154
|
+
readonly v: 1;
|
|
155
|
+
readonly alg: 'aes-256-gcm-pre-shared';
|
|
156
|
+
readonly sealId: string;
|
|
157
|
+
};
|
|
143
158
|
}
|
|
144
159
|
/**
|
|
145
160
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
@@ -328,9 +343,15 @@ interface WriteNoydbBundleOptions {
|
|
|
328
343
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
329
344
|
* `provider.id`) to auto-unseal on import.
|
|
330
345
|
*
|
|
331
|
-
* `mode: 'self-target'`
|
|
332
|
-
*
|
|
333
|
-
*
|
|
346
|
+
* `mode: 'self-target'` — sender and recipient share the same
|
|
347
|
+
* provider identity (same iCloud Keychain entry, same
|
|
348
|
+
* MDM-provisioned bundle id, same KMS account, etc.).
|
|
349
|
+
*
|
|
350
|
+
* `mode: 'recipient-target'` — asymmetric sealing via a
|
|
351
|
+
* {@link RecipientSealer}. Each user entry carries a
|
|
352
|
+
* `credential` and a `hint` (the recipient's public material).
|
|
353
|
+
* The bundle can only be unsealed by the holder of the matching
|
|
354
|
+
* private key.
|
|
334
355
|
*
|
|
335
356
|
* Mutually exclusive with `autoCredentials`, `autoPassphrases`,
|
|
336
357
|
* and `sealedPassphrases`.
|
|
@@ -339,6 +360,13 @@ interface WriteNoydbBundleOptions {
|
|
|
339
360
|
readonly mode: 'self-target';
|
|
340
361
|
readonly provider: SealingKeyProvider;
|
|
341
362
|
readonly perUser: Record<string, AutoCredential>;
|
|
363
|
+
} | {
|
|
364
|
+
readonly mode: 'recipient-target';
|
|
365
|
+
readonly provider: RecipientSealer;
|
|
366
|
+
readonly perUser: Record<string, {
|
|
367
|
+
readonly credential: AutoCredential;
|
|
368
|
+
readonly hint: RecipientHint;
|
|
369
|
+
}>;
|
|
342
370
|
};
|
|
343
371
|
/**
|
|
344
372
|
* @deprecated Use `autoCredentials` instead (#215).
|
|
@@ -371,11 +399,11 @@ interface WriteNoydbBundleOptions {
|
|
|
371
399
|
* recipient must hold a provider with a matching `pid` (i.e.,
|
|
372
400
|
* `provider.id`) to auto-unseal on import.
|
|
373
401
|
*
|
|
374
|
-
* `mode: 'self-target'` is the only mode
|
|
375
|
-
* recipient share the same provider identity (same iCloud Keychain
|
|
402
|
+
* `mode: 'self-target'` is the only mode for `sealedPassphrases` — sender
|
|
403
|
+
* and recipient share the same provider identity (same iCloud Keychain
|
|
376
404
|
* entry, same MDM-provisioned bundle id, same KMS account, etc.).
|
|
377
|
-
*
|
|
378
|
-
*
|
|
405
|
+
* For recipient-target sealing via the `RecipientSealer` interface,
|
|
406
|
+
* use `sealedCredentials` with `mode: 'recipient-target'` (§11.4).
|
|
379
407
|
*
|
|
380
408
|
* Mutually exclusive with `autoCredentials`, `sealedCredentials`,
|
|
381
409
|
* and `autoPassphrases`.
|
|
@@ -440,31 +468,21 @@ interface ReadNoydbBundleOptions {
|
|
|
440
468
|
*/
|
|
441
469
|
readonly attemptUnsealAcrossProviders?: boolean;
|
|
442
470
|
}
|
|
443
|
-
/** Test-only: reset the brotli detection cache between tests. */
|
|
444
|
-
declare function resetBrotliSupportCache(): void;
|
|
445
471
|
/**
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
* via `vault.getBundleHandle()` — same handle on
|
|
451
|
-
* every export from the same vault instance, so cloud
|
|
452
|
-
* adapters can use it as a primary key.
|
|
453
|
-
* 2. `vault.dump()` → JSON string with encrypted records
|
|
454
|
-
* inside.
|
|
455
|
-
* 3. UTF-8 encode the dump string.
|
|
456
|
-
* 4. Compress (brotli if available, gzip fallback by default).
|
|
457
|
-
* 5. Compute SHA-256 of the compressed body for integrity.
|
|
458
|
-
* 6. Build the minimum-disclosure header from format version,
|
|
459
|
-
* handle, body length, body sha.
|
|
460
|
-
* 7. Serialize: magic (4) + flags (1) + algo (1) + headerLen (4)
|
|
461
|
-
* + header JSON (N) + compressed body (M).
|
|
462
|
-
*
|
|
463
|
-
* The output is a single `Uint8Array`. Consumers writing to disk
|
|
464
|
-
* pass it to `fs.writeFile`; consumers uploading to cloud storage
|
|
465
|
-
* pass it as the request body. The `@noy-db/file` adapter wraps
|
|
466
|
-
* this with a `saveBundle(path, vault)` helper.
|
|
472
|
+
* Transfer-seal payload (#206). The destination DEKs, exported to raw
|
|
473
|
+
* bytes and AES-256-GCM-sealed *as a set* under the one-time transfer
|
|
474
|
+
* key. `adoptPartition` (#207) unseals this; `createOwnerOnAdoptedPartition`
|
|
475
|
+
* (#208) re-wraps the raw DEKs under the recipient's KEK.
|
|
467
476
|
*/
|
|
477
|
+
interface TransferSealPayload {
|
|
478
|
+
readonly v: 1;
|
|
479
|
+
readonly alg: 'aes-256-gcm-pre-shared';
|
|
480
|
+
readonly sealId: string;
|
|
481
|
+
/** base64(AES-256-GCM(transferKey, JSON of { collection: base64(rawDEK) })) — iv ‖ ct ‖ tag. */
|
|
482
|
+
readonly payload: string;
|
|
483
|
+
}
|
|
484
|
+
/** Test-only: reset the brotli detection cache between tests. */
|
|
485
|
+
declare function resetBrotliSupportCache(): void;
|
|
468
486
|
declare function writeNoydbBundle(vault: Vault, opts?: WriteNoydbBundleOptions): Promise<Uint8Array>;
|
|
469
487
|
/**
|
|
470
488
|
* Read just the bundle header — no body decompression, no
|
|
@@ -582,4 +600,4 @@ declare function generateULID(): string;
|
|
|
582
600
|
*/
|
|
583
601
|
declare function isULID(value: string): boolean;
|
|
584
602
|
|
|
585
|
-
export { type AutoCredential as A,
|
|
603
|
+
export { type AutoCredential as A, COMPRESSION_BROTLI as C, FLAG_COMPRESSED as F, NOYDB_BUNDLE_FORMAT_VERSION as N, type ReadNoydbBundleOptions as R, type TransferSealPayload as T, type WriteNoydbBundleOptions as W, COMPRESSION_GZIP as a, COMPRESSION_NONE as b, type CompressionAlgo as c, FLAG_HAS_INTEGRITY_HASH as d, NOYDB_BUNDLE_MAGIC as e, NOYDB_BUNDLE_PREFIX_BYTES as f, type NoydbBundleHeader as g, type NoydbBundleReadResult as h, encodeBundleHeader as i, generateULID as j, isULID as k, readNoydbBundleHeader as l, resetBrotliSupportCache as m, type AutoCredentialKind as n, hasNoydbBundleMagic as o, readNoydbBundlePublicEnvelope as p, readNoydbBundle as r, validateBundleHeader as v, writeNoydbBundle as w };
|