[{"data":1,"prerenderedAt":2962},["ShallowReactive",2],{"navigation":3,"\u002Fservices\u002Fsealed-record":927,"mdc--u5mbys-key":2922,"mdc--ftj7m4-key":2938,"mdc-9oucks-key":2950},[4,40,114,446,474,498,596,903],{"title":5,"path":6,"stem":7,"children":8},"Architecture","\u002Farchitecture","architecture",[9,14,28,32,36],{"title":10,"path":6,"stem":11,"access":12,"icon":13},"Overview","architecture\u002Findex","public","i-lucide-network",{"title":10,"path":15,"stem":16,"children":17,"access":12,"icon":19},"\u002Farchitecture\u002Fkernel","architecture\u002F1.kernel\u002Findex",[18,20,24],{"title":10,"path":15,"stem":16,"access":12,"icon":19},"i-lucide-box",{"title":21,"path":22,"stem":23,"access":12},"Enclave","\u002Farchitecture\u002Fkernel\u002Fenclave","architecture\u002F1.kernel\u002Fenclave",{"title":25,"path":26,"stem":27,"access":12},"Forking the enclave","\u002Farchitecture\u002Fkernel\u002Fforking-the-enclave","architecture\u002F1.kernel\u002Fforking-the-enclave",{"title":29,"path":30,"stem":31,"access":12},"Ports","\u002Farchitecture\u002Fports","architecture\u002F2.ports",{"title":33,"path":34,"stem":35,"access":12},"Service layers","\u002Farchitecture\u002Fservice-layers","architecture\u002F3.service-layers",{"title":37,"path":38,"stem":39,"access":12},"Families","\u002Farchitecture\u002Ffamilies","architecture\u002F4.families",{"title":41,"path":42,"stem":43,"children":44},"Core","\u002Fcore","core",[45,47,50,53,56,88,97],{"title":10,"path":42,"stem":46,"access":12,"icon":19},"core\u002Findex",{"title":10,"path":48,"stem":49,"access":12},"\u002Fcore\u002F01-overview","core\u002F01-overview",{"title":10,"path":51,"stem":52,"access":12},"\u002Fcore\u002F05-stores","core\u002F05-stores",{"title":10,"path":54,"stem":55,"access":12},"\u002Fcore\u002F06-permissions-and-keyring","core\u002F06-permissions-and-keyring",{"title":10,"path":57,"stem":58,"children":59,"access":12},"\u002Fcore\u002Fnoydb","core\u002F2.noydb\u002Findex",[60,61,65,68,72,76,80,84],{"title":10,"path":57,"stem":58,"access":12},{"title":62,"path":63,"stem":64,"access":12},"Noydb","\u002Fcore\u002Fnoydb\u002Fmethods","core\u002F2.noydb\u002F1.methods",{"title":21,"path":66,"stem":67,"access":12},"\u002Fcore\u002Fnoydb\u002Fenclave","core\u002F2.noydb\u002F2.enclave",{"title":69,"path":70,"stem":71,"access":12},"Secret & keyring","\u002Fcore\u002Fnoydb\u002Fkeyring","core\u002F2.noydb\u002F3.keyring",{"title":73,"path":74,"stem":75,"access":12},"Authentication","\u002Fcore\u002Fnoydb\u002Fauthentication","core\u002F2.noydb\u002F4.authentication",{"title":77,"path":78,"stem":79,"access":12},"Auth recovery","\u002Fcore\u002Fnoydb\u002Frecovery","core\u002F2.noydb\u002F5.recovery",{"title":81,"path":82,"stem":83,"access":12},"Configuration","\u002Fcore\u002Fnoydb\u002Fconfiguration","core\u002F2.noydb\u002F6.configuration",{"title":85,"path":86,"stem":87,"access":12},"Strategies","\u002Fcore\u002Fnoydb\u002Fstrategies","core\u002F2.noydb\u002F7.strategies",{"title":10,"path":89,"stem":90,"children":91,"access":12},"\u002Fcore\u002Fvault","core\u002F3.vault\u002Findex",[92,93],{"title":10,"path":89,"stem":90,"access":12},{"title":94,"path":95,"stem":96,"access":12},"Vault","\u002Fcore\u002Fvault\u002Fmethods","core\u002F3.vault\u002F1.methods",{"title":10,"path":98,"stem":99,"children":100,"access":12},"\u002Fcore\u002Fcollection","core\u002F4.collection\u002Findex",[101,102,106,110],{"title":10,"path":98,"stem":99,"access":12},{"title":103,"path":104,"stem":105,"access":12},"Collection","\u002Fcore\u002Fcollection\u002Fmethods","core\u002F4.collection\u002F1.methods",{"title":107,"path":108,"stem":109,"access":12},"Querying","\u002Fcore\u002Fcollection\u002Fquerying","core\u002F4.collection\u002F2.querying",{"title":111,"path":112,"stem":113,"access":12},"Schema","\u002Fcore\u002Fcollection\u002Fschema","core\u002F4.collection\u002F3.schema",{"title":37,"path":115,"stem":116,"children":117},"\u002Ffamilies","families",[118,121,168,194,208,212,216,294,340],{"title":10,"path":115,"stem":119,"access":12,"icon":120},"families\u002Findex","i-lucide-plug",{"title":122,"path":123,"stem":124,"children":125,"access":12,"icon":127},"as-Exports","\u002Ffamilies\u002Fas","families\u002Fas\u002Findex",[126,128,132,136,140,144,148,152,156,160,164],{"title":122,"path":123,"stem":124,"access":12,"icon":127},"i-lucide-book-open",{"title":129,"path":130,"stem":131,"access":12},"aws-s3","\u002Ffamilies\u002Fas\u002Faws-s3","families\u002Fas\u002Faws-s3",{"title":133,"path":134,"stem":135,"access":12},"blob","\u002Ffamilies\u002Fas\u002Fblob","families\u002Fas\u002Fblob",{"title":137,"path":138,"stem":139,"access":12},"csv","\u002Ffamilies\u002Fas\u002Fcsv","families\u002Fas\u002Fcsv",{"title":141,"path":142,"stem":143,"access":12},"json","\u002Ffamilies\u002Fas\u002Fjson","families\u002Fas\u002Fjson",{"title":145,"path":146,"stem":147,"access":12},"ndjson","\u002Ffamilies\u002Fas\u002Fndjson","families\u002Fas\u002Fndjson",{"title":149,"path":150,"stem":151,"access":12},"noydb","\u002Ffamilies\u002Fas\u002Fnoydb","families\u002Fas\u002Fnoydb",{"title":153,"path":154,"stem":155,"access":12},"sql","\u002Ffamilies\u002Fas\u002Fsql","families\u002Fas\u002Fsql",{"title":157,"path":158,"stem":159,"access":12},"xlsx","\u002Ffamilies\u002Fas\u002Fxlsx","families\u002Fas\u002Fxlsx",{"title":161,"path":162,"stem":163,"access":12},"xml","\u002Ffamilies\u002Fas\u002Fxml","families\u002Fas\u002Fxml",{"title":165,"path":166,"stem":167,"access":12},"zip","\u002Ffamilies\u002Fas\u002Fzip","families\u002Fas\u002Fzip",{"title":169,"path":170,"stem":171,"children":172,"access":12,"icon":127},"at-Seals","\u002Ffamilies\u002Fat","families\u002Fat\u002Findex",[173,174,178,182,186,190],{"title":169,"path":170,"stem":171,"access":12,"icon":127},{"title":175,"path":176,"stem":177,"access":12},"aws-kms","\u002Ffamilies\u002Fat\u002Faws-kms","families\u002Fat\u002Faws-kms",{"title":179,"path":180,"stem":181,"access":12},"azure-keyvault","\u002Ffamilies\u002Fat\u002Fazure-keyvault","families\u002Fat\u002Fazure-keyvault",{"title":183,"path":184,"stem":185,"access":12},"env","\u002Ffamilies\u002Fat\u002Fenv","families\u002Fat\u002Fenv",{"title":187,"path":188,"stem":189,"access":12},"gcp-kms","\u002Ffamilies\u002Fat\u002Fgcp-kms","families\u002Fat\u002Fgcp-kms",{"title":191,"path":192,"stem":193,"access":12},"macos-keychain","\u002Ffamilies\u002Fat\u002Fmacos-keychain","families\u002Fat\u002Fmacos-keychain",{"title":195,"path":196,"stem":197,"children":198,"access":12,"icon":127},"by-Sessions","\u002Ffamilies\u002Fby","families\u002Fby\u002Findex",[199,200,204],{"title":195,"path":196,"stem":197,"access":12,"icon":127},{"title":201,"path":202,"stem":203,"access":12},"peer","\u002Ffamilies\u002Fby\u002Fpeer","families\u002Fby\u002Fpeer",{"title":205,"path":206,"stem":207,"access":12},"tabs","\u002Ffamilies\u002Fby\u002Ftabs","families\u002Fby\u002Ftabs",{"title":209,"path":210,"stem":211,"access":12},"Classifying a package","\u002Ffamilies\u002Fclassification","families\u002Fclassification",{"title":213,"path":214,"stem":215,"access":12},"Command-line tools","\u002Ffamilies\u002Fcli","families\u002Fcli",{"title":217,"path":218,"stem":219,"children":220,"access":12,"icon":127},"in-Frameworks","\u002Ffamilies\u002Fin","families\u002Fin\u002Findex",[221,222,226,230,234,238,242,246,250,254,258,262,266,270,274,278,282,286,290],{"title":217,"path":218,"stem":219,"access":12,"icon":127},{"title":223,"path":224,"stem":225,"access":12},"ai","\u002Ffamilies\u002Fin\u002Fai","families\u002Fin\u002Fai",{"title":227,"path":228,"stem":229,"access":12},"devtools","\u002Ffamilies\u002Fin\u002Fdevtools","families\u002Fin\u002Fdevtools",{"title":231,"path":232,"stem":233,"access":12},"devtools-tui","\u002Ffamilies\u002Fin\u002Fdevtools-tui","families\u002Fin\u002Fdevtools-tui",{"title":235,"path":236,"stem":237,"access":12},"liff","\u002Ffamilies\u002Fin\u002Fliff","families\u002Fin\u002Fliff",{"title":239,"path":240,"stem":241,"access":12},"nextjs","\u002Ffamilies\u002Fin\u002Fnextjs","families\u002Fin\u002Fnextjs",{"title":243,"path":244,"stem":245,"access":12},"nuxt","\u002Ffamilies\u002Fin\u002Fnuxt","families\u002Fin\u002Fnuxt",{"title":247,"path":248,"stem":249,"access":12},"pinia","\u002Ffamilies\u002Fin\u002Fpinia","families\u002Fin\u002Fpinia",{"title":251,"path":252,"stem":253,"access":12},"pwa","\u002Ffamilies\u002Fin\u002Fpwa","families\u002Fin\u002Fpwa",{"title":255,"path":256,"stem":257,"access":12},"react","\u002Ffamilies\u002Fin\u002Freact","families\u002Fin\u002Freact",{"title":259,"path":260,"stem":261,"access":12},"relay","\u002Ffamilies\u002Fin\u002Frelay","families\u002Fin\u002Frelay",{"title":263,"path":264,"stem":265,"access":12},"rest","\u002Ffamilies\u002Fin\u002Frest","families\u002Fin\u002Frest",{"title":267,"path":268,"stem":269,"access":12},"solid","\u002Ffamilies\u002Fin\u002Fsolid","families\u002Fin\u002Fsolid",{"title":271,"path":272,"stem":273,"access":12},"svelte","\u002Ffamilies\u002Fin\u002Fsvelte","families\u002Fin\u002Fsvelte",{"title":275,"path":276,"stem":277,"access":12},"tanstack-query","\u002Ffamilies\u002Fin\u002Ftanstack-query","families\u002Fin\u002Ftanstack-query",{"title":279,"path":280,"stem":281,"access":12},"tanstack-table","\u002Ffamilies\u002Fin\u002Ftanstack-table","families\u002Fin\u002Ftanstack-table",{"title":283,"path":284,"stem":285,"access":12},"vue","\u002Ffamilies\u002Fin\u002Fvue","families\u002Fin\u002Fvue",{"title":287,"path":288,"stem":289,"access":12},"yjs","\u002Ffamilies\u002Fin\u002Fyjs","families\u002Fin\u002Fyjs",{"title":291,"path":292,"stem":293,"access":12},"zustand","\u002Ffamilies\u002Fin\u002Fzustand","families\u002Fin\u002Fzustand",{"title":295,"path":296,"stem":297,"children":298,"access":12,"icon":127},"on-Auth","\u002Ffamilies\u002Fon","families\u002Fon\u002Findex",[299,300,304,308,312,316,320,324,328,332,336],{"title":295,"path":296,"stem":297,"access":12,"icon":127},{"title":301,"path":302,"stem":303,"access":12},"email-otp","\u002Ffamilies\u002Fon\u002Femail-otp","families\u002Fon\u002Femail-otp",{"title":305,"path":306,"stem":307,"access":12},"magic-link","\u002Ffamilies\u002Fon\u002Fmagic-link","families\u002Fon\u002Fmagic-link",{"title":309,"path":310,"stem":311,"access":12},"oidc","\u002Ffamilies\u002Fon\u002Foidc","families\u002Fon\u002Foidc",{"title":313,"path":314,"stem":315,"access":12},"password","\u002Ffamilies\u002Fon\u002Fpassword","families\u002Fon\u002Fpassword",{"title":317,"path":318,"stem":319,"access":12},"pin","\u002Ffamilies\u002Fon\u002Fpin","families\u002Fon\u002Fpin",{"title":321,"path":322,"stem":323,"access":12},"recovery","\u002Ffamilies\u002Fon\u002Frecovery","families\u002Fon\u002Frecovery",{"title":325,"path":326,"stem":327,"access":12},"shamir","\u002Ffamilies\u002Fon\u002Fshamir","families\u002Fon\u002Fshamir",{"title":329,"path":330,"stem":331,"access":12},"threat","\u002Ffamilies\u002Fon\u002Fthreat","families\u002Fon\u002Fthreat",{"title":333,"path":334,"stem":335,"access":12},"totp","\u002Ffamilies\u002Fon\u002Ftotp","families\u002Fon\u002Ftotp",{"title":337,"path":338,"stem":339,"access":12},"webauthn","\u002Ffamilies\u002Fon\u002Fwebauthn","families\u002Fon\u002Fwebauthn",{"title":341,"path":342,"stem":343,"children":344,"access":12,"icon":127},"to-Stores","\u002Ffamilies\u002Fto","families\u002Fto\u002Findex",[345,346,350,353,357,361,365,370,374,378,382,386,390,394,398,402,406,410,414,417,421,425,429,434,438,442],{"title":341,"path":342,"stem":343,"access":12,"icon":127},{"title":347,"path":348,"stem":349,"access":12},"aws-dynamo","\u002Ffamilies\u002Fto\u002Faws-dynamo","families\u002Fto\u002Faws-dynamo",{"title":129,"path":351,"stem":352,"access":12},"\u002Ffamilies\u002Fto\u002Faws-s3","families\u002Fto\u002Faws-s3",{"title":354,"path":355,"stem":356,"access":12},"browser-fs","\u002Ffamilies\u002Fto\u002Fbrowser-fs","families\u002Fto\u002Fbrowser-fs",{"title":358,"path":359,"stem":360,"access":12},"browser-idb","\u002Ffamilies\u002Fto\u002Fbrowser-idb","families\u002Fto\u002Fbrowser-idb",{"title":362,"path":363,"stem":364,"access":12},"browser-local","\u002Ffamilies\u002Fto\u002Fbrowser-local","families\u002Fto\u002Fbrowser-local",{"title":366,"path":367,"stem":368,"access":12,"icon":369},"Choosing a store","\u002Ffamilies\u002Fto\u002Fchoosing-a-store","families\u002Fto\u002Fchoosing-a-store","i-lucide-split",{"title":371,"path":372,"stem":373,"access":12},"cloudflare-d1","\u002Ffamilies\u002Fto\u002Fcloudflare-d1","families\u002Fto\u002Fcloudflare-d1",{"title":375,"path":376,"stem":377,"access":12},"cloudflare-r2","\u002Ffamilies\u002Fto\u002Fcloudflare-r2","families\u002Fto\u002Fcloudflare-r2",{"title":379,"path":380,"stem":381,"access":12},"drive","\u002Ffamilies\u002Fto\u002Fdrive","families\u002Fto\u002Fdrive",{"title":383,"path":384,"stem":385,"access":12},"file","\u002Ffamilies\u002Fto\u002Ffile","families\u002Fto\u002Ffile",{"title":387,"path":388,"stem":389,"access":12},"icloud","\u002Ffamilies\u002Fto\u002Ficloud","families\u002Fto\u002Ficloud",{"title":391,"path":392,"stem":393,"access":12},"memory","\u002Ffamilies\u002Fto\u002Fmemory","families\u002Fto\u002Fmemory",{"title":395,"path":396,"stem":397,"access":12},"meter","\u002Ffamilies\u002Fto\u002Fmeter","families\u002Fto\u002Fmeter",{"title":399,"path":400,"stem":401,"access":12},"mysql","\u002Ffamilies\u002Fto\u002Fmysql","families\u002Fto\u002Fmysql",{"title":403,"path":404,"stem":405,"access":12},"nfs","\u002Ffamilies\u002Fto\u002Fnfs","families\u002Fto\u002Fnfs",{"title":407,"path":408,"stem":409,"access":12},"postgres","\u002Ffamilies\u002Fto\u002Fpostgres","families\u002Fto\u002Fpostgres",{"title":411,"path":412,"stem":413,"access":12},"probe","\u002Ffamilies\u002Fto\u002Fprobe","families\u002Fto\u002Fprobe",{"title":263,"path":415,"stem":416,"access":12},"\u002Ffamilies\u002Fto\u002Frest","families\u002Fto\u002Frest",{"title":418,"path":419,"stem":420,"access":12},"smb","\u002Ffamilies\u002Fto\u002Fsmb","families\u002Fto\u002Fsmb",{"title":422,"path":423,"stem":424,"access":12},"sqlite","\u002Ffamilies\u002Fto\u002Fsqlite","families\u002Fto\u002Fsqlite",{"title":426,"path":427,"stem":428,"access":12},"ssh","\u002Ffamilies\u002Fto\u002Fssh","families\u002Fto\u002Fssh",{"title":430,"path":431,"stem":432,"access":12,"icon":433},"Store-locator descriptors","\u002Ffamilies\u002Fto\u002Fstore-locator","families\u002Fto\u002Fstore-locator","i-lucide-map-pin",{"title":435,"path":436,"stem":437,"access":12},"supabase","\u002Ffamilies\u002Fto\u002Fsupabase","families\u002Fto\u002Fsupabase",{"title":439,"path":440,"stem":441,"access":12},"turso","\u002Ffamilies\u002Fto\u002Fturso","families\u002Fto\u002Fturso",{"title":443,"path":444,"stem":445,"access":12},"webdav","\u002Ffamilies\u002Fto\u002Fwebdav","families\u002Fto\u002Fwebdav",{"title":447,"path":448,"stem":449,"children":450},"Faq","\u002Ffaq","faq",[451,454,458,462,466,470],{"title":10,"path":448,"stem":452,"access":12,"icon":453},"faq\u002Findex","i-lucide-circle-help",{"title":455,"path":456,"stem":457,"access":12},"Where can noy-db run?","\u002Ffaq\u002Fwhere-can-noy-db-run","faq\u002F1.where-can-noy-db-run",{"title":459,"path":460,"stem":461,"access":12},"Native mobile & PWA","\u002Ffaq\u002Fmobile-and-pwa","faq\u002F2.mobile-and-pwa",{"title":463,"path":464,"stem":465,"access":12},"Threat model","\u002Ffaq\u002Fthreat-model","faq\u002F3.threat-model",{"title":467,"path":468,"stem":469,"access":12},"Community & ecosystem","\u002Ffaq\u002Fcommunity-and-ecosystem","faq\u002F4.community-and-ecosystem",{"title":471,"path":472,"stem":473,"access":12},"Licensing","\u002Ffaq\u002Flicensing","faq\u002F5.licensing",{"title":475,"path":476,"stem":477,"children":478},"Glossary","\u002Fglossary","glossary",[479,482,486,490,494],{"title":10,"path":476,"stem":480,"access":12,"icon":481},"glossary\u002Findex","i-lucide-book-a",{"title":483,"path":484,"stem":485,"access":12},"Core vocabulary","\u002Fglossary\u002Fcore-vocabulary","glossary\u002Fcore-vocabulary",{"title":487,"path":488,"stem":489,"access":12},"Deletion vocabulary","\u002Fglossary\u002Fdeletion","glossary\u002Fdeletion",{"title":491,"path":492,"stem":493,"access":12},"Satellite collection vocabulary","\u002Fglossary\u002Fsatellite-collections","glossary\u002Fsatellite-collections",{"title":495,"path":496,"stem":497,"access":12},"Schema migration vocabulary","\u002Fglossary\u002Fschema-migration","glossary\u002Fschema-migration",{"title":499,"path":500,"stem":501,"children":502},"Recipes","\u002Frecipes","recipes",[503,506,510,514,518,522,526,530,534,538,542,546,550,554,558,562,567,571,575,580,584,588,592],{"title":10,"path":500,"stem":504,"access":12,"icon":505},"recipes\u002Findex","i-lucide-play",{"title":507,"path":508,"stem":509,"access":12},"Accounting app","\u002Frecipes\u002Faccounting-app","recipes\u002Faccounting-app",{"title":511,"path":512,"stem":513,"access":12},"Analytics app","\u002Frecipes\u002Fanalytics-app","recipes\u002Fanalytics-app",{"title":515,"path":516,"stem":517,"access":12},"Attestation verifier","\u002Frecipes\u002Fattestation-verifier","recipes\u002Fattestation-verifier",{"title":519,"path":520,"stem":521,"access":12},"AWS-KMS attestation","\u002Frecipes\u002Faws-kms-pdf-attestation","recipes\u002Faws-kms-pdf-attestation",{"title":523,"path":524,"stem":525,"access":12},"Browser durability","\u002Frecipes\u002Fbrowser-durability","recipes\u002Fbrowser-durability",{"title":527,"path":528,"stem":529,"access":12},"Production cloud store","\u002Frecipes\u002Fcloud-store","recipes\u002Fcloud-store",{"title":531,"path":532,"stem":533,"access":12},"Compose your own setup","\u002Frecipes\u002Fcompose-your-own","recipes\u002Fcompose-your-own",{"title":535,"path":536,"stem":537,"access":12},"Confidential HR records","\u002Frecipes\u002Fconfidential-hr","recipes\u002Fconfidential-hr",{"title":539,"path":540,"stem":541,"access":12},"Composing an echo secret","\u002Frecipes\u002Fecho-secret-enrollment","recipes\u002Fecho-secret-enrollment",{"title":543,"path":544,"stem":545,"access":12},"Email archive","\u002Frecipes\u002Femail-archive","recipes\u002Femail-archive",{"title":547,"path":548,"stem":549,"access":12},"Email archive — threads & revisions","\u002Frecipes\u002Femail-archive-threads-revisions","recipes\u002Femail-archive-threads-revisions",{"title":551,"path":552,"stem":553,"access":12},"Export & portability","\u002Frecipes\u002Fexport-portability","recipes\u002Fexport-portability",{"title":555,"path":556,"stem":557,"access":12},"Passwordless OIDC (AWS Cognito)","\u002Frecipes\u002Fpasswordless-oidc","recipes\u002Fpasswordless-oidc",{"title":559,"path":560,"stem":561,"access":12},"Personal notebook","\u002Frecipes\u002Fpersonal-notebook","recipes\u002Fpersonal-notebook",{"title":563,"path":564,"stem":565,"access":12,"icon":566},"Playgrounds","\u002Frecipes\u002Fplaygrounds","recipes\u002Fplaygrounds","i-lucide-gamepad-2",{"title":568,"path":569,"stem":570,"access":12},"React invoice app","\u002Frecipes\u002Freact-invoices","recipes\u002Freact-invoices",{"title":572,"path":573,"stem":574,"access":12},"Collaborative app","\u002Frecipes\u002Frealtime-crdt-app","recipes\u002Frealtime-crdt-app",{"title":576,"path":577,"stem":578,"access":12,"icon":579},"Run the showcases","\u002Frecipes\u002Frun-the-showcases","recipes\u002Frun-the-showcases","i-lucide-flask-conical",{"title":581,"path":582,"stem":583,"access":12},"Search & RAG","\u002Frecipes\u002Fsearch-rag","recipes\u002Fsearch-rag",{"title":585,"path":586,"stem":587,"access":12},"Team vault topology","\u002Frecipes\u002Fteam-vault-topology","recipes\u002Fteam-vault-topology",{"title":589,"path":590,"stem":591,"access":12},"Unlock ceremonies","\u002Frecipes\u002Funlock-ceremonies","recipes\u002Funlock-ceremonies",{"title":593,"path":594,"stem":595,"access":12},"User preferences","\u002Frecipes\u002Fuser-preferences","recipes\u002Fuser-preferences",{"title":597,"path":598,"stem":599,"children":600},"Services","\u002Fservices","services",[601,604,608,612,616,620,624,628,632,636,640,644,648,652,656,660,664,668,672,676,680,684,688,692,696,700,704,710,714,718,722,726,730,734,738,742,746,750,755,759,763,767,771,775,779,783,787,791,795,799,803,807,811,815,819,823,827,831,835,839,843,847,851,855,859,863,867,871,875,879,883,887,891,895,899],{"title":10,"path":598,"stem":602,"access":12,"icon":603},"services\u002Findex","i-lucide-layers",{"title":605,"path":606,"stem":607,"access":12},"archive","\u002Fservices\u002Farchive","services\u002Farchive",{"title":609,"path":610,"stem":611,"access":12},"attestation","\u002Fservices\u002Fattestation","services\u002Fattestation",{"title":613,"path":614,"stem":615,"access":12},"auth-introspection","\u002Fservices\u002Fauth-introspection","services\u002Fauth-introspection",{"title":617,"path":618,"stem":619,"access":12},"auth-landscape","\u002Fservices\u002Fauth-landscape","services\u002Fauth-landscape",{"title":621,"path":622,"stem":623,"access":12},"blobs","\u002Fservices\u002Fblobs","services\u002Fblobs",{"title":625,"path":626,"stem":627,"access":12},"broker","\u002Fservices\u002Fbroker","services\u002Fbroker",{"title":629,"path":630,"stem":631,"access":12},"bundle","\u002Fservices\u002Fbundle","services\u002Fbundle",{"title":633,"path":634,"stem":635,"access":12},"classified","\u002Fservices\u002Fclassified","services\u002Fclassified",{"title":637,"path":638,"stem":639,"access":12},"computed","\u002Fservices\u002Fcomputed","services\u002Fcomputed",{"title":641,"path":642,"stem":643,"access":12},"consent","\u002Fservices\u002Fconsent","services\u002Fconsent",{"title":645,"path":646,"stem":647,"access":12},"cover","\u002Fservices\u002Fcover","services\u002Fcover",{"title":649,"path":650,"stem":651,"access":12},"coverage","\u002Fservices\u002Fcoverage","services\u002Fcoverage",{"title":653,"path":654,"stem":655,"access":12},"crdt","\u002Fservices\u002Fcrdt","services\u002Fcrdt",{"title":657,"path":658,"stem":659,"access":12},"cross-join","\u002Fservices\u002Fcross-join","services\u002Fcross-join",{"title":661,"path":662,"stem":663,"access":12},"custody","\u002Fservices\u002Fcustody","services\u002Fcustody",{"title":665,"path":666,"stem":667,"access":12},"derivations","\u002Fservices\u002Fderivations","services\u002Fderivations",{"title":669,"path":670,"stem":671,"access":12},"directory","\u002Fservices\u002Fdirectory","services\u002Fdirectory",{"title":673,"path":674,"stem":675,"access":12},"search — AI","\u002Fservices\u002Fembeddings","services\u002Fembeddings",{"title":677,"path":678,"stem":679,"access":12},"Field metadata","\u002Fservices\u002Ffield-metadata","services\u002Ffield-metadata",{"title":681,"path":682,"stem":683,"access":12},"Foreign refs","\u002Fservices\u002Fforeign-refs","services\u002Fforeign-refs",{"title":685,"path":686,"stem":687,"access":12},"forget","\u002Fservices\u002Fforget","services\u002Fforget",{"title":689,"path":690,"stem":691,"access":12},"governance","\u002Fservices\u002Fgovernance","services\u002Fgovernance",{"title":693,"path":694,"stem":695,"access":12},"guards","\u002Fservices\u002Fguards","services\u002Fguards",{"title":697,"path":698,"stem":699,"access":12},"history","\u002Fservices\u002Fhistory","services\u002Fhistory",{"title":701,"path":702,"stem":703,"access":12},"i18n","\u002Fservices\u002Fi18n","services\u002Fi18n",{"title":705,"path":706,"stem":707,"children":708,"access":12},"indexing","\u002Fservices\u002Findexing","services\u002Findexing",[709],{"title":705,"path":706,"stem":707,"access":12},{"title":711,"path":712,"stem":713,"access":12},"introspection","\u002Fservices\u002Fintrospection","services\u002Fintrospection",{"title":715,"path":716,"stem":717,"access":12},"joins","\u002Fservices\u002Fjoins","services\u002Fjoins",{"title":719,"path":720,"stem":721,"access":12},"lazy","\u002Fservices\u002Flazy","services\u002Flazy",{"title":723,"path":724,"stem":725,"access":12},"links","\u002Fservices\u002Flinks","services\u002Flinks",{"title":727,"path":728,"stem":729,"access":12},"live","\u002Fservices\u002Flive","services\u002Flive",{"title":731,"path":732,"stem":733,"access":12},"lookup","\u002Fservices\u002Flookup","services\u002Flookup",{"title":735,"path":736,"stem":737,"access":12},"manifest","\u002Fservices\u002Fmanifest","services\u002Fmanifest",{"title":739,"path":740,"stem":741,"access":12},"materialized-views","\u002Fservices\u002Fmaterialized-views","services\u002Fmaterialized-views",{"title":743,"path":744,"stem":745,"access":12},"Metadata ladder","\u002Fservices\u002Fmetadata-ladder","services\u002Fmetadata-ladder",{"title":747,"path":748,"stem":749,"access":12},"Metadata riders","\u002Fservices\u002Fmetadata-riders","services\u002Fmetadata-riders",{"title":751,"path":752,"stem":753,"access":12,"badge":754},"metrics","\u002Fservices\u002Fmetrics","services\u002Fmetrics","Planned",{"title":756,"path":757,"stem":758,"access":12,"badge":754},"migrations","\u002Fservices\u002Fmigrations","services\u002Fmigrations",{"title":760,"path":761,"stem":762,"access":12},"money","\u002Fservices\u002Fmoney","services\u002Fmoney",{"title":764,"path":765,"stem":766,"access":12},"numbering","\u002Fservices\u002Fnumbering","services\u002Fnumbering",{"title":768,"path":769,"stem":770,"access":12},"overlay-views","\u002Fservices\u002Foverlay-views","services\u002Foverlay-views",{"title":772,"path":773,"stem":774,"access":12,"badge":754},"partitioning","\u002Fservices\u002Fpartitioning","services\u002Fpartitioning",{"title":776,"path":777,"stem":778,"access":12},"periods","\u002Fservices\u002Fperiods","services\u002Fperiods",{"title":780,"path":781,"stem":782,"access":12},"persisted-schemas","\u002Fservices\u002Fpersisted-schemas","services\u002Fpersisted-schemas",{"title":784,"path":785,"stem":786,"access":12},"plaintext-bypass","\u002Fservices\u002Fplaintext-bypass","services\u002Fplaintext-bypass",{"title":788,"path":789,"stem":790,"access":12},"pod-redirect","\u002Fservices\u002Fpod-redirect","services\u002Fpod-redirect",{"title":792,"path":793,"stem":794,"access":12},"pod-signature","\u002Fservices\u002Fpod-signature","services\u002Fpod-signature",{"title":796,"path":797,"stem":798,"access":12},"policy","\u002Fservices\u002Fpolicy","services\u002Fpolicy",{"title":800,"path":801,"stem":802,"access":12},"portability","\u002Fservices\u002Fportability","services\u002Fportability",{"title":804,"path":805,"stem":806,"access":12},"reduce","\u002Fservices\u002Freduce","services\u002Freduce",{"title":808,"path":809,"stem":810,"access":12},"routing","\u002Fservices\u002Frouting","services\u002Frouting",{"title":812,"path":813,"stem":814,"access":12},"satellites","\u002Fservices\u002Fsatellites","services\u002Fsatellites",{"title":816,"path":817,"stem":818,"access":12},"schema-identifiers","\u002Fservices\u002Fschema-identifiers","services\u002Fschema-identifiers",{"title":820,"path":821,"stem":822,"access":12},"schema-update","\u002Fservices\u002Fschema-update","services\u002Fschema-update",{"title":824,"path":825,"stem":826,"access":12},"sealed-record","\u002Fservices\u002Fsealed-record","services\u002Fsealed-record",{"title":828,"path":829,"stem":830,"access":12},"sealing provider id","\u002Fservices\u002Fsealing-pid-stability","services\u002Fsealing-pid-stability",{"title":832,"path":833,"stem":834,"access":12},"search — full-text","\u002Fservices\u002Fsearch","services\u002Fsearch",{"title":836,"path":837,"stem":838,"access":12},"sequence","\u002Fservices\u002Fsequence","services\u002Fsequence",{"title":840,"path":841,"stem":842,"access":12},"session","\u002Fservices\u002Fsession","services\u002Fsession",{"title":844,"path":845,"stem":846,"access":12},"session-tiers","\u002Fservices\u002Fsession-tiers","services\u002Fsession-tiers",{"title":848,"path":849,"stem":850,"access":12},"shadow","\u002Fservices\u002Fshadow","services\u002Fshadow",{"title":852,"path":853,"stem":854,"access":12},"share-link","\u002Fservices\u002Fshare-link","services\u002Fshare-link",{"title":856,"path":857,"stem":858,"access":12},"snapshots","\u002Fservices\u002Fsnapshots","services\u002Fsnapshots",{"title":860,"path":861,"stem":862,"access":12},"store capabilities","\u002Fservices\u002Fstorage-capability-matrix","services\u002Fstorage-capability-matrix",{"title":864,"path":865,"stem":866,"access":12},"sync","\u002Fservices\u002Fsync","services\u002Fsync",{"title":868,"path":869,"stem":870,"access":12},"team","\u002Fservices\u002Fteam","services\u002Fteam",{"title":872,"path":873,"stem":874,"access":12},"tiers","\u002Fservices\u002Ftiers","services\u002Ftiers",{"title":876,"path":877,"stem":878,"access":12},"transactions","\u002Fservices\u002Ftransactions","services\u002Ftransactions",{"title":880,"path":881,"stem":882,"access":12},"partitions","\u002Fservices\u002Ftransferable-partitions","services\u002Ftransferable-partitions",{"title":884,"path":885,"stem":886,"access":12},"user-envelope","\u002Fservices\u002Fuser-envelope","services\u002Fuser-envelope",{"title":888,"path":889,"stem":890,"access":12,"badge":754},"validation","\u002Fservices\u002Fvalidation","services\u002Fvalidation",{"title":892,"path":893,"stem":894,"access":12},"vault-head","\u002Fservices\u002Fvault-head","services\u002Fvault-head",{"title":896,"path":897,"stem":898,"access":12},"via","\u002Fservices\u002Fvia","services\u002Fvia",{"title":900,"path":901,"stem":902,"access":12},"withdrawal","\u002Fservices\u002Fwithdrawal","services\u002Fwithdrawal",{"title":904,"path":905,"stem":906,"children":907},"Start","\u002Fstart","start",[908,911,915,919,923],{"title":10,"path":905,"stem":909,"access":12,"icon":910},"start\u002Findex","i-lucide-flag",{"title":912,"path":913,"stem":914,"access":12},"Install","\u002Fstart\u002Finstall","start\u002F1.install",{"title":916,"path":917,"stem":918,"access":12},"Your first vault","\u002Fstart\u002Ffirst-vault","start\u002F2.first-vault",{"title":920,"path":921,"stem":922,"access":12},"Your first service","\u002Fstart\u002Ffirst-service","start\u002F3.first-service",{"title":924,"path":925,"stem":926,"access":12},"See the ciphertext","\u002Fstart\u002Fsee-the-ciphertext","start\u002F4.see-the-ciphertext",{"id":928,"title":824,"access":12,"apiToc":929,"body":930,"category":2913,"description":2914,"extension":2915,"meta":2916,"navigation":2913,"nest":2917,"path":825,"seo":2918,"sinceVersion":2913,"status":2919,"stem":826,"subtitle":2913,"tier":2920,"tocExternal":2913,"__hash__":2921},"docs\u002Fservices\u002Fsealed-record.md",false,{"type":931,"value":932,"toc":2892},"minimark",[933,936,940,945,979,1007,1010,1053,1057,1073,1077,1090,1387,1410,1414,1419,1434,1672,1720,1730,1809,1813,1819,1917,1960,1988,2083,2087,2100,2204,2209,2213,2218,2236,2253,2259,2338,2364,2370,2429,2446,2452,2473,2479,2485,2619,2644,2648,2725,2729,2796,2800,2839,2843,2888],[934,935,824],"h1",{"id":824},[937,938],"service-meta",{":rows":939},"[{\"label\":\"Subpath\",\"value\":\"`@noy-db\u002Fhub\u002Fsealed-record`\"},{\"label\":\"Factory\",\"value\":\"`withSealedRecord()`\"},{\"label\":\"Layer\",\"value\":\"`with-audit`\"}]",[941,942,944],"h2",{"id":943},"what-it-does","What it does",[946,947,948,949,953,954,957,958,962,963,966,967,970,971,974,975,978],"p",{},"Sometimes an outside system needs to read ",[950,951,952],"strong",{},"one specific record"," — and only that record —\nwithout becoming a full member of the vault (an encrypted, per-tenant data space that groups\nrelated ",[950,955,956],{},"collections"," of records — see ",[959,960,961],"a",{"href":48},"Core 01 — Vault and collections",").\n",[964,965,824],"code",{}," lets a vault owner (the ",[950,968,969],{},"grantor",", who holds the collection's shared\n",[959,972,973],{"href":66},"data-encryption key",") seal a single record's own per-record key to an\nexternal ",[950,976,977],{},"host",", so that host can decrypt exactly that record and nothing else: not the\ncollection key, not any other record.",[946,980,981,982,986,987,990,991,994,995,999,1000,1006],{},"This builds on ",[959,983,985],{"href":984},"\u002Fcore\u002Fnoydb\u002Fenclave#per-record-keys-cek","per-record keys",": when a\ncollection opts into ",[964,988,989],{},"perRecordKeys: true",", every record gets its own AES-256-GCM key (the\n",[950,992,993],{},"CEK",", content-encryption key) instead of sharing the collection's key. Sealing hands a\n",[996,997,998],"em",{},"copy"," of one record's CEK to the host, wrapped (\"sealed\") so only that host can open it —\nthe same sealing mechanism the ",[959,1001,1002,1005],{"href":170},[964,1003,1004],{},"at-*"," key-provider family"," uses elsewhere in\nnoy-db. The host never touches the vault's collection key and cannot decrypt anything the\ngrantor didn't explicitly seal to it.",[946,1008,1009],{},"Two sides make up the feature:",[1011,1012,1013,1036],"ul",{},[1014,1015,1016,1019,1020,1023,1024,1027,1028,1031,1032,1035],"li",{},[950,1017,1018],{},"Grantor side"," (",[964,1021,1022],{},"vault.sealRecordToHost",", ",[964,1025,1026],{},"vault.revokeSealedRecord",",\n",[964,1029,1030],{},"vault.rotateRecordCek",") — lives on the vault, because sealing a CEK requires the\ncollection key to unwrap it first. This is the opt-in capability gated by\n",[964,1033,1034],{},"withSealedRecord()",".",[1014,1037,1038,1019,1041,1044,1045,1048,1049,1052],{},[950,1039,1040],{},"Recipient-host side",[964,1042,1043],{},"openSealedRecord",") — a plain function the host runs. It needs no\nvault, no ",[964,1046,1047],{},"createNoydb"," instance, and is ",[950,1050,1051],{},"not gated"," by the opt-in — it's exported for\nuse on a remote host that only has the sealed delivery and its own unsealer.",[941,1054,1056],{"id":1055},"prerequisites","Prerequisites",[1011,1058,1059,1067],{},[1014,1060,1061,1066],{},[950,1062,1063,1065],{},[964,1064,989],{}," on the collection you seal from"," — only per-record-key records have a CEK to seal.",[1014,1068,1069,1070,1072],{},"The recipient host needs none of this: ",[964,1071,1043],{}," is a plain function taking the sealed envelope — no hub, no strategy, no keys beyond what the envelope carries.",[941,1074,1076],{"id":1075},"opt-in","Opt in",[946,1078,1079,1080,1083,1084,1086,1087,1089],{},"The grantor side is opt-in and tree-shaken until you enable it. Pass\n",[964,1081,1082],{},"sealedRecordStrategy: withSealedRecord()"," to ",[964,1085,1047],{},", and open the collection you'll\nseal records from with ",[964,1088,989],{}," (only per-record-key records have a CEK to seal):",[1091,1092,1097],"pre",{"className":1093,"code":1094,"language":1095,"meta":1096,"style":1096},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createNoydb } from '@noy-db\u002Fhub'\nimport { withSealedRecord } from '@noy-db\u002Fhub\u002Fsealed-record'\nimport { toMemory } from '@noy-db\u002Fto-memory'\n\nconst db = await createNoydb({\n  store: toMemory(),\n  user: 'alice',\n  secret: 'owner-secret-long',\n  sealedRecordStrategy: withSealedRecord(),\n})\n\nconst vault = await db.openVault('v')\nconst docs = vault.collection\u003C{ id: string; secret: string }>('docs', { perRecordKeys: true })\n","ts","",[964,1098,1099,1132,1153,1174,1181,1206,1223,1241,1258,1272,1281,1286,1317],{"__ignoreMap":1096},[1100,1101,1104,1108,1112,1116,1119,1122,1125,1129],"span",{"class":1102,"line":1103},"line",1,[1100,1105,1107],{"class":1106},"s7zQu","import",[1100,1109,1111],{"class":1110},"sMK4o"," {",[1100,1113,1115],{"class":1114},"sTEyZ"," createNoydb",[1100,1117,1118],{"class":1110}," }",[1100,1120,1121],{"class":1106}," from",[1100,1123,1124],{"class":1110}," '",[1100,1126,1128],{"class":1127},"sfazB","@noy-db\u002Fhub",[1100,1130,1131],{"class":1110},"'\n",[1100,1133,1135,1137,1139,1142,1144,1146,1148,1151],{"class":1102,"line":1134},2,[1100,1136,1107],{"class":1106},[1100,1138,1111],{"class":1110},[1100,1140,1141],{"class":1114}," withSealedRecord",[1100,1143,1118],{"class":1110},[1100,1145,1121],{"class":1106},[1100,1147,1124],{"class":1110},[1100,1149,1150],{"class":1127},"@noy-db\u002Fhub\u002Fsealed-record",[1100,1152,1131],{"class":1110},[1100,1154,1156,1158,1160,1163,1165,1167,1169,1172],{"class":1102,"line":1155},3,[1100,1157,1107],{"class":1106},[1100,1159,1111],{"class":1110},[1100,1161,1162],{"class":1114}," toMemory",[1100,1164,1118],{"class":1110},[1100,1166,1121],{"class":1106},[1100,1168,1124],{"class":1110},[1100,1170,1171],{"class":1127},"@noy-db\u002Fto-memory",[1100,1173,1131],{"class":1110},[1100,1175,1177],{"class":1102,"line":1176},4,[1100,1178,1180],{"emptyLinePlaceholder":1179},true,"\n",[1100,1182,1184,1188,1191,1194,1197,1200,1203],{"class":1102,"line":1183},5,[1100,1185,1187],{"class":1186},"spNyl","const",[1100,1189,1190],{"class":1114}," db ",[1100,1192,1193],{"class":1110},"=",[1100,1195,1196],{"class":1106}," await",[1100,1198,1115],{"class":1199},"s2Zo4",[1100,1201,1202],{"class":1114},"(",[1100,1204,1205],{"class":1110},"{\n",[1100,1207,1209,1213,1216,1218,1221],{"class":1102,"line":1208},6,[1100,1210,1212],{"class":1211},"swJcz","  store",[1100,1214,1215],{"class":1110},":",[1100,1217,1162],{"class":1199},[1100,1219,1220],{"class":1114},"()",[1100,1222,1027],{"class":1110},[1100,1224,1226,1229,1231,1233,1236,1239],{"class":1102,"line":1225},7,[1100,1227,1228],{"class":1211},"  user",[1100,1230,1215],{"class":1110},[1100,1232,1124],{"class":1110},[1100,1234,1235],{"class":1127},"alice",[1100,1237,1238],{"class":1110},"'",[1100,1240,1027],{"class":1110},[1100,1242,1244,1247,1249,1251,1254,1256],{"class":1102,"line":1243},8,[1100,1245,1246],{"class":1211},"  secret",[1100,1248,1215],{"class":1110},[1100,1250,1124],{"class":1110},[1100,1252,1253],{"class":1127},"owner-secret-long",[1100,1255,1238],{"class":1110},[1100,1257,1027],{"class":1110},[1100,1259,1261,1264,1266,1268,1270],{"class":1102,"line":1260},9,[1100,1262,1263],{"class":1211},"  sealedRecordStrategy",[1100,1265,1215],{"class":1110},[1100,1267,1141],{"class":1199},[1100,1269,1220],{"class":1114},[1100,1271,1027],{"class":1110},[1100,1273,1275,1278],{"class":1102,"line":1274},10,[1100,1276,1277],{"class":1110},"}",[1100,1279,1280],{"class":1114},")\n",[1100,1282,1284],{"class":1102,"line":1283},11,[1100,1285,1180],{"emptyLinePlaceholder":1179},[1100,1287,1289,1291,1294,1296,1298,1301,1303,1306,1308,1310,1313,1315],{"class":1102,"line":1288},12,[1100,1290,1187],{"class":1186},[1100,1292,1293],{"class":1114}," vault ",[1100,1295,1193],{"class":1110},[1100,1297,1196],{"class":1106},[1100,1299,1300],{"class":1114}," db",[1100,1302,1035],{"class":1110},[1100,1304,1305],{"class":1199},"openVault",[1100,1307,1202],{"class":1114},[1100,1309,1238],{"class":1110},[1100,1311,1312],{"class":1127},"v",[1100,1314,1238],{"class":1110},[1100,1316,1280],{"class":1114},[1100,1318,1320,1322,1325,1327,1330,1332,1335,1338,1341,1343,1347,1350,1353,1355,1357,1360,1362,1364,1367,1369,1372,1374,1377,1379,1383,1385],{"class":1102,"line":1319},13,[1100,1321,1187],{"class":1186},[1100,1323,1324],{"class":1114}," docs ",[1100,1326,1193],{"class":1110},[1100,1328,1329],{"class":1114}," vault",[1100,1331,1035],{"class":1110},[1100,1333,1334],{"class":1199},"collection",[1100,1336,1337],{"class":1110},"\u003C{",[1100,1339,1340],{"class":1211}," id",[1100,1342,1215],{"class":1110},[1100,1344,1346],{"class":1345},"sBMFI"," string",[1100,1348,1349],{"class":1110},";",[1100,1351,1352],{"class":1211}," secret",[1100,1354,1215],{"class":1110},[1100,1356,1346],{"class":1345},[1100,1358,1359],{"class":1110}," }>",[1100,1361,1202],{"class":1114},[1100,1363,1238],{"class":1110},[1100,1365,1366],{"class":1127},"docs",[1100,1368,1238],{"class":1110},[1100,1370,1371],{"class":1110},",",[1100,1373,1111],{"class":1110},[1100,1375,1376],{"class":1211}," perRecordKeys",[1100,1378,1215],{"class":1110},[1100,1380,1382],{"class":1381},"sfNiH"," true",[1100,1384,1118],{"class":1110},[1100,1386,1280],{"class":1114},[946,1388,1389,1390,1023,1392,1395,1396,1395,1399,1402,1403,1406,1407,1409],{},"Without ",[964,1391,1034],{},[964,1393,1394],{},"sealRecordToHost"," \u002F ",[964,1397,1398],{},"revokeSealedRecord",[964,1400,1401],{},"rotateRecordCek","\nall throw ",[964,1404,1405],{},"SealedRecordNotEnabledError",". The ",[964,1408,1043],{}," opener works with or without\nopting in — it's a separate, ungated function meant to run on the recipient host, which has\nno vault of its own.",[941,1411,1413],{"id":1412},"usage","Usage",[1415,1416,1418],"h3",{"id":1417},"seal-a-record-to-a-host","Seal a record to a host",[946,1420,1421,1422,1425,1426,1429,1430,1433],{},"The host publishes a \"recipient hint\" (e.g. its public key); the grantor uses it to seal the\nrecord's CEK into a delivery envelope written at ",[964,1423,1424],{},"_sealed_cek\u002F\u003Ccollection>\u002F\u003Cid>\u002F\u003Cpid>",".\n",[964,1427,1428],{},"MemoryRecipientSealer"," is the in-memory RSA-OAEP stand-in used below for a self-contained\nexample — production hosts (a KMS-backed service, say) implement the same ",[964,1431,1432],{},"RecipientSealer","\ninterface.",[1091,1435,1437],{"className":1093,"code":1436,"language":1095,"meta":1096,"style":1096},"import { MemoryRecipientSealer } from '@noy-db\u002Fhub'\n\nawait docs.put('d-1', { id: 'd-1', secret: 'the eagle lands at dawn' })\n\nconst host = new MemoryRecipientSealer({ id: 'kms:host-A' })\n\nconst { pid, envelopeKey } = await vault.sealRecordToHost('docs', 'd-1', host, {\n  expiresAt: new Date(Date.now() + 60 * 60 * 1000).toISOString(), \u002F\u002F 1 hour\n})\n",[964,1438,1439,1458,1462,1515,1519,1553,1557,1610,1666],{"__ignoreMap":1096},[1100,1440,1441,1443,1445,1448,1450,1452,1454,1456],{"class":1102,"line":1103},[1100,1442,1107],{"class":1106},[1100,1444,1111],{"class":1110},[1100,1446,1447],{"class":1114}," MemoryRecipientSealer",[1100,1449,1118],{"class":1110},[1100,1451,1121],{"class":1106},[1100,1453,1124],{"class":1110},[1100,1455,1128],{"class":1127},[1100,1457,1131],{"class":1110},[1100,1459,1460],{"class":1102,"line":1134},[1100,1461,1180],{"emptyLinePlaceholder":1179},[1100,1463,1464,1467,1470,1472,1475,1477,1479,1482,1484,1486,1488,1490,1492,1494,1496,1498,1500,1502,1504,1506,1509,1511,1513],{"class":1102,"line":1155},[1100,1465,1466],{"class":1106},"await",[1100,1468,1469],{"class":1114}," docs",[1100,1471,1035],{"class":1110},[1100,1473,1474],{"class":1199},"put",[1100,1476,1202],{"class":1114},[1100,1478,1238],{"class":1110},[1100,1480,1481],{"class":1127},"d-1",[1100,1483,1238],{"class":1110},[1100,1485,1371],{"class":1110},[1100,1487,1111],{"class":1110},[1100,1489,1340],{"class":1211},[1100,1491,1215],{"class":1110},[1100,1493,1124],{"class":1110},[1100,1495,1481],{"class":1127},[1100,1497,1238],{"class":1110},[1100,1499,1371],{"class":1110},[1100,1501,1352],{"class":1211},[1100,1503,1215],{"class":1110},[1100,1505,1124],{"class":1110},[1100,1507,1508],{"class":1127},"the eagle lands at dawn",[1100,1510,1238],{"class":1110},[1100,1512,1118],{"class":1110},[1100,1514,1280],{"class":1114},[1100,1516,1517],{"class":1102,"line":1176},[1100,1518,1180],{"emptyLinePlaceholder":1179},[1100,1520,1521,1523,1526,1528,1531,1533,1535,1538,1540,1542,1544,1547,1549,1551],{"class":1102,"line":1183},[1100,1522,1187],{"class":1186},[1100,1524,1525],{"class":1114}," host ",[1100,1527,1193],{"class":1110},[1100,1529,1530],{"class":1110}," new",[1100,1532,1447],{"class":1199},[1100,1534,1202],{"class":1114},[1100,1536,1537],{"class":1110},"{",[1100,1539,1340],{"class":1211},[1100,1541,1215],{"class":1110},[1100,1543,1124],{"class":1110},[1100,1545,1546],{"class":1127},"kms:host-A",[1100,1548,1238],{"class":1110},[1100,1550,1118],{"class":1110},[1100,1552,1280],{"class":1114},[1100,1554,1555],{"class":1102,"line":1208},[1100,1556,1180],{"emptyLinePlaceholder":1179},[1100,1558,1559,1561,1563,1566,1568,1571,1573,1576,1578,1580,1582,1584,1586,1588,1590,1592,1594,1596,1598,1600,1602,1605,1607],{"class":1102,"line":1225},[1100,1560,1187],{"class":1186},[1100,1562,1111],{"class":1110},[1100,1564,1565],{"class":1114}," pid",[1100,1567,1371],{"class":1110},[1100,1569,1570],{"class":1114}," envelopeKey ",[1100,1572,1277],{"class":1110},[1100,1574,1575],{"class":1110}," =",[1100,1577,1196],{"class":1106},[1100,1579,1329],{"class":1114},[1100,1581,1035],{"class":1110},[1100,1583,1394],{"class":1199},[1100,1585,1202],{"class":1114},[1100,1587,1238],{"class":1110},[1100,1589,1366],{"class":1127},[1100,1591,1238],{"class":1110},[1100,1593,1371],{"class":1110},[1100,1595,1124],{"class":1110},[1100,1597,1481],{"class":1127},[1100,1599,1238],{"class":1110},[1100,1601,1371],{"class":1110},[1100,1603,1604],{"class":1114}," host",[1100,1606,1371],{"class":1110},[1100,1608,1609],{"class":1110}," {\n",[1100,1611,1612,1615,1617,1619,1622,1625,1627,1630,1633,1636,1640,1643,1645,1647,1650,1653,1655,1658,1660,1662],{"class":1102,"line":1243},[1100,1613,1614],{"class":1211},"  expiresAt",[1100,1616,1215],{"class":1110},[1100,1618,1530],{"class":1110},[1100,1620,1621],{"class":1199}," Date",[1100,1623,1624],{"class":1114},"(Date",[1100,1626,1035],{"class":1110},[1100,1628,1629],{"class":1199},"now",[1100,1631,1632],{"class":1114},"() ",[1100,1634,1635],{"class":1110},"+",[1100,1637,1639],{"class":1638},"sbssI"," 60",[1100,1641,1642],{"class":1110}," *",[1100,1644,1639],{"class":1638},[1100,1646,1642],{"class":1110},[1100,1648,1649],{"class":1638}," 1000",[1100,1651,1652],{"class":1114},")",[1100,1654,1035],{"class":1110},[1100,1656,1657],{"class":1199},"toISOString",[1100,1659,1220],{"class":1114},[1100,1661,1371],{"class":1110},[1100,1663,1665],{"class":1664},"sHwdD"," \u002F\u002F 1 hour\n",[1100,1667,1668,1670],{"class":1102,"line":1260},[1100,1669,1277],{"class":1110},[1100,1671,1280],{"class":1114},[1091,1673,1676],{"className":1674,"code":1675,"language":141,"meta":1096,"style":1096},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{ \"pid\": \"kms:host-A\", \"envelopeKey\": \"docs\u002Fd-1\u002Fkms:host-A\" }\n",[964,1677,1678],{"__ignoreMap":1096},[1100,1679,1680,1682,1685,1688,1691,1693,1695,1697,1699,1701,1703,1706,1708,1710,1712,1715,1717],{"class":1102,"line":1103},[1100,1681,1537],{"class":1110},[1100,1683,1684],{"class":1110}," \"",[1100,1686,1687],{"class":1186},"pid",[1100,1689,1690],{"class":1110},"\"",[1100,1692,1215],{"class":1110},[1100,1694,1684],{"class":1110},[1100,1696,1546],{"class":1127},[1100,1698,1690],{"class":1110},[1100,1700,1371],{"class":1110},[1100,1702,1684],{"class":1110},[1100,1704,1705],{"class":1186},"envelopeKey",[1100,1707,1690],{"class":1110},[1100,1709,1215],{"class":1110},[1100,1711,1684],{"class":1110},[1100,1713,1714],{"class":1127},"docs\u002Fd-1\u002Fkms:host-A",[1100,1716,1690],{"class":1110},[1100,1718,1719],{"class":1110}," }\n",[946,1721,1722,1725,1726,1729],{},[964,1723,1724],{},"opts.expiresAt"," is required — it's sealed ",[996,1727,1728],{},"inside"," the delivery so the host can't extend its\nown access by tampering with the outer envelope.",[1731,1732,1734],"div",{"style":1733},"border:1px solid var(--ui-border); border-radius:0.75rem; background:var(--ui-bg-elevated); padding:1.25rem 1rem; margin:1.5rem 0; overflow-x:auto;",[1731,1735,1737,1741,1759,1762,1766,1768,1772,1782,1785,1788,1790,1792,1805],{"style":1736},"display:flex; flex-direction:column; align-items:center; min-width:23rem; text-align:center; line-height:1.35;",[1731,1738,1740],{"style":1739},"font-size:0.6875rem; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; color:var(--ui-text-muted); margin-bottom:0.5rem;","Sealing ceremony — grantor side",[1731,1742,1744,1751],{"style":1743},"border:1px solid var(--ui-border); border-radius:0.5rem; background:var(--ui-bg); padding:0.5rem 1.5rem;",[1731,1745,1747,1748],{"style":1746},"font-weight:600; color:var(--ui-text-highlighted);","Record ",[1100,1749,1481],{"style":1750},"font-family:ui-monospace,monospace;",[1731,1752,1754,1755,1758],{"style":1753},"font-size:0.75rem; color:var(--ui-text-muted);","its envelope carries ",[1100,1756,1757],{"style":1750},"_cek"," — the record’s key, wrapped under the collection DEK",[1731,1760],{"style":1761},"width:1px; height:0.5rem; background:var(--ui-border);",[1731,1763,1765],{"style":1764},"font-size:0.75rem; color:var(--ui-text-muted); border:1px dashed var(--ui-border); border-radius:999px; padding:0.15rem 0.9rem; margin:0.25rem 0;","AES-KW unwrap under the collection DEK",[1731,1767],{"style":1761},[1731,1769,1771],{"style":1770},"color:var(--ui-text-muted); line-height:1; font-size:0.7rem;","▼",[1731,1773,1775,1778],{"style":1774},"border:1px solid var(--ui-primary); border-radius:0.5rem; background:var(--ui-bg); padding:0.5rem 1.5rem; margin-top:0.25rem;",[1731,1776,1777],{"style":1746},"Binding",[1731,1779,1781],{"style":1780},"font-size:0.75rem; font-family:ui-monospace,monospace; color:var(--ui-text-muted);","{ collection, id, cek, expiresAt }",[1731,1783],{"style":1784},"width:1px; height:0.5rem; background:var(--ui-border); margin-top:0.25rem;",[1731,1786,1787],{"style":1764},"sealed under the host’s published RSA-OAEP public key",[1731,1789],{"style":1761},[1731,1791,1771],{"style":1770},[1731,1793,1795,1798],{"style":1794},"border:1px solid var(--ui-border); border-radius:0.5rem; background:var(--ui-bg); padding:0.5rem 1.5rem; margin-top:0.25rem;",[1731,1796,1797],{"style":1746},"Delivery envelope",[1731,1799,1800,1801,1804],{"style":1753},"written to ",[1100,1802,1803],{"style":1750},"_sealed_cek\u002Fdocs\u002Fd-1\u002Fkms:host-A"," — opaque to everyone but the host",[1731,1806,1808],{"style":1807},"font-size:0.75rem; color:var(--ui-text-muted); margin-top:0.75rem;","The collection DEK — and every other record’s CEK — never leaves the grantor side.",[1415,1810,1812],{"id":1811},"open-the-sealed-record-on-the-host","Open the sealed record on the host",[946,1814,1815,1816,1818],{},"The host reads the delivery envelope and the record's encrypted body (however those travel\nto it — e.g. exported via the vault's store) and calls ",[964,1817,1043],{}," with its own\nunsealer:",[1091,1820,1822],{"className":1093,"code":1821,"language":1095,"meta":1096,"style":1096},"import { openSealedRecord } from '@noy-db\u002Fhub\u002Fsealed-record'\n\n\u002F\u002F `delivery` = the SealedCekDeliveryEnvelope from _sealed_cek\u002Fdocs\u002Fd-1\u002Fkms:host-A\n\u002F\u002F `recordEnvelope` = the record's stored { _iv, _data } body\nconst json = await openSealedRecord(delivery, recordEnvelope, host, 'docs', 'd-1')\n\nJSON.parse(json)\n",[964,1823,1824,1843,1847,1852,1857,1900,1904],{"__ignoreMap":1096},[1100,1825,1826,1828,1830,1833,1835,1837,1839,1841],{"class":1102,"line":1103},[1100,1827,1107],{"class":1106},[1100,1829,1111],{"class":1110},[1100,1831,1832],{"class":1114}," openSealedRecord",[1100,1834,1118],{"class":1110},[1100,1836,1121],{"class":1106},[1100,1838,1124],{"class":1110},[1100,1840,1150],{"class":1127},[1100,1842,1131],{"class":1110},[1100,1844,1845],{"class":1102,"line":1134},[1100,1846,1180],{"emptyLinePlaceholder":1179},[1100,1848,1849],{"class":1102,"line":1155},[1100,1850,1851],{"class":1664},"\u002F\u002F `delivery` = the SealedCekDeliveryEnvelope from _sealed_cek\u002Fdocs\u002Fd-1\u002Fkms:host-A\n",[1100,1853,1854],{"class":1102,"line":1176},[1100,1855,1856],{"class":1664},"\u002F\u002F `recordEnvelope` = the record's stored { _iv, _data } body\n",[1100,1858,1859,1861,1864,1866,1868,1870,1873,1875,1878,1880,1882,1884,1886,1888,1890,1892,1894,1896,1898],{"class":1102,"line":1183},[1100,1860,1187],{"class":1186},[1100,1862,1863],{"class":1114}," json ",[1100,1865,1193],{"class":1110},[1100,1867,1196],{"class":1106},[1100,1869,1832],{"class":1199},[1100,1871,1872],{"class":1114},"(delivery",[1100,1874,1371],{"class":1110},[1100,1876,1877],{"class":1114}," recordEnvelope",[1100,1879,1371],{"class":1110},[1100,1881,1604],{"class":1114},[1100,1883,1371],{"class":1110},[1100,1885,1124],{"class":1110},[1100,1887,1366],{"class":1127},[1100,1889,1238],{"class":1110},[1100,1891,1371],{"class":1110},[1100,1893,1124],{"class":1110},[1100,1895,1481],{"class":1127},[1100,1897,1238],{"class":1110},[1100,1899,1280],{"class":1114},[1100,1901,1902],{"class":1102,"line":1208},[1100,1903,1180],{"emptyLinePlaceholder":1179},[1100,1905,1906,1909,1911,1914],{"class":1102,"line":1225},[1100,1907,1908],{"class":1114},"JSON",[1100,1910,1035],{"class":1110},[1100,1912,1913],{"class":1199},"parse",[1100,1915,1916],{"class":1114},"(json)\n",[1091,1918,1920],{"className":1674,"code":1919,"language":141,"meta":1096,"style":1096},"{ \"id\": \"d-1\", \"secret\": \"the eagle lands at dawn\" }\n",[964,1921,1922],{"__ignoreMap":1096},[1100,1923,1924,1926,1928,1931,1933,1935,1937,1939,1941,1943,1945,1948,1950,1952,1954,1956,1958],{"class":1102,"line":1103},[1100,1925,1537],{"class":1110},[1100,1927,1684],{"class":1110},[1100,1929,1930],{"class":1186},"id",[1100,1932,1690],{"class":1110},[1100,1934,1215],{"class":1110},[1100,1936,1684],{"class":1110},[1100,1938,1481],{"class":1127},[1100,1940,1690],{"class":1110},[1100,1942,1371],{"class":1110},[1100,1944,1684],{"class":1110},[1100,1946,1947],{"class":1186},"secret",[1100,1949,1690],{"class":1110},[1100,1951,1215],{"class":1110},[1100,1953,1684],{"class":1110},[1100,1955,1508],{"class":1127},[1100,1957,1690],{"class":1110},[1100,1959,1719],{"class":1110},[946,1961,1962,1964,1965,1968,1969,1972,1973,1976,1977,1979,1980,1983,1984,1987],{},[964,1963,1043],{}," checks, in order: the delivery's fast-path expiry, then unseals the\nbinding, then verifies the binding's ",[964,1966,1967],{},"{collection, id}"," matches what the host expected\n(rejecting a CEK sealed for a different record), then re-checks the binding's own\nauthoritative expiry, then decrypts. A CEK sealed before a ",[964,1970,1971],{},"rotateRecordCek()"," call passes\nall of those checks but fails decryption against the rotated body, surfacing as the same\n",[964,1974,1975],{},"TamperedError"," a tampered ciphertext produces. That collision is why ",[964,1978,1975],{}," is not read\nas an accusation on its own: a stale CEK, a pre-",[964,1981,1982],{},"0.6.0-pre.18"," record and a hostile store all\narrive at the same error. Check ",[964,1985,1986],{},"err.reason"," first.",[1731,1989,1990],{"style":1733},[1731,1991,1992,1995,2011,2013,2019,2021,2026,2028,2030,2036,2038,2047,2049,2057,2059,2068,2070,2072,2080],{"style":1736},[1731,1993,1994],{"style":1739},"Unlock ceremony — host side",[1731,1996,1997,2000],{"style":1743},[1731,1998,1999],{"style":1746},"Delivery envelope arrives",[1731,2001,2002,2003,2006,2007,2010],{"style":1753},"sealed ",[1100,2004,2005],{"style":1750},"payload"," + clear-text ",[1100,2008,2009],{"style":1750},"expiresAt"," hint",[1731,2012],{"style":1761},[1731,2014,2015,2016],{"style":1764},"1 · fast-path expiry check — expired → ",[1100,2017,2018],{"style":1750},"SealedRecordExpiredError",[1731,2020],{"style":1761},[1731,2022,2023,2024],{"style":1764},"2 · host’s own unsealer opens ",[1100,2025,2005],{"style":1750},[1731,2027],{"style":1761},[1731,2029,1771],{"style":1770},[1731,2031,2032,2034],{"style":1774},[1731,2033,1777],{"style":1746},[1731,2035,1781],{"style":1780},[1731,2037],{"style":1784},[1731,2039,2040,2041,2043,2044],{"style":1764},"3 · ",[1100,2042,1967],{"style":1750}," must name the record being opened — mismatch → ",[1100,2045,2046],{"style":1750},"SealedRecordMismatchError",[1731,2048],{"style":1761},[1731,2050,2051,2052,2054,2055],{"style":1764},"4 · authoritative ",[1100,2053,2009],{"style":1750}," re-check — expired → ",[1100,2056,2018],{"style":1750},[1731,2058],{"style":1761},[1731,2060,2061,2062,2065,2066],{"style":1764},"5 · CEK decrypts ",[1100,2063,2064],{"style":1750},"{ _iv, _data }"," — a pre-rotation CEK fails the GCM tag → ",[1100,2067,1975],{"style":1750},[1731,2069],{"style":1761},[1731,2071,1771],{"style":1770},[1731,2073,2074,2077],{"style":1794},[1731,2075,2076],{"style":1746},"Plaintext record",[1731,2078,2079],{"style":1753},"exactly this one record — nothing else unlocks",[1731,2081,2082],{"style":1807},"The vault’s collection DEK is never present on this side.",[1415,2084,2086],{"id":2085},"revoke-access-soft-vs-hard","Revoke access — soft vs. hard",[946,2088,2089,2091,2092,2095,2096,2099],{},[964,2090,1398],{}," is ",[950,2093,2094],{},"soft"," by default: it deletes the delivery envelope so no new host\ncan fetch it, but a host that already unsealed the CEK keeps the ability to decrypt (there's\nno way to un-teach a host something it has already read). Pass ",[964,2097,2098],{},"{ hard: true }"," to also\nrotate the record's CEK, which cuts off every previously sealed copy — including ones already\nfetched — because they no longer match the record's (now re-encrypted) body:",[1091,2101,2103],{"className":1093,"code":2102,"language":1095,"meta":1096,"style":1096},"\u002F\u002F Soft (default): stops future fetches only.\nawait vault.revokeSealedRecord('docs', 'd-1', 'kms:host-A')\n\n\u002F\u002F Hard: also rotates the CEK, so any already-fetched sealed copy stops working.\nawait vault.revokeSealedRecord('docs', 'd-1', 'kms:host-A', { hard: true })\n",[964,2104,2105,2110,2146,2150,2155],{"__ignoreMap":1096},[1100,2106,2107],{"class":1102,"line":1103},[1100,2108,2109],{"class":1664},"\u002F\u002F Soft (default): stops future fetches only.\n",[1100,2111,2112,2114,2116,2118,2120,2122,2124,2126,2128,2130,2132,2134,2136,2138,2140,2142,2144],{"class":1102,"line":1134},[1100,2113,1466],{"class":1106},[1100,2115,1329],{"class":1114},[1100,2117,1035],{"class":1110},[1100,2119,1398],{"class":1199},[1100,2121,1202],{"class":1114},[1100,2123,1238],{"class":1110},[1100,2125,1366],{"class":1127},[1100,2127,1238],{"class":1110},[1100,2129,1371],{"class":1110},[1100,2131,1124],{"class":1110},[1100,2133,1481],{"class":1127},[1100,2135,1238],{"class":1110},[1100,2137,1371],{"class":1110},[1100,2139,1124],{"class":1110},[1100,2141,1546],{"class":1127},[1100,2143,1238],{"class":1110},[1100,2145,1280],{"class":1114},[1100,2147,2148],{"class":1102,"line":1155},[1100,2149,1180],{"emptyLinePlaceholder":1179},[1100,2151,2152],{"class":1102,"line":1176},[1100,2153,2154],{"class":1664},"\u002F\u002F Hard: also rotates the CEK, so any already-fetched sealed copy stops working.\n",[1100,2156,2157,2159,2161,2163,2165,2167,2169,2171,2173,2175,2177,2179,2181,2183,2185,2187,2189,2191,2193,2196,2198,2200,2202],{"class":1102,"line":1183},[1100,2158,1466],{"class":1106},[1100,2160,1329],{"class":1114},[1100,2162,1035],{"class":1110},[1100,2164,1398],{"class":1199},[1100,2166,1202],{"class":1114},[1100,2168,1238],{"class":1110},[1100,2170,1366],{"class":1127},[1100,2172,1238],{"class":1110},[1100,2174,1371],{"class":1110},[1100,2176,1124],{"class":1110},[1100,2178,1481],{"class":1127},[1100,2180,1238],{"class":1110},[1100,2182,1371],{"class":1110},[1100,2184,1124],{"class":1110},[1100,2186,1546],{"class":1127},[1100,2188,1238],{"class":1110},[1100,2190,1371],{"class":1110},[1100,2192,1111],{"class":1110},[1100,2194,2195],{"class":1211}," hard",[1100,2197,1215],{"class":1110},[1100,2199,1382],{"class":1381},[1100,2201,1118],{"class":1110},[1100,2203,1280],{"class":1114},[946,2205,2206,2208],{},[964,2207,1401],{}," (used internally by hard revoke, and callable directly) re-encrypts the\nlive record body under a fresh CEK and deletes every sealed-CEK delivery envelope for that\nrecord. Prior history versions keep their original CEK and remain openable by hosts sealed\nagainst them — only the live record is cut over.",[941,2210,2212],{"id":2211},"api-reference","API reference",[1415,2214,2216],{"id":2215},"withsealedrecord",[964,2217,1034],{},[1091,2219,2221],{"className":1093,"code":2220,"language":1095,"meta":1096,"style":1096},"function withSealedRecord(): SealedRecordStrategy\n",[964,2222,2223],{"__ignoreMap":1096},[1100,2224,2225,2228,2230,2233],{"class":1102,"line":1103},[1100,2226,2227],{"class":1186},"function",[1100,2229,1141],{"class":1199},[1100,2231,2232],{"class":1110},"():",[1100,2234,2235],{"class":1345}," SealedRecordStrategy\n",[946,2237,2238,2239,1395,2241,2243,2244,2246,2247,1083,2250,2252],{},"Returns the strategy that makes ",[964,2240,1022],{},[964,2242,1026],{}," \u002F\n",[964,2245,1030],{}," live. Pass it as ",[964,2248,2249],{},"sealedRecordStrategy",[964,2251,1047],{},". The\nsealing\u002Frotation engine is dynamically imported inside it, so it's excluded from your bundle\nuntil you opt in.",[1415,2254,2256],{"id":2255},"vaultsealrecordtohostcollection-id-hostsealer-opts",[964,2257,2258],{},"vault.sealRecordToHost(collection, id, hostSealer, opts)",[1091,2260,2262],{"className":1093,"code":2261,"language":1095,"meta":1096,"style":1096},"sealRecordToHost(\n  collection: string,\n  id: string,\n  hostSealer: RecipientSealer,\n  opts: { expiresAt: string },\n): Promise\u003C{ pid: string; envelopeKey: string }>\n",[964,2263,2264,2271,2278,2285,2292,2310],{"__ignoreMap":1096},[1100,2265,2266,2268],{"class":1102,"line":1103},[1100,2267,1394],{"class":1199},[1100,2269,2270],{"class":1114},"(\n",[1100,2272,2273,2276],{"class":1102,"line":1134},[1100,2274,2275],{"class":1114},"  collection: string",[1100,2277,1027],{"class":1110},[1100,2279,2280,2283],{"class":1102,"line":1155},[1100,2281,2282],{"class":1114},"  id: string",[1100,2284,1027],{"class":1110},[1100,2286,2287,2290],{"class":1102,"line":1176},[1100,2288,2289],{"class":1114},"  hostSealer: RecipientSealer",[1100,2291,1027],{"class":1110},[1100,2293,2294,2297,2299,2302,2304,2307],{"class":1102,"line":1183},[1100,2295,2296],{"class":1114},"  opts: ",[1100,2298,1537],{"class":1110},[1100,2300,2301],{"class":1211}," expiresAt",[1100,2303,1215],{"class":1110},[1100,2305,2306],{"class":1114}," string ",[1100,2308,2309],{"class":1110},"},\n",[1100,2311,2312,2315,2318,2320,2322,2324,2326,2328,2331,2333,2335],{"class":1102,"line":1208},[1100,2313,2314],{"class":1114},"): ",[1100,2316,2317],{"class":1345},"Promise",[1100,2319,1337],{"class":1110},[1100,2321,1565],{"class":1345},[1100,2323,1215],{"class":1110},[1100,2325,1346],{"class":1114},[1100,2327,1349],{"class":1110},[1100,2329,2330],{"class":1345}," envelopeKey",[1100,2332,1215],{"class":1110},[1100,2334,1346],{"class":1114},[1100,2336,2337],{"class":1110}," }>\n",[946,2339,2340,2341,2344,2345,2348,2349,2351,2352,2354,2355,2357,2358,2361,2362,1035],{},"Seals ",[964,2342,2343],{},"collection\u002Fid","'s CEK to ",[964,2346,2347],{},"hostSealer"," and writes the delivery envelope. ",[964,2350,2009],{},"\n(ISO 8601) is required and becomes the authoritative expiry sealed inside the binding.\nReturns the host's provider id (",[964,2353,1687],{},") and the store key (",[964,2356,1705],{},") the delivery was\nwritten under. Throws ",[964,2359,2360],{},"RecordCekNotFoundError"," if the record has no CEK — either it doesn't\nexist, or its collection wasn't opened with ",[964,2363,989],{},[1415,2365,2367],{"id":2366},"vaultrevokesealedrecordcollection-id-pid-opts",[964,2368,2369],{},"vault.revokeSealedRecord(collection, id, pid, opts?)",[1091,2371,2373],{"className":1093,"code":2372,"language":1095,"meta":1096,"style":1096},"revokeSealedRecord(\n  collection: string,\n  id: string,\n  pid: string,\n  opts?: { hard?: boolean },\n): Promise\u003Cvoid>\n",[964,2374,2375,2381,2387,2393,2400,2420],{"__ignoreMap":1096},[1100,2376,2377,2379],{"class":1102,"line":1103},[1100,2378,1398],{"class":1199},[1100,2380,2270],{"class":1114},[1100,2382,2383,2385],{"class":1102,"line":1134},[1100,2384,2275],{"class":1114},[1100,2386,1027],{"class":1110},[1100,2388,2389,2391],{"class":1102,"line":1155},[1100,2390,2282],{"class":1114},[1100,2392,1027],{"class":1110},[1100,2394,2395,2398],{"class":1102,"line":1176},[1100,2396,2397],{"class":1114},"  pid: string",[1100,2399,1027],{"class":1110},[1100,2401,2402,2405,2408,2410,2413,2415,2418],{"class":1102,"line":1183},[1100,2403,2404],{"class":1114},"  opts",[1100,2406,2407],{"class":1110},"?:",[1100,2409,1111],{"class":1110},[1100,2411,2412],{"class":1114}," hard?",[1100,2414,1215],{"class":1110},[1100,2416,2417],{"class":1114}," boolean ",[1100,2419,2309],{"class":1110},[1100,2421,2422,2424,2426],{"class":1102,"line":1208},[1100,2423,2314],{"class":1114},[1100,2425,2317],{"class":1345},[1100,2427,2428],{"class":1110},"\u003Cvoid>\n",[946,2430,2431,2432,2434,2435,2437,2438,2442,2443,2445],{},"Deletes the ",[964,2433,1687],{}," delivery envelope for ",[964,2436,2343],{},". Soft by default (see ",[959,2439,2441],{"href":2440},"#revoke-access-soft-vs-hard","Revoke\naccess"," above); ",[964,2444,2098],{}," additionally rotates the\nrecord's CEK.",[1415,2447,2449],{"id":2448},"vaultrotaterecordcekcollection-id",[964,2450,2451],{},"vault.rotateRecordCek(collection, id)",[1091,2453,2455],{"className":1093,"code":2454,"language":1095,"meta":1096,"style":1096},"rotateRecordCek(collection: string, id: string): Promise\u003Cvoid>\n",[964,2456,2457],{"__ignoreMap":1096},[1100,2458,2459,2461,2464,2466,2469,2471],{"class":1102,"line":1103},[1100,2460,1401],{"class":1199},[1100,2462,2463],{"class":1114},"(collection: string",[1100,2465,1371],{"class":1110},[1100,2467,2468],{"class":1114}," id: string): ",[1100,2470,2317],{"class":1345},[1100,2472,2428],{"class":1110},[946,2474,2475,2476,2478],{},"Re-encrypts the live record body under a freshly minted CEK and deletes every sealed-CEK\ndelivery envelope for the record. Throws ",[964,2477,2360],{}," if the record is missing or\nhas no CEK.",[1415,2480,2482],{"id":2481},"opensealedrecordsealedcekenvelope-recordenvelope-recipientsealer-expectedcollection-expectedid",[964,2483,2484],{},"openSealedRecord(sealedCekEnvelope, recordEnvelope, recipientSealer, expectedCollection, expectedId)",[1091,2486,2488],{"className":1093,"code":2487,"language":1095,"meta":1096,"style":1096},"function openSealedRecord(\n  sealedCekEnvelope: SealedCekDeliveryEnvelope,\n  recordEnvelope: { readonly _iv: string; readonly _data: string },\n  recipientSealer: { unseal(bytes: Uint8Array): Promise\u003CUint8Array> },\n  expectedCollection: string,\n  expectedId: string,\n): Promise\u003Cstring>\n",[964,2489,2490,2498,2511,2544,2583,2594,2605],{"__ignoreMap":1096},[1100,2491,2492,2494,2496],{"class":1102,"line":1103},[1100,2493,2227],{"class":1186},[1100,2495,1832],{"class":1199},[1100,2497,2270],{"class":1110},[1100,2499,2500,2504,2506,2509],{"class":1102,"line":1134},[1100,2501,2503],{"class":2502},"sHdIc","  sealedCekEnvelope",[1100,2505,1215],{"class":1110},[1100,2507,2508],{"class":1345}," SealedCekDeliveryEnvelope",[1100,2510,1027],{"class":1110},[1100,2512,2513,2516,2518,2520,2523,2526,2528,2530,2532,2534,2537,2539,2541],{"class":1102,"line":1155},[1100,2514,2515],{"class":2502},"  recordEnvelope",[1100,2517,1215],{"class":1110},[1100,2519,1111],{"class":1110},[1100,2521,2522],{"class":1186}," readonly",[1100,2524,2525],{"class":1211}," _iv",[1100,2527,1215],{"class":1110},[1100,2529,1346],{"class":1345},[1100,2531,1349],{"class":1110},[1100,2533,2522],{"class":1186},[1100,2535,2536],{"class":1211}," _data",[1100,2538,1215],{"class":1110},[1100,2540,1346],{"class":1345},[1100,2542,2543],{"class":1110}," },\n",[1100,2545,2546,2549,2551,2553,2556,2558,2561,2563,2566,2569,2572,2575,2578,2581],{"class":1102,"line":1176},[1100,2547,2548],{"class":2502},"  recipientSealer",[1100,2550,1215],{"class":1110},[1100,2552,1111],{"class":1110},[1100,2554,2555],{"class":1211}," unseal",[1100,2557,1202],{"class":1110},[1100,2559,2560],{"class":2502},"bytes",[1100,2562,1215],{"class":1110},[1100,2564,2565],{"class":1345}," Uint8Array",[1100,2567,2568],{"class":1110},"):",[1100,2570,2571],{"class":1345}," Promise",[1100,2573,2574],{"class":1110},"\u003C",[1100,2576,2577],{"class":1345},"Uint8Array",[1100,2579,2580],{"class":1110},">",[1100,2582,2543],{"class":1110},[1100,2584,2585,2588,2590,2592],{"class":1102,"line":1183},[1100,2586,2587],{"class":2502},"  expectedCollection",[1100,2589,1215],{"class":1110},[1100,2591,1346],{"class":1345},[1100,2593,1027],{"class":1110},[1100,2595,2596,2599,2601,2603],{"class":1102,"line":1208},[1100,2597,2598],{"class":2502},"  expectedId",[1100,2600,1215],{"class":1110},[1100,2602,1346],{"class":1345},[1100,2604,1027],{"class":1110},[1100,2606,2607,2609,2611,2613,2616],{"class":1102,"line":1225},[1100,2608,2568],{"class":1110},[1100,2610,2571],{"class":1345},[1100,2612,2574],{"class":1110},[1100,2614,2615],{"class":1345},"string",[1100,2617,2618],{"class":1110},">\n",[946,2620,2621,2622,2625,2626,2628,2629,2631,2632,2634,2635,2637,2638,2641,2642,1035],{},"Runs on the recipient host — ",[950,2623,2624],{},"not"," gated by ",[964,2627,1034],{},". Reconstructs the\nrecord's plaintext (returned as a JSON string) from the delivery envelope, the record's\nencrypted ",[964,2630,2064],{}," body, and the host's own unsealer. Throws\n",[964,2633,2018],{}," or ",[964,2636,2046],{}," on the checks described in\n",[959,2639,1413],{"href":2640},"#open-the-sealed-record-on-the-host","; a CEK that unseals but no longer matches the\nrecord's ciphertext (e.g. after rotation) surfaces as ",[964,2643,1975],{},[1415,2645,2647],{"id":2646},"types","Types",[2649,2650,2651,2667],"table",{},[2652,2653,2654],"thead",{},[2655,2656,2657,2661,2664],"tr",{},[2658,2659,2660],"th",{},"Type",[2658,2662,2663],{},"Shape",[2658,2665,2666],{},"Purpose",[2668,2669,2670,2695],"tbody",{},[2655,2671,2672,2678,2683],{},[2673,2674,2675],"td",{},[964,2676,2677],{},"SealedCekDeliveryEnvelope",[2673,2679,2680],{},[964,2681,2682],{},"{ v: 1, _noydb_sealed_cek: 1, pid: string, payload: string, expiresAt: string }",[2673,2684,2685,2686,2688,2689,2691,2692,2694],{},"The thin envelope written to ",[964,2687,1424],{},". ",[964,2690,2005],{}," is the opaque sealed binding; ",[964,2693,2009],{}," here is a fast-path hint only.",[2655,2696,2697,2702,2707],{},[2673,2698,2699],{},[964,2700,2701],{},"SealedCekBinding",[2673,2703,2704],{},[964,2705,2706],{},"{ collection: string, id: string, cek: string, expiresAt: string }",[2673,2708,2709,2710,2712,2713,2715,2716,2718,2719,2721,2722,2724],{},"The plaintext struct sealed ",[996,2711,1728],{}," ",[964,2714,2005],{},". This — not the delivery envelope — is the security boundary: ",[964,2717,1334],{},"\u002F",[964,2720,1930],{}," bind the CEK to one record, and this ",[964,2723,2009],{}," is authoritative.",[1415,2726,2728],{"id":2727},"errors","Errors",[2649,2730,2731,2741],{},[2652,2732,2733],{},[2655,2734,2735,2738],{},[2658,2736,2737],{},"Error",[2658,2739,2740],{},"Thrown when",[2668,2742,2743,2754,2770,2784],{},[2655,2744,2745,2749],{},[2673,2746,2747],{},[964,2748,1405],{},[2673,2750,2751,2752,1035],{},"A grantor-side method is called without ",[964,2753,1082],{},[2655,2755,2756,2760],{},[2673,2757,2758],{},[964,2759,2360],{},[2673,2761,2762,1395,2764,2766,2767,2769],{},[964,2763,1394],{},[964,2765,1401],{}," target a record with no CEK (missing, or its collection lacks ",[964,2768,989],{},").",[2655,2771,2772,2776],{},[2673,2773,2774],{},[964,2775,2018],{},[2673,2777,2778,2780,2781,2783],{},[964,2779,1043],{},"'s fast-path or authoritative ",[964,2782,2009],{}," check fails.",[2655,2785,2786,2790],{},[2673,2787,2788],{},[964,2789,2046],{},[2673,2791,2792,2793,2795],{},"The unsealed binding's ",[964,2794,1967],{}," doesn't match what the host expected — a CEK sealed for one record presented against another.",[941,2797,2799],{"id":2798},"limits-gotchas","Limits & gotchas",[1011,2801,2802,2816,2825,2831],{},[1014,2803,2804,2809,2810,2812,2813,2815],{},[950,2805,2806,2807,1035],{},"Requires ",[964,2808,989],{}," Legacy records (body encrypted directly under the\ncollection key) have no CEK to seal — ",[964,2811,1394],{}," throws ",[964,2814,2360],{},".\nSealing deliberately never exposes the shared collection key itself.",[1014,2817,2818,2821,2822,2824],{},[950,2819,2820],{},"Soft revoke doesn't reach already-fetched copies."," If a host unsealed the CEK before you\nrevoke, deleting the delivery envelope doesn't stop it from decrypting the record it\nalready has. Use ",[964,2823,2098],{}," when a leaked or misbehaving host must actually lose\naccess.",[1014,2826,2827,2830],{},[950,2828,2829],{},"Hard revoke \u002F rotation only cuts off the live record."," History versions keep their\noriginal CEK; a host previously sealed against a specific history version can still open\nthat version after the live record is rotated.",[1014,2832,2833,2838],{},[950,2834,2835,2837],{},[964,2836,2009],{}," has two copies for a reason."," The clear-text copy on the delivery envelope\nis only a cheap pre-unseal reject; the copy inside the sealed binding is the one that\ncan't be forged by editing the envelope. Both are checked, and both fail closed on a\nmalformed or empty timestamp.",[941,2840,2842],{"id":2841},"see-also","See also",[1011,2844,2845,2851,2862,2867,2877],{},[1014,2846,2847,2850],{},[959,2848,2849],{"href":66},"Enclave (Core 02)"," — per-record keys (CEK), the collection DEK, and the envelope format this service builds on.",[1014,2852,2853,2858,2859,2861],{},[959,2854,2855,2857],{"href":170},[964,2856,1004],{}," family"," — sealing-key providers a production ",[964,2860,1432],{}," would be built on.",[1014,2863,2864,2866],{},[959,2865,661],{"href":662}," — a related sealing pattern for handing off an entire vault's ownership rather than a single record.",[1014,2868,2869,2872,2873],{},[959,2870,2871],{"href":598},"Services overview"," · ",[959,2874,2876],{"href":2875},"\u002Forientation","Orientation map",[1014,2878,2879,2880,1035],{},"Proven by showcase ",[959,2881,2885],{"href":2882,"rel":2883},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F133-sealed-record.showcase.test.ts",[2884],"nofollow",[964,2886,2887],{},"133-sealed-record",[2889,2890,2891],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":1096,"searchDepth":1155,"depth":1155,"links":2893},[2894,2895,2896,2897,2902,2911,2912],{"id":943,"depth":1134,"text":944},{"id":1055,"depth":1134,"text":1056},{"id":1075,"depth":1134,"text":1076},{"id":1412,"depth":1134,"text":1413,"children":2898},[2899,2900,2901],{"id":1417,"depth":1155,"text":1418},{"id":1811,"depth":1155,"text":1812},{"id":2085,"depth":1155,"text":2086},{"id":2211,"depth":1134,"text":2212,"children":2903},[2904,2905,2906,2907,2908,2909,2910],{"id":2215,"depth":1155,"text":1034},{"id":2255,"depth":1155,"text":2258},{"id":2366,"depth":1155,"text":2369},{"id":2448,"depth":1155,"text":2451},{"id":2481,"depth":1155,"text":2484},{"id":2646,"depth":1155,"text":2647},{"id":2727,"depth":1155,"text":2728},{"id":2798,"depth":1134,"text":2799},{"id":2841,"depth":1134,"text":2842},null,"Seal a single record's decryption key to an external host (e.g.","md",{},"service",{"title":824,"description":2914},"stable","important","03cYln7PkmQxKs7ArLms48oLyQqaxu_F27WPsCXq00E",{"data":2923,"body":2924},{},{"type":2925,"children":2926},"root",[2927],{"type":2928,"tag":946,"props":2929,"children":2930},"element",{},[2931],{"type":2928,"tag":964,"props":2932,"children":2934},{"className":2933},[],[2935],{"type":2936,"value":2937},"text","with-audit",{"data":2939,"body":2940},{},{"type":2925,"children":2941},[2942],{"type":2928,"tag":946,"props":2943,"children":2944},{},[2945],{"type":2928,"tag":964,"props":2946,"children":2948},{"className":2947},[],[2949],{"type":2936,"value":1150},{"data":2951,"body":2952},{},{"type":2925,"children":2953},[2954],{"type":2928,"tag":946,"props":2955,"children":2956},{},[2957],{"type":2928,"tag":964,"props":2958,"children":2960},{"className":2959},[],[2961],{"type":2936,"value":1034},1791896588401]