@noy-db/hub 0.8.0-pre.0 → 0.8.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/CHANGELOG.md +50 -0
- package/dist/api-OS747DS4.js +18 -0
- package/dist/as/index.js +11 -12
- package/dist/as/index.js.map +1 -1
- package/dist/at/index.js +9 -10
- package/dist/attestation/index.js +39 -28
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-7TFRVFLH.js → backup-YE2VQ26S.js} +15 -16
- package/dist/backup-YE2VQ26S.js.map +1 -0
- package/dist/blobs/index.js +13 -14
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -13
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/capsule/contract.d.ts +159 -0
- package/dist/capsule/contract.js +95 -0
- package/dist/capsule/enclave-aes/bound.d.ts +52 -0
- package/dist/capsule/enclave-aes/capabilities.d.ts +2 -0
- package/dist/capsule/enclave-aes/classify/compare.d.ts +20 -0
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/find.d.ts +1 -1
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/reveal.d.ts +1 -1
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/verify.d.ts +2 -2
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/write.d.ts +1 -1
- package/dist/{kernel/enclave → capsule/enclave-aes}/crypto.d.ts +33 -129
- package/dist/capsule/enclave-aes/index.d.ts +113 -0
- package/dist/capsule/enclave-aes/index.js +335 -0
- package/dist/capsule/enclave-aes/index.js.map +1 -0
- package/dist/capsule/enclave-aes/primitives.d.ts +29 -0
- package/dist/capsule/index.d.ts +27 -0
- package/dist/capsule/plumbing/ct-equal.d.ts +11 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/deterministic.d.ts +8 -21
- package/dist/capsule/plumbing/digest.d.ts +122 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/envelope-body.d.ts +44 -48
- package/dist/capsule/plumbing/index.d.ts +100 -0
- package/dist/capsule/plumbing/lifecycle.d.ts +50 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/record-codec.d.ts +55 -20
- package/dist/{kernel/enclave → capsule/plumbing}/record-envelope.d.ts +1 -1
- package/dist/capsule/plumbing/rekey-blob.d.ts +33 -0
- package/dist/capsule/plumbing/rekey.d.ts +44 -0
- package/dist/capsule/plumbing/sealed-slot.d.ts +22 -0
- package/dist/capsule/plumbing/sealed-slots.d.ts +37 -0
- package/dist/capsule/plumbing/sealing.d.ts +29 -0
- package/dist/capsule/plumbing/sign.d.ts +9 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/tombstone.d.ts +2 -2
- package/dist/capsule-VOLX3QRQ.js +209 -0
- package/dist/cargo/index.js +36 -36
- package/dist/{chunk-DF73H4UN.js → chunk-23D6M6VM.js} +5 -5
- package/dist/chunk-23D6M6VM.js.map +1 -0
- package/dist/{chunk-FH2L2E34.js → chunk-244QBK7Z.js} +4 -4
- package/dist/{chunk-FH2L2E34.js.map → chunk-244QBK7Z.js.map} +1 -1
- package/dist/{chunk-YSK2CU2Q.js → chunk-2AFX33YA.js} +2 -2
- package/dist/{chunk-TKUOEU2F.js → chunk-2GHDLTPE.js} +2 -2
- package/dist/{chunk-GYGLAVCX.js → chunk-2MG3SW7Q.js} +6 -2
- package/dist/chunk-2MG3SW7Q.js.map +1 -0
- package/dist/{chunk-6OWXYZK2.js → chunk-2ODVB6LZ.js} +2 -2
- package/dist/{chunk-X25NWUZB.js → chunk-2PVXF5CS.js} +3 -3
- package/dist/{chunk-IEX7NK2K.js → chunk-2RH777HH.js} +21 -20
- package/dist/{chunk-IEX7NK2K.js.map → chunk-2RH777HH.js.map} +1 -1
- package/dist/{chunk-244VXYPG.js → chunk-37EPTBBR.js} +14 -1
- package/dist/chunk-37EPTBBR.js.map +1 -0
- package/dist/{chunk-NRT6QZQB.js → chunk-3A5DUZ56.js} +6 -6
- package/dist/chunk-3A5DUZ56.js.map +1 -0
- package/dist/{chunk-ORDURZBU.js → chunk-3EWS67C7.js} +2 -2
- package/dist/{chunk-3H5KLDZN.js → chunk-3L2NBKDR.js} +4 -8
- package/dist/chunk-3L2NBKDR.js.map +1 -0
- package/dist/{chunk-ENAG3IY7.js → chunk-3XJQBBZD.js} +26 -28
- package/dist/chunk-3XJQBBZD.js.map +1 -0
- package/dist/{chunk-KJFW62P4.js → chunk-42ALPZ2B.js} +652 -662
- package/dist/chunk-42ALPZ2B.js.map +1 -0
- package/dist/{chunk-FXQBGFOX.js → chunk-4CIQDWRB.js} +8 -8
- package/dist/{chunk-HT2AHGQI.js → chunk-4JPMZTJY.js} +2 -2
- package/dist/{chunk-FQ5VRHIB.js → chunk-4T3SE27M.js} +5 -9
- package/dist/chunk-4T3SE27M.js.map +1 -0
- package/dist/{chunk-MKXXMNJH.js → chunk-4V3Q35WG.js} +2 -2
- package/dist/{chunk-A6IJU4TK.js → chunk-52MGURXO.js} +2 -2
- package/dist/{chunk-IUWCVHQ7.js → chunk-5A4345TG.js} +4 -4
- package/dist/{chunk-IUWCVHQ7.js.map → chunk-5A4345TG.js.map} +1 -1
- package/dist/{chunk-ISZQJBML.js → chunk-5FE75J4S.js} +6 -6
- package/dist/chunk-5FE75J4S.js.map +1 -0
- package/dist/chunk-5KC7QYEC.js +565 -0
- package/dist/chunk-5KC7QYEC.js.map +1 -0
- package/dist/{chunk-NNARWO72.js → chunk-5UMK7GRI.js} +13 -12
- package/dist/chunk-5UMK7GRI.js.map +1 -0
- package/dist/{chunk-HLEK5VAN.js → chunk-5WWDGFOS.js} +2 -2
- package/dist/{chunk-CKNGS5MH.js → chunk-6QVKPHBF.js} +3 -5
- package/dist/chunk-6QVKPHBF.js.map +1 -0
- package/dist/{chunk-PSIV7CJV.js → chunk-747G6CT3.js} +2 -2
- package/dist/chunk-747G6CT3.js.map +1 -0
- package/dist/{chunk-LGRLME4M.js → chunk-7R2Q7CPL.js} +16 -16
- package/dist/chunk-7R2Q7CPL.js.map +1 -0
- package/dist/{chunk-SOIQ4MM4.js → chunk-7XMHMVTS.js} +3 -3
- package/dist/{chunk-BUDAGWL5.js → chunk-A4XMIZT3.js} +6 -6
- package/dist/{chunk-BUDAGWL5.js.map → chunk-A4XMIZT3.js.map} +1 -1
- package/dist/{chunk-4MXI3ODD.js → chunk-AEQGFRU4.js} +3 -3
- package/dist/{chunk-7JE7BDYJ.js → chunk-AL6ML4LA.js} +5 -5
- package/dist/{chunk-ZUVBC32X.js → chunk-AUKKUPVB.js} +2 -2
- package/dist/chunk-BNWA3WG5.js +22 -0
- package/dist/chunk-BNWA3WG5.js.map +1 -0
- package/dist/{chunk-WY2XXTET.js → chunk-BPWYQ25R.js} +4 -4
- package/dist/{chunk-EOVMT6TB.js → chunk-BVCUTXE3.js} +2 -2
- package/dist/{chunk-UPD5NWI5.js → chunk-DHHGL42E.js} +13 -16
- package/dist/chunk-DHHGL42E.js.map +1 -0
- package/dist/{chunk-3JWHAR6E.js → chunk-DIZLQVAA.js} +2 -2
- package/dist/{chunk-QWFHIOD2.js → chunk-DLD5LGDS.js} +11 -12
- package/dist/chunk-DLD5LGDS.js.map +1 -0
- package/dist/{chunk-ZE4CHIED.js → chunk-DQESF6RP.js} +17 -28
- package/dist/chunk-DQESF6RP.js.map +1 -0
- package/dist/{chunk-IT22PWKV.js → chunk-E2N2T5ZO.js} +2 -2
- package/dist/{chunk-3ELRMVJK.js → chunk-EGVJ7TM4.js} +31 -34
- package/dist/chunk-EGVJ7TM4.js.map +1 -0
- package/dist/{chunk-WNJ4AVGE.js → chunk-EJLV62NI.js} +2 -2
- package/dist/{chunk-QBBUZ3I3.js → chunk-EYG2CY2X.js} +11 -11
- package/dist/{enclave-27SMF6GF.js → chunk-EZGV6F47.js} +83 -56
- package/dist/chunk-EZGV6F47.js.map +1 -0
- package/dist/{chunk-LQ4ZHOKP.js → chunk-EZOAKKTB.js} +36 -27
- package/dist/chunk-EZOAKKTB.js.map +1 -0
- package/dist/{chunk-BJ2IXQ5Q.js → chunk-FFJFE4T7.js} +2 -2
- package/dist/{chunk-JCN44NCY.js → chunk-FLPCETP6.js} +2 -2
- package/dist/{chunk-5O7D6ZTW.js → chunk-FOEDQATO.js} +2 -2
- package/dist/{chunk-VNNRUGMM.js → chunk-FVH5QYY2.js} +2 -2
- package/dist/{chunk-ANWPSTZU.js → chunk-G2MVBDFP.js} +23 -26
- package/dist/chunk-G2MVBDFP.js.map +1 -0
- package/dist/chunk-GMKGGY7V.js +234 -0
- package/dist/chunk-GMKGGY7V.js.map +1 -0
- package/dist/{chunk-EIPVYUEP.js → chunk-GQ4MF3CM.js} +3 -3
- package/dist/chunk-GQ4MF3CM.js.map +1 -0
- package/dist/{chunk-PEOZ34EM.js → chunk-GSAK56VF.js} +1 -1
- package/dist/chunk-GSAK56VF.js.map +1 -0
- package/dist/{chunk-QOOUUR4A.js → chunk-GUZET4SG.js} +10 -4
- package/dist/chunk-GUZET4SG.js.map +1 -0
- package/dist/{chunk-4AF3TUMP.js → chunk-GZT3NQRA.js} +2 -2
- package/dist/{chunk-N5DNADLQ.js → chunk-H23XHRTT.js} +19 -34
- package/dist/chunk-H23XHRTT.js.map +1 -0
- package/dist/{chunk-MVZ2TPVP.js → chunk-H427H63K.js} +2 -2
- package/dist/{chunk-6B3VNR4P.js → chunk-H7JBY4P7.js} +23 -32
- package/dist/chunk-H7JBY4P7.js.map +1 -0
- package/dist/{chunk-MLPHLJIQ.js → chunk-HS554XAF.js} +2 -2
- package/dist/{chunk-HK67PX4J.js → chunk-HW7CMKUG.js} +1 -1
- package/dist/chunk-HW7CMKUG.js.map +1 -0
- package/dist/{chunk-S57HTZ6X.js → chunk-IMQKWR46.js} +5 -7
- package/dist/chunk-IMQKWR46.js.map +1 -0
- package/dist/{chunk-FCKWQE2H.js → chunk-IUBMZPHM.js} +7 -7
- package/dist/chunk-IUBMZPHM.js.map +1 -0
- package/dist/{chunk-UD5EVGZ7.js → chunk-IUT3GWP3.js} +49 -13
- package/dist/chunk-IUT3GWP3.js.map +1 -0
- package/dist/{chunk-J6UOHJY5.js → chunk-JDEYF3PJ.js} +4 -8
- package/dist/{chunk-J6UOHJY5.js.map → chunk-JDEYF3PJ.js.map} +1 -1
- package/dist/{chunk-NWHBJQAL.js → chunk-JIBUPZHA.js} +4 -4
- package/dist/chunk-JIBUPZHA.js.map +1 -0
- package/dist/{chunk-TROR3ALR.js → chunk-JOSPH3E5.js} +2 -2
- package/dist/{chunk-F24ZZTHQ.js → chunk-JQYKPKG6.js} +4 -4
- package/dist/{chunk-GF5BZ7D4.js → chunk-JSMTXZR3.js} +8 -12
- package/dist/chunk-JSMTXZR3.js.map +1 -0
- package/dist/chunk-JWWYRR4Q.js +12 -0
- package/dist/chunk-JWWYRR4Q.js.map +1 -0
- package/dist/{chunk-HBPPGWUM.js → chunk-KZXDLBY6.js} +14 -9
- package/dist/chunk-KZXDLBY6.js.map +1 -0
- package/dist/{chunk-7VCXZDA4.js → chunk-LIOVX5TJ.js} +7 -11
- package/dist/chunk-LIOVX5TJ.js.map +1 -0
- package/dist/{chunk-QWGU66MP.js → chunk-LNSVGRHO.js} +5 -7
- package/dist/chunk-LNSVGRHO.js.map +1 -0
- package/dist/{chunk-MDWKM2XC.js → chunk-M5B2W6YY.js} +3 -3
- package/dist/{chunk-F2TDU7MQ.js → chunk-MBMTND6D.js} +2 -2
- package/dist/{chunk-K6W7BVZ6.js → chunk-MILI22XQ.js} +3 -3
- package/dist/{chunk-YNIUIERI.js → chunk-MXKI4ABF.js} +18 -59
- package/dist/chunk-MXKI4ABF.js.map +1 -0
- package/dist/{chunk-T2LBQ5DV.js → chunk-MXOQ5JCG.js} +252 -214
- package/dist/chunk-MXOQ5JCG.js.map +1 -0
- package/dist/{chunk-ZXABPVM6.js → chunk-N7EVQD5S.js} +9 -13
- package/dist/chunk-N7EVQD5S.js.map +1 -0
- package/dist/{chunk-CF5UU4S7.js → chunk-N7UDP5VU.js} +7 -7
- package/dist/{chunk-FQ54DWUQ.js → chunk-NBQ3KK6X.js} +4 -4
- package/dist/{chunk-4I522ERM.js → chunk-NCO25JZO.js} +4 -4
- package/dist/chunk-NH2UOV3B.js +18 -0
- package/dist/chunk-NH2UOV3B.js.map +1 -0
- package/dist/{chunk-SI3V7D4G.js → chunk-O2IMQSNA.js} +2 -2
- package/dist/{chunk-T52GX4SA.js → chunk-O46CHQT7.js} +4 -4
- package/dist/chunk-OIEO4WDL.js +27 -0
- package/dist/chunk-OIEO4WDL.js.map +1 -0
- package/dist/{chunk-GHLTDZRS.js → chunk-OKSTSITU.js} +25 -4
- package/dist/chunk-OKSTSITU.js.map +1 -0
- package/dist/{chunk-TOPYQ6GA.js → chunk-OYW3I5M4.js} +6 -6
- package/dist/{chunk-X4773RBR.js → chunk-PD64727P.js} +2 -2
- package/dist/chunk-PD64727P.js.map +1 -0
- package/dist/{chunk-BP6DARYA.js → chunk-PP3K67AJ.js} +4 -4
- package/dist/chunk-PP3K67AJ.js.map +1 -0
- package/dist/chunk-Q2XRFWOI.js +40 -0
- package/dist/chunk-Q2XRFWOI.js.map +1 -0
- package/dist/{chunk-AOWGXU6D.js → chunk-Q4UHJ5SN.js} +2 -2
- package/dist/{chunk-FW22ZCXT.js → chunk-QBLT6POL.js} +2 -2
- package/dist/chunk-QMWY2FDS.js +157 -0
- package/dist/chunk-QMWY2FDS.js.map +1 -0
- package/dist/{chunk-I3JDRCMW.js → chunk-RB4DOPGZ.js} +10 -10
- package/dist/{chunk-32YV3TJT.js → chunk-SMV2HRDU.js} +2 -2
- package/dist/{chunk-ODVPTDPK.js → chunk-SV2PM2OY.js} +1 -1
- package/dist/chunk-SV2PM2OY.js.map +1 -0
- package/dist/{chunk-Z5HTYMMQ.js → chunk-SYNY3VB5.js} +2 -2
- package/dist/{chunk-SYVZW77S.js → chunk-TEHHROZL.js} +6 -8
- package/dist/chunk-TEHHROZL.js.map +1 -0
- package/dist/{chunk-ZSX4S5XB.js → chunk-TKVUE4JF.js} +9 -9
- package/dist/{chunk-B57AFBY2.js → chunk-TZZBXPZK.js} +2 -2
- package/dist/{chunk-VNPEWFPD.js → chunk-U2FZNEWJ.js} +4 -4
- package/dist/chunk-U2FZNEWJ.js.map +1 -0
- package/dist/{chunk-5FDLC6G7.js → chunk-UA372JHH.js} +3 -3
- package/dist/{chunk-PDCG6PR5.js → chunk-UEFOQH74.js} +2 -2
- package/dist/chunk-UEFOQH74.js.map +1 -0
- package/dist/{chunk-HVSCEIYL.js → chunk-UIYESRD6.js} +9 -11
- package/dist/chunk-UIYESRD6.js.map +1 -0
- package/dist/{chunk-B6SJIBQK.js → chunk-V3RWOOSO.js} +4 -4
- package/dist/{chunk-HBRLNOHL.js → chunk-V7ADQF5O.js} +4 -4
- package/dist/{chunk-L7DOS3TE.js → chunk-VAORSCSU.js} +3 -3
- package/dist/chunk-VAORSCSU.js.map +1 -0
- package/dist/{chunk-M522UYZ2.js → chunk-VFHCKG5M.js} +6 -10
- package/dist/chunk-VFHCKG5M.js.map +1 -0
- package/dist/{chunk-DC5QVPV7.js → chunk-VHBKYN2J.js} +3 -3
- package/dist/chunk-VHBKYN2J.js.map +1 -0
- package/dist/{chunk-WX5ADGTZ.js → chunk-VKI2EB3N.js} +3 -3
- package/dist/chunk-VKI2EB3N.js.map +1 -0
- package/dist/{chunk-MTL7MXGR.js → chunk-VMV5SBE4.js} +16 -17
- package/dist/chunk-VMV5SBE4.js.map +1 -0
- package/dist/{chunk-F7XGHL5O.js → chunk-VQDZYB2B.js} +3 -3
- package/dist/{chunk-BK2HHQGN.js → chunk-VVOLDVIR.js} +2 -2
- package/dist/{chunk-6LMQ5R26.js → chunk-WPOYWFSE.js} +7 -7
- package/dist/{chunk-6LMQ5R26.js.map → chunk-WPOYWFSE.js.map} +1 -1
- package/dist/{chunk-3F7GLNAE.js → chunk-WXE4W2U6.js} +7 -11
- package/dist/chunk-WXE4W2U6.js.map +1 -0
- package/dist/{chunk-6K7DPM7D.js → chunk-XQRFSKYM.js} +2 -2
- package/dist/{chunk-M7NI3IWE.js → chunk-XSPFDUDG.js} +22 -50
- package/dist/chunk-XSPFDUDG.js.map +1 -0
- package/dist/{chunk-ID6Z6E66.js → chunk-Y2RKVFKR.js} +2 -2
- package/dist/{chunk-6LNL42F5.js → chunk-Y3LPTBG7.js} +12 -12
- package/dist/chunk-Y3LPTBG7.js.map +1 -0
- package/dist/{chunk-FN5EBVTQ.js → chunk-YRXFFWG4.js} +2 -2
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-W3USLL5M.js → classified-marker-SIYKUU5L.js} +3 -3
- package/dist/classified-marker-SIYKUU5L.js.map +1 -0
- package/dist/collection-facade-CS7CA2XO.js +47 -0
- package/dist/{computed-TPFBX7U4.js → computed-FAD7SED4.js} +3 -3
- package/dist/consent/index.js +10 -11
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +9 -10
- package/dist/custody/index.js +12 -13
- package/dist/{dead-filter-U2UYKSZL.js → dead-filter-4F3LWYKH.js} +11 -3
- package/dist/dead-filter-4F3LWYKH.js.map +1 -0
- package/dist/debug/index.js +11 -2
- package/dist/debug/index.js.map +1 -1
- package/dist/{delegation-S3AEPW2T.js → delegation-NANZDG4N.js} +13 -16
- package/dist/delegation-NANZDG4N.js.map +1 -0
- package/dist/derivations/index.js +23 -24
- package/dist/derive-XLOJVXPU.js +20 -0
- package/dist/directory/index.js +10 -11
- package/dist/{dispatch-3CQDJV5Q.js → dispatch-H4HV32AM.js} +5 -5
- package/dist/{dispatch-RH4LHKBH.js → dispatch-JDZNGEB3.js} +21 -22
- package/dist/dispatch-JDZNGEB3.js.map +1 -0
- package/dist/executor-FMPVN6DT.js +35 -0
- package/dist/executor-LBBBRTN5.js +8 -0
- package/dist/executor-OSRZST2U.js +8 -0
- package/dist/export-accessible-RAOJAAU5.js +22 -0
- package/dist/extract-partition-JD5CUSTG.js +37 -0
- package/dist/{fanout-sidecar-OT6RYLOL.js → fanout-sidecar-L7NHPIOC.js} +13 -15
- package/dist/fanout-sidecar-L7NHPIOC.js.map +1 -0
- package/dist/find-JRN4RNQ5.js +10 -0
- package/dist/forget/index.js +9 -10
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +13 -14
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +183 -184
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +5 -5
- package/dist/introspection/index.js +11 -12
- package/dist/issue-YIVBZUTH.js +19 -0
- package/dist/kernel/attestation-types.d.ts +62 -0
- package/dist/kernel/collection-config.d.ts +1 -48
- package/dist/kernel/collection.d.ts +1 -1
- package/dist/kernel/cutover-transform.d.ts +1 -1
- package/dist/kernel/errors.d.ts +30 -2
- package/dist/kernel/merge-authority.d.ts +1 -1
- package/dist/kernel/paths.d.ts +29 -5
- package/dist/kernel/prepared-write.d.ts +1 -1
- package/dist/kernel/secret-mode.d.ts +1 -1
- package/dist/kernel/types.d.ts +42 -5
- package/dist/kernel/vault.d.ts +2 -2
- package/dist/kernel/write-queue.d.ts +17 -0
- package/dist/{ledger-KZPCMVZY.js → ledger-5ZMGE44K.js} +11 -12
- package/dist/liberate-WZSZM2W6.js +24 -0
- package/dist/link-set-MFXC24VK.js +29 -0
- package/dist/{managed-secret-S3MQ6SH6.js → managed-secret-MFTFT22X.js} +10 -11
- package/dist/materialized-views/index.js +26 -27
- package/dist/{migrate-cek-V7GKJZ7O.js → migrate-cek-DZRFFOHW.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-ITIGNKUF.js +96 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -13
- package/dist/pod/index.js +72 -72
- package/dist/{pod-handle-WGDFB4C2.js → pod-handle-A3LET7NO.js} +10 -11
- package/dist/pod-handle-A3LET7NO.js.map +1 -0
- package/dist/policy/index.js +10 -11
- package/dist/port/on/index.d.ts +1 -1
- package/dist/port/to/index.d.ts +1 -1
- package/dist/port/with/blob-strategy.d.ts +1 -1
- package/dist/port/with/classified-strategy.d.ts +1 -1
- package/dist/port/with/collection-options.d.ts +1 -1
- package/dist/port/with/collection-registries.d.ts +1 -1
- package/dist/port/with/lookup-strategy.d.ts +2 -2
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-SLSXIPBV.js → post-register-7ND27CF2.js} +6 -6
- package/dist/post-register-7ND27CF2.js.map +1 -0
- package/dist/query/all/index.js +15 -15
- package/dist/query/index.js +7 -7
- package/dist/query/live/index.js +7 -7
- package/dist/query/reduce/index.js +10 -10
- package/dist/query/relate/index.js +9 -9
- package/dist/reduce/index.js +8 -8
- package/dist/register-DT5HZ2LZ.js +30 -0
- package/dist/registry-BHRZGZHF.js +8 -0
- package/dist/registry-ET6ZFFWA.js +34 -0
- package/dist/registry-HXFGLGTG.js +8 -0
- package/dist/registry-THCPDEOD.js +23 -0
- package/dist/request-withdrawal-AV2MJJKY.js +30 -0
- package/dist/{reveal-4BCKPEC2.js → reveal-B2TLP4JQ.js} +10 -9
- package/dist/reveal-B2TLP4JQ.js.map +1 -0
- package/dist/revoke-6DWIEOCV.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +16 -18
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{seed-4JS2RJ4A.js → seed-XNSE4U3S.js} +15 -18
- package/dist/seed-XNSE4U3S.js.map +1 -0
- package/dist/sequence/index.js +9 -10
- package/dist/session/index.js +9 -10
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MHGW3OIL.js +23 -0
- package/dist/snapshots/index.js +11 -11
- package/dist/stale-6GCFMOOR.js +28 -0
- package/dist/storage-BYN5LO6Z.js +21 -0
- package/dist/store/index.js +1 -1
- package/dist/{store-coordination-provider-2O2VUHKW.js → store-coordination-provider-C4BPT5XF.js} +11 -12
- package/dist/store-coordination-provider-C4BPT5XF.js.map +1 -0
- package/dist/sync/index.js +10 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +15 -16
- package/dist/tiers/index.js +11 -12
- package/dist/to/index.js +2 -2
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +11 -14
- package/dist/vault-head/index.js.map +1 -1
- package/dist/{verify-RVT67IMH.js → verify-UKALW7C2.js} +14 -12
- package/dist/verify-UKALW7C2.js.map +1 -0
- package/dist/via/classified/binding.d.ts +2 -2
- package/dist/via/classified/config-drift.d.ts +2 -2
- package/dist/via/classified/errors.d.ts +1 -1
- package/dist/via/lookup/handle.d.ts +4 -4
- package/dist/walk-4VPK7AS4.js +20 -0
- package/dist/with-audit/attestation/index.d.ts +2 -1
- package/dist/with-audit/attestation/issue.d.ts +2 -2
- package/dist/with-audit/attestation/revoke.d.ts +2 -2
- package/dist/with-audit/attestation/scheme.d.ts +7 -0
- package/dist/with-audit/attestation/signer.d.ts +1 -1
- package/dist/with-audit/attestation/strategy.d.ts +2 -2
- package/dist/with-audit/attestation/types.d.ts +10 -0
- package/dist/with-audit/attestation/vault-facade.d.ts +2 -2
- package/dist/with-audit/attestation/verifier.d.ts +6 -0
- package/dist/with-audit/consent/consent.d.ts +1 -1
- package/dist/with-audit/consent/strategy.d.ts +1 -1
- package/dist/with-audit/forget/subject-index.d.ts +1 -1
- package/dist/with-audit/periods/vault-facade.d.ts +1 -1
- package/dist/with-audit/sealed-record/index.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-audit/tiers/index.d.ts +2 -2
- package/dist/with-cargo/adopt-partition.d.ts +1 -1
- package/dist/with-cargo/extract-partition.d.ts +1 -1
- package/dist/with-cargo/floor.d.ts +1 -1
- package/dist/with-commit/history/history.d.ts +2 -2
- package/dist/with-commit/history/index.d.ts +1 -1
- package/dist/with-commit/history/ledger/store.d.ts +1 -1
- package/dist/with-commit/history/strategy.d.ts +1 -1
- package/dist/with-commit/history/time-machine.d.ts +1 -1
- package/dist/with-commit/numbering/index.d.ts +1 -1
- package/dist/with-commit/sequence/index.d.ts +1 -1
- package/dist/with-commit/vault-head/head.d.ts +1 -1
- package/dist/with-commit/vault-head/index.d.ts +1 -1
- package/dist/with-commit/vault-head/strategy.d.ts +1 -1
- package/dist/with-commit/vault-head/verify.d.ts +1 -1
- package/dist/with-formula/derivations/dispatch.d.ts +1 -1
- package/dist/with-formula/derivations/fanout-sidecar.d.ts +1 -1
- package/dist/with-lookup/indexing/collection-facade.d.ts +1 -1
- package/dist/with-lookup/search/collection-facade.d.ts +1 -1
- package/dist/with-party/broker/index.d.ts +3 -3
- package/dist/with-party/directory/user-envelope/storage.d.ts +1 -1
- package/dist/with-party/team/delegation.d.ts +1 -1
- package/dist/with-party/team/echo-secret.d.ts +2 -2
- package/dist/with-party/team/index.d.ts +1 -1
- package/dist/with-party/team/keyring.d.ts +1 -1
- package/dist/with-party/team/magic-link-grant.d.ts +1 -1
- package/dist/with-party/team/recovery.d.ts +1 -1
- package/dist/with-party/team/roster-tag.d.ts +1 -1
- package/dist/with-party/team/rotate-recover.d.ts +1 -1
- package/dist/with-party/team/wrapped-deks.d.ts +1 -1
- package/dist/with-pod/index.d.ts +1 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +1 -1
- package/dist/with-shape/blobs/blob-intent.d.ts +1 -1
- package/dist/with-shape/blobs/blob-set.d.ts +2 -2
- package/dist/with-shape/blobs/legacy-sweep.d.ts +1 -1
- package/dist/with-shape/introspection/describe.d.ts +1 -1
- package/dist/with-shape/introspection/walk.d.ts +1 -1
- package/dist/with-shape/links/lazy-handle.d.ts +1 -1
- package/dist/with-shape/links/link-set.d.ts +1 -1
- package/dist/with-shape/manifest/derive.d.ts +1 -1
- package/dist/with-shape/manifest/storage.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/register.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/storage.d.ts +1 -1
- package/dist/with-shape/satellites/dead-filter.d.ts +1 -1
- package/dist/with-shape/satellites/declare.d.ts +1 -1
- package/dist/with-shape/satellites/marker.d.ts +1 -1
- package/dist/with-shape/satellites/post-register.d.ts +1 -1
- package/dist/with-sync/presence.d.ts +5 -10
- package/dist/withdraw-accessible-HL7GACUE.js +27 -0
- package/dist/withdraw-accessible-HL7GACUE.js.map +1 -0
- package/package.json +14 -5
- package/dist/api-GVYEKSJE.js +0 -19
- package/dist/backup-7TFRVFLH.js.map +0 -1
- package/dist/chunk-244VXYPG.js.map +0 -1
- package/dist/chunk-3ELRMVJK.js.map +0 -1
- package/dist/chunk-3F7GLNAE.js.map +0 -1
- package/dist/chunk-3H5KLDZN.js.map +0 -1
- package/dist/chunk-6B3VNR4P.js.map +0 -1
- package/dist/chunk-6LNL42F5.js.map +0 -1
- package/dist/chunk-6QSQQLSE.js +0 -95
- package/dist/chunk-6QSQQLSE.js.map +0 -1
- package/dist/chunk-7VCXZDA4.js.map +0 -1
- package/dist/chunk-ANWPSTZU.js.map +0 -1
- package/dist/chunk-BP6DARYA.js.map +0 -1
- package/dist/chunk-CKNGS5MH.js.map +0 -1
- package/dist/chunk-DC5QVPV7.js.map +0 -1
- package/dist/chunk-DE4DH2RZ.js +0 -29
- package/dist/chunk-DE4DH2RZ.js.map +0 -1
- package/dist/chunk-DF73H4UN.js.map +0 -1
- package/dist/chunk-EIPVYUEP.js.map +0 -1
- package/dist/chunk-ENAG3IY7.js.map +0 -1
- package/dist/chunk-FCKWQE2H.js.map +0 -1
- package/dist/chunk-FQ5VRHIB.js.map +0 -1
- package/dist/chunk-GF5BZ7D4.js.map +0 -1
- package/dist/chunk-GHLTDZRS.js.map +0 -1
- package/dist/chunk-GYGLAVCX.js.map +0 -1
- package/dist/chunk-HBPPGWUM.js.map +0 -1
- package/dist/chunk-HK67PX4J.js.map +0 -1
- package/dist/chunk-HVSCEIYL.js.map +0 -1
- package/dist/chunk-ISZQJBML.js.map +0 -1
- package/dist/chunk-KJFW62P4.js.map +0 -1
- package/dist/chunk-L7DOS3TE.js.map +0 -1
- package/dist/chunk-LGRLME4M.js.map +0 -1
- package/dist/chunk-LP7BEXCT.js +0 -32
- package/dist/chunk-LP7BEXCT.js.map +0 -1
- package/dist/chunk-LQ4ZHOKP.js.map +0 -1
- package/dist/chunk-M522UYZ2.js.map +0 -1
- package/dist/chunk-M7NI3IWE.js.map +0 -1
- package/dist/chunk-MTL7MXGR.js.map +0 -1
- package/dist/chunk-N5DNADLQ.js.map +0 -1
- package/dist/chunk-NNARWO72.js.map +0 -1
- package/dist/chunk-NRT6QZQB.js.map +0 -1
- package/dist/chunk-NWHBJQAL.js.map +0 -1
- package/dist/chunk-ODVPTDPK.js.map +0 -1
- package/dist/chunk-PDCG6PR5.js.map +0 -1
- package/dist/chunk-PEOZ34EM.js.map +0 -1
- package/dist/chunk-PSIV7CJV.js.map +0 -1
- package/dist/chunk-QOOUUR4A.js.map +0 -1
- package/dist/chunk-QWFHIOD2.js.map +0 -1
- package/dist/chunk-QWGU66MP.js.map +0 -1
- package/dist/chunk-S57HTZ6X.js.map +0 -1
- package/dist/chunk-SEE332EV.js +0 -66
- package/dist/chunk-SEE332EV.js.map +0 -1
- package/dist/chunk-SYVZW77S.js.map +0 -1
- package/dist/chunk-T2LBQ5DV.js.map +0 -1
- package/dist/chunk-UD5EVGZ7.js.map +0 -1
- package/dist/chunk-UPD5NWI5.js.map +0 -1
- package/dist/chunk-UYB234ZR.js +0 -479
- package/dist/chunk-UYB234ZR.js.map +0 -1
- package/dist/chunk-VNPEWFPD.js.map +0 -1
- package/dist/chunk-WX5ADGTZ.js.map +0 -1
- package/dist/chunk-X4773RBR.js.map +0 -1
- package/dist/chunk-YNIUIERI.js.map +0 -1
- package/dist/chunk-ZE4CHIED.js.map +0 -1
- package/dist/chunk-ZXABPVM6.js.map +0 -1
- package/dist/classified-marker-W3USLL5M.js.map +0 -1
- package/dist/collection-facade-QU6IJBN3.js +0 -48
- package/dist/dead-filter-U2UYKSZL.js.map +0 -1
- package/dist/delegation-S3AEPW2T.js.map +0 -1
- package/dist/derive-OX7F6TGG.js +0 -21
- package/dist/dispatch-RH4LHKBH.js.map +0 -1
- package/dist/executor-B6SRO2QS.js +0 -36
- package/dist/executor-BI5CHWRY.js +0 -8
- package/dist/executor-RBKM5W5K.js +0 -8
- package/dist/export-accessible-VMA3YM5V.js +0 -22
- package/dist/extract-partition-NF7PXGPP.js +0 -37
- package/dist/fanout-sidecar-OT6RYLOL.js.map +0 -1
- package/dist/find-LZMP26KF.js +0 -10
- package/dist/issue-IHARXWW5.js +0 -18
- package/dist/kernel/enclave/classify/compare.d.ts +0 -10
- package/dist/kernel/enclave/index.d.ts +0 -87
- package/dist/kernel/enclave/record-keys/lifecycle.d.ts +0 -124
- package/dist/kernel/enclave/record-keys/rekey-blob.d.ts +0 -88
- package/dist/kernel/enclave/record-keys/rekey.d.ts +0 -91
- package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +0 -14
- package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +0 -123
- package/dist/kernel/enclave/record-keys/sealing.d.ts +0 -70
- package/dist/liberate-GRLCZMW4.js +0 -24
- package/dist/link-set-JCMJ7ULP.js +0 -30
- package/dist/noydb-SWQJ3MZS.js +0 -97
- package/dist/pod-handle-WGDFB4C2.js.map +0 -1
- package/dist/post-register-SLSXIPBV.js.map +0 -1
- package/dist/register-F3OYE7MJ.js +0 -31
- package/dist/registry-CILQFXFK.js +0 -8
- package/dist/registry-XNNYQVKV.js +0 -8
- package/dist/registry-YCDZV3VW.js +0 -35
- package/dist/registry-ZGYS33TE.js +0 -24
- package/dist/request-withdrawal-Z5NC6TXT.js +0 -30
- package/dist/reveal-4BCKPEC2.js.map +0 -1
- package/dist/revoke-ZL62WC2D.js +0 -23
- package/dist/seed-4JS2RJ4A.js.map +0 -1
- package/dist/signer-MBZZMXTC.js +0 -24
- package/dist/stale-TJ3DYZMQ.js +0 -29
- package/dist/storage-SVMKRGCW.js +0 -22
- package/dist/store-coordination-provider-2O2VUHKW.js.map +0 -1
- package/dist/verify-RVT67IMH.js.map +0 -1
- package/dist/walk-HJ42EISE.js +0 -21
- package/dist/withdraw-accessible-5NZUPAVA.js +0 -27
- /package/dist/{api-GVYEKSJE.js.map → api-OS747DS4.js.map} +0 -0
- /package/dist/{computed-TPFBX7U4.js.map → capsule/contract.js.map} +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/broker/proof.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/bidx.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/digest.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/vdig.d.ts +0 -0
- /package/dist/{kernel/enclave/classify → capsule/plumbing}/kofn.d.ts +0 -0
- /package/dist/{kernel/enclave/classify → capsule/plumbing}/normalize.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/plumbing}/record-aad.d.ts +0 -0
- /package/dist/{collection-facade-QU6IJBN3.js.map → capsule-VOLX3QRQ.js.map} +0 -0
- /package/dist/{chunk-YSK2CU2Q.js.map → chunk-2AFX33YA.js.map} +0 -0
- /package/dist/{chunk-TKUOEU2F.js.map → chunk-2GHDLTPE.js.map} +0 -0
- /package/dist/{chunk-6OWXYZK2.js.map → chunk-2ODVB6LZ.js.map} +0 -0
- /package/dist/{chunk-X25NWUZB.js.map → chunk-2PVXF5CS.js.map} +0 -0
- /package/dist/{chunk-ORDURZBU.js.map → chunk-3EWS67C7.js.map} +0 -0
- /package/dist/{chunk-FXQBGFOX.js.map → chunk-4CIQDWRB.js.map} +0 -0
- /package/dist/{chunk-HT2AHGQI.js.map → chunk-4JPMZTJY.js.map} +0 -0
- /package/dist/{chunk-MKXXMNJH.js.map → chunk-4V3Q35WG.js.map} +0 -0
- /package/dist/{chunk-A6IJU4TK.js.map → chunk-52MGURXO.js.map} +0 -0
- /package/dist/{chunk-HLEK5VAN.js.map → chunk-5WWDGFOS.js.map} +0 -0
- /package/dist/{chunk-SOIQ4MM4.js.map → chunk-7XMHMVTS.js.map} +0 -0
- /package/dist/{chunk-4MXI3ODD.js.map → chunk-AEQGFRU4.js.map} +0 -0
- /package/dist/{chunk-7JE7BDYJ.js.map → chunk-AL6ML4LA.js.map} +0 -0
- /package/dist/{chunk-ZUVBC32X.js.map → chunk-AUKKUPVB.js.map} +0 -0
- /package/dist/{chunk-WY2XXTET.js.map → chunk-BPWYQ25R.js.map} +0 -0
- /package/dist/{chunk-EOVMT6TB.js.map → chunk-BVCUTXE3.js.map} +0 -0
- /package/dist/{chunk-3JWHAR6E.js.map → chunk-DIZLQVAA.js.map} +0 -0
- /package/dist/{chunk-IT22PWKV.js.map → chunk-E2N2T5ZO.js.map} +0 -0
- /package/dist/{chunk-WNJ4AVGE.js.map → chunk-EJLV62NI.js.map} +0 -0
- /package/dist/{chunk-QBBUZ3I3.js.map → chunk-EYG2CY2X.js.map} +0 -0
- /package/dist/{chunk-BJ2IXQ5Q.js.map → chunk-FFJFE4T7.js.map} +0 -0
- /package/dist/{chunk-JCN44NCY.js.map → chunk-FLPCETP6.js.map} +0 -0
- /package/dist/{chunk-5O7D6ZTW.js.map → chunk-FOEDQATO.js.map} +0 -0
- /package/dist/{chunk-VNNRUGMM.js.map → chunk-FVH5QYY2.js.map} +0 -0
- /package/dist/{chunk-4AF3TUMP.js.map → chunk-GZT3NQRA.js.map} +0 -0
- /package/dist/{chunk-MVZ2TPVP.js.map → chunk-H427H63K.js.map} +0 -0
- /package/dist/{chunk-MLPHLJIQ.js.map → chunk-HS554XAF.js.map} +0 -0
- /package/dist/{chunk-TROR3ALR.js.map → chunk-JOSPH3E5.js.map} +0 -0
- /package/dist/{chunk-F24ZZTHQ.js.map → chunk-JQYKPKG6.js.map} +0 -0
- /package/dist/{chunk-MDWKM2XC.js.map → chunk-M5B2W6YY.js.map} +0 -0
- /package/dist/{chunk-F2TDU7MQ.js.map → chunk-MBMTND6D.js.map} +0 -0
- /package/dist/{chunk-K6W7BVZ6.js.map → chunk-MILI22XQ.js.map} +0 -0
- /package/dist/{chunk-CF5UU4S7.js.map → chunk-N7UDP5VU.js.map} +0 -0
- /package/dist/{chunk-FQ54DWUQ.js.map → chunk-NBQ3KK6X.js.map} +0 -0
- /package/dist/{chunk-4I522ERM.js.map → chunk-NCO25JZO.js.map} +0 -0
- /package/dist/{chunk-SI3V7D4G.js.map → chunk-O2IMQSNA.js.map} +0 -0
- /package/dist/{chunk-T52GX4SA.js.map → chunk-O46CHQT7.js.map} +0 -0
- /package/dist/{chunk-TOPYQ6GA.js.map → chunk-OYW3I5M4.js.map} +0 -0
- /package/dist/{chunk-AOWGXU6D.js.map → chunk-Q4UHJ5SN.js.map} +0 -0
- /package/dist/{chunk-FW22ZCXT.js.map → chunk-QBLT6POL.js.map} +0 -0
- /package/dist/{chunk-I3JDRCMW.js.map → chunk-RB4DOPGZ.js.map} +0 -0
- /package/dist/{chunk-32YV3TJT.js.map → chunk-SMV2HRDU.js.map} +0 -0
- /package/dist/{chunk-Z5HTYMMQ.js.map → chunk-SYNY3VB5.js.map} +0 -0
- /package/dist/{chunk-ZSX4S5XB.js.map → chunk-TKVUE4JF.js.map} +0 -0
- /package/dist/{chunk-B57AFBY2.js.map → chunk-TZZBXPZK.js.map} +0 -0
- /package/dist/{chunk-5FDLC6G7.js.map → chunk-UA372JHH.js.map} +0 -0
- /package/dist/{chunk-B6SJIBQK.js.map → chunk-V3RWOOSO.js.map} +0 -0
- /package/dist/{chunk-HBRLNOHL.js.map → chunk-V7ADQF5O.js.map} +0 -0
- /package/dist/{chunk-F7XGHL5O.js.map → chunk-VQDZYB2B.js.map} +0 -0
- /package/dist/{chunk-BK2HHQGN.js.map → chunk-VVOLDVIR.js.map} +0 -0
- /package/dist/{chunk-6K7DPM7D.js.map → chunk-XQRFSKYM.js.map} +0 -0
- /package/dist/{chunk-ID6Z6E66.js.map → chunk-Y2RKVFKR.js.map} +0 -0
- /package/dist/{chunk-FN5EBVTQ.js.map → chunk-YRXFFWG4.js.map} +0 -0
- /package/dist/{derive-OX7F6TGG.js.map → collection-facade-CS7CA2XO.js.map} +0 -0
- /package/dist/{enclave-27SMF6GF.js.map → computed-FAD7SED4.js.map} +0 -0
- /package/dist/{executor-B6SRO2QS.js.map → derive-XLOJVXPU.js.map} +0 -0
- /package/dist/{dispatch-3CQDJV5Q.js.map → dispatch-H4HV32AM.js.map} +0 -0
- /package/dist/{executor-BI5CHWRY.js.map → executor-FMPVN6DT.js.map} +0 -0
- /package/dist/{executor-RBKM5W5K.js.map → executor-LBBBRTN5.js.map} +0 -0
- /package/dist/{export-accessible-VMA3YM5V.js.map → executor-OSRZST2U.js.map} +0 -0
- /package/dist/{extract-partition-NF7PXGPP.js.map → export-accessible-RAOJAAU5.js.map} +0 -0
- /package/dist/{find-LZMP26KF.js.map → extract-partition-JD5CUSTG.js.map} +0 -0
- /package/dist/{issue-IHARXWW5.js.map → find-JRN4RNQ5.js.map} +0 -0
- /package/dist/{ledger-KZPCMVZY.js.map → issue-YIVBZUTH.js.map} +0 -0
- /package/dist/{liberate-GRLCZMW4.js.map → ledger-5ZMGE44K.js.map} +0 -0
- /package/dist/{link-set-JCMJ7ULP.js.map → liberate-WZSZM2W6.js.map} +0 -0
- /package/dist/{managed-secret-S3MQ6SH6.js.map → link-set-MFXC24VK.js.map} +0 -0
- /package/dist/{noydb-SWQJ3MZS.js.map → managed-secret-MFTFT22X.js.map} +0 -0
- /package/dist/{migrate-cek-V7GKJZ7O.js.map → migrate-cek-DZRFFOHW.js.map} +0 -0
- /package/dist/{register-F3OYE7MJ.js.map → noydb-ITIGNKUF.js.map} +0 -0
- /package/dist/{registry-CILQFXFK.js.map → register-DT5HZ2LZ.js.map} +0 -0
- /package/dist/{registry-XNNYQVKV.js.map → registry-BHRZGZHF.js.map} +0 -0
- /package/dist/{registry-YCDZV3VW.js.map → registry-ET6ZFFWA.js.map} +0 -0
- /package/dist/{registry-ZGYS33TE.js.map → registry-HXFGLGTG.js.map} +0 -0
- /package/dist/{request-withdrawal-Z5NC6TXT.js.map → registry-THCPDEOD.js.map} +0 -0
- /package/dist/{revoke-ZL62WC2D.js.map → request-withdrawal-AV2MJJKY.js.map} +0 -0
- /package/dist/{signer-MBZZMXTC.js.map → revoke-6DWIEOCV.js.map} +0 -0
- /package/dist/{stale-TJ3DYZMQ.js.map → signer-MHGW3OIL.js.map} +0 -0
- /package/dist/{storage-SVMKRGCW.js.map → stale-6GCFMOOR.js.map} +0 -0
- /package/dist/{walk-HJ42EISE.js.map → storage-BYN5LO6Z.js.map} +0 -0
- /package/dist/{withdraw-accessible-5NZUPAVA.js.map → walk-4VPK7AS4.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/capsule/enclave-aes/broker/proof.ts","../../../src/capsule/enclave-aes/capabilities.ts","../../../src/capsule/enclave-aes/index.ts"],"sourcesContent":["/**\n * Credential-broker proof crypto (#479, credential-broker spec §3).\n *\n * The `_broker` seed (32 random bytes, decrypted from `_broker/<brokerId>` by\n * the party layer) is never transmitted. Instead, a **proof key** is\n * HKDF-derived from it, domain-separated per `(vaultId, brokerId)`, and the\n * derived bits are registered with the broker host once at enrol. Steady\n * state, the client re-derives the same key from the seed and signs a\n * **canonical** string binding the request's identity/context, so the broker\n * can verify a fresh HMAC on every mint without ever holding the seed itself.\n *\n * ## Derivation (spec §3, follow verbatim)\n *\n * ```\n * hkdf = importKey('raw', seed, 'HKDF', false, ['deriveBits'])\n * proofBits = deriveBits({ name:'HKDF', hash:'SHA-256',\n * salt: utf8(BROKER_PROOF_DOMAIN),\n * info: utf8(JSON.stringify([BROKER_PROOF_DOMAIN, vaultId, brokerId])) },\n * hkdf, 256)\n * proofKey = importKey('raw', proofBits, { name:'HMAC', hash:'SHA-256' }, false, ['sign'])\n * proof = base64(sign('HMAC', proofKey, utf8(canonical)))\n * ```\n *\n * `BROKER_PROOF_DOMAIN` is both the HKDF salt and the first `info` array\n * element (the injective-JSON-array convention `deriveClassifyIndexKey`\n * established — see `classify/bidx.ts`). `BROKER_PROOF_VERSION` is the\n * separate MAC version tag, the first element of the `canonical` array.\n *\n * ## Canonical (spec §2 step 3)\n *\n * `JSON.stringify([BROKER_PROOF_VERSION, vaultId, endpointOrigin, brokerId,\n * profile ?? '', instancePid ?? '', challenge, expiresAt])` — every binding\n * field folded into ONE MAC input:\n * - `vaultId` (V1), `challenge` (V3), `expiresAt` (V4) — verbatim strings,\n * never reparsed/reformatted (F8): a byte-identical ISO string is\n * required, so e.g. `Z` vs `+00:00` for the same instant fails.\n * - `profile ?? ''` (F1) — a proof captured at one profile cannot be\n * replayed at another.\n * - `endpointOrigin` (F4) — a proof cannot be relayed to a different broker\n * endpoint reusing the same `brokerId`.\n * - `instancePid ?? ''` (F7) — an EMPTY STRING `instancePid` is forbidden in\n * both {@link computeBrokerProof} and {@link verifyBrokerProof}: absent\n * (the field omitted) and `''` must stay distinguishable, or `?? ''`\n * would alias \"no instance\" onto a real registered instance.\n *\n * ## Verify order (spec §3, non-negotiable, F2/F6)\n *\n * {@link verifyBrokerProof} MUST, in this exact order: (1) burn the challenge\n * via `consumeChallenge` FIRST and short-circuit `false` before any MAC work\n * (F2 — burn-on-presentation, not burn-on-success); (2) recompute the\n * canonical and compare with `crypto.subtle.verify('HMAC', …)` — portable,\n * constant-time, never a manual byte compare or Node `timingSafeEqual` (F6);\n * (3) assert `now < expiresAt` — the client clock is never trusted, so this\n * check only matters once the MAC (which covers `expiresAt`) has verified.\n *\n * ## Zeroing (F5)\n *\n * `seed` and the transient HKDF output are raw, durable secret material —\n * the `recovery.ts:276-307` `try{}finally{secret.fill(0)}` discipline, not\n * the ephemeral-CEK happy-path zeroing elsewhere. {@link computeBrokerProof}\n * zeroes the `seed` argument in a `finally` on every path including a throw;\n * {@link deriveBrokerProofKey} zeroes its own transient HKDF-output bytes the\n * same way. {@link deriveBrokerProofBits} does not zero `seed` — it exists\n * so the party layer can register the raw bits at one-time enrol (the value\n * that must survive the call to be base64-encoded and POSTed).\n *\n * @module\n */\nimport type { EnclaveKey } from '../crypto.js'\nimport { base64ToBuffer, bufferToBase64 } from '../../plumbing/digest.js'\nimport { ValidationError } from '../../../kernel/errors.js'\n\nconst subtle = globalThis.crypto.subtle\n\n/** HKDF salt domain for the broker proof key — also the first `info` array element. */\nexport const BROKER_PROOF_DOMAIN = 'noydb-broker-proof'\n\n/** MAC version tag — the first element of the `canonical` array signed/verified. */\nexport const BROKER_PROOF_VERSION = 'noydb-broker-proof-v1'\n\n/** Default challenge TTL (spec §2 step 2: \"TTL ≤ 60 s\"). */\nconst DEFAULT_CHALLENGE_TTL_MS = 60_000\n\n/** The canonical-binding fields a client supplies alongside `vaultId`/`brokerId` (spec §2 step 3). */\nexport interface BrokerProofCanonicalParts {\n readonly endpointOrigin: string\n readonly profile?: string | undefined\n readonly instancePid?: string | undefined\n readonly challenge: string\n readonly expiresAt: string\n}\n\n/** A freshly-minted, server-random single-use challenge (spec §2 step 2). */\nexport interface IssuedChallenge {\n readonly challenge: string\n readonly expiresAt: string\n}\n\n/** Arguments the broker host passes to verify a submitted proof (spec §3). */\nexport interface VerifyBrokerProofArgs {\n /**\n * Atomically test-and-delete the challenge, returning whether it was still\n * fresh (unconsumed and unexpired-from-the-store's-perspective). MUST burn\n * on presentation, not on successful verification (F2).\n */\n readonly consumeChallenge: (challenge: string) => Promise<boolean>\n /** The registered proof key's raw bytes, already KMS-unwrapped by the host (§7). */\n readonly registeredProofKey: Uint8Array\n readonly vaultId: string\n readonly endpointOrigin: string\n readonly brokerId: string\n readonly profile?: string | undefined\n readonly instancePid?: string | undefined\n readonly challenge: string\n readonly expiresAt: string\n /** base64(HMAC-SHA-256(proofKey, canonical)), as submitted by the client. */\n readonly proof: string\n}\n\n/** Build the canonical MAC input verbatim — never reparses/reformats a field (F8). */\nfunction buildCanonical(vaultId: string, brokerId: string, parts: BrokerProofCanonicalParts): string {\n return JSON.stringify([\n BROKER_PROOF_VERSION,\n vaultId,\n parts.endpointOrigin,\n brokerId,\n parts.profile ?? '',\n parts.instancePid ?? '',\n parts.challenge,\n parts.expiresAt,\n ])\n}\n\n/**\n * The HKDF step: derive the 256-bit proof bits from the `_broker` seed,\n * domain-separated per `(vaultId, brokerId)`. Returns the raw bits — the\n * value registered with the broker host once at enrol (spec §2 step 2/3).\n * Does not mutate or zero `seed`; the caller owns the seed's lifecycle.\n */\nexport async function deriveBrokerProofBits(\n seed: Uint8Array,\n vaultId: string,\n brokerId: string,\n): Promise<Uint8Array> {\n const hkdfKey = await subtle.importKey('raw', seed as BufferSource, 'HKDF', false, ['deriveBits'])\n const salt = new TextEncoder().encode(BROKER_PROOF_DOMAIN)\n const info = new TextEncoder().encode(JSON.stringify([BROKER_PROOF_DOMAIN, vaultId, brokerId]))\n const bits = await subtle.deriveBits({ name: 'HKDF', hash: 'SHA-256', salt, info }, hkdfKey, 256)\n return new Uint8Array(bits)\n}\n\n/**\n * Derive the steady-state, non-extractable `['sign']` HMAC proof key from\n * the `_broker` seed. Zeroes the transient HKDF-output bytes in a `finally`\n * once the key has been imported (F5) — the raw bits never leave this\n * function in usable form after import.\n */\nexport async function deriveBrokerProofKey(\n seed: Uint8Array,\n vaultId: string,\n brokerId: string,\n): Promise<EnclaveKey> {\n const proofBits = await deriveBrokerProofBits(seed, vaultId, brokerId)\n try {\n return await subtle.importKey('raw', proofBits as BufferSource, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'])\n } finally {\n proofBits.fill(0)\n }\n}\n\n/**\n * Compose derive + sign for the client: re-derive the proof key from the\n * seed and sign the canonical over `canonicalParts` (spec §2 step 3).\n *\n * Rejects an empty-string `instancePid` (F7 — absent is fine, `''` is not).\n * Zeroes the `seed` argument in a `finally` on EVERY path including a throw\n * (F5, durable-secret discipline) — the transient HKDF bits are zeroed one\n * layer down, inside {@link deriveBrokerProofKey}.\n */\nexport async function computeBrokerProof(\n seed: Uint8Array,\n vaultId: string,\n brokerId: string,\n canonicalParts: BrokerProofCanonicalParts,\n): Promise<string> {\n try {\n if (canonicalParts.instancePid === '') {\n throw new ValidationError(\n \"computeBrokerProof: instancePid must not be an empty string — omit the field entirely for \" +\n \"'no instance' (F7); '' would alias onto a registered instance.\",\n )\n }\n const canonical = buildCanonical(vaultId, brokerId, canonicalParts)\n const key = await deriveBrokerProofKey(seed, vaultId, brokerId)\n const mac = await subtle.sign('HMAC', key, new TextEncoder().encode(canonical) as BufferSource)\n return bufferToBase64(new Uint8Array(mac))\n } finally {\n seed.fill(0)\n }\n}\n\n/**\n * Host-side nonce mint: 32 random bytes, base64-encoded, plus an ISO\n * `expiresAt` at most `ttlMs` (default 60 s) in the future. The caller\n * (the broker host) persists both returned strings **verbatim** and MACs\n * those exact bytes on verify — never a reparsed/reformatted copy (F8).\n */\nexport function issueChallenge(opts?: { ttlMs?: number }): IssuedChallenge {\n const ttlMs = opts?.ttlMs ?? DEFAULT_CHALLENGE_TTL_MS\n const bytes = globalThis.crypto.getRandomValues(new Uint8Array(32))\n return {\n challenge: bufferToBase64(bytes),\n expiresAt: new Date(Date.now() + ttlMs).toISOString(),\n }\n}\n\n/**\n * Verify a submitted broker proof. Order is NON-NEGOTIABLE (spec §3):\n *\n * 1. `await consumeChallenge(challenge)` FIRST — burn-and-check-fresh; a\n * not-fresh (already-consumed or unknown) challenge short-circuits to\n * `false` before any MAC work (F2).\n * 2. Empty-string `instancePid` is rejected (F7), then the canonical is\n * recomputed over the verbatim `endpointOrigin`/`brokerId`/`profile`/\n * `instancePid`/`challenge`/`expiresAt` and compared via\n * `crypto.subtle.verify('HMAC', …)` — portable, constant-time, never a\n * manual compare or Node `timingSafeEqual` (F6).\n * 3. `now < expiresAt` — the client clock is never trusted; `expiresAt`\n * rides inside the already-verified MAC (F4/F8).\n */\nexport async function verifyBrokerProof(args: VerifyBrokerProofArgs): Promise<boolean> {\n const fresh = await args.consumeChallenge(args.challenge)\n if (!fresh) return false\n\n if (args.instancePid === '') return false\n\n const canonical = buildCanonical(args.vaultId, args.brokerId, {\n endpointOrigin: args.endpointOrigin,\n profile: args.profile,\n instancePid: args.instancePid,\n challenge: args.challenge,\n expiresAt: args.expiresAt,\n })\n const key = await subtle.importKey(\n 'raw',\n args.registeredProofKey as BufferSource,\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['verify'],\n )\n const ok = await subtle.verify(\n 'HMAC',\n key,\n base64ToBuffer(args.proof) as BufferSource,\n new TextEncoder().encode(canonical) as BufferSource,\n )\n if (!ok) return false\n\n return Date.now() < Date.parse(args.expiresAt)\n}\n","import type { CapsuleGroup } from '../contract.js'\n\n/**\n * `enclave-aes` supports every group. It is the REFERENCE capsule — the\n * behaviour every other implementation is compared against, and the one hub\n * ships so that `npm install @noy-db/hub` alone is a working noy-db.\n *\n * An `exclave-*` refuses `authenticate` and `seal` (no secret, no key\n * hierarchy — the store's own IAM is the authority) and may refuse the\n * optional groups. That asymmetry is what the prefix means, and the\n * conformance suite asserts it from the package name rather than trusting a\n * declaration.\n *\n * Frozen so a caller cannot edit what a capsule claims to support: a mutable\n * set would let a service \"enable\" a group by adding to it, which is exactly\n * the confidently-wrong failure the typed refusal exists to prevent.\n */\n/**\n * ⛔ `Object.freeze` does NOT make a Set immutable — it guards own properties,\n * not internal slots, so `frozen.add(x)` still succeeds. Measured 2026-09-12,\n * against a test that asserted otherwise and failed. The mutators are replaced\n * so the refusal is real at runtime, not just in the type.\n *\n * Why it has to be real: a caller holding a mutable capability set can \"enable\"\n * a group the capsule does not implement, and the next thing that happens is a\n * primitive being called on a capsule that has none. `ReadonlySet` alone is a\n * compile-time claim, and a JS consumer never sees it.\n */\nfunction sealedSet<T>(items: readonly T[]): ReadonlySet<T> {\n const set = new Set<T>(items)\n const refuse = (): never => {\n throw new TypeError(\n 'capabilities() is immutable — a capsule\\'s declared groups cannot be edited by a caller',\n )\n }\n set.add = refuse as never\n set.delete = refuse as never\n set.clear = refuse as never\n return Object.freeze(set)\n}\n\nconst ALL: ReadonlySet<CapsuleGroup> = sealedSet<CapsuleGroup>([\n 'authenticate',\n 'seal',\n 'cipher',\n 'digest',\n 'sign',\n 'codec',\n 'sealing',\n 'deterministic',\n 'classify',\n])\n\nexport function capabilities(): ReadonlySet<CapsuleGroup> {\n return ALL\n}\n","/**\n * **capsule/enclave-aes** — the hub's crypto interior, behind one door.\n *\n * This barrel is **the fork-swap contract**: a sister project that wants a\n * different crypto engine (a different KDF, a hardware-backed keystore, a\n * post-quantum wrap algorithm, …) replaces the entire `capsule/enclave-aes/`\n * folder wholesale and only has to honor the exports below. Nothing outside\n * `capsule/enclave-aes/**` may deep-import `crypto.js` or `record-keys/*` directly\n * — `scripts/check-architecture.mjs`'s `enclave-barrel-only` check enforces\n * that mechanically. Import sites inside `capsule/enclave-aes/**` keep their\n * existing relative imports; this door is for everyone else.\n *\n * The export list is the OBSERVED contract — exactly the symbols consumed\n * from outside this folder today — grouped by the module that defines them:\n *\n * - key type — `crypto.ts`: `EnclaveKey`, the opaque key type every\n * barrel-facing signature traffics in (`= CryptoKey` in\n * noy-db's reference enclave; a fork redefines it to its\n * own key representation — see the type's own doc for\n * the fork contract).\n * - crypto ops — `crypto.ts`: AES-256-GCM encrypt/decrypt (+ bytes, AAD,\n * deterministic variants), SHA-256 / HMAC-SHA-256 hashing.\n * - key lifecycle — `crypto.ts` + `record-keys/lifecycle.ts`: KEK/DEK\n * derivation, AES-KW wrap/unwrap, per-record CEK\n * wrap/unwrap/import + resolution/re-wrap, HKDF-derived\n * presence/sealed-field keys, base64 helpers.\n * - record codec — `record-keys/record-codec.ts`: the per-record\n * encode/decode engine.\n * - sealing — `record-keys/sealing.ts`: the sealed-record grantor\n * primitives (seal/revoke/rotate to an `at-*` host).\n * - deterministic — `record-keys/deterministic.ts`: blind-equality lookup\n * over deterministically-encrypted fields.\n * - tombstone — `record-keys/tombstone.ts`: the erased-record residue.\n * - envelope body — `record-keys/envelope-body.ts`: the C1 protected-body\n * access contract (`openEnvelopeJson`,\n * `writeEnvelopeBody`, `hasPerRecordKey`,\n * `hasSealedBody`, `envelopeBodyForHash`) — the\n * sanctioned door onto\n * `_iv`/`_data`/`_cek`/`_sealed` for everyone outside\n * this folder.\n * - reserved envelopes — `plumbing/sealed-slots.ts`: `makeReservedEnvelopes`,\n * the whole-envelope encrypt/decrypt door scoped to a\n * declared collection-name prefix (e.g. `_dict_`) —\n * `kernel/vault.ts` binds it for `DictionaryHandle`\n * (#629 Task 4).\n *\n * Additive changes only — removing or renaming an export here is breaking\n * for any fork. Frozen by `__tests__/enclave-surface-golden.test.ts`.\n *\n * **Refusal contract:** the barrel above is frozen — every symbol must\n * exist in any fork — but the optional groups (sealing, deterministic,\n * per-record-key lifecycle) MAY throw `EnclaveNotSupportedError` instead\n * of implementing the reference behavior. The core groups (crypto ops,\n * record codec, tombstone) MUST NOT throw it — they are load-bearing for\n * every consumer regardless of which enclave is wired in. noy-db's own\n * enclave supports every group, so it never throws this error.\n */\n\nimport { aesCapsule } from './bound.js'\n\n// ─── key type ──────────────────────────────────────────────────────\nexport type { EnclaveKey, EncryptResult } from './crypto.js'\n\n// ─── crypto ops ────────────────────────────────────────────────────\nexport {\n encrypt,\n decrypt,\n encryptBytes,\n decryptBytes,\n encryptBytesWithAAD,\n decryptBytesWithAAD,\n encryptDeterministic,\n decryptDeterministic,\n} from './crypto.js'\n\n// ─── key lifecycle ─────────────────────────────────────────────────\nexport {\n deriveKey,\n deriveSecretKey,\n generateDEK,\n generateEphemeralKey,\n importTransferKey,\n exportDekSet,\n importDekSet,\n wrapKey,\n unwrapKey,\n mintCanary,\n checkCanary,\n deriveDeterministicKey,\n deriveSealedFieldKey,\n deriveSealedFieldKeyFromCek,\n wrapCek,\n unwrapCek,\n importCek,\n deriveEchoKey,\n} from './crypto.js'\nexport type { SecretKeyUsage } from './crypto.js'\n// ─── shared plumbing ───────────────────────────────────────────────\n//\n// Everything from here to the end of this block used to be twelve modules\n// under `./record-keys/`. They now live once in `../plumbing/`, and this\n// capsule is one of two callers of `makeCapsule()`.\n//\n// The split below is not cosmetic. The cipher-FREE half is re-exported\n// straight from its module: it inspects envelope fields and derives hash\n// input, so there is nothing to bind and every capsule gets the identical\n// function. The cipher-BOUND half is destructured off `aesCapsule`, which is\n// `makeCapsule(aesPrimitives)` — one binding for the whole capsule, so a value\n// exported here and a value used inside `classify/**` are the SAME object.\nexport {\n buildRecordAad,\n recordAadFor,\n buildRecordEnvelope,\n isTombstone,\n isTombstoneShape,\n buildTombstone,\n isDeleteMarker,\n buildDeleteMarker,\n requireSealedBody,\n sealedBodyArgs,\n envelopeBodySize,\n hasPerRecordKey,\n envelopeBodyForHash,\n hasSealedBody,\n} from '../plumbing/index.js'\n// ─── digest group ──────────────────────────────────────────────────\n// Shared, not AES-specific: the seam design marks `digest` \"as today\" for every\n// capsule. Re-exported here so the barrel's surface is unchanged.\nexport {\n sha256Hex,\n sha256Bytes,\n hmacSha256Hex,\n hmacSignHex,\n hkdfAesGcmKey,\n deriveBlobAddressKey,\n derivePresenceKey,\n derivePresenceTagKey,\n generateIV,\n generateSalt,\n generateRecoverySecret,\n bufferToBase64,\n base64ToBuffer,\n encodeEchoParts,\n} from '../plumbing/digest.js'\nexport type { EchoSecretParts } from '../plumbing/digest.js'\nexport type { RecordIdentity, RecordRef } from '../plumbing/index.js'\nimport type { RecordCodecBase } from '../plumbing/record-codec.js'\n/**\n * `RecordCodec` is a VALUE (the capsule-bound subclass, destructured below) and\n * a TYPE (the module-level generic base). A type ALIAS can coexist with a value\n * of the same name; a `export type { RecordCodec }` RE-EXPORT cannot, which is\n * what `TS2323: Cannot redeclare exported variable` was saying.\n */\nexport type RecordCodec<T = Record<string, unknown>> = RecordCodecBase<T>\nexport { buildSealedRecordEnvelope } from '../plumbing/record-envelope.js'\nexport type { RecordEnvelopeBody } from '../plumbing/record-envelope.js'\nexport type { RewrappedBody } from '../plumbing/lifecycle.js'\nexport type { SealedShredSlot } from '../plumbing/record-codec.js'\nexport type { SealingContext } from '../plumbing/sealing.js'\nexport type { DeterministicContext } from '../plumbing/deterministic.js'\n\nexport const {\n // envelope body\n openEnvelopeJson,\n writeEnvelopeBody,\n verifyRecordIdentity,\n // key lifecycle\n resolveStableCek,\n rewrapBodyToDek,\n rewrapEnvelope,\n applyRewrappedBody,\n isRewrappedUnder,\n // rekey\n rekeyEnvelopeToDek,\n rekeyEnvelopeIfNeeded,\n envelopeOpensUnderAny,\n rekeyBlobSet,\n // record codec\n RecordCodec,\n // sealed slots — ONLY `makeReservedEnvelopes` is part of the frozen surface.\n // The other seven are capsule-internal; destructuring the whole capsule here\n // leaked them and widened the golden by 8 names. A surface is a contract, so\n // the fix is to narrow the barrel, not to re-baseline the golden.\n makeReservedEnvelopes,\n // sealing\n SEALED_CEK_NS,\n sealRecordToHost,\n revokeSealedRecord,\n rotateRecordCek,\n // deterministic\n findByDet,\n queryByDet,\n} = aesCapsule\n\n// ─── reserved envelopes (ViaCryptoCtx.reservedEnvelopes capability) ──\n\n// ─── classify (stage-2 verify oracle primitives) ────────────────────\n// ADDITIVE per Enclave Contract v1. A fork must provide these four; the\n// verify/matchGroup orchestration (classify/verify.ts) sits behind the\n// with-shape dynamic-import seam and is not part of the fork contract.\nexport { deriveVdigSlotKey } from './classify/vdig.js'\nexport { pbkdf2VerifyDigest } from './classify/digest.js'\nexport { ctEqualTags } from '../plumbing/ct-equal.js'\nexport { evaluateKofN } from '../plumbing/kofn.js'\n\n// ─── classify (slice-2b equatable blind index) ──────────────────────\n// ADDITIVE per Enclave Contract v1. A fork must provide these four; the\n// findByDigest orchestration (collection.ts) sits behind the with-shape\n// dynamic-import seam and is not part of the fork contract.\nexport { deriveClassifyIndexKey, deriveClassifyIndexSalt, mintBidxTag } from './classify/bidx.js'\nexport { computeBidxTarget } from './classify/find.js'\n\n// ─── broker (proof derivation + challenge/verify, #479 slice 2) ─────\n// ADDITIVE per Enclave Contract v1. A fork must provide these five; the\n// seed lifecycle + network/cache orchestration (with-party/broker/**) sits\n// behind its own dynamic-import seam and is not part of the fork contract.\nexport {\n deriveBrokerProofBits,\n deriveBrokerProofKey,\n computeBrokerProof,\n issueChallenge,\n verifyBrokerProof,\n} from './broker/proof.js'\nexport type { BrokerProofCanonicalParts, VerifyBrokerProofArgs, IssuedChallenge } from './broker/proof.js'\n\n// ─── sign ─────────────────────────────────────────────────────────────\nexport { generateSigningKeyPair, signBytes, verifyBytes } from '../plumbing/sign.js'\n\n// ─── recipient sealing ────────────────────────────────────────────────\nexport type { EnclaveKeyPair } from './crypto.js'\nexport {\n generateRecipientKeyPair,\n exportRecipientPublicKeySpki,\n importRecipientPublicKeySpki,\n recipientWrap,\n recipientUnwrap,\n} from './crypto.js'\n\n// ─── capabilities ─────────────────────────────────────────────────────\n// What THIS capsule supports. Part of the contract every capsule implements,\n// not an enclave-aes detail — an alternative declares its own, and a service\n// asserts against it at createNoydb() rather than failing on first write.\nexport { capabilities } from './capabilities.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,IAAM,SAAS,WAAW,OAAO;AAG1B,IAAM,sBAAsB;AAG5B,IAAM,uBAAuB;AAGpC,IAAM,2BAA2B;AAuCjC,SAAS,eAAe,SAAiB,UAAkB,OAA0C;AACnG,SAAO,KAAK,UAAU;AAAA,IACpB;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA,MAAM,WAAW;AAAA,IACjB,MAAM,eAAe;AAAA,IACrB,MAAM;AAAA,IACN,MAAM;AAAA,EACR,CAAC;AACH;AAQA,eAAsB,sBACpB,MACA,SACA,UACqB;AACrB,QAAM,UAAU,MAAM,OAAO,UAAU,OAAO,MAAsB,QAAQ,OAAO,CAAC,YAAY,CAAC;AACjG,QAAM,OAAO,IAAI,YAAY,EAAE,OAAO,mBAAmB;AACzD,QAAM,OAAO,IAAI,YAAY,EAAE,OAAO,KAAK,UAAU,CAAC,qBAAqB,SAAS,QAAQ,CAAC,CAAC;AAC9F,QAAM,OAAO,MAAM,OAAO,WAAW,EAAE,MAAM,QAAQ,MAAM,WAAW,MAAM,KAAK,GAAG,SAAS,GAAG;AAChG,SAAO,IAAI,WAAW,IAAI;AAC5B;AAQA,eAAsB,qBACpB,MACA,SACA,UACqB;AACrB,QAAM,YAAY,MAAM,sBAAsB,MAAM,SAAS,QAAQ;AACrE,MAAI;AACF,WAAO,MAAM,OAAO,UAAU,OAAO,WAA2B,EAAE,MAAM,QAAQ,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;AAAA,EACpH,UAAE;AACA,cAAU,KAAK,CAAC;AAAA,EAClB;AACF;AAWA,eAAsB,mBACpB,MACA,SACA,UACA,gBACiB;AACjB,MAAI;AACF,QAAI,eAAe,gBAAgB,IAAI;AACrC,YAAM,IAAI;AAAA,QACR;AAAA,MAEF;AAAA,IACF;AACA,UAAM,YAAY,eAAe,SAAS,UAAU,cAAc;AAClE,UAAM,MAAM,MAAM,qBAAqB,MAAM,SAAS,QAAQ;AAC9D,UAAM,MAAM,MAAM,OAAO,KAAK,QAAQ,KAAK,IAAI,YAAY,EAAE,OAAO,SAAS,CAAiB;AAC9F,WAAO,eAAe,IAAI,WAAW,GAAG,CAAC;AAAA,EAC3C,UAAE;AACA,SAAK,KAAK,CAAC;AAAA,EACb;AACF;AAQO,SAAS,eAAe,MAA4C;AACzE,QAAM,QAAQ,MAAM,SAAS;AAC7B,QAAM,QAAQ,WAAW,OAAO,gBAAgB,IAAI,WAAW,EAAE,CAAC;AAClE,SAAO;AAAA,IACL,WAAW,eAAe,KAAK;AAAA,IAC/B,WAAW,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,EAAE,YAAY;AAAA,EACtD;AACF;AAgBA,eAAsB,kBAAkB,MAA+C;AACrF,QAAM,QAAQ,MAAM,KAAK,iBAAiB,KAAK,SAAS;AACxD,MAAI,CAAC,MAAO,QAAO;AAEnB,MAAI,KAAK,gBAAgB,GAAI,QAAO;AAEpC,QAAM,YAAY,eAAe,KAAK,SAAS,KAAK,UAAU;AAAA,IAC5D,gBAAgB,KAAK;AAAA,IACrB,SAAS,KAAK;AAAA,IACd,aAAa,KAAK;AAAA,IAClB,WAAW,KAAK;AAAA,IAChB,WAAW,KAAK;AAAA,EAClB,CAAC;AACD,QAAM,MAAM,MAAM,OAAO;AAAA,IACvB;AAAA,IACA,KAAK;AAAA,IACL,EAAE,MAAM,QAAQ,MAAM,UAAU;AAAA,IAChC;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AACA,QAAM,KAAK,MAAM,OAAO;AAAA,IACtB;AAAA,IACA;AAAA,IACA,eAAe,KAAK,KAAK;AAAA,IACzB,IAAI,YAAY,EAAE,OAAO,SAAS;AAAA,EACpC;AACA,MAAI,CAAC,GAAI,QAAO;AAEhB,SAAO,KAAK,IAAI,IAAI,KAAK,MAAM,KAAK,SAAS;AAC/C;;;ACvOA,SAAS,UAAa,OAAqC;AACzD,QAAM,MAAM,IAAI,IAAO,KAAK;AAC5B,QAAM,SAAS,MAAa;AAC1B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,MAAM;AACV,MAAI,SAAS;AACb,MAAI,QAAQ;AACZ,SAAO,OAAO,OAAO,GAAG;AAC1B;AAEA,IAAM,MAAiC,UAAwB;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,SAAS,eAA0C;AACxD,SAAO;AACT;;;AC0GO,IAAM;AAAA;AAAA,EAEX;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AACF,IAAI;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `enclave-aes` as a {@link CapsulePrimitives} — the 13 functions the shared
|
|
3
|
+
* plumbing binds to.
|
|
4
|
+
*
|
|
5
|
+
* ⭐ THE ASSIGNMENT BELOW IS A TEST, and it is the reason this file exists as
|
|
6
|
+
* a file rather than an inline object at the `makeCapsule()` call. Declaring
|
|
7
|
+
* the seam type and implementing it are two different acts; nothing checks a
|
|
8
|
+
* hand-written interface against the module it claims to describe unless
|
|
9
|
+
* something binds one to the other. This binding caught two errors in the
|
|
10
|
+
* declaration within minutes of it being written:
|
|
11
|
+
*
|
|
12
|
+
* - `deriveDeterministicKey` was declared `(dek, context)`. It takes ONE
|
|
13
|
+
* argument — the AES capsule derives the context into the IV, not the key.
|
|
14
|
+
* - `bufferToBase64` was declared `(bytes: Uint8Array)`. It also accepts an
|
|
15
|
+
* `ArrayBuffer`, which is what its callers actually pass.
|
|
16
|
+
*
|
|
17
|
+
* Both would have compiled here and failed at the far end of the refactor,
|
|
18
|
+
* where the cause is no longer visible. (The same lesson as `#16`: a
|
|
19
|
+
* structural declaration drifts silently from its implementation until an
|
|
20
|
+
* assignment pins the two together.)
|
|
21
|
+
*
|
|
22
|
+
* ⚠️ Method shorthand in `CapsulePrimitives` is checked BIVARIANTLY, so this
|
|
23
|
+
* assignment does NOT catch parameter-arity drift — that is exactly how the
|
|
24
|
+
* `deriveDeterministicKey` mistake survived the type and was caught by a call
|
|
25
|
+
* site instead. Keep the conformance kit's call-site coverage; this assignment
|
|
26
|
+
* is necessary, not sufficient.
|
|
27
|
+
*/
|
|
28
|
+
import type { CapsulePrimitives } from '../contract.js';
|
|
29
|
+
export declare const aesPrimitives: CapsulePrimitives;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE DOOR. This is the ONLY hub file that may import the bound capsule.
|
|
3
|
+
* Everything else in hub imports THIS file.
|
|
4
|
+
*
|
|
5
|
+
* Enforced by `capsule-door-only` in `scripts/check-architecture.mjs`, which
|
|
6
|
+
* fails any other file naming `#capsule`. A door nothing enforces is not a
|
|
7
|
+
* door — the enclave barrel it replaces was reached around 38 times before a
|
|
8
|
+
* check existed.
|
|
9
|
+
*
|
|
10
|
+
* `#capsule` resolves through hub's `imports` map: `capsule/enclave-aes/` by
|
|
11
|
+
* default, or an alternative package when a consumer sets a build condition.
|
|
12
|
+
*
|
|
13
|
+
* ⛔ THE RE-EXPORTS BELOW ARE EXPLICIT, AND MUST STAY THAT WAY.
|
|
14
|
+
* `export * from '#capsule'` is the obvious spelling and it does not build:
|
|
15
|
+
* `#capsule` is EXTERNAL (it has to be, or the capsule choice bakes in at hub's
|
|
16
|
+
* build time), and esbuild cannot enumerate an external module's exports. Every
|
|
17
|
+
* named import through the door then fails with "No matching export". Measured
|
|
18
|
+
* 2026-09-12.
|
|
19
|
+
*
|
|
20
|
+
* Generated from `__tests__/enclave-surface.golden.json` — the same artefact
|
|
21
|
+
* the surface test freezes, so the door and the golden cannot drift. Adding a
|
|
22
|
+
* capsule primitive means adding it to the golden and regenerating.
|
|
23
|
+
*/
|
|
24
|
+
export { RecordCodec, SEALED_CEK_NS, applyRewrappedBody, base64ToBuffer, bufferToBase64, buildDeleteMarker, buildRecordAad, buildRecordEnvelope, buildSealedRecordEnvelope, buildTombstone, capabilities, checkCanary, computeBidxTarget, computeBrokerProof, ctEqualTags, decrypt, decryptBytes, decryptBytesWithAAD, decryptDeterministic, deriveBlobAddressKey, deriveBrokerProofBits, deriveBrokerProofKey, deriveClassifyIndexKey, deriveClassifyIndexSalt, deriveDeterministicKey, deriveEchoKey, deriveKey, derivePresenceKey, derivePresenceTagKey, deriveSealedFieldKey, deriveSealedFieldKeyFromCek, deriveSecretKey, deriveVdigSlotKey, encodeEchoParts, encrypt, encryptBytes, encryptBytesWithAAD, encryptDeterministic, envelopeBodyForHash, envelopeBodySize, envelopeOpensUnderAny, evaluateKofN, exportDekSet, exportRecipientPublicKeySpki, findByDet, generateDEK, generateEphemeralKey, generateIV, generateRecipientKeyPair, generateRecoverySecret, generateSalt, generateSigningKeyPair, hasPerRecordKey, hasSealedBody, requireSealedBody, sealedBodyArgs, hkdfAesGcmKey, hmacSha256Hex, hmacSignHex, importCek, importDekSet, importRecipientPublicKeySpki, importTransferKey, isDeleteMarker, isRewrappedUnder, isTombstone, isTombstoneShape, issueChallenge, makeReservedEnvelopes, mintBidxTag, mintCanary, openEnvelopeJson, pbkdf2VerifyDigest, queryByDet, recipientUnwrap, recipientWrap, recordAadFor, rekeyBlobSet, rekeyEnvelopeIfNeeded, rekeyEnvelopeToDek, resolveStableCek, revokeSealedRecord, rewrapBodyToDek, rewrapEnvelope, rotateRecordCek, sealRecordToHost, sha256Bytes, sha256Hex, signBytes, unwrapCek, unwrapKey, verifyBrokerProof, verifyBytes, verifyRecordIdentity, wrapCek, wrapKey, writeEnvelopeBody, } from '#capsule';
|
|
25
|
+
export type { BrokerProofCanonicalParts, DeterministicContext, EchoSecretParts, EnclaveKey, EnclaveKeyPair, EncryptResult, IssuedChallenge, RecordEnvelopeBody, RecordIdentity, RecordRef, RewrappedBody, SealedShredSlot, SealingContext, SecretKeyUsage, VerifyBrokerProofArgs, } from '#capsule';
|
|
26
|
+
export type { CapsuleKey, CapsuleKeyPair, CapsuleGroup } from './contract.js';
|
|
27
|
+
export { CapsuleNotSupportedError } from './contract.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constant-time 32-byte tag comparison.
|
|
3
|
+
*
|
|
4
|
+
* Pure — no WebCrypto, no key material — so it is plumbing rather than a
|
|
5
|
+
* capsule primitive. It lived in `enclave-aes/classify/compare.ts` only
|
|
6
|
+
* because that is where its first caller was; leaving it there would have made
|
|
7
|
+
* `@noy-db/hub/capsule` import the AES capsule to reach it, which is precisely
|
|
8
|
+
* the coupling the seam exists to remove.
|
|
9
|
+
*/
|
|
10
|
+
/** Compare exactly-32-byte tags. XOR-accumulate over all 32 bytes, no early exit. */
|
|
11
|
+
export declare function ctEqualTags(a: Uint8Array, b: Uint8Array): boolean;
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Internal service — not exported as a `@noy-db/hub/*` subpath.
|
|
18
18
|
*/
|
|
19
|
-
import {
|
|
20
|
-
import type {
|
|
21
|
-
import type { RecordCodec } from './record-codec.js';
|
|
19
|
+
import type { NoydbStore } from '../../kernel/types.js';
|
|
20
|
+
import type { RecordCodec } from './index.js';
|
|
22
21
|
/** Everything the moving deterministic-index methods touched on `this.*`. */
|
|
22
|
+
import type { CapsuleKey, CapsulePrimitives } from '../contract.js';
|
|
23
23
|
export interface DeterministicContext<T> {
|
|
24
24
|
/** Collection name — the deterministic-encryption AAD scope. */
|
|
25
25
|
readonly name: string;
|
|
@@ -32,24 +32,11 @@ export interface DeterministicContext<T> {
|
|
|
32
32
|
/** False on plaintext collections — det lookups are encrypted-only. */
|
|
33
33
|
readonly storeCiphertext: boolean;
|
|
34
34
|
/** The collection DEK resolver. */
|
|
35
|
-
getDEK(): Promise<
|
|
35
|
+
getDEK(): Promise<CapsuleKey>;
|
|
36
36
|
/** The record codec — decrypts a matched envelope to T. */
|
|
37
37
|
readonly codec: RecordCodec<T>;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* Reads every envelope via the adapter and compares the stored `_det[field]` to
|
|
44
|
-
* a freshly computed deterministic ciphertext — no record bodies are decrypted
|
|
45
|
-
* during the search.
|
|
46
|
-
*
|
|
47
|
-
* Throws when the field is not declared in `deterministicFields`, so a typo
|
|
48
|
-
* fails loudly at the call site rather than silently returning null forever.
|
|
49
|
-
*/
|
|
50
|
-
export declare function findByDet<T>(ctx: DeterministicContext<T>, field: string, value: unknown): Promise<T | null>;
|
|
51
|
-
/**
|
|
52
|
-
* Return every record whose deterministic field matches. Same semantics as
|
|
53
|
-
* {@link findByDet} but without the short-circuit.
|
|
54
|
-
*/
|
|
55
|
-
export declare function queryByDet<T>(ctx: DeterministicContext<T>, field: string, value: unknown): Promise<T[]>;
|
|
39
|
+
export declare function makeDeterministic(p: CapsulePrimitives): {
|
|
40
|
+
findByDet: <T>(ctx: DeterministicContext<T>, field: string, value: unknown) => Promise<T | null>;
|
|
41
|
+
queryByDet: <T>(ctx: DeterministicContext<T>, field: string, value: unknown) => Promise<T[]>;
|
|
42
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** AES key size in bits. Shared: every capsule that derives an AES-GCM subkey
|
|
2
|
+
* from the digest group produces a 256-bit key, or the derivations diverge. */
|
|
3
|
+
export declare const KEY_BITS = 256;
|
|
4
|
+
export declare const IV_BYTES = 12;
|
|
5
|
+
/** The echo-secret typed parts. Encoding lives here with `encodeEchoParts`; the
|
|
6
|
+
* KEK derivation that consumes it stays in the capsule's `authenticate` group. */
|
|
7
|
+
export interface EchoSecretParts {
|
|
8
|
+
readonly prompt: string;
|
|
9
|
+
readonly echo: string;
|
|
10
|
+
readonly key: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* AG-1 encoding: domain context + 4-byte big-endian length prefix per
|
|
14
|
+
* part. Two independent guarantees make a single typed string unable to
|
|
15
|
+
* derive an echo vault's KEK (spec AG-1):
|
|
16
|
+
*
|
|
17
|
+
* 1. The `0xFF` context prefix — UTF-8 never produces that byte, so the
|
|
18
|
+
* encoding is provably not the encoding of ANY string (not merely of
|
|
19
|
+
* no separator-joined form).
|
|
20
|
+
* 2. Structural length prefixes — part boundaries are key material, so
|
|
21
|
+
* re-splitting the same characters changes the derived KEK.
|
|
22
|
+
*
|
|
23
|
+
* @throws ValidationError when any part is not a string — the single
|
|
24
|
+
* chokepoint every echo KEK derivation and block mint passes through, so a
|
|
25
|
+
* malformed parts object cannot be `TextEncoder`-coerced into key material.
|
|
26
|
+
*/
|
|
27
|
+
export declare function encodeEchoParts(parts: EchoSecretParts): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* SHA-256 hex digest of raw bytes. Used to derive content-addressed
|
|
30
|
+
* eTags for blob deduplication. Computed on plaintext bytes
|
|
31
|
+
* before compression and encryption so the eTag identifies content, not
|
|
32
|
+
* ciphertext, and survives re-encryption (key rotation, re-upload).
|
|
33
|
+
*/
|
|
34
|
+
export declare function sha256Hex(data: Uint8Array): Promise<string>;
|
|
35
|
+
/** SHA-256 of raw bytes, as bytes. */
|
|
36
|
+
export declare function sha256Bytes(data: Uint8Array): Promise<Uint8Array>;
|
|
37
|
+
/**
|
|
38
|
+
* Derive the blob CONTENT-ADDRESSING key for one tier (#1126).
|
|
39
|
+
*
|
|
40
|
+
* The blob eTag is an HMAC over the plaintext. It used to be keyed by the
|
|
41
|
+
* `_blob` DEK — the very key `rotateKeys` replaces — so after any rotation
|
|
42
|
+
* `HMAC(live DEK, plaintext) !== storedETag` for every blob written before it,
|
|
43
|
+
* permanently. `decryptResponse()` checks that unconditionally, so the
|
|
44
|
+
* presigned-URL read path raised `TamperedError` on legitimate data forever;
|
|
45
|
+
* dedup also split, minting a second address for identical bytes.
|
|
46
|
+
*
|
|
47
|
+
* The fix is a `root` that rotation never touches (`_blob_addr`, refused by
|
|
48
|
+
* `rotateKeys` exactly as `_roster` is). Rotation then re-keys chunk BODIES
|
|
49
|
+
* while every address stays stable, which is what makes the AAD
|
|
50
|
+
* `{eTag}:{i}:{count}` and every `_blob_index` / `_blob_slots_*` /
|
|
51
|
+
* `_blob_versions_*` row survive it untouched.
|
|
52
|
+
*
|
|
53
|
+
* **Derived PER TIER, deliberately.** A single vault-wide address would make an
|
|
54
|
+
* elevated blob and a tier-0 blob with identical content share an eTag,
|
|
55
|
+
* leaking equality across a boundary the tier system exists to enforce — and
|
|
56
|
+
* `rehomeForTier` re-addresses on a tier move precisely because the address is
|
|
57
|
+
* tier-scoped today. Domain separation keeps that property while removing the
|
|
58
|
+
* rotation coupling: the two are independent axes, and only one of them was
|
|
59
|
+
* ever meant to change the address.
|
|
60
|
+
*
|
|
61
|
+
* Same HKDF idiom as `asKwKey`, with its own salt so the addressing key can
|
|
62
|
+
* never coincide with a wrapping or encryption key.
|
|
63
|
+
*/
|
|
64
|
+
export declare function deriveBlobAddressKey(root: CryptoKey, tier: number): Promise<CryptoKey>;
|
|
65
|
+
/**
|
|
66
|
+
* HMAC-SHA-256(key, data) as hex.
|
|
67
|
+
*
|
|
68
|
+
* Keyed, unlike {@link sha256Hex}: blob eTags derived with this are opaque to
|
|
69
|
+
* the store, so an attacker with store access cannot pre-compute the address of
|
|
70
|
+
* a file they guess at. Dedup still works inside a vault, where the key is shared.
|
|
71
|
+
*/
|
|
72
|
+
export declare function hmacSha256Hex(key: CryptoKey, data: Uint8Array): Promise<string>;
|
|
73
|
+
/**
|
|
74
|
+
* Derive an AES-256-GCM presence key from a collection DEK using HKDF-SHA256.
|
|
75
|
+
*
|
|
76
|
+
* The presence key is domain-separated from the data DEK by the fixed salt
|
|
77
|
+
* `'noydb-presence'` and the `info` = collection name. This means:
|
|
78
|
+
* - The adapter never sees the presence key.
|
|
79
|
+
* - Presence payloads rotate automatically when the collection DEK is rotated.
|
|
80
|
+
* - Revoked users cannot derive the new presence key after a DEK rotation.
|
|
81
|
+
*
|
|
82
|
+
* @param dek The collection's AES-256-GCM DEK (extractable).
|
|
83
|
+
* @param collectionName Used as the HKDF `info` parameter for domain separation.
|
|
84
|
+
* @returns A non-extractable AES-256-GCM key suitable for presence payload encryption.
|
|
85
|
+
*/
|
|
86
|
+
export declare function derivePresenceKey(dek: CryptoKey, collectionName: string): Promise<CryptoKey>;
|
|
87
|
+
/**
|
|
88
|
+
* Derive the presence-TAG key from a collection DEK: a non-extractable,
|
|
89
|
+
* sign-only HMAC-SHA256 key, HKDF-separated from the presence PAYLOAD key
|
|
90
|
+
* ({@link derivePresenceKey}) by its own salt. The tag is the adapter-opaque
|
|
91
|
+
* record id for storage-polled presence; the adapter never sees the userId.
|
|
92
|
+
*/
|
|
93
|
+
export declare function derivePresenceTagKey(dek: CryptoKey, collectionName: string): Promise<CryptoKey>;
|
|
94
|
+
/**
|
|
95
|
+
* HMAC-SHA256 hex with a key that IS an HMAC key (e.g. from
|
|
96
|
+
* {@link derivePresenceTagKey}). {@link hmacSha256Hex} takes an AES-GCM
|
|
97
|
+
* carrier and re-imports its raw bytes, which needs an extractable key;
|
|
98
|
+
* this one signs directly and works with non-extractable keys.
|
|
99
|
+
*/
|
|
100
|
+
export declare function hmacSignHex(key: CryptoKey, data: Uint8Array): Promise<string>;
|
|
101
|
+
/**
|
|
102
|
+
* HKDF-SHA256 → non-extractable AES-256-GCM key from caller-supplied input
|
|
103
|
+
* key material. The magic-link content key derives here from
|
|
104
|
+
* `(serverSecret, SHA-256(token), info)`; `salt`/`info` are the caller's
|
|
105
|
+
* domain separation, this function adds none.
|
|
106
|
+
*/
|
|
107
|
+
export declare function hkdfAesGcmKey(ikm: Uint8Array, salt: Uint8Array, info: Uint8Array): Promise<CryptoKey>;
|
|
108
|
+
/** Generate a random 12-byte IV for AES-GCM. */
|
|
109
|
+
export declare function generateIV(): Uint8Array;
|
|
110
|
+
/** Generate a random 32-byte salt for PBKDF2. */
|
|
111
|
+
export declare function generateSalt(): Uint8Array;
|
|
112
|
+
/**
|
|
113
|
+
* Mint a fresh recovery secret — the high-entropy value a recovery profile
|
|
114
|
+
* wraps the DEK set under and then hands out (Shamir splits it into shares;
|
|
115
|
+
* paper prints it). Not a salt: a salt is public, this is not, and a fork
|
|
116
|
+
* may size them differently. The reference enclave returns 32 bytes.
|
|
117
|
+
*
|
|
118
|
+
* Callers must zero the buffer once it has been wrapped and split.
|
|
119
|
+
*/
|
|
120
|
+
export declare function generateRecoverySecret(): Uint8Array;
|
|
121
|
+
export declare function bufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
|
|
122
|
+
export declare function base64ToBuffer(base64: string): Uint8Array<ArrayBuffer>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `_v`, `_ts`, `_by`, `_source`, `_sourceTs`, `_tier`, `_elevatedBy`) and a
|
|
6
6
|
* protected body (enclave-owned; `_iv`, `_data`, `_cek`, `_det`, `_sealed`,
|
|
7
7
|
* `_debug`). The four helpers below are the ONLY sanctioned way for code
|
|
8
|
-
* outside `
|
|
8
|
+
* outside `capsule/enclave-aes/**` to read or construct the protected body —
|
|
9
9
|
* later migration batches move the ~121 direct `_iv`/`_data`/`_cek`/`_sealed`
|
|
10
10
|
* access sites in `with-*` services onto these.
|
|
11
11
|
*
|
|
@@ -13,41 +13,40 @@
|
|
|
13
13
|
* per-function doc for its oracle call site) — this file introduces no new
|
|
14
14
|
* crypto or semantics, only a narrower door onto what already runs.
|
|
15
15
|
*/
|
|
16
|
-
import { type RecordIdentity, type RecordRef } from '
|
|
17
|
-
import {
|
|
18
|
-
import type { EncryptedEnvelope } from '../../types.js';
|
|
16
|
+
import { type RecordIdentity, type RecordRef } from './record-aad.js';
|
|
17
|
+
import type { CapsuleKey, CapsulePrimitives } from '../contract.js';
|
|
18
|
+
import type { EncryptedEnvelope } from '../../kernel/types.js';
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The sealed body, or a typed refusal (#15).
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
* `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
22
|
+
* Since `_iv`/`_data` became optional, every AES path that is about to call
|
|
23
|
+
* `decrypt()` needs this one narrowing. It is deliberately the ONLY place in
|
|
24
|
+
* the enclave that turns absence into an error: the alternative — a `!` or a
|
|
25
|
+
* `?? ''` at each of the two dozen decrypt sites — would have spelled the
|
|
26
|
+
* same decision twenty-four times and produced an AEAD failure (i.e. hub's
|
|
27
|
+
* tamper alert) instead of an honest one.
|
|
28
|
+
*
|
|
29
|
+
* Ask {@link hasSealedBody} FIRST when absence is a legitimate outcome; this
|
|
30
|
+
* helper is for the paths where it is not.
|
|
30
31
|
*/
|
|
31
|
-
export declare function
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
export declare function requireSealedBody(env: Pick<EncryptedEnvelope, '_iv' | '_data'>, where: string): {
|
|
33
|
+
iv: string;
|
|
34
|
+
data: string;
|
|
35
|
+
};
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
+
* {@link requireSealedBody} shaped for the `decrypt(iv, data, …)` argument
|
|
38
|
+
* list, so a narrowing can be spliced into an existing call without
|
|
39
|
+
* restructuring the statement around it:
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* await decrypt(...sealedBodyArgs(env, 'rekeyRecord'), dek, aad)
|
|
43
|
+
* ```
|
|
37
44
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* - `opts.perRecordKey === true` → mints a fresh per-record CEK, encrypts
|
|
42
|
-
* the body under it, and AES-KW-wraps the CEK under `key` (mirrors
|
|
43
|
-
* `encryptJsonString`'s `cek !== undefined` branch, except the CEK is
|
|
44
|
-
* generated here rather than supplied by the caller).
|
|
45
|
-
* - otherwise → legacy path, body encrypted directly under `key`.
|
|
45
|
+
* The tuple return type is load-bearing — it is what lets the spread satisfy
|
|
46
|
+
* two fixed positional parameters. Widening it to `string[]` would compile
|
|
47
|
+
* here and fail at every call site.
|
|
46
48
|
*/
|
|
47
|
-
export declare function
|
|
48
|
-
encrypted?: boolean;
|
|
49
|
-
perRecordKey?: boolean;
|
|
50
|
-
}): Promise<Pick<EncryptedEnvelope, '_iv' | '_data' | '_cek'>>;
|
|
49
|
+
export declare function sealedBodyArgs(env: Pick<EncryptedEnvelope, '_iv' | '_data'>, where: string): [string, string];
|
|
51
50
|
/**
|
|
52
51
|
* Approximate protected-body payload size for KPI/telemetry (#807's
|
|
53
52
|
* period-scoped pull download counters): `_data` + `_iv` string length —
|
|
@@ -79,7 +78,7 @@ export declare function hasPerRecordKey(env: EncryptedEnvelope): boolean;
|
|
|
79
78
|
*
|
|
80
79
|
* Deliberately reimplements the two-key-object canonicalization inline
|
|
81
80
|
* rather than importing `with-commit/history/ledger/entry.ts`'s general
|
|
82
|
-
* `canonicalJson` — `
|
|
81
|
+
* `canonicalJson` — `capsule/enclave-aes/**` may import only spine types (C3),
|
|
83
82
|
* never a `with-*` service. For this fixed `{ _data: string; _sealed:
|
|
84
83
|
* Record<string, string> }` shape the two produce byte-identical output
|
|
85
84
|
* (verified against that exact call site's oracle expression in
|
|
@@ -99,21 +98,18 @@ export declare function envelopeBodyForHash(env: EncryptedEnvelope): string;
|
|
|
99
98
|
*/
|
|
100
99
|
export declare function hasSealedBody(env: Pick<EncryptedEnvelope, '_iv'>): boolean;
|
|
101
100
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* `enclave-body-only` reserves to this folder. An earlier draft did that test
|
|
107
|
-
* in `kernel/noydb.ts` and the guard refused it — correctly, since a caller
|
|
108
|
-
* outside the enclave inspecting protected fields is how envelope knowledge
|
|
109
|
-
* leaks back out.
|
|
110
|
-
*
|
|
111
|
-
* Returns a boolean rather than throwing: `applyRemote` must be able to reject
|
|
112
|
-
* one poisoned record without halting an entire sync, and a hostile store
|
|
113
|
-
* would very much like the opposite.
|
|
114
|
-
*
|
|
115
|
-
* **A record with no sealed body is vacuously authentic** — a tombstone carries
|
|
116
|
-
* none, and a plaintext collection has no AEAD to verify. Those are pass-through
|
|
117
|
-
* by construction, not by omission.
|
|
101
|
+
* The cipher-dependent half: the three doors that actually reach the capsule's
|
|
102
|
+
* `encrypt`/`decrypt`. Everything above this line is cipher-FREE — it inspects
|
|
103
|
+
* envelope fields or derives hash input, so it stays a plain module export that
|
|
104
|
+
* both capsules share with nothing to bind.
|
|
118
105
|
*/
|
|
119
|
-
export declare function
|
|
106
|
+
export declare function makeEnvelopeBody(p: CapsulePrimitives): {
|
|
107
|
+
openEnvelopeJson: (ref: RecordRef, env: EncryptedEnvelope, key: CapsuleKey, opts?: {
|
|
108
|
+
encrypted?: boolean;
|
|
109
|
+
}) => Promise<string>;
|
|
110
|
+
writeEnvelopeBody: (identity: RecordIdentity, json: string, key: CapsuleKey, opts?: {
|
|
111
|
+
encrypted?: boolean;
|
|
112
|
+
perRecordKey?: boolean;
|
|
113
|
+
}) => Promise<Pick<EncryptedEnvelope, "_iv" | "_data" | "_cek">>;
|
|
114
|
+
verifyRecordIdentity: (ref: RecordRef, env: EncryptedEnvelope, key: CapsuleKey) => Promise<boolean>;
|
|
115
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `makeCapsule()` — hub's envelope plumbing, bound to one capsule's cipher.
|
|
3
|
+
*
|
|
4
|
+
* ⭐ WHY THIS EXISTS. `enclave-aes` is ~4,200 lines, but only ~1,200 touch
|
|
5
|
+
* `crypto.subtle`. The other ~3,000 — envelope assembly, record-identity AAD,
|
|
6
|
+
* tombstones, the record codec, sealed slots, rekeying — encode HUB'S ENVELOPE
|
|
7
|
+
* FORMAT, not anyone's cipher, so they are identical for every capsule. This
|
|
8
|
+
* module is the single copy; a capsule supplies {@link CapsulePrimitives} and
|
|
9
|
+
* gets the whole surface back.
|
|
10
|
+
*
|
|
11
|
+
* The alternative was copying the plumbing into each capsule. Rejected because
|
|
12
|
+
* nothing would fail when the copies drifted: a change to the tombstone shape
|
|
13
|
+
* or the AAD would have to be made twice, and the miss surfaces as an envelope
|
|
14
|
+
* one capsule writes and the other cannot read — at runtime, in a consumer.
|
|
15
|
+
*
|
|
16
|
+
* ⚠️ BINDING IS PER-CALL, NOT PER-PROCESS, and that is load-bearing. An
|
|
17
|
+
* earlier sketch bound primitives once into module state (`setPrimitives(p)`),
|
|
18
|
+
* which is simpler and wrong: the conformance kit runs two capsules in the
|
|
19
|
+
* same process, so a single global would make the second one silently inherit
|
|
20
|
+
* the first one's cipher — and both suites would still pass.
|
|
21
|
+
*
|
|
22
|
+
* Cipher-FREE helpers are NOT in here. They are plain exports of their own
|
|
23
|
+
* modules (`buildRecordAad`, `isTombstone`, `hasSealedBody`, …) because they
|
|
24
|
+
* inspect envelope fields and need nothing bound. Re-exported below so the
|
|
25
|
+
* capsule surface stays one import for consumers.
|
|
26
|
+
*/
|
|
27
|
+
import type { CapsulePrimitives } from '../contract.js';
|
|
28
|
+
export { buildRecordAad, recordAadFor, type RecordIdentity, type RecordRef, } from './record-aad.js';
|
|
29
|
+
export { buildRecordEnvelope } from './record-envelope.js';
|
|
30
|
+
export { isTombstone, isTombstoneShape, buildTombstone, isDeleteMarker, buildDeleteMarker, } from './tombstone.js';
|
|
31
|
+
export { normalizeForVerify } from './normalize.js';
|
|
32
|
+
export { parseSealedSlot } from './sealed-slot.js';
|
|
33
|
+
export { requireSealedBody, sealedBodyArgs, envelopeBodySize, hasPerRecordKey, envelopeBodyForHash, hasSealedBody, } from './envelope-body.js';
|
|
34
|
+
/**
|
|
35
|
+
* Bind the plumbing to a capsule's primitives.
|
|
36
|
+
*
|
|
37
|
+
* Composition order is a real dependency order, not a style choice:
|
|
38
|
+
* `sealedSlot` feeds both `sealedSlots` and `sealing`; `sealedSlots` feeds the
|
|
39
|
+
* codec. Everything else depends only on `p`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function makeCapsule(p: CapsulePrimitives): {
|
|
42
|
+
findByDet: <T>(ctx: import("./deterministic.js").DeterministicContext<T>, field: string, value: unknown) => Promise<T | null>;
|
|
43
|
+
queryByDet: <T>(ctx: import("./deterministic.js").DeterministicContext<T>, field: string, value: unknown) => Promise<T[]>;
|
|
44
|
+
SEALED_CEK_NS: string;
|
|
45
|
+
sealRecordToHost: (ctx: import("./sealing.js").SealingContext, collection: string, id: string, hostSealer: import("../../index.js").RecipientSealer, opts: {
|
|
46
|
+
expiresAt: string;
|
|
47
|
+
}) => Promise<{
|
|
48
|
+
pid: string;
|
|
49
|
+
envelopeKey: string;
|
|
50
|
+
}>;
|
|
51
|
+
revokeSealedRecord: (ctx: import("./sealing.js").SealingContext, collection: string, id: string, pid: string, opts?: {
|
|
52
|
+
hard?: boolean;
|
|
53
|
+
}) => Promise<void>;
|
|
54
|
+
rotateRecordCek: (ctx: import("./sealing.js").SealingContext, collection: string, id: string) => Promise<void>;
|
|
55
|
+
rekeyBlobSet: (adapter: import("../../index.js").NoydbStore, vault: string, oldDek: import("../contract.js").CapsuleKey, newDek: import("../contract.js").CapsuleKey, otherDeks?: readonly import("../contract.js").CapsuleKey[]) => Promise<import("./rekey-blob.js").BlobRekeyReport>;
|
|
56
|
+
rekeyEnvelopeToDek: (ref: {
|
|
57
|
+
readonly collection: string;
|
|
58
|
+
readonly id: string;
|
|
59
|
+
}, envelope: import("../../index.js").EncryptedEnvelope, oldDek: import("../contract.js").CapsuleKey, newDek: import("../contract.js").CapsuleKey) => Promise<import("../../index.js").EncryptedEnvelope>;
|
|
60
|
+
rekeyEnvelopeIfNeeded: (ref: {
|
|
61
|
+
readonly collection: string;
|
|
62
|
+
readonly id: string;
|
|
63
|
+
}, envelope: import("../../index.js").EncryptedEnvelope, oldDek: import("../contract.js").CapsuleKey, newDek: import("../contract.js").CapsuleKey) => Promise<import("../../index.js").EncryptedEnvelope | null>;
|
|
64
|
+
envelopeOpensUnderAny: (ref: {
|
|
65
|
+
readonly collection: string;
|
|
66
|
+
readonly id: string;
|
|
67
|
+
}, envelope: import("../../index.js").EncryptedEnvelope, keys: readonly import("../contract.js").CapsuleKey[]) => Promise<boolean>;
|
|
68
|
+
resolveStableCek: (deps: import("./lifecycle.js").StableCekDeps, id: string) => Promise<import("../contract.js").CapsuleKey>;
|
|
69
|
+
rewrapBodyToDek: (from: import("./record-aad.js").RecordIdentity, to: import("./record-aad.js").RecordIdentity, envelope: Pick<import("../../index.js").EncryptedEnvelope, "_iv" | "_data" | "_cek" | "_tier" | "_by">, fromDek: import("../contract.js").CapsuleKey, toDek: import("../contract.js").CapsuleKey) => Promise<import("./lifecycle.js").RewrappedBody>;
|
|
70
|
+
applyRewrappedBody: (envelope: import("../../index.js").EncryptedEnvelope, body: import("./lifecycle.js").RewrappedBody) => import("../../index.js").EncryptedEnvelope;
|
|
71
|
+
rewrapEnvelope: (identity: import("./record-aad.js").RecordIdentity, envelope: import("../../index.js").EncryptedEnvelope, fromDek: import("../contract.js").CapsuleKey, toDek: import("../contract.js").CapsuleKey) => Promise<import("../../index.js").EncryptedEnvelope>;
|
|
72
|
+
isRewrappedUnder: (identity: import("./record-aad.js").RecordIdentity, envelope: Pick<import("../../index.js").EncryptedEnvelope, "_iv" | "_data" | "_cek">, dek: import("../contract.js").CapsuleKey) => Promise<boolean>;
|
|
73
|
+
RecordCodec: import("./record-codec.js").BoundRecordCodec;
|
|
74
|
+
sealFields: (record: Record<string, unknown>, sensitiveFields: ReadonlySet<string>, keyMaterial: import("./sealed-slots.js").SealKeyMaterial) => Promise<import("./sealed-slots.js").SealFieldsResult>;
|
|
75
|
+
unsealOneField: (field: string, blob: string, keyMaterial: import("./sealed-slots.js").SealKeyMaterial) => Promise<unknown>;
|
|
76
|
+
makeHandleProducer: (keyMaterial: import("./sealed-slots.js").SealKeyMaterial) => (field: string, blob: string) => import("../../index.js").SealedHandle<unknown>;
|
|
77
|
+
unsealFields: (record: Record<string, unknown>, sealed: Record<string, string>, keyMaterial: import("./sealed-slots.js").SealKeyMaterial, opts?: {
|
|
78
|
+
asHandles?: boolean;
|
|
79
|
+
}) => Promise<Record<string, unknown>>;
|
|
80
|
+
makeSealedSlotCapability: (ctx: import("./sealed-slots.js").SealedSlotCapabilityCtx, recordId: string, cek?: import("../contract.js").CapsuleKey) => import("../../kernel/via/index.js").ViaCryptoCtx["sealedSlots"];
|
|
81
|
+
makeReservedEnvelopes: (dekResolver: import("./sealed-slots.js").ReservedEnvelopeDekResolver, declaredPrefixes: readonly string[]) => import("../../kernel/via/index.js").ViaCryptoCtx["reservedEnvelopes"];
|
|
82
|
+
dualReadSealedSlot: (blob: string, field: string, collection: string, cek: CryptoKey | undefined, dek: CryptoKey) => Promise<string>;
|
|
83
|
+
openEnvelopeJson: (ref: import("./record-aad.js").RecordRef, env: import("../../index.js").EncryptedEnvelope, key: import("../contract.js").CapsuleKey, opts?: {
|
|
84
|
+
encrypted?: boolean;
|
|
85
|
+
}) => Promise<string>;
|
|
86
|
+
writeEnvelopeBody: (identity: import("./record-aad.js").RecordIdentity, json: string, key: import("../contract.js").CapsuleKey, opts?: {
|
|
87
|
+
encrypted?: boolean;
|
|
88
|
+
perRecordKey?: boolean;
|
|
89
|
+
}) => Promise<Pick<import("../../index.js").EncryptedEnvelope, "_iv" | "_data" | "_cek">>;
|
|
90
|
+
verifyRecordIdentity: (ref: import("./record-aad.js").RecordRef, env: import("../../index.js").EncryptedEnvelope, key: import("../contract.js").CapsuleKey) => Promise<boolean>;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* `RecordCodec` as a TYPE is the module-level generic base class; as a VALUE
|
|
94
|
+
* it is the capsule-bound subclass `makeCapsule()` returns. Hub parameterises
|
|
95
|
+
* the type in six places, and an `InstanceType<…>` alias would have dropped
|
|
96
|
+
* `T` at every one of them without an error — see the note in
|
|
97
|
+
* `record-codec.ts`.
|
|
98
|
+
*/
|
|
99
|
+
export type { RecordCodecBase as RecordCodec } from './record-codec.js';
|
|
100
|
+
export type Capsule = ReturnType<typeof makeCapsule>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-record CEK lifecycle helpers for the WRITE path.
|
|
3
|
+
*
|
|
4
|
+
* These are the collection-coupled CEK operations, lifted off `Collection`
|
|
5
|
+
* behind narrow deps so the kernel file delegates instead of carrying the
|
|
6
|
+
* crypto inline:
|
|
7
|
+
*
|
|
8
|
+
* - {@link resolveStableCek} — the stable-CEK rule: an update or history
|
|
9
|
+
* snapshot reuses the record's existing CEK so a single CEK delete kills
|
|
10
|
+
* the whole version chain; a genuine insert (or legacy record being
|
|
11
|
+
* migrated) mints a fresh one.
|
|
12
|
+
* - {@link rewrapBodyToDek} — move a record body's wrapping from one DEK to
|
|
13
|
+
* another (tier elevate/demote, bundle re-key) WITHOUT changing the body
|
|
14
|
+
* key: unwrap the CEK under the source DEK, re-encrypt the body under the
|
|
15
|
+
* same CEK, re-wrap the CEK under the destination DEK. History-chain
|
|
16
|
+
* identity is preserved because the body key never changes.
|
|
17
|
+
*
|
|
18
|
+
* Both are pure functions over their deps — the `cekCache` ownership stays on
|
|
19
|
+
* the collection (its lifetime is tied to `load()`), so callers cache the
|
|
20
|
+
* returned key themselves.
|
|
21
|
+
*/
|
|
22
|
+
import type { EncryptedEnvelope } from '../../kernel/types.js';
|
|
23
|
+
import { type RecordIdentity } from './record-aad.js';
|
|
24
|
+
import type { Lru } from '../../kernel/cache/index.js';
|
|
25
|
+
/** Dependencies {@link resolveStableCek} needs from its collection. */
|
|
26
|
+
import type { CapsuleKey, CapsulePrimitives } from '../contract.js';
|
|
27
|
+
export interface StableCekDeps {
|
|
28
|
+
/** The collection's per-record CEK cache (`null` → no caching). */
|
|
29
|
+
readonly cache: Lru<string, CapsuleKey> | null;
|
|
30
|
+
/** Read the record's live envelope (to recover an existing `_cek`). */
|
|
31
|
+
getLive(id: string): Promise<EncryptedEnvelope | null>;
|
|
32
|
+
/** The DEK the CEK is wrapped under (the collection DEK on the normal path). */
|
|
33
|
+
getDEK(): Promise<CapsuleKey>;
|
|
34
|
+
}
|
|
35
|
+
/** Re-wrapped body bytes + the (optional) CEK to cache. */
|
|
36
|
+
export interface RewrappedBody {
|
|
37
|
+
readonly _iv: string;
|
|
38
|
+
readonly _data: string;
|
|
39
|
+
/** Present iff the source envelope carried a CEK (per-record-key record). */
|
|
40
|
+
readonly _cek?: string;
|
|
41
|
+
/** The body key when one exists, so the caller can cache it; `null` for a legacy record. */
|
|
42
|
+
readonly cek: CapsuleKey | null;
|
|
43
|
+
}
|
|
44
|
+
export declare function makeLifecycle(p: CapsulePrimitives): {
|
|
45
|
+
resolveStableCek: (deps: StableCekDeps, id: string) => Promise<CapsuleKey>;
|
|
46
|
+
rewrapBodyToDek: (from: RecordIdentity, to: RecordIdentity, envelope: Pick<EncryptedEnvelope, "_iv" | "_data" | "_cek" | "_tier" | "_by">, fromDek: CapsuleKey, toDek: CapsuleKey) => Promise<RewrappedBody>;
|
|
47
|
+
applyRewrappedBody: (envelope: EncryptedEnvelope, body: RewrappedBody) => EncryptedEnvelope;
|
|
48
|
+
rewrapEnvelope: (identity: RecordIdentity, envelope: EncryptedEnvelope, fromDek: CapsuleKey, toDek: CapsuleKey) => Promise<EncryptedEnvelope>;
|
|
49
|
+
isRewrappedUnder: (identity: RecordIdentity, envelope: Pick<EncryptedEnvelope, "_iv" | "_data" | "_cek">, dek: CapsuleKey) => Promise<boolean>;
|
|
50
|
+
};
|