{"_id":"@bun-win32/fveapi","_rev":"4-984365514a6ffbbf2b148d8ec6f638c0","name":"@bun-win32/fveapi","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/fveapi","version":"1.0.0","keywords":["bun","ffi","win32","windows","fveapi","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/fveapi@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"7660fd426beca438578f41d3a8298fe024947471","tarball":"https://registry.npmjs.org/@bun-win32/fveapi/-/fveapi-1.0.0.tgz","fileCount":6,"integrity":"sha512-96jp4yzPmI6SLWQ5GUW8bYHm9ZB6SYWE36FNnWTSyO14Mar08X+fkWsBR7kP0t+YumYUaxZoEoE+kTjnC2d5Xw==","signatures":[{"sig":"MEYCIQDUJBiSTjez57XdT7j03Y8YvS6yAqC5GboG1GxGKhWRIgIhAM7+TwA2+T/Ec0Artj9Nou7yGp3ioCQSN0hgJ72hz9ro","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66114},"main":"./index.ts","type":"module","module":"index.ts","shasum":"7660fd426beca438578f41d3a8298fe024947471","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:bitlocker-vault-scope":"bun ./example/bitlocker-vault-scope.ts","example:bitlocker-compliance-report":"bun ./example/bitlocker-compliance-report.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-96jp4yzPmI6SLWQ5GUW8bYHm9ZB6SYWE36FNnWTSyO14Mar08X+fkWsBR7kP0t+YumYUaxZoEoE+kTjnC2d5Xw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/fveapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 FVEAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.21"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/fveapi_1.0.0_1779222172421_0.3917003319338941","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/fveapi","version":"1.0.1","keywords":["bun","ffi","win32","windows","fveapi","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/fveapi@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"73c81aa2c9bda9109524545932176d437832e68b","tarball":"https://registry.npmjs.org/@bun-win32/fveapi/-/fveapi-1.0.1.tgz","fileCount":6,"integrity":"sha512-LsFYB+eI3MxjE7shutrWS4xkzmApIVAi2GpHNKpixHWLuw2M75DQvpS5b2HUYl8rEJf0dWBH7ZozAUejx6pPnA==","signatures":[{"sig":"MEUCIBmkMf7qgALL5E78mtpNLBHHjCSy+5wfEL19Fj1Th9pDAiEA+EInH8FF8BF1kC8fiKKxqEHnABa++4jOXr5iPkkpz4E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66119},"main":"./index.ts","type":"module","module":"index.ts","shasum":"73c81aa2c9bda9109524545932176d437832e68b","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:bitlocker-vault-scope":"bun ./example/bitlocker-vault-scope.ts","example:bitlocker-compliance-report":"bun ./example/bitlocker-compliance-report.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-LsFYB+eI3MxjE7shutrWS4xkzmApIVAi2GpHNKpixHWLuw2M75DQvpS5b2HUYl8rEJf0dWBH7ZozAUejx6pPnA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/fveapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 FVEAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.26"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/fveapi_1.0.1_1781130833621_0.1912258165975267","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/fveapi","version":"2.0.0","keywords":["bun","ffi","win32","windows","fveapi","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/fveapi@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"0cc050406c37afd4cc76098b293df8fd9f697b36","tarball":"https://registry.npmjs.org/@bun-win32/fveapi/-/fveapi-2.0.0.tgz","fileCount":6,"integrity":"sha512-eCPNP2InQjUO0GIpvHxFLUmVTxMoz+Fqff/MNgPrGfR+6GfRxA8/jKX7/Jz+OAeUqYDR0wXcuiz6zWN9B6dJZw==","signatures":[{"sig":"MEUCIHPR7rVWs176Cgr2RT7IYPviWVGhBh12ZBuFFFagBcVqAiEA8wkbqX5BEKm6aZP7dTXQGHkFOWvcerSDOdU2Q/mPvlU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67398},"main":"./index.ts","type":"module","module":"index.ts","shasum":"0cc050406c37afd4cc76098b293df8fd9f697b36","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:bitlocker-vault-scope":"bun ./example/bitlocker-vault-scope.ts","example:bitlocker-compliance-report":"bun ./example/bitlocker-compliance-report.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-eCPNP2InQjUO0GIpvHxFLUmVTxMoz+Fqff/MNgPrGfR+6GfRxA8/jKX7/Jz+OAeUqYDR0wXcuiz6zWN9B6dJZw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/fveapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 FVEAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"2.0.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/fveapi_2.0.0_1782435311523_0.2709555186040924","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 FVEAPI bindings for Bun (FFI) on Windows.","devDependencies":{"@bun-win32/kernel32":"2.0.1","@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/fveapi","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/fveapi"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","fveapi","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:bitlocker-compliance-report":"bun ./example/bitlocker-compliance-report.ts","example:bitlocker-vault-scope":"bun ./example/bitlocker-vault-scope.ts"},"_id":"@bun-win32/fveapi@2.0.1","_integrity":"sha512-I7oXN8BSppVca6nqqBu0/sxDZjKXeqDDGQoHafCbl12KlG+yM5zOEIFw3E94LYDtSuNgp1EHKfibzejhHLQqaA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"1421b54c1c16e9dff6d17baed10ccd6bb11ab67f","dist":{"integrity":"sha512-I7oXN8BSppVca6nqqBu0/sxDZjKXeqDDGQoHafCbl12KlG+yM5zOEIFw3E94LYDtSuNgp1EHKfibzejhHLQqaA==","shasum":"1421b54c1c16e9dff6d17baed10ccd6bb11ab67f","tarball":"https://registry.npmjs.org/@bun-win32/fveapi/-/fveapi-2.0.1.tgz","fileCount":6,"unpackedSize":67398,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCv4xve2aswy5xqfxdEJIoIEU7SQT4w4VemLqcsBbEDnwIhAN0fmRlebFxTLMNMbL9Yf5PkKOhyo20F7DCPEE3fOZyV"}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fveapi_2.0.1_1782437773501_0.40229999953104323"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-19T20:22:52.303Z","modified":"2026-06-26T01:36:13.737Z","1.0.0":"2026-05-19T20:22:52.654Z","1.0.1":"2026-06-10T22:33:53.781Z","2.0.0":"2026-06-26T00:55:11.705Z","2.0.1":"2026-06-26T01:36:13.627Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","fveapi","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/fveapi"},"description":"Zero-dependency, zero-overhead Win32 FVEAPI bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/fveapi\n\nZero-dependency, zero-overhead Win32 FVEAPI (BitLocker / Full Volume Encryption) bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/fveapi` exposes the `fveapi.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Fveapi`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\n`fveapi.dll` is the user-mode entry point to the kernel-mode BitLocker Drive Encryption (FVE) support. Microsoft does not publish per-function C prototypes or Microsoft Learn pages for these exports; the documented programmatic surface for the same operations is the [`Win32_EncryptableVolume`](https://learn.microsoft.com/en-us/windows/win32/secprov/win32-encryptablevolume) WMI provider. The volume-handle lifetime, the `HRESULT`-style return value, and the volume-handle-first calling pattern are verified empirically against the live DLL; remaining undocumented parameters are bound as opaque pointers. Treat every return value as an `HRESULT` and degrade gracefully when not elevated or on non-BitLocker volumes.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `fveapi.dll` (BitLocker volume status, protection, conversion, recovery, device encryption).\n- In-source docs in `structs/Fveapi.ts` with links to Microsoft's documented BitLocker surface.\n- Lazy binding on first call; optional eager preload (`Fveapi.Preload()`).\n- No wrapper overhead; calls map 1:1 to native exports.\n- Strongly-typed Win32 aliases (see `types/Fveapi.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n- Many operations require elevation (run as Administrator / SYSTEM); read-only status probes degrade gracefully without it.\n\n## Installation\n\n```sh\nbun add @bun-win32/fveapi\n```\n\n## Quick Start\n\n```ts\nimport Fveapi from '@bun-win32/fveapi';\n\n// Open a volume handle (HRESULT-style return; 0 == S_OK)\nconst volume = Buffer.from('\\\\\\\\?\\\\Volume{00000000-0000-0000-0000-000000000000}\\0', 'utf16le');\nconst handleOut = Buffer.alloc(8);\nconst hr = Fveapi.FveOpenVolumeW(volume.ptr, 0, handleOut.ptr);\nif (hr === 0) {\n  const hVolume = handleOut.readBigUInt64LE(0);\n  const status = Buffer.alloc(64);\n  Fveapi.FveGetStatus(hVolume, status.ptr);\n  Fveapi.FveCloseVolume(hVolume);\n}\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example:bitlocker-vault-scope\nbun run example:bitlocker-compliance-report\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Fveapi.Preload()`.\n- Windows only. Bun runtime required.\n- Return values are `HRESULT`-style codes (`0` = success). `fveapi.dll` rejects unsupported callers with `0x80070057` (`E_INVALIDARG`) or `0x80070005` (`E_ACCESSDENIED`) — handle these instead of assuming success.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}