@noy-db/hub 0.6.0-pre.18 → 0.6.0-pre.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-Z5VHH24A.js +20 -0
- package/dist/attestation/index.js +16 -16
- package/dist/{backup-OLBRFYY7.js → backup-K62BFMYK.js} +10 -10
- package/dist/blobs/index.js +11 -11
- package/dist/broker/index.js +10 -10
- package/dist/cargo/index.js +26 -26
- package/dist/{chunk-5SK5AFYH.js → chunk-2E2MKBMI.js} +2 -2
- package/dist/{chunk-TNOQNU3R.js → chunk-2IK6AC6A.js} +5 -5
- package/dist/{chunk-FOABWV7L.js → chunk-32O2N2CH.js} +5 -5
- package/dist/{chunk-FRGF56PD.js → chunk-37P5VB4N.js} +5 -5
- package/dist/{chunk-LPAGIMXJ.js → chunk-437FDIHO.js} +3 -3
- package/dist/{chunk-7WD2G6K4.js → chunk-47ZFULEZ.js} +2 -2
- package/dist/{chunk-7EH322GJ.js → chunk-4HVTRHSA.js} +5 -5
- package/dist/{chunk-OZD3D2DZ.js → chunk-5BS6IQZZ.js} +4 -4
- package/dist/{chunk-QWNYUTI2.js → chunk-5EJQNA26.js} +2 -2
- package/dist/{chunk-C66T4W5P.js → chunk-5J5TTSGW.js} +3 -3
- package/dist/{chunk-DFFSCYIW.js → chunk-5JT4Y5UE.js} +10 -10
- package/dist/{chunk-NAAPSNCS.js → chunk-6S466CMQ.js} +6 -6
- package/dist/{chunk-PBPYQZDW.js → chunk-7RCZ436O.js} +2 -2
- package/dist/{chunk-42IDLU5V.js → chunk-A3NTKHDB.js} +2 -2
- package/dist/{chunk-LU6NPJWN.js → chunk-A4K5GLE6.js} +4 -4
- package/dist/{chunk-K2MR7ROB.js → chunk-APV42WPR.js} +2 -2
- package/dist/{chunk-MVG67SMN.js → chunk-AQF7JSQR.js} +2 -2
- package/dist/{chunk-VTTRWLOR.js → chunk-BP4I7IBK.js} +2 -2
- package/dist/{chunk-T7AEAFEE.js → chunk-BTNKPDZM.js} +3 -3
- package/dist/{chunk-PCXAUC65.js → chunk-C7WJNVJG.js} +2 -2
- package/dist/{chunk-AMMYIT7F.js → chunk-CV7WXCZD.js} +8 -8
- package/dist/{chunk-6D3CN2JR.js → chunk-CVYXIN5B.js} +3 -3
- package/dist/{chunk-X3AXSYBL.js → chunk-D5UDZANO.js} +6 -6
- package/dist/{chunk-HVR74IBG.js → chunk-DJ23QZIN.js} +2 -2
- package/dist/{chunk-O4QDBAB6.js → chunk-DYASJSKI.js} +2 -2
- package/dist/{chunk-EZ3UHHND.js → chunk-E6VDPBE3.js} +4 -4
- package/dist/{chunk-ZSOTZ2RZ.js → chunk-E6WANBD6.js} +5 -5
- package/dist/{chunk-OCCNYGKG.js → chunk-EG6AQBYW.js} +8 -8
- package/dist/{chunk-3KXIGMZ4.js → chunk-EJIVFOOQ.js} +6 -6
- package/dist/{chunk-YGJZLOSR.js → chunk-GDGTIWB4.js} +2 -2
- package/dist/{chunk-TQ7IRULX.js → chunk-GILI76SU.js} +2 -2
- package/dist/{chunk-4444HN72.js → chunk-GT72D4FO.js} +3 -3
- package/dist/{chunk-CFTPERGL.js → chunk-GYUCRDAU.js} +3 -3
- package/dist/{chunk-GSRW5MTU.js → chunk-HGAR7H5M.js} +74 -74
- package/dist/{chunk-SGEI3IJK.js → chunk-HGJC7I5F.js} +2 -2
- package/dist/{chunk-V4M4BZNW.js → chunk-HTHRCGWP.js} +2 -2
- package/dist/{chunk-DL4GDOWL.js → chunk-HTMQBBF3.js} +3 -3
- package/dist/{chunk-VXVKEWYC.js → chunk-HUYNPLTT.js} +4 -4
- package/dist/{chunk-UE72AQDZ.js → chunk-I26TE27S.js} +6 -6
- package/dist/{chunk-NFPSC2HL.js → chunk-ICCRAPWD.js} +4 -4
- package/dist/{chunk-RAYGDC4A.js → chunk-IOURTXTM.js} +6 -6
- package/dist/{chunk-EWAGI3EM.js → chunk-IPDS2TYW.js} +3 -3
- package/dist/{chunk-ITXPKEDP.js → chunk-JHO6FGZX.js} +4 -4
- package/dist/{chunk-YDJXGYYA.js → chunk-JIF3IBRK.js} +2 -2
- package/dist/{chunk-S6CP5FWF.js → chunk-KBOPY6W2.js} +2 -2
- package/dist/{chunk-SQSZRCYT.js → chunk-KDX6VEYV.js} +2 -2
- package/dist/{chunk-H545OIWE.js → chunk-KM6YR5XF.js} +2 -2
- package/dist/{chunk-AFSMT3WI.js → chunk-KUXTWVAR.js} +3 -3
- package/dist/{chunk-2NE7ILO7.js → chunk-L2XQ776M.js} +2 -2
- package/dist/{chunk-QI2KXQOM.js → chunk-L6FSZFG7.js} +2 -2
- package/dist/{chunk-BVIGGV6D.js → chunk-LAFP5H5U.js} +6 -6
- package/dist/{chunk-ZDATYUYG.js → chunk-LBDTQM3R.js} +3 -3
- package/dist/{chunk-2ION5ZRH.js → chunk-M4IKEOJS.js} +5 -5
- package/dist/{chunk-5NKSNW25.js → chunk-MNMYHZVU.js} +2 -2
- package/dist/{chunk-FDIZHZ3C.js → chunk-MNUTPZRQ.js} +5 -5
- package/dist/{chunk-DWO55ZWE.js → chunk-MQXYR65M.js} +5 -5
- package/dist/{chunk-6QCXMCLZ.js → chunk-N2HKBESK.js} +3 -3
- package/dist/{chunk-HNOBRU24.js → chunk-N7YAQKAO.js} +2 -2
- package/dist/{chunk-6U7M7AX6.js → chunk-NH2MST6J.js} +2 -2
- package/dist/{chunk-A5QQKWCK.js → chunk-NYSD43OE.js} +3 -3
- package/dist/{chunk-Q67P7S2I.js → chunk-ODVIFBAQ.js} +5 -5
- package/dist/{chunk-AIZNLHKN.js → chunk-OIIAXFKM.js} +3 -3
- package/dist/{chunk-FSZPQCDR.js → chunk-OQLYMBJI.js} +3 -3
- package/dist/{chunk-JYFJNSTW.js → chunk-OWGEHDT2.js} +5 -5
- package/dist/{chunk-I64WQSN3.js → chunk-P7L3OQLL.js} +19 -2
- package/dist/chunk-P7L3OQLL.js.map +1 -0
- package/dist/{chunk-6AL6O4CS.js → chunk-PG6PFMDC.js} +2 -2
- package/dist/{chunk-AA2WWTS3.js → chunk-PZSS7MUM.js} +4 -4
- package/dist/{chunk-AA7LM2A3.js → chunk-QPIUFRUC.js} +2 -2
- package/dist/{chunk-RJTGXZT6.js → chunk-REL4OLWW.js} +2 -2
- package/dist/{chunk-FY33DKPH.js → chunk-RNSC2ARR.js} +3 -3
- package/dist/{chunk-RWPNRCK2.js → chunk-RORE2GX2.js} +2 -2
- package/dist/{chunk-YH65A6WM.js → chunk-RSFG7XHM.js} +2 -2
- package/dist/{chunk-QLMUW7OC.js → chunk-S55DBWRC.js} +2 -2
- package/dist/{chunk-CGQUSSW7.js → chunk-SA77BQ7F.js} +5 -5
- package/dist/{chunk-RBTZLXZJ.js → chunk-SFD2LL7G.js} +2 -2
- package/dist/{chunk-ER3BQCCE.js → chunk-SG3OQCRG.js} +3 -3
- package/dist/{chunk-TXDOMADN.js → chunk-TC6MBEGH.js} +4 -4
- package/dist/{chunk-KLVGF2D4.js → chunk-TENLCGYD.js} +3 -3
- package/dist/{chunk-3RZ7QLJ4.js → chunk-VH2W6BOG.js} +6 -6
- package/dist/{chunk-PBRIHUQ5.js → chunk-VHVMJWM6.js} +5 -5
- package/dist/{chunk-QTDAPDDV.js → chunk-VJ4B3ZXY.js} +15 -3
- package/dist/chunk-VJ4B3ZXY.js.map +1 -0
- package/dist/{chunk-RDPZMUCX.js → chunk-W6NFONOV.js} +2 -2
- package/dist/{chunk-Z3U2YVNM.js → chunk-WBNXZU42.js} +4 -4
- package/dist/{chunk-7EIPPOEL.js → chunk-WKD5ESK4.js} +2 -2
- package/dist/{chunk-U6D5XTI5.js → chunk-YEZW6UJA.js} +10 -10
- package/dist/{chunk-UIYZ5SOU.js → chunk-YOT7D63X.js} +2 -2
- package/dist/{chunk-IN5EZWYQ.js → chunk-YVTADFTC.js} +3 -3
- package/dist/{chunk-3ODOWQMV.js → chunk-ZBDWKPBW.js} +4 -4
- package/dist/{chunk-BBU3OD3D.js → chunk-ZPMXYPBR.js} +2 -2
- package/dist/{chunk-TQLYMYOK.js → chunk-ZWKF3CD3.js} +2 -2
- package/dist/classified/index.js +4 -4
- package/dist/{classified-marker-GWQTNDSL.js → classified-marker-PMDG3O36.js} +3 -3
- package/dist/{collection-facade-56RTPO4G.js → collection-facade-ZJK5EB33.js} +15 -15
- package/dist/{computed-5E2OM6EN.js → computed-UHCBRILW.js} +3 -3
- package/dist/consent/index.js +7 -7
- package/dist/cover/index.js +7 -7
- package/dist/custody/index.js +9 -9
- package/dist/{dead-filter-XP7MPHCJ.js → dead-filter-777VWDER.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-Q3HEAVLA.js → delegation-4R5DU23X.js} +9 -9
- package/dist/derivations/index.js +10 -10
- package/dist/{derive-SVDY36ER.js → derive-3WAS2G5T.js} +8 -8
- package/dist/directory/index.js +8 -8
- package/dist/{dispatch-RVJQ4BOL.js → dispatch-3EN6YCCS.js} +16 -16
- package/dist/{dispatch-MG5KNMWG.js → dispatch-ASL257KG.js} +5 -5
- package/dist/{enclave-AOZTWFZK.js → enclave-ZJS5R5RH.js} +7 -7
- package/dist/executor-GPM6DNWV.js +9 -0
- package/dist/executor-LJSMZ4IB.js +9 -0
- package/dist/executor-SHUVRZUJ.js +29 -0
- package/dist/export-accessible-GNY6DC6U.js +23 -0
- package/dist/extract-partition-BG3AF4NZ.js +38 -0
- package/dist/{fanout-sidecar-NZA6J7QB.js → fanout-sidecar-TFPWDOME.js} +7 -7
- package/dist/find-KX6OKHDP.js +11 -0
- package/dist/forget/index.js +7 -7
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +11 -11
- package/dist/i18n/index.js +12 -12
- package/dist/index.js +86 -86
- package/dist/indexing/index.js +2 -2
- package/dist/introspection/index.js +9 -9
- package/dist/issue-PAUM7NCX.js +19 -0
- package/dist/kernel/errors.d.ts +17 -1
- package/dist/{ledger-KQAJPEMZ.js → ledger-62CEPRPX.js} +9 -9
- package/dist/liberate-7QY7TULB.js +24 -0
- package/dist/{link-set-XKN5V7VM.js → link-set-ZRYNUHN3.js} +9 -9
- package/dist/{managed-secret-7WIIVMJ5.js → managed-secret-T2WB4O47.js} +7 -7
- package/dist/materialized-views/index.js +18 -18
- package/dist/money/index.js +4 -4
- package/dist/noydb-VZIVPDXG.js +84 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +10 -10
- package/dist/pod/index.js +50 -50
- package/dist/{pod-handle-SKDKRPOR.js → pod-handle-UPLXOGIK.js} +7 -7
- package/dist/policy/index.js +7 -7
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-CVS7CCJE.js → post-register-J4DEVNXK.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/{register-GJ6PW4KP.js → register-UPD4GKBC.js} +13 -13
- package/dist/registry-7KX2HWFS.js +18 -0
- package/dist/registry-PKYYEHEW.js +9 -0
- package/dist/registry-XHCYMD34.js +19 -0
- package/dist/registry-XIRTZHPC.js +9 -0
- package/dist/{request-withdrawal-LICOUGXG.js → request-withdrawal-XZSESWZV.js} +12 -12
- package/dist/{reveal-PWM47FQN.js → reveal-525XWQU2.js} +4 -4
- package/dist/{revoke-AWZKZLZB.js → revoke-QI7YHQ2B.js} +9 -9
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +10 -10
- package/dist/search/index.js +4 -4
- package/dist/{seed-LNTLU2A3.js → seed-2KZDTFS4.js} +9 -9
- package/dist/sequence/index.js +7 -7
- package/dist/session/index.js +7 -7
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-JE6NEURY.js → signer-BZWDPGGN.js} +8 -8
- package/dist/snapshots/index.js +8 -8
- package/dist/{stale-ZWTKUVZX.js → stale-PQYPVCER.js} +8 -8
- package/dist/{storage-WCZOCA46.js → storage-MJHKNQRO.js} +8 -8
- package/dist/{store-coordination-provider-7H62VO2C.js → store-coordination-provider-TFHZLKHG.js} +7 -7
- package/dist/sync/index.js +8 -8
- package/dist/team/index.js +12 -12
- package/dist/tiers/index.js +9 -9
- package/dist/to/index.js +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +6 -6
- package/dist/{verify-SHJXGZGM.js → verify-J6DEOXP3.js} +5 -5
- package/dist/walk-BX4NSB5L.js +21 -0
- package/dist/{withdraw-accessible-GHBA4DAA.js → withdraw-accessible-K4CPMH4C.js} +11 -11
- package/package.json +3 -3
- package/dist/api-FRFEJ6WR.js +0 -20
- package/dist/chunk-I64WQSN3.js.map +0 -1
- package/dist/chunk-QTDAPDDV.js.map +0 -1
- package/dist/executor-FRUVM36Q.js +0 -29
- package/dist/executor-PCZN2LTY.js +0 -9
- package/dist/executor-WFTHIDT7.js +0 -9
- package/dist/export-accessible-HDDHZYPM.js +0 -23
- package/dist/extract-partition-TRADP234.js +0 -38
- package/dist/find-VBNMB42N.js +0 -11
- package/dist/issue-GZQDW5TQ.js +0 -19
- package/dist/liberate-Z2EXJY2S.js +0 -24
- package/dist/noydb-NPW3C2EX.js +0 -84
- package/dist/registry-6LUJ5IJW.js +0 -19
- package/dist/registry-E4FM32KD.js +0 -9
- package/dist/registry-HACMULJJ.js +0 -9
- package/dist/registry-KI77RVK7.js +0 -18
- package/dist/walk-HSS3NLQ3.js +0 -21
- /package/dist/{api-FRFEJ6WR.js.map → api-Z5VHH24A.js.map} +0 -0
- /package/dist/{backup-OLBRFYY7.js.map → backup-K62BFMYK.js.map} +0 -0
- /package/dist/{chunk-5SK5AFYH.js.map → chunk-2E2MKBMI.js.map} +0 -0
- /package/dist/{chunk-TNOQNU3R.js.map → chunk-2IK6AC6A.js.map} +0 -0
- /package/dist/{chunk-FOABWV7L.js.map → chunk-32O2N2CH.js.map} +0 -0
- /package/dist/{chunk-FRGF56PD.js.map → chunk-37P5VB4N.js.map} +0 -0
- /package/dist/{chunk-LPAGIMXJ.js.map → chunk-437FDIHO.js.map} +0 -0
- /package/dist/{chunk-7WD2G6K4.js.map → chunk-47ZFULEZ.js.map} +0 -0
- /package/dist/{chunk-7EH322GJ.js.map → chunk-4HVTRHSA.js.map} +0 -0
- /package/dist/{chunk-OZD3D2DZ.js.map → chunk-5BS6IQZZ.js.map} +0 -0
- /package/dist/{chunk-QWNYUTI2.js.map → chunk-5EJQNA26.js.map} +0 -0
- /package/dist/{chunk-C66T4W5P.js.map → chunk-5J5TTSGW.js.map} +0 -0
- /package/dist/{chunk-DFFSCYIW.js.map → chunk-5JT4Y5UE.js.map} +0 -0
- /package/dist/{chunk-NAAPSNCS.js.map → chunk-6S466CMQ.js.map} +0 -0
- /package/dist/{chunk-PBPYQZDW.js.map → chunk-7RCZ436O.js.map} +0 -0
- /package/dist/{chunk-42IDLU5V.js.map → chunk-A3NTKHDB.js.map} +0 -0
- /package/dist/{chunk-LU6NPJWN.js.map → chunk-A4K5GLE6.js.map} +0 -0
- /package/dist/{chunk-K2MR7ROB.js.map → chunk-APV42WPR.js.map} +0 -0
- /package/dist/{chunk-MVG67SMN.js.map → chunk-AQF7JSQR.js.map} +0 -0
- /package/dist/{chunk-VTTRWLOR.js.map → chunk-BP4I7IBK.js.map} +0 -0
- /package/dist/{chunk-T7AEAFEE.js.map → chunk-BTNKPDZM.js.map} +0 -0
- /package/dist/{chunk-PCXAUC65.js.map → chunk-C7WJNVJG.js.map} +0 -0
- /package/dist/{chunk-AMMYIT7F.js.map → chunk-CV7WXCZD.js.map} +0 -0
- /package/dist/{chunk-6D3CN2JR.js.map → chunk-CVYXIN5B.js.map} +0 -0
- /package/dist/{chunk-X3AXSYBL.js.map → chunk-D5UDZANO.js.map} +0 -0
- /package/dist/{chunk-HVR74IBG.js.map → chunk-DJ23QZIN.js.map} +0 -0
- /package/dist/{chunk-O4QDBAB6.js.map → chunk-DYASJSKI.js.map} +0 -0
- /package/dist/{chunk-EZ3UHHND.js.map → chunk-E6VDPBE3.js.map} +0 -0
- /package/dist/{chunk-ZSOTZ2RZ.js.map → chunk-E6WANBD6.js.map} +0 -0
- /package/dist/{chunk-OCCNYGKG.js.map → chunk-EG6AQBYW.js.map} +0 -0
- /package/dist/{chunk-3KXIGMZ4.js.map → chunk-EJIVFOOQ.js.map} +0 -0
- /package/dist/{chunk-YGJZLOSR.js.map → chunk-GDGTIWB4.js.map} +0 -0
- /package/dist/{chunk-TQ7IRULX.js.map → chunk-GILI76SU.js.map} +0 -0
- /package/dist/{chunk-4444HN72.js.map → chunk-GT72D4FO.js.map} +0 -0
- /package/dist/{chunk-CFTPERGL.js.map → chunk-GYUCRDAU.js.map} +0 -0
- /package/dist/{chunk-GSRW5MTU.js.map → chunk-HGAR7H5M.js.map} +0 -0
- /package/dist/{chunk-SGEI3IJK.js.map → chunk-HGJC7I5F.js.map} +0 -0
- /package/dist/{chunk-V4M4BZNW.js.map → chunk-HTHRCGWP.js.map} +0 -0
- /package/dist/{chunk-DL4GDOWL.js.map → chunk-HTMQBBF3.js.map} +0 -0
- /package/dist/{chunk-VXVKEWYC.js.map → chunk-HUYNPLTT.js.map} +0 -0
- /package/dist/{chunk-UE72AQDZ.js.map → chunk-I26TE27S.js.map} +0 -0
- /package/dist/{chunk-NFPSC2HL.js.map → chunk-ICCRAPWD.js.map} +0 -0
- /package/dist/{chunk-RAYGDC4A.js.map → chunk-IOURTXTM.js.map} +0 -0
- /package/dist/{chunk-EWAGI3EM.js.map → chunk-IPDS2TYW.js.map} +0 -0
- /package/dist/{chunk-ITXPKEDP.js.map → chunk-JHO6FGZX.js.map} +0 -0
- /package/dist/{chunk-YDJXGYYA.js.map → chunk-JIF3IBRK.js.map} +0 -0
- /package/dist/{chunk-S6CP5FWF.js.map → chunk-KBOPY6W2.js.map} +0 -0
- /package/dist/{chunk-SQSZRCYT.js.map → chunk-KDX6VEYV.js.map} +0 -0
- /package/dist/{chunk-H545OIWE.js.map → chunk-KM6YR5XF.js.map} +0 -0
- /package/dist/{chunk-AFSMT3WI.js.map → chunk-KUXTWVAR.js.map} +0 -0
- /package/dist/{chunk-2NE7ILO7.js.map → chunk-L2XQ776M.js.map} +0 -0
- /package/dist/{chunk-QI2KXQOM.js.map → chunk-L6FSZFG7.js.map} +0 -0
- /package/dist/{chunk-BVIGGV6D.js.map → chunk-LAFP5H5U.js.map} +0 -0
- /package/dist/{chunk-ZDATYUYG.js.map → chunk-LBDTQM3R.js.map} +0 -0
- /package/dist/{chunk-2ION5ZRH.js.map → chunk-M4IKEOJS.js.map} +0 -0
- /package/dist/{chunk-5NKSNW25.js.map → chunk-MNMYHZVU.js.map} +0 -0
- /package/dist/{chunk-FDIZHZ3C.js.map → chunk-MNUTPZRQ.js.map} +0 -0
- /package/dist/{chunk-DWO55ZWE.js.map → chunk-MQXYR65M.js.map} +0 -0
- /package/dist/{chunk-6QCXMCLZ.js.map → chunk-N2HKBESK.js.map} +0 -0
- /package/dist/{chunk-HNOBRU24.js.map → chunk-N7YAQKAO.js.map} +0 -0
- /package/dist/{chunk-6U7M7AX6.js.map → chunk-NH2MST6J.js.map} +0 -0
- /package/dist/{chunk-A5QQKWCK.js.map → chunk-NYSD43OE.js.map} +0 -0
- /package/dist/{chunk-Q67P7S2I.js.map → chunk-ODVIFBAQ.js.map} +0 -0
- /package/dist/{chunk-AIZNLHKN.js.map → chunk-OIIAXFKM.js.map} +0 -0
- /package/dist/{chunk-FSZPQCDR.js.map → chunk-OQLYMBJI.js.map} +0 -0
- /package/dist/{chunk-JYFJNSTW.js.map → chunk-OWGEHDT2.js.map} +0 -0
- /package/dist/{chunk-6AL6O4CS.js.map → chunk-PG6PFMDC.js.map} +0 -0
- /package/dist/{chunk-AA2WWTS3.js.map → chunk-PZSS7MUM.js.map} +0 -0
- /package/dist/{chunk-AA7LM2A3.js.map → chunk-QPIUFRUC.js.map} +0 -0
- /package/dist/{chunk-RJTGXZT6.js.map → chunk-REL4OLWW.js.map} +0 -0
- /package/dist/{chunk-FY33DKPH.js.map → chunk-RNSC2ARR.js.map} +0 -0
- /package/dist/{chunk-RWPNRCK2.js.map → chunk-RORE2GX2.js.map} +0 -0
- /package/dist/{chunk-YH65A6WM.js.map → chunk-RSFG7XHM.js.map} +0 -0
- /package/dist/{chunk-QLMUW7OC.js.map → chunk-S55DBWRC.js.map} +0 -0
- /package/dist/{chunk-CGQUSSW7.js.map → chunk-SA77BQ7F.js.map} +0 -0
- /package/dist/{chunk-RBTZLXZJ.js.map → chunk-SFD2LL7G.js.map} +0 -0
- /package/dist/{chunk-ER3BQCCE.js.map → chunk-SG3OQCRG.js.map} +0 -0
- /package/dist/{chunk-TXDOMADN.js.map → chunk-TC6MBEGH.js.map} +0 -0
- /package/dist/{chunk-KLVGF2D4.js.map → chunk-TENLCGYD.js.map} +0 -0
- /package/dist/{chunk-3RZ7QLJ4.js.map → chunk-VH2W6BOG.js.map} +0 -0
- /package/dist/{chunk-PBRIHUQ5.js.map → chunk-VHVMJWM6.js.map} +0 -0
- /package/dist/{chunk-RDPZMUCX.js.map → chunk-W6NFONOV.js.map} +0 -0
- /package/dist/{chunk-Z3U2YVNM.js.map → chunk-WBNXZU42.js.map} +0 -0
- /package/dist/{chunk-7EIPPOEL.js.map → chunk-WKD5ESK4.js.map} +0 -0
- /package/dist/{chunk-U6D5XTI5.js.map → chunk-YEZW6UJA.js.map} +0 -0
- /package/dist/{chunk-UIYZ5SOU.js.map → chunk-YOT7D63X.js.map} +0 -0
- /package/dist/{chunk-IN5EZWYQ.js.map → chunk-YVTADFTC.js.map} +0 -0
- /package/dist/{chunk-3ODOWQMV.js.map → chunk-ZBDWKPBW.js.map} +0 -0
- /package/dist/{chunk-BBU3OD3D.js.map → chunk-ZPMXYPBR.js.map} +0 -0
- /package/dist/{chunk-TQLYMYOK.js.map → chunk-ZWKF3CD3.js.map} +0 -0
- /package/dist/{classified-marker-GWQTNDSL.js.map → classified-marker-PMDG3O36.js.map} +0 -0
- /package/dist/{collection-facade-56RTPO4G.js.map → collection-facade-ZJK5EB33.js.map} +0 -0
- /package/dist/{computed-5E2OM6EN.js.map → computed-UHCBRILW.js.map} +0 -0
- /package/dist/{dead-filter-XP7MPHCJ.js.map → dead-filter-777VWDER.js.map} +0 -0
- /package/dist/{delegation-Q3HEAVLA.js.map → delegation-4R5DU23X.js.map} +0 -0
- /package/dist/{derive-SVDY36ER.js.map → derive-3WAS2G5T.js.map} +0 -0
- /package/dist/{dispatch-RVJQ4BOL.js.map → dispatch-3EN6YCCS.js.map} +0 -0
- /package/dist/{dispatch-MG5KNMWG.js.map → dispatch-ASL257KG.js.map} +0 -0
- /package/dist/{enclave-AOZTWFZK.js.map → enclave-ZJS5R5RH.js.map} +0 -0
- /package/dist/{executor-FRUVM36Q.js.map → executor-GPM6DNWV.js.map} +0 -0
- /package/dist/{executor-PCZN2LTY.js.map → executor-LJSMZ4IB.js.map} +0 -0
- /package/dist/{executor-WFTHIDT7.js.map → executor-SHUVRZUJ.js.map} +0 -0
- /package/dist/{export-accessible-HDDHZYPM.js.map → export-accessible-GNY6DC6U.js.map} +0 -0
- /package/dist/{extract-partition-TRADP234.js.map → extract-partition-BG3AF4NZ.js.map} +0 -0
- /package/dist/{fanout-sidecar-NZA6J7QB.js.map → fanout-sidecar-TFPWDOME.js.map} +0 -0
- /package/dist/{find-VBNMB42N.js.map → find-KX6OKHDP.js.map} +0 -0
- /package/dist/{issue-GZQDW5TQ.js.map → issue-PAUM7NCX.js.map} +0 -0
- /package/dist/{ledger-KQAJPEMZ.js.map → ledger-62CEPRPX.js.map} +0 -0
- /package/dist/{liberate-Z2EXJY2S.js.map → liberate-7QY7TULB.js.map} +0 -0
- /package/dist/{link-set-XKN5V7VM.js.map → link-set-ZRYNUHN3.js.map} +0 -0
- /package/dist/{managed-secret-7WIIVMJ5.js.map → managed-secret-T2WB4O47.js.map} +0 -0
- /package/dist/{noydb-NPW3C2EX.js.map → noydb-VZIVPDXG.js.map} +0 -0
- /package/dist/{pod-handle-SKDKRPOR.js.map → pod-handle-UPLXOGIK.js.map} +0 -0
- /package/dist/{post-register-CVS7CCJE.js.map → post-register-J4DEVNXK.js.map} +0 -0
- /package/dist/{register-GJ6PW4KP.js.map → register-UPD4GKBC.js.map} +0 -0
- /package/dist/{registry-6LUJ5IJW.js.map → registry-7KX2HWFS.js.map} +0 -0
- /package/dist/{registry-E4FM32KD.js.map → registry-PKYYEHEW.js.map} +0 -0
- /package/dist/{registry-HACMULJJ.js.map → registry-XHCYMD34.js.map} +0 -0
- /package/dist/{registry-KI77RVK7.js.map → registry-XIRTZHPC.js.map} +0 -0
- /package/dist/{request-withdrawal-LICOUGXG.js.map → request-withdrawal-XZSESWZV.js.map} +0 -0
- /package/dist/{reveal-PWM47FQN.js.map → reveal-525XWQU2.js.map} +0 -0
- /package/dist/{revoke-AWZKZLZB.js.map → revoke-QI7YHQ2B.js.map} +0 -0
- /package/dist/{seed-LNTLU2A3.js.map → seed-2KZDTFS4.js.map} +0 -0
- /package/dist/{signer-JE6NEURY.js.map → signer-BZWDPGGN.js.map} +0 -0
- /package/dist/{stale-ZWTKUVZX.js.map → stale-PQYPVCER.js.map} +0 -0
- /package/dist/{storage-WCZOCA46.js.map → storage-MJHKNQRO.js.map} +0 -0
- /package/dist/{store-coordination-provider-7H62VO2C.js.map → store-coordination-provider-TFHZLKHG.js.map} +0 -0
- /package/dist/{verify-SHJXGZGM.js.map → verify-J6DEOXP3.js.map} +0 -0
- /package/dist/{walk-HSS3NLQ3.js.map → walk-BX4NSB5L.js.map} +0 -0
- /package/dist/{withdraw-accessible-GHBA4DAA.js.map → withdraw-accessible-K4CPMH4C.js.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAccessibleBundle,
|
|
3
3
|
resolveAccessibleCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZPMXYPBR.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope
|
|
7
7
|
} from "./chunk-ZVAFJQZB.js";
|
|
8
8
|
import {
|
|
9
9
|
sha256Hex
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VJ4B3ZXY.js";
|
|
11
11
|
import {
|
|
12
12
|
ReadOnlyError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P7L3OQLL.js";
|
|
14
14
|
|
|
15
15
|
// src/with-audit/portability/withdraw-accessible.ts
|
|
16
16
|
var FROZEN_SNAPSHOTS_COLLECTION = "_frozen_snapshots";
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
freezeAndDeleteClosure,
|
|
118
118
|
withdrawAccessibleData
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-TC6MBEGH.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordAad,
|
|
3
3
|
openEnvelopeJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D5UDZANO.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope
|
|
7
7
|
} from "./chunk-ZVAFJQZB.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
encrypt,
|
|
10
10
|
hmacSha256Hex,
|
|
11
11
|
sha256Hex
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VJ4B3ZXY.js";
|
|
13
13
|
|
|
14
14
|
// src/with-audit/forget/strategy.ts
|
|
15
15
|
var NO_FORGET = { subjects: {} };
|
|
@@ -149,4 +149,4 @@ export {
|
|
|
149
149
|
coerceSubjectId,
|
|
150
150
|
readDottedPath
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=chunk-
|
|
152
|
+
//# sourceMappingURL=chunk-TENLCGYD.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
deriveSchemaManifest,
|
|
8
8
|
loadSchemaManifestEntry,
|
|
9
9
|
saveSchemaManifest
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E6VDPBE3.js";
|
|
11
11
|
import {
|
|
12
12
|
MANIFEST_COLLECTION
|
|
13
13
|
} from "./chunk-EPFF7LOX.js";
|
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
} from "./chunk-HJRTFXAA.js";
|
|
18
18
|
import {
|
|
19
19
|
derivePersistedSchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-N7YAQKAO.js";
|
|
21
21
|
import {
|
|
22
22
|
loadPersistedSchemaEntry,
|
|
23
23
|
savePersistedSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YVTADFTC.js";
|
|
25
25
|
import {
|
|
26
26
|
envelopePayloadHash
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RNSC2ARR.js";
|
|
28
28
|
import {
|
|
29
29
|
ManifestConflictError,
|
|
30
30
|
isConflictError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-P7L3OQLL.js";
|
|
32
32
|
|
|
33
33
|
// src/with-shape/persisted-schemas/field-ids.ts
|
|
34
34
|
var BASE32URL_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
|
|
@@ -257,4 +257,4 @@ export {
|
|
|
257
257
|
persistClassifiedMarker,
|
|
258
258
|
persistSatelliteMarker
|
|
259
259
|
};
|
|
260
|
-
//# sourceMappingURL=chunk-
|
|
260
|
+
//# sourceMappingURL=chunk-VH2W6BOG.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PERIODS_COLLECTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HTHRCGWP.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalJson,
|
|
6
6
|
sha256Hex
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RNSC2ARR.js";
|
|
8
8
|
import {
|
|
9
9
|
isDeleteMarker
|
|
10
10
|
} from "./chunk-ZVAFJQZB.js";
|
|
11
11
|
import {
|
|
12
12
|
PeriodClosedError,
|
|
13
13
|
ValidationError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-P7L3OQLL.js";
|
|
15
15
|
|
|
16
16
|
// src/with-audit/periods/periods.ts
|
|
17
17
|
function resolveReopenState(events) {
|
|
@@ -124,7 +124,7 @@ function validatePeriodName(name, existing, partition) {
|
|
|
124
124
|
}
|
|
125
125
|
async function appendPeriodLedgerEntry(ledger, actor, envelope, name, collection = PERIODS_COLLECTION) {
|
|
126
126
|
if (!ledger) return;
|
|
127
|
-
const { envelopePayloadHash } = await import("./ledger-
|
|
127
|
+
const { envelopePayloadHash } = await import("./ledger-62CEPRPX.js");
|
|
128
128
|
await ledger.append({
|
|
129
129
|
op: "put",
|
|
130
130
|
collection,
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
purgeMarkersOn,
|
|
199
199
|
withPeriods
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
201
|
+
//# sourceMappingURL=chunk-VHVMJWM6.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
InvalidKeyError,
|
|
4
4
|
TamperedError,
|
|
5
5
|
ValidationError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P7L3OQLL.js";
|
|
7
7
|
|
|
8
8
|
// src/kernel/enclave/crypto.ts
|
|
9
9
|
var PBKDF2_ITERATIONS = 6e5;
|
|
@@ -175,13 +175,25 @@ async function decrypt(ivBase64, dataBase64, dek, aad) {
|
|
|
175
175
|
return new TextDecoder().decode(plaintext);
|
|
176
176
|
} catch (err) {
|
|
177
177
|
if (err instanceof Error && err.name === "OperationError") {
|
|
178
|
-
throw new TamperedError();
|
|
178
|
+
throw new TamperedError(...await classifyTagFailure(iv, ciphertext, dek, aad));
|
|
179
179
|
}
|
|
180
180
|
throw new DecryptionError(
|
|
181
181
|
err instanceof Error ? err.message : "Decryption failed"
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
+
async function classifyTagFailure(iv, ciphertext, dek, aad) {
|
|
186
|
+
if (aad === void 0) return [];
|
|
187
|
+
try {
|
|
188
|
+
await subtle.decrypt({ name: "AES-GCM", iv }, dek, ciphertext);
|
|
189
|
+
} catch {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
return [
|
|
193
|
+
"This record was sealed BEFORE record-identity binding (#1041) and cannot be read by this version. Its body decrypts correctly under the record key, so this is a data-format transition, not tampering \u2014 but it also means the record predates authenticated metadata. There is no migration path; see noy-db #1100.",
|
|
194
|
+
"unbound-legacy-format"
|
|
195
|
+
];
|
|
196
|
+
}
|
|
185
197
|
async function encryptBytes(data, dek) {
|
|
186
198
|
const iv = generateIV();
|
|
187
199
|
const ciphertext = await subtle.encrypt(
|
|
@@ -427,4 +439,4 @@ export {
|
|
|
427
439
|
bufferToBase64,
|
|
428
440
|
base64ToBuffer
|
|
429
441
|
};
|
|
430
|
-
//# sourceMappingURL=chunk-
|
|
442
|
+
//# sourceMappingURL=chunk-VJ4B3ZXY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/kernel/enclave/crypto.ts"],"sourcesContent":["/**\n * Cryptographic primitives — thin wrappers around the Web Crypto API.\n *\n * ## Design principle\n *\n * **Zero npm crypto dependencies.** Every operation uses `globalThis.crypto.subtle`,\n * which is available natively in Node.js ≥ 18, all modern browsers, and\n * Deno/Bun. This avoids supply-chain risk from third-party crypto packages and\n * ensures the library stays auditable.\n *\n * ## Algorithms\n *\n * | Use case | Algorithm | Parameters |\n * |----------|-----------|------------|\n * | Key derivation | PBKDF2-SHA256 | 600,000 iterations, 32-byte salt |\n * | Record encryption | AES-256-GCM | 12-byte random IV per operation |\n * | DEK wrapping | AES-KW (RFC 3394) | 256-bit KEK |\n * | Binary encrypt | AES-256-GCM | same as record encryption |\n * | Integrity | HMAC-SHA256 | for presence channels |\n * | Content hash | SHA-256 | for ledger and bundle integrity |\n *\n * ## Key lifecycle\n *\n * ```\n * secret + salt\n * └─► deriveKey() → KEK (CryptoKey, extractable: false)\n * └─► wrapKey() → wrapped DEK bytes [stored in keyring]\n * └─► unwrapKey() → DEK (CryptoKey) [memory only during session]\n * └─► encrypt() / decrypt() → ciphertext / plaintext\n * ```\n *\n * IVs are generated fresh by {@link generateIV} on every encrypt call.\n * Reusing an IV with the same key would break GCM's authentication guarantee —\n * this function should be the only place IVs are produced.\n *\n * @module\n */\n\nimport { DecryptionError, InvalidKeyError, TamperedError, ValidationError } from '../errors.js'\n\n/**\n * **EnclaveKey** — the opaque key type at the enclave seam.\n *\n * In noy-db's reference enclave this is `CryptoKey` (the Web Crypto API's\n * key handle). A fork's enclave redefines this alias to its own key\n * representation (e.g. `type EnclaveKey = null` for a keyless HSM-backed\n * fork) — outside `kernel/enclave/**`, every consumer must treat it as\n * opaque: never construct, inspect, or serialize it directly, only pass it\n * between barrel functions (`encrypt`/`decrypt`/`wrapKey`/`unwrapKey`/…).\n */\nexport type EnclaveKey = CryptoKey\n\nconst PBKDF2_ITERATIONS = 600_000\nconst SALT_BYTES = 32\nconst IV_BYTES = 12\nconst KEY_BITS = 256\n\nconst subtle = globalThis.crypto.subtle\n\n// ─── Key Derivation ────────────────────────────────────────────────────\n\n/** Derive a KEK from a secret and salt using PBKDF2-SHA256. */\nexport async function deriveKey(\n secret: string,\n salt: Uint8Array,\n): Promise<CryptoKey> {\n return deriveKekFromMaterial(new TextEncoder().encode(secret), salt)\n}\n\n/**\n * Shared PBKDF2 → AES-KW derivation core. `material` is the raw\n * pre-KDF input bytes (a UTF-8 phrase for standard mode, an\n * AG-1-encoded 3-part structure for echo mode).\n */\nasync function deriveKekFromMaterial(\n material: Uint8Array,\n salt: Uint8Array,\n): Promise<CryptoKey> {\n const keyMaterial = await subtle.importKey('raw', material as BufferSource, 'PBKDF2', false, ['deriveKey'])\n return subtle.deriveKey(\n { name: 'PBKDF2', salt: salt as BufferSource, iterations: PBKDF2_ITERATIONS, hash: 'SHA-256' },\n keyMaterial,\n { name: 'AES-KW', length: KEY_BITS },\n false,\n ['wrapKey', 'unwrapKey'],\n )\n}\n\n/** One three-part echo secret: prompt (typed) → echo (revealed) → key (typed). */\nexport interface EchoSecretParts {\n readonly prompt: string\n readonly echo: string\n readonly key: string\n}\n\n/**\n * Domain context for the AG-1 encoding. The leading `0xFF` is the load-bearing\n * byte: it is not a legal UTF-8 lead byte, so `TextEncoder` can never emit it —\n * no string's UTF-8 encoding can equal an AG-1 encoding, whatever the string.\n */\nconst ECHO_KDF_CONTEXT = new Uint8Array([0xff, ...new TextEncoder().encode('noydb-echo-secret-v1')])\n\n/**\n * AG-1 encoding: domain context + 4-byte big-endian length prefix per\n * part. Two independent guarantees make a single typed string unable to\n * derive an echo vault's KEK (spec AG-1):\n *\n * 1. The `0xFF` context prefix — UTF-8 never produces that byte, so the\n * encoding is provably not the encoding of ANY string (not merely of\n * no separator-joined form).\n * 2. Structural length prefixes — part boundaries are key material, so\n * re-splitting the same characters changes the derived KEK.\n *\n * @throws ValidationError when any part is not a string — the single\n * chokepoint every echo KEK derivation and block mint passes through, so a\n * malformed parts object cannot be `TextEncoder`-coerced into key material.\n */\nexport function encodeEchoParts(parts: EchoSecretParts): Uint8Array {\n for (const name of ['prompt', 'echo', 'key'] as const) {\n if (typeof parts?.[name] !== 'string') {\n throw new ValidationError('echo secret parts must be three strings: prompt, echo, key')\n }\n }\n const enc = new TextEncoder()\n const segments = [parts.prompt, parts.echo, parts.key].map((p) => enc.encode(p))\n const total = ECHO_KDF_CONTEXT.length + segments.reduce((n, s) => n + 4 + s.length, 0)\n const out = new Uint8Array(total)\n out.set(ECHO_KDF_CONTEXT, 0)\n let offset = ECHO_KDF_CONTEXT.length\n for (const s of segments) {\n new DataView(out.buffer).setUint32(offset, s.length, false)\n out.set(s, offset + 4)\n offset += 4 + s.length\n }\n return out\n}\n\n/** Derive the tier-1 KEK from a 3-part echo secret (spec: KEK from ALL parts). */\nexport async function deriveEchoKey(\n parts: EchoSecretParts,\n salt: Uint8Array,\n): Promise<CryptoKey> {\n return deriveKekFromMaterial(encodeEchoParts(parts), salt)\n}\n\n/**\n * Which AES algorithm/usage a {@link deriveSecretKey} result is for:\n * `'aes-kw'` mints a key-wrapping key (`wrapKey`/`unwrapKey`, e.g. for\n * KEK derivation); `'aes-gcm'` mints a direct encrypt/decrypt key (e.g.\n * for the wrap-DEKs primitive in `with-party/team/wrapped-deks.ts`).\n */\nexport type SecretKeyUsage = 'aes-kw' | 'aes-gcm'\n\n/**\n * Derive a non-extractable AES key from a secret/credential and salt\n * via PBKDF2-SHA256, generalizing {@link deriveKey}'s AES-KW derivation to\n * also cover AES-GCM-usage keys. Callers pin their own `iterations` and\n * `keyUsage` so an existing call site's exact parameters (and thus its\n * derived-key bytes) are preserved verbatim when migrated onto this\n * shared primitive — this is call-site consolidation, not a KDF change.\n */\nexport async function deriveSecretKey(\n secret: string,\n salt: Uint8Array,\n params: { iterations: number; keyUsage: SecretKeyUsage },\n): Promise<CryptoKey> {\n const keyMaterial = await subtle.importKey(\n 'raw',\n new TextEncoder().encode(secret),\n 'PBKDF2',\n false,\n ['deriveKey'],\n )\n\n return params.keyUsage === 'aes-gcm'\n ? subtle.deriveKey(\n {\n name: 'PBKDF2',\n salt: salt as BufferSource,\n iterations: params.iterations,\n hash: 'SHA-256',\n },\n keyMaterial,\n { name: 'AES-GCM', length: KEY_BITS },\n false,\n ['encrypt', 'decrypt'],\n )\n : subtle.deriveKey(\n {\n name: 'PBKDF2',\n salt: salt as BufferSource,\n iterations: params.iterations,\n hash: 'SHA-256',\n },\n keyMaterial,\n { name: 'AES-KW', length: KEY_BITS },\n false,\n ['wrapKey', 'unwrapKey'],\n )\n}\n\n// ─── DEK Generation ────────────────────────────────────────────────────\n\n/** Generate a random AES-256-GCM data encryption key. */\nexport async function generateDEK(): Promise<CryptoKey> {\n return subtle.generateKey(\n { name: 'AES-GCM', length: KEY_BITS },\n true, // extractable — needed for AES-KW wrapping\n ['encrypt', 'decrypt'],\n )\n}\n\n// ─── Key Wrapping ──────────────────────────────────────────────────────\n\n/** Wrap (encrypt) a DEK with a KEK using AES-KW. Returns base64 string. */\nexport async function wrapKey(dek: CryptoKey, kek: CryptoKey): Promise<string> {\n const wrapped = await subtle.wrapKey('raw', dek, kek, 'AES-KW')\n return bufferToBase64(wrapped)\n}\n\n/** Unwrap (decrypt) a DEK from base64 string using a KEK. */\nexport async function unwrapKey(\n wrappedBase64: string,\n kek: CryptoKey,\n): Promise<CryptoKey> {\n try {\n return await subtle.unwrapKey(\n 'raw',\n base64ToBuffer(wrappedBase64) as BufferSource,\n kek,\n 'AES-KW',\n { name: 'AES-GCM', length: KEY_BITS },\n true,\n ['encrypt', 'decrypt'],\n )\n } catch {\n throw new InvalidKeyError()\n }\n}\n\n// ─── Per-record CEK wrapping ───────────────────────────────────────────\n\n/**\n * Derive a **dedicated** AES-KW wrapping key from a collection/tier DEK via\n * HKDF-SHA256, used to wrap/unwrap a per-record CEK.\n *\n * The collection/tier DEKs are AES-256-**GCM** keys (usages\n * `encrypt`/`decrypt`) and cannot themselves act as an AES-KW KEK. We do NOT\n * re-import the raw DEK bytes directly as an AES-KW key — that would reuse one\n * key across two primitives (AES-GCM for `_det`/presence, AES-KW for CEK\n * wrapping), violating key separation. Instead we HKDF-derive a domain-\n * separated KW key (salt `noydb-cek-wrap`), exactly as `derivePresenceKey`\n * derives a separate presence key. The derivation is deterministic, so\n * wrapping the same CEK under the same DEK always yields identical ciphertext\n * — which is what lets an update reuse a record's stable CEK and produce a\n * byte-identical `_cek`. The KW key is independent of the DEK's GCM key.\n *\n * The DEK must be extractable (it is — `generateDEK`/`unwrapKey` mint\n * extractable keys).\n */\nasync function asKwKey(dek: CryptoKey): Promise<CryptoKey> {\n const rawDek = await subtle.exportKey('raw', dek)\n const hkdfKey = await subtle.importKey('raw', rawDek, 'HKDF', false, ['deriveBits'])\n const salt = new TextEncoder().encode('noydb-cek-wrap')\n const info = new TextEncoder().encode('v1')\n const bits = await subtle.deriveBits(\n { name: 'HKDF', hash: 'SHA-256', salt, info },\n hkdfKey,\n KEY_BITS,\n )\n return subtle.importKey('raw', bits, 'AES-KW', false, ['wrapKey', 'unwrapKey'])\n}\n\n/**\n * AES-KW-wrap a per-record CEK under a collection/tier DEK. Returns base64.\n * Deterministic over `(cek, dek)`.\n */\nexport async function wrapCek(cek: CryptoKey, dek: CryptoKey): Promise<string> {\n const kw = await asKwKey(dek)\n const wrapped = await subtle.wrapKey('raw', cek, kw, 'AES-KW')\n return bufferToBase64(wrapped)\n}\n\n/**\n * Unwrap a per-record CEK from base64 under a collection/tier DEK. Throws\n * `InvalidKeyError` if the wrapped bytes do not authenticate under the DEK.\n */\nexport async function unwrapCek(wrappedBase64: string, dek: CryptoKey): Promise<CryptoKey> {\n const kw = await asKwKey(dek)\n try {\n return await subtle.unwrapKey(\n 'raw',\n base64ToBuffer(wrappedBase64) as BufferSource,\n kw,\n 'AES-KW',\n { name: 'AES-GCM', length: KEY_BITS },\n true,\n ['encrypt', 'decrypt'],\n )\n } catch {\n throw new InvalidKeyError()\n }\n}\n\n/**\n * Import a raw 32-byte AES-256-GCM record CEK (e.g. from a sealed-CEK\n * delivery binding). Non-extractable, decrypt-only — the imported key is\n * used solely to open the record's `_iv`/`_data` body under `decrypt()`.\n */\nexport async function importCek(rawKey: Uint8Array): Promise<CryptoKey> {\n return subtle.importKey('raw', rawKey as BufferSource, { name: 'AES-GCM', length: KEY_BITS }, false, ['decrypt'])\n}\n\n// ─── Encrypt / Decrypt ─────────────────────────────────────────────────\n\nexport interface EncryptResult {\n iv: string // base64\n data: string // base64\n}\n\n/**\n * Encrypt plaintext JSON string with AES-256-GCM. Fresh IV per call.\n *\n * `aad` binds the record's identity into the auth tag (#1041) — see\n * `record-aad.ts` for what is bound and why `_v` is not. A body sealed with\n * AAD can only be opened by a reader supplying the identical bytes, which is\n * what stops an untrusted store from relocating or re-tiering an envelope.\n *\n * Optional **only while the call-site sweep is in progress**. It becomes\n * mandatory once every `encrypt`/`decrypt` pair supplies it, at which point\n * the format version bumps and the reader rejects anything unbound. Until\n * then an omitted `aad` reproduces the previous, unauthenticated behaviour.\n */\nexport async function encrypt(\n plaintext: string,\n dek: CryptoKey,\n aad?: Uint8Array,\n): Promise<EncryptResult> {\n const iv = generateIV()\n const encoded = new TextEncoder().encode(plaintext)\n\n const ciphertext = await subtle.encrypt(\n {\n name: 'AES-GCM',\n iv: iv as BufferSource,\n ...(aad !== undefined && { additionalData: aad as BufferSource }),\n },\n dek,\n encoded,\n )\n\n return {\n iv: bufferToBase64(iv),\n data: bufferToBase64(ciphertext),\n }\n}\n\n/**\n * Decrypt AES-256-GCM ciphertext. Throws on wrong key or tampered data.\n *\n * `aad` must be byte-identical to what {@link encrypt} was given, or the auth\n * tag fails and this throws `TamperedError` (#1041). Note the asymmetry that\n * makes this useful: a mismatched identity is indistinguishable from a\n * corrupted body, so relocation fails **closed** rather than returning a\n * plausible record in the wrong place.\n */\nexport async function decrypt(\n ivBase64: string,\n dataBase64: string,\n dek: CryptoKey,\n aad?: Uint8Array,\n): Promise<string> {\n const iv = base64ToBuffer(ivBase64)\n const ciphertext = base64ToBuffer(dataBase64)\n\n try {\n const plaintext = await subtle.decrypt(\n {\n name: 'AES-GCM',\n iv: iv as BufferSource,\n ...(aad !== undefined && { additionalData: aad as BufferSource }),\n },\n dek,\n ciphertext as BufferSource,\n )\n return new TextDecoder().decode(plaintext)\n } catch (err) {\n if (err instanceof Error && err.name === 'OperationError') {\n throw new TamperedError(...(await classifyTagFailure(iv, ciphertext, dek, aad)))\n }\n throw new DecryptionError(\n err instanceof Error ? err.message : 'Decryption failed',\n )\n }\n}\n\n\n/**\n * Distinguish a FORMAT TRANSITION from an attack, when the enclave can (#1103).\n *\n * ## The problem\n *\n * Since #1041 switched identity AAD on, one `TamperedError` covers at least\n * four situations: legitimate pre-binding data, a store that reconstructs an\n * envelope and drops a bound field, a CEK/rotation mismatch, and actual\n * tampering. `SECURITY.md` and the subsystem docs teach the LAST reading — so a\n * user who upgrades, hits this on their own honest data, and consults the docs\n * is told their store has been compromised.\n *\n * That is a false positive on the product's central security claim, and the\n * cost is not merely a confusing message: **a tamper alarm that cries wolf is\n * one users learn to ignore.**\n *\n * ## Why the probe is sound, and why it is NOT a downgrade\n *\n * A body sealed before #1041 carries no AAD, so it opens under an empty one.\n * Retrying that way is **positive evidence** of the legacy format rather than a\n * guess: forging a body that decrypts under this DEK requires the DEK, and an\n * untrusted store does not hold one.\n *\n * ⚠️ **Classification ONLY — the plaintext is discarded and the caller still\n * throws.** That is the entire safety argument: the outcome is identical either\n * way, so this cannot become the lenient path #1041 exists to remove. A variant\n * that RETURNED the retry's plaintext would be exactly the accept-without-AAD\n * downgrade the binding was built to prevent. Do not \"optimise\" it into one.\n *\n * Note what the honest message concedes: pre-#1041 data had no authenticated\n * metadata, so a legacy record that was ALSO tampered with reads as legacy.\n * That is not a weakening — it is an accurate statement about data that\n * genuinely never carried a binding.\n */\nasync function classifyTagFailure(\n iv: Uint8Array,\n ciphertext: Uint8Array,\n dek: CryptoKey,\n aad: Uint8Array | undefined,\n): Promise<[] | [string, 'unbound-legacy-format']> {\n // Only meaningful when AAD was supplied: with none there is no second\n // interpretation to test, and the failure is a plain tag mismatch.\n if (aad === undefined) return []\n try {\n await subtle.decrypt({ name: 'AES-GCM', iv: iv as BufferSource }, dek, ciphertext as BufferSource)\n } catch {\n return [] // no benign explanation — the security alert stands\n }\n return [\n 'This record was sealed BEFORE record-identity binding (#1041) and cannot be read by this ' +\n 'version. Its body decrypts correctly under the record key, so this is a data-format ' +\n 'transition, not tampering — but it also means the record predates authenticated metadata. ' +\n 'There is no migration path; see noy-db #1100.',\n 'unbound-legacy-format',\n ]\n}\n\n// ─── Binary Encrypt / Decrypt ────────\n\n/**\n * Encrypt raw bytes with AES-256-GCM using a fresh random IV.\n * Used by the attachment store so binary blobs avoid double base64 encoding\n * (the existing `encrypt()` function calls `TextEncoder` on a string — here\n * we pass the `Uint8Array` directly to `subtle.encrypt`).\n */\nexport async function encryptBytes(\n data: Uint8Array,\n dek: CryptoKey,\n): Promise<EncryptResult> {\n const iv = generateIV()\n const ciphertext = await subtle.encrypt(\n { name: 'AES-GCM', iv: iv as BufferSource },\n dek,\n data as unknown as BufferSource,\n )\n return {\n iv: bufferToBase64(iv),\n data: bufferToBase64(ciphertext),\n }\n}\n\n/**\n * Decrypt AES-256-GCM ciphertext back to raw bytes.\n * Counterpart to `encryptBytes`. Throws `TamperedError` on auth-tag failure.\n */\nexport async function decryptBytes(\n ivBase64: string,\n dataBase64: string,\n dek: CryptoKey,\n): Promise<Uint8Array> {\n const iv = base64ToBuffer(ivBase64)\n const ciphertext = base64ToBuffer(dataBase64)\n try {\n const plaintext = await subtle.decrypt(\n { name: 'AES-GCM', iv: iv as BufferSource },\n dek,\n ciphertext as BufferSource,\n )\n return new Uint8Array(plaintext)\n } catch (err) {\n if (err instanceof Error && err.name === 'OperationError') {\n throw new TamperedError()\n }\n throw new DecryptionError(\n err instanceof Error ? err.message : 'Decryption failed',\n )\n }\n}\n\n/**\n * SHA-256 hex digest of raw bytes. Used to derive content-addressed\n * eTags for blob deduplication. Computed on plaintext bytes\n * before compression and encryption so the eTag identifies content, not\n * ciphertext, and survives re-encryption (key rotation, re-upload).\n */\nexport async function sha256Hex(data: Uint8Array): Promise<string> {\n const hash = await subtle.digest('SHA-256', data as unknown as BufferSource)\n return Array.from(new Uint8Array(hash))\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n}\n\n// ─── HMAC-SHA-256 ─────────────────────────────\n\n/**\n * Compute HMAC-SHA-256(key, data) and return hex string.\n *\n * Used to derive content-addressed eTags that are opaque to the store:\n * ```\n * eTag = hmacSha256Hex(blobDEK, plaintext)\n * ```\n *\n * Unlike a plain SHA-256, the HMAC is keyed by the vault-shared `_blob` DEK,\n * so an attacker with store access cannot pre-compute eTags for known files.\n * Deduplication still works within a vault (same key + same content = same eTag).\n */\nexport async function hmacSha256Hex(key: CryptoKey, data: Uint8Array): Promise<string> {\n // Export AES-GCM DEK raw bytes → import as HMAC key\n const rawKey = await subtle.exportKey('raw', key)\n const hmacKey = await subtle.importKey(\n 'raw',\n rawKey,\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['sign'],\n )\n const sig = await subtle.sign('HMAC', hmacKey, data as unknown as BufferSource)\n return Array.from(new Uint8Array(sig))\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n}\n\n// ─── AAD-aware Binary Encrypt / Decrypt ──\n\n/**\n * Encrypt raw bytes with AES-256-GCM using Additional Authenticated Data.\n *\n * The AAD binds each chunk to its parent blob and position, preventing\n * chunk reorder, substitution, and truncation attacks:\n * ```\n * AAD = UTF-8(\"{eTag}:{chunkIndex}:{chunkCount}\")\n * ```\n *\n * The AAD is NOT stored — the reader reconstructs it from `BlobObject`\n * metadata and passes it to `decryptBytesWithAAD`.\n */\nexport async function encryptBytesWithAAD(\n data: Uint8Array,\n dek: CryptoKey,\n aad: Uint8Array,\n): Promise<EncryptResult> {\n const iv = generateIV()\n const ciphertext = await subtle.encrypt(\n {\n name: 'AES-GCM',\n iv: iv as BufferSource,\n additionalData: aad as BufferSource,\n },\n dek,\n data as unknown as BufferSource,\n )\n return {\n iv: bufferToBase64(iv),\n data: bufferToBase64(ciphertext),\n }\n}\n\n/**\n * Decrypt AES-256-GCM ciphertext with AAD verification.\n *\n * If the AAD does not match the one used at encryption time (e.g. because\n * a chunk was reordered or substituted from another blob), the GCM auth\n * tag fails and this throws `TamperedError`.\n */\nexport async function decryptBytesWithAAD(\n ivBase64: string,\n dataBase64: string,\n dek: CryptoKey,\n aad: Uint8Array,\n): Promise<Uint8Array> {\n const iv = base64ToBuffer(ivBase64)\n const ciphertext = base64ToBuffer(dataBase64)\n try {\n const plaintext = await subtle.decrypt(\n {\n name: 'AES-GCM',\n iv: iv as BufferSource,\n additionalData: aad as BufferSource,\n },\n dek,\n ciphertext as BufferSource,\n )\n return new Uint8Array(plaintext)\n } catch (err) {\n if (err instanceof Error && err.name === 'OperationError') {\n throw new TamperedError()\n }\n throw new DecryptionError(\n err instanceof Error ? err.message : 'Decryption failed',\n )\n }\n}\n\n// ─── Presence Key Derivation ──────────────────────────────\n\n/**\n * Derive an AES-256-GCM presence key from a collection DEK using HKDF-SHA256.\n *\n * The presence key is domain-separated from the data DEK by the fixed salt\n * `'noydb-presence'` and the `info` = collection name. This means:\n * - The adapter never sees the presence key.\n * - Presence payloads rotate automatically when the collection DEK is rotated.\n * - Revoked users cannot derive the new presence key after a DEK rotation.\n *\n * @param dek The collection's AES-256-GCM DEK (extractable).\n * @param collectionName Used as the HKDF `info` parameter for domain separation.\n * @returns A non-extractable AES-256-GCM key suitable for presence payload encryption.\n */\nexport async function derivePresenceKey(dek: CryptoKey, collectionName: string): Promise<CryptoKey> {\n // Step 1: export DEK raw bytes\n const rawDek = await subtle.exportKey('raw', dek)\n\n // Step 2: import as HKDF key material\n const hkdfKey = await subtle.importKey(\n 'raw',\n rawDek,\n 'HKDF',\n false,\n ['deriveBits'],\n )\n\n // Step 3: derive 256 bits with salt='noydb-presence' and info=collectionName\n const salt = new TextEncoder().encode('noydb-presence')\n const info = new TextEncoder().encode(collectionName)\n const bits = await subtle.deriveBits(\n { name: 'HKDF', hash: 'SHA-256', salt, info },\n hkdfKey,\n KEY_BITS,\n )\n\n // Step 4: import derived bits as AES-GCM key\n return subtle.importKey(\n 'raw',\n bits,\n { name: 'AES-GCM', length: KEY_BITS },\n false,\n ['encrypt', 'decrypt'],\n )\n}\n\n// ─── Sealed Field Key Derivation ──────────────────────────\n\n/**\n * Derive a **per-field** AES-256-GCM key from a collection DEK using\n * HKDF-SHA256, used to encrypt a single sensitive field into its own\n * `_sealed[field]` envelope slot (structural group-encryption).\n *\n * Domain-separated from the data DEK (and from the presence/deterministic\n * channels) by the fixed salt `'noydb-sealed'` and an `info` of\n * `JSON.stringify(['noydb-sealed', collectionName, field])`. The JSON-array\n * encoding is injective — each element is separately quoted/escaped — so\n * collection `a/sealed/b` + field `c` cannot collide with collection `a` +\n * field `b/sealed/c`. Each sensitive field gets a **distinct** key, so a\n * `_sealed[a]` ciphertext does not authenticate under field `b`'s key —\n * sealed fields are cryptographically isolated from one another. The\n * collection name keeps the same field name in two collections from sharing a\n * key, mirroring how `derivePresenceKey` / `encryptDeterministic` domain-separate.\n *\n * @param dek The collection's AES-256-GCM DEK (extractable).\n * @param collectionName Part of the HKDF `info` for domain separation.\n * @param field Sensitive field name — the rest of the `info`.\n * @returns A non-extractable AES-256-GCM key for that field's sealed slot.\n */\nexport async function deriveSealedFieldKey(\n dek: CryptoKey,\n collectionName: string,\n field: string,\n): Promise<CryptoKey> {\n const rawDek = await subtle.exportKey('raw', dek)\n const hkdfKey = await subtle.importKey('raw', rawDek, 'HKDF', false, ['deriveBits'])\n const salt = new TextEncoder().encode('noydb-sealed')\n // JSON-array encoding is injective: each element is separately quoted/\n // escaped, so collection `a/sealed/b` + field `c` cannot collide with\n // collection `a` + field `b/sealed/c`.\n const info = new TextEncoder().encode(JSON.stringify(['noydb-sealed', collectionName, field]))\n const bits = await subtle.deriveBits(\n { name: 'HKDF', hash: 'SHA-256', salt, info },\n hkdfKey,\n KEY_BITS,\n )\n return subtle.importKey(\n 'raw',\n bits,\n { name: 'AES-GCM', length: KEY_BITS },\n false,\n ['encrypt', 'decrypt'],\n )\n}\n\n/**\n * Derive a per-record sealed-field key from the record's **per-record CEK**\n * rather than the collection DEK. Same HKDF construction as\n * {@link deriveSealedFieldKey} but with salt `'noydb-sealed-cek'` (distinct\n * from `'noydb-sealed'`), so a CEK-derived key can never collide with a\n * DEK-derived one for the same `{collection, field}`.\n *\n * The point: the sealed ciphertext's only key now flows from the record's CEK.\n * Dropping the record's wrapped `_cek` (crypto-shred / `forget`) makes the key\n * — and thus `_sealed[field]` — unrecoverable, giving sealed fields the same\n * erasure guarantee `_data` already has. The CEK must be extractable (it is —\n * `unwrapCek`/`generateDEK` mint extractable keys).\n *\n * @param cek The record's AES-256-GCM CEK (extractable).\n * @param collectionName Part of the HKDF `info` for domain separation.\n * @param field Sensitive field name — the rest of the `info`.\n * @returns A non-extractable AES-256-GCM key for that field's sealed slot.\n */\nexport async function deriveSealedFieldKeyFromCek(\n cek: CryptoKey,\n collectionName: string,\n field: string,\n): Promise<CryptoKey> {\n const rawCek = await subtle.exportKey('raw', cek)\n const hkdfKey = await subtle.importKey('raw', rawCek, 'HKDF', false, ['deriveBits'])\n const salt = new TextEncoder().encode('noydb-sealed-cek')\n const info = new TextEncoder().encode(JSON.stringify(['noydb-sealed-cek', collectionName, field]))\n const bits = await subtle.deriveBits(\n { name: 'HKDF', hash: 'SHA-256', salt, info },\n hkdfKey,\n KEY_BITS,\n )\n return subtle.importKey(\n 'raw',\n bits,\n { name: 'AES-GCM', length: KEY_BITS },\n false,\n ['encrypt', 'decrypt'],\n )\n}\n\n// ─── Deterministic Encryption ────────────────────────────\n\n/**\n * Derive the collection's **dedicated deterministic-index key** from its DEK\n * via HKDF-SHA256 (L-1, #554).\n *\n * `_det` slots previously encrypted under the raw collection DEK — the same\n * key `_data` uses with a *randomized*-IV regime while `_det` uses a\n * *deterministic*-IV regime. Two IV regimes on one key is avoidable hygiene\n * debt (~2^-96 theoretical collision), so the deterministic index now gets its\n * own HKDF-separated key: salt `'noydb-det'`, info\n * `JSON.stringify(['noydb-det'])` (the injective JSON-array domain tag, same\n * convention as {@link deriveSealedFieldKey}). Per-field separation still\n * comes from the `'<collection>/<field>'` context inside\n * {@link encryptDeterministic}, exactly as before.\n *\n * The derived key stays **DEK-derived (collection-level)** on purpose: `_det`\n * is carried verbatim through per-record CEK rotation (see\n * `record-keys/sealing.ts`), so its key must not depend on the CEK. It rotates\n * with the collection DEK, like the presence key.\n *\n * The key is minted **extractable** — {@link encryptDeterministic} derives its\n * per-value IV via HKDF over the raw key bytes (an `exportKey` under the\n * hood), which a non-extractable key would forbid. Same in-memory posture as\n * the DEK itself (`generateDEK` mints extractable keys).\n *\n * @param dek The collection's AES-256-GCM DEK (extractable).\n * @returns A dedicated AES-256-GCM key for the `_det` deterministic index.\n */\nexport async function deriveDeterministicKey(dek: CryptoKey): Promise<CryptoKey> {\n const rawDek = await subtle.exportKey('raw', dek)\n const hkdfKey = await subtle.importKey('raw', rawDek, 'HKDF', false, ['deriveBits'])\n const salt = new TextEncoder().encode('noydb-det')\n const info = new TextEncoder().encode(JSON.stringify(['noydb-det']))\n const bits = await subtle.deriveBits(\n { name: 'HKDF', hash: 'SHA-256', salt, info },\n hkdfKey,\n KEY_BITS,\n )\n return subtle.importKey(\n 'raw',\n bits,\n { name: 'AES-GCM', length: KEY_BITS },\n true,\n ['encrypt', 'decrypt'],\n )\n}\n\n/**\n * Derive a deterministic 12-byte IV from `{ DEK, context, plaintext }`\n * via HKDF-SHA256. Given the same three inputs, the IV is identical, so\n * `encryptDeterministic` produces the same ciphertext on every call —\n * which is precisely what enables blind equality search on encrypted\n * fields.\n *\n * **The side channel this opens.** Two records whose field value is the\n * same produce the same ciphertext. An observer with store access can\n * therefore tell which records share a value — not *what* the value is,\n * but the equivalence class. This is the well-known trade-off of\n * deterministic encryption and is why the feature is strictly opt-in\n * per field, guarded by `acknowledgeDeterministicRisk: true` at\n * collection creation.\n *\n * The context string MUST include the collection name and field name,\n * so:\n * - The same plaintext in two different fields encrypts differently\n * (no cross-field equality leak).\n * - The same plaintext in two different collections (different DEKs)\n * encrypts differently by virtue of the key, even before HKDF\n * domain separation kicks in.\n */\nasync function deriveDeterministicIV(\n dek: CryptoKey,\n context: string,\n plaintext: string,\n): Promise<Uint8Array> {\n const rawDek = await subtle.exportKey('raw', dek)\n const hkdfKey = await subtle.importKey('raw', rawDek, 'HKDF', false, ['deriveBits'])\n const salt = new TextEncoder().encode('noydb-deterministic-v1')\n const info = new TextEncoder().encode(`${context}\\x00${plaintext}`)\n const bits = await subtle.deriveBits(\n { name: 'HKDF', hash: 'SHA-256', salt, info },\n hkdfKey,\n IV_BYTES * 8,\n )\n return new Uint8Array(bits)\n}\n\n/**\n * Encrypt a plaintext string with AES-256-GCM and a deterministic,\n * HKDF-derived IV.\n *\n * The same `{ dek, context, plaintext }` triple always produces the\n * same `{ iv, data }` — call this twice and you can string-compare the\n * ciphertexts to check equality of the inputs without decrypting them.\n *\n * @param context Domain-separation string — by convention\n * `'<collection>/<field>'`. Different contexts encrypt\n * the same plaintext to different ciphertexts, so\n * `email` in collection `users` does not collide with\n * `email` in collection `customers`.\n */\nexport async function encryptDeterministic(\n plaintext: string,\n dek: CryptoKey,\n context: string,\n): Promise<EncryptResult> {\n const iv = await deriveDeterministicIV(dek, context, plaintext)\n const encoded = new TextEncoder().encode(plaintext)\n const ciphertext = await subtle.encrypt(\n { name: 'AES-GCM', iv: iv as BufferSource },\n dek,\n encoded,\n )\n return {\n iv: bufferToBase64(iv),\n data: bufferToBase64(ciphertext),\n }\n}\n\n/**\n * Counterpart to {@link encryptDeterministic}. The IV is stored\n * alongside the ciphertext (exactly like the randomized path), so\n * decrypt uses the stored IV and verifies the GCM auth tag — a tampered\n * ciphertext throws `TamperedError` just like randomized AES-GCM.\n */\nexport async function decryptDeterministic(\n ivBase64: string,\n dataBase64: string,\n dek: CryptoKey,\n): Promise<string> {\n return decrypt(ivBase64, dataBase64, dek)\n}\n\n// ─── Random Generation ─────────────────────────────────────────────────\n\n/** Generate a random 12-byte IV for AES-GCM. */\nexport function generateIV(): Uint8Array {\n return globalThis.crypto.getRandomValues(new Uint8Array(IV_BYTES))\n}\n\n/** Generate a random 32-byte salt for PBKDF2. */\nexport function generateSalt(): Uint8Array {\n return globalThis.crypto.getRandomValues(new Uint8Array(SALT_BYTES))\n}\n\n// ─── Base64 Helpers ────────────────────────────────────────────────────\n\nexport function bufferToBase64(buffer: ArrayBuffer | Uint8Array): string {\n const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer)\n let binary = ''\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]!)\n }\n return btoa(binary)\n}\n\nexport function base64ToBuffer(base64: string): Uint8Array<ArrayBuffer> {\n const binary = atob(base64)\n const bytes = new Uint8Array(binary.length)\n for (let i = 0; i < binary.length; i++) {\n bytes[i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1C;AAAA,IACA;AAAA,EACF;AACA,SAAO;AAAA,IACL,IAAI,eAAe,EAAE;AAAA,IACrB,MAAM,eAAe,UAAU;AAAA,EACjC;AACF;AAQA,eAAsB,qBACpB,UACA,YACA,KACiB;AACjB,SAAO,QAAQ,UAAU,YAAY,GAAG;AAC1C;AAKO,SAAS,aAAyB;AACvC,SAAO,WAAW,OAAO,gBAAgB,IAAI,WAAW,QAAQ,CAAC;AACnE;AAGO,SAAS,eAA2B;AACzC,SAAO,WAAW,OAAO,gBAAgB,IAAI,WAAW,UAAU,CAAC;AACrE;AAIO,SAAS,eAAe,QAA0C;AACvE,QAAM,QAAQ,kBAAkB,aAAa,SAAS,IAAI,WAAW,MAAM;AAC3E,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,cAAU,OAAO,aAAa,MAAM,CAAC,CAAE;AAAA,EACzC;AACA,SAAO,KAAK,MAAM;AACpB;AAEO,SAAS,eAAe,QAAyC;AACtE,QAAM,SAAS,KAAK,MAAM;AAC1B,QAAM,QAAQ,IAAI,WAAW,OAAO,MAAM;AAC1C,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,UAAM,CAAC,IAAI,OAAO,WAAW,CAAC;AAAA,EAChC;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OverlayIdMismatchError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P7L3OQLL.js";
|
|
4
4
|
|
|
5
5
|
// src/with-formula/overlay-views/virtual-collection.ts
|
|
6
6
|
var OverlayedCollection = class {
|
|
@@ -206,4 +206,4 @@ var OverlayedCollection = class {
|
|
|
206
206
|
export {
|
|
207
207
|
OverlayedCollection
|
|
208
208
|
};
|
|
209
|
-
//# sourceMappingURL=chunk-
|
|
209
|
+
//# sourceMappingURL=chunk-W6NFONOV.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViaGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RSFG7XHM.js";
|
|
4
4
|
import {
|
|
5
5
|
sha256Hex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VJ4B3ZXY.js";
|
|
7
7
|
import {
|
|
8
8
|
DerivationCycleError,
|
|
9
9
|
DuplicateBehaviorNameError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-P7L3OQLL.js";
|
|
11
11
|
|
|
12
12
|
// src/with-formula/derivations/strategy-hash.ts
|
|
13
13
|
async function computeStrategyHash(source, outputKeys, derive, sources) {
|
|
@@ -172,4 +172,4 @@ var DerivationRegistry = class {
|
|
|
172
172
|
export {
|
|
173
173
|
DerivationRegistry
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-WBNXZU42.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
OverlayBaseIsVirtualError,
|
|
3
3
|
OverlayCollectionUnavailableError,
|
|
4
4
|
OverlayNameCollisionError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P7L3OQLL.js";
|
|
6
6
|
|
|
7
7
|
// src/with-formula/overlay-views/registry.ts
|
|
8
8
|
var OverlayedViewRegistry = class {
|
|
@@ -68,4 +68,4 @@ var OverlayedViewRegistry = class {
|
|
|
68
68
|
export {
|
|
69
69
|
OverlayedViewRegistry
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-WKD5ESK4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
walkClosure
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CV7WXCZD.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveManagedSecret
|
|
6
6
|
} from "./chunk-NRNTXBHT.js";
|
|
@@ -8,34 +8,34 @@ import {
|
|
|
8
8
|
parseExtractedPartitionBody,
|
|
9
9
|
readPod,
|
|
10
10
|
readPodHeader
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2IK6AC6A.js";
|
|
12
12
|
import {
|
|
13
13
|
createOwnerKeyring
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E6WANBD6.js";
|
|
15
15
|
import {
|
|
16
16
|
diff
|
|
17
17
|
} from "./chunk-SVLR4POP.js";
|
|
18
18
|
import {
|
|
19
19
|
LedgerStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MNUTPZRQ.js";
|
|
21
21
|
import {
|
|
22
22
|
LEDGER_COLLECTION
|
|
23
23
|
} from "./chunk-I7FD46FF.js";
|
|
24
24
|
import {
|
|
25
25
|
openEnvelopeJson
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-D5UDZANO.js";
|
|
27
27
|
import {
|
|
28
28
|
buildRecordEnvelope
|
|
29
29
|
} from "./chunk-ZVAFJQZB.js";
|
|
30
30
|
import {
|
|
31
31
|
base64ToBuffer,
|
|
32
32
|
wrapKey
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-VJ4B3ZXY.js";
|
|
34
34
|
import {
|
|
35
35
|
AdoptionStateError,
|
|
36
36
|
TransferSealError,
|
|
37
37
|
ValidationError
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-P7L3OQLL.js";
|
|
39
39
|
|
|
40
40
|
// src/with-cargo/vault-diff.ts
|
|
41
41
|
async function diffVault(vault, candidate, options = {}) {
|
|
@@ -196,7 +196,7 @@ function shortJSON(value) {
|
|
|
196
196
|
function withCargo() {
|
|
197
197
|
return {
|
|
198
198
|
async extractPartition(vault, opts) {
|
|
199
|
-
const { extractPartitionCore } = await import("./extract-partition-
|
|
199
|
+
const { extractPartitionCore } = await import("./extract-partition-BG3AF4NZ.js");
|
|
200
200
|
return extractPartitionCore(vault, opts);
|
|
201
201
|
}
|
|
202
202
|
};
|
|
@@ -404,7 +404,7 @@ async function createOwnerOnAdoptedPartition(store, vaultName, opts) {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
if (isManaged(opts)) {
|
|
407
|
-
const { createNoydb } = await import("./noydb-
|
|
407
|
+
const { createNoydb } = await import("./noydb-VZIVPDXG.js");
|
|
408
408
|
const db = await createNoydb({
|
|
409
409
|
store,
|
|
410
410
|
user: userId,
|
|
@@ -460,4 +460,4 @@ export {
|
|
|
460
460
|
withCargo,
|
|
461
461
|
describeExtraction
|
|
462
462
|
};
|
|
463
|
-
//# sourceMappingURL=chunk-
|
|
463
|
+
//# sourceMappingURL=chunk-YEZW6UJA.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isRewrappedUnder,
|
|
3
3
|
rewrapEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D5UDZANO.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope,
|
|
7
7
|
isTombstone,
|
|
@@ -187,4 +187,4 @@ export {
|
|
|
187
187
|
rewrapHistory,
|
|
188
188
|
NO_HISTORY
|
|
189
189
|
};
|
|
190
|
-
//# sourceMappingURL=chunk-
|
|
190
|
+
//# sourceMappingURL=chunk-YOT7D63X.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordAad,
|
|
3
3
|
openEnvelopeJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D5UDZANO.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope
|
|
7
7
|
} from "./chunk-ZVAFJQZB.js";
|
|
8
8
|
import {
|
|
9
9
|
encrypt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VJ4B3ZXY.js";
|
|
11
11
|
|
|
12
12
|
// src/with-shape/persisted-schemas/storage.ts
|
|
13
13
|
var SCHEMAS_COLLECTION = "_schemas";
|
|
@@ -45,4 +45,4 @@ export {
|
|
|
45
45
|
loadPersistedSchema,
|
|
46
46
|
savePersistedSchema
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-YVTADFTC.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildRecordAad,
|
|
3
3
|
openEnvelopeJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D5UDZANO.js";
|
|
5
5
|
import {
|
|
6
6
|
buildRecordEnvelope
|
|
7
7
|
} from "./chunk-ZVAFJQZB.js";
|
|
8
8
|
import {
|
|
9
9
|
encrypt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VJ4B3ZXY.js";
|
|
11
11
|
import {
|
|
12
12
|
ConflictError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P7L3OQLL.js";
|
|
14
14
|
|
|
15
15
|
// src/with-audit/attestation/signer.ts
|
|
16
16
|
import { generateDocSigningKeyPair } from "@noy-db/attestation";
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
loadSigner,
|
|
56
56
|
loadOrCreateSigner
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-ZBDWKPBW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePod
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2IK6AC6A.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/portability/export-accessible.ts
|
|
6
6
|
function resolveAccessibleCollections(keyring, scope, writableOnly = false) {
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
buildAccessibleBundle,
|
|
43
43
|
exportAccessibleData
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-ZPMXYPBR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttestationNotEnabledError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P7L3OQLL.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/attestation/strategy.ts
|
|
6
6
|
var NO_ATTESTATION = {
|
|
@@ -27,4 +27,4 @@ var NO_ATTESTATION = {
|
|
|
27
27
|
export {
|
|
28
28
|
NO_ATTESTATION
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-ZWKF3CD3.js.map
|
package/dist/classified/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
classified,
|
|
3
3
|
luhnCheck,
|
|
4
4
|
withClassified
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-EJIVFOOQ.js";
|
|
6
6
|
import {
|
|
7
7
|
ClassifiedNeverStoredError,
|
|
8
8
|
ClassifiedValidationError,
|
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
isClassifiedFieldSpec,
|
|
12
12
|
isClassifiedGroup,
|
|
13
13
|
resolveClassifiedFields
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-N2HKBESK.js";
|
|
15
|
+
import "../chunk-KDX6VEYV.js";
|
|
16
16
|
import "../chunk-3Y4OFWQJ.js";
|
|
17
17
|
import {
|
|
18
18
|
ClassifiedConfigError,
|
|
19
19
|
ClassifiedRevealError,
|
|
20
20
|
ClassifiedRotationError,
|
|
21
21
|
ClassifiedVerifyError
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-P7L3OQLL.js";
|
|
23
23
|
import "../chunk-PZ5AY32C.js";
|
|
24
24
|
export {
|
|
25
25
|
ClassifiedConfigError,
|
|
@@ -13,11 +13,11 @@ function markerForFields(vdigFields) {
|
|
|
13
13
|
async function persistClassifiedMarkerForFields(store, vault, collectionName, vdigFields, dek) {
|
|
14
14
|
const marker = markerForFields(vdigFields);
|
|
15
15
|
if (marker === null) return;
|
|
16
|
-
const { persistClassifiedMarker } = await import("./register-
|
|
16
|
+
const { persistClassifiedMarker } = await import("./register-UPD4GKBC.js");
|
|
17
17
|
await persistClassifiedMarker({ store, vault, collectionName, dek, marker });
|
|
18
18
|
}
|
|
19
19
|
async function readClassifiedMarkerDigestOnly(store, vault, collectionName, dek) {
|
|
20
|
-
const { loadPersistedSchema } = await import("./storage-
|
|
20
|
+
const { loadPersistedSchema } = await import("./storage-MJHKNQRO.js");
|
|
21
21
|
const persisted = await loadPersistedSchema(store, vault, collectionName, dek);
|
|
22
22
|
return persisted?.classified?.digestOnly ?? [];
|
|
23
23
|
}
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
persistClassifiedMarkerForFields,
|
|
26
26
|
readClassifiedMarkerDigestOnly
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=classified-marker-
|
|
28
|
+
//# sourceMappingURL=classified-marker-PMDG3O36.js.map
|
|
@@ -10,24 +10,24 @@ import {
|
|
|
10
10
|
similarTo,
|
|
11
11
|
syncTierSearch,
|
|
12
12
|
warmIndex
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-OWGEHDT2.js";
|
|
14
|
+
import "./chunk-5JT4Y5UE.js";
|
|
15
15
|
import "./chunk-AURFOK3D.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-PG6PFMDC.js";
|
|
17
|
+
import "./chunk-GYUCRDAU.js";
|
|
18
|
+
import "./chunk-437FDIHO.js";
|
|
19
|
+
import "./chunk-KDX6VEYV.js";
|
|
20
|
+
import "./chunk-RNSC2ARR.js";
|
|
21
|
+
import "./chunk-47ZFULEZ.js";
|
|
22
|
+
import "./chunk-D5UDZANO.js";
|
|
23
23
|
import "./chunk-ZVAFJQZB.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-OQLYMBJI.js";
|
|
25
|
+
import "./chunk-DJ23QZIN.js";
|
|
26
|
+
import "./chunk-SFD2LL7G.js";
|
|
27
27
|
import "./chunk-LP7BEXCT.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-VJ4B3ZXY.js";
|
|
29
29
|
import "./chunk-3Y4OFWQJ.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-P7L3OQLL.js";
|
|
31
31
|
import "./chunk-PZ5AY32C.js";
|
|
32
32
|
export {
|
|
33
33
|
buildPersistedIndexCallbacks,
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
syncTierSearch,
|
|
43
43
|
warmIndex
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=collection-facade-
|
|
45
|
+
//# sourceMappingURL=collection-facade-ZJK5EB33.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComputedFieldError,
|
|
3
3
|
evalComputedFields
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-GDGTIWB4.js";
|
|
5
|
+
import "./chunk-P7L3OQLL.js";
|
|
6
6
|
import "./chunk-PZ5AY32C.js";
|
|
7
7
|
export {
|
|
8
8
|
ComputedFieldError,
|
|
9
9
|
evalComputedFields
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=computed-
|
|
11
|
+
//# sourceMappingURL=computed-UHCBRILW.js.map
|
package/dist/consent/index.js
CHANGED
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
CONSENT_AUDIT_COLLECTION,
|
|
3
3
|
loadConsentEntries,
|
|
4
4
|
writeConsentEntry
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-NYSD43OE.js";
|
|
6
6
|
import {
|
|
7
7
|
NO_CONSENT
|
|
8
8
|
} from "../chunk-PEOZ34EM.js";
|
|
9
9
|
import "../chunk-4AOERLTV.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-D5UDZANO.js";
|
|
11
11
|
import "../chunk-ZVAFJQZB.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-OQLYMBJI.js";
|
|
13
|
+
import "../chunk-DJ23QZIN.js";
|
|
14
|
+
import "../chunk-SFD2LL7G.js";
|
|
15
15
|
import "../chunk-LP7BEXCT.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-VJ4B3ZXY.js";
|
|
17
17
|
import "../chunk-3Y4OFWQJ.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-P7L3OQLL.js";
|
|
19
19
|
import "../chunk-PZ5AY32C.js";
|
|
20
20
|
|
|
21
21
|
// src/with-audit/consent/active.ts
|