{"_id":"@airctrl/sdk","name":"@airctrl/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@airctrl/sdk","version":"0.1.0","type":"module","description":"AIRCTRL SDK — client-side secret consumption with zero-knowledge decryption. Bundles the AIRCTRL crypto engine + a typed HTTP client.","license":"UNLICENSED","homepage":"https://airctrl.dev","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsup"},"dependencies":{"libsodium-wrappers":"0.8.4"},"devDependencies":{"@airctrl/crypto":"1.0.0"},"gitHead":"cc62d4b10ea2268f94fa964fc7b4a683d6b1a35d","_id":"@airctrl/sdk@0.1.0","_nodeVersion":"22.19.0","_npmVersion":"11.12.0","dist":{"integrity":"sha512-Nng4S5Q/o8O+G6zI8vqWpgBroUpC1Bw8UzMUaRl+3yDK4jhddm8K/SI0KWDH6W4FrJxYCEcafsk/mk3GyBSfRA==","shasum":"672c15773e27541423705c93002067e8892c6ead","tarball":"https://registry.npmjs.org/@airctrl/sdk/-/sdk-0.1.0.tgz","fileCount":4,"unpackedSize":19227,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCLQ4ewvjafp8XZxMuJKWNSLm5TK109Qz0W6Xi71ZS2WAIhAPaxVPrkz6XlTyXUI1tn/M2+whwdSJy6aXdZJVFVuira"}]},"_npmUser":{"name":"david.theovex","email":"david@theovex.com"},"directories":{},"maintainers":[{"name":"david.theovex","email":"david@theovex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.0_1783614341897_0.1845900626888195"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-09T16:25:41.730Z","0.1.0":"2026-07-09T16:25:42.052Z","modified":"2026-07-09T16:25:42.277Z"},"maintainers":[{"name":"david.theovex","email":"david@theovex.com"}],"description":"AIRCTRL SDK — client-side secret consumption with zero-knowledge decryption. Bundles the AIRCTRL crypto engine + a typed HTTP client.","homepage":"https://airctrl.dev","license":"UNLICENSED","readme":"# @airctrl/sdk\n\nTyped client for [AIRCTRL](https://airctrl.dev) with **client-side, zero-knowledge** secret\ndecryption. Ciphertext and wrapped keys come from the API; decryption happens in your process\nusing your vault passphrase — **the server never sees plaintext**. The AIRCTRL crypto engine is\nbundled in, so there's nothing else to install.\n\n## Install\n\n```sh\nnpm install @airctrl/sdk\n```\n\n## Before you start (get these three)\n\n1. **Personal Access Token (PAT)** — in the AIRCTRL app: **Settings → Developer → Create token**. Copy the `sk-actrl-pat-…` (shown once). This is the `auth` value below.\n2. **API base URL** — your AIRCTRL API (`http://localhost:54330` for local dev, or your dev/prod URL).\n3. **Vault passphrase** — the passphrase you set to unlock your vault. It's passed as `vaultPassword` and decrypts secrets **on your machine**. It is **not** the PAT: the PAT authenticates to the API; the passphrase decrypts the ciphertext locally.\n\n## Usage (user mode)\n\n```ts\nimport { createClient } from '@airctrl/sdk'\n\nconst airctrl = createClient({\n  baseUrl: process.env.AC_API_BASE_URL!, // your AIRCTRL API base URL\n  auth: process.env.AC_TOKEN!,           // personal access token (sk-actrl-pat-…)\n})\n\n// Decrypt one record\nconst secret = await airctrl.getSecret({ recordId, vaultPassword })\nconsole.log(secret.value)\n\n// Decrypt every record in a project (e.g. to inject as env vars)\nconst all = await airctrl.getAll({ projectId, vaultPassword })\nfor (const s of all) console.log(s.name, s.value)\n```\n\n## Service mode (machine-to-machine)\n\n```ts\nimport { createServiceClient } from '@airctrl/sdk'\n\nconst svc = createServiceClient({\n  baseUrl: process.env.AC_API_BASE_URL!,\n  auth: process.env.AC_SERVICE_TOKEN!, // service-account token\n})\n```\n\n## Zero-knowledge\n\nPlaintext is never transmitted. The SDK fetches the ciphertext plus your wrapped record key,\nunwraps it locally with your vault passphrase, and decrypts in-process (AES-256-GCM · X25519).\n\n© AIRCTRL — all rights reserved (license TBD) · [airctrl.dev](https://airctrl.dev)\n","readmeFilename":"README.md","_rev":"1-6fdfbf5450017f6172f818810a5b0b67"}