@en-decrypt/sdk
v0.1.2
Published
Thin TypeScript/JavaScript client for the en-decrypt named-key crypto API
Maintainers
Readme
@en-decrypt/sdk
Thin client for the en-decrypt named-key crypto API.
npm install @en-decrypt/sdkimport { EnDecrypt } from "@en-decrypt/sdk";
const client = new EnDecrypt({
apiKey: process.env.ENDECRYPT_API_KEY!,
// Staging default: https://en-decrypt-s.com/v1
// Pass baseUrl (including /v1) when production host is decided.
});
const encrypted = await client.encrypt({ "1": "ssn: 078-05-1120" });
const decrypted = await client.decrypt(encrypted);- Staging base URL (default):
https://en-decrypt-s.com/v1 - Production base URL: TBD — pass
baseUrlexplicitly at launch - Do not use
api.en-decrypt.com/api.en-decrypt-s.com(Cloudflare may 308; clients dropAuthorization) - Auth:
Authorization: Bearer ek_live_…(orek_demo_/ek_test_) - Package is ESM-only (
importworks;require()does not) - OpenAPI:
GET /v1/openapi.jsonon the site origin - Postman collection:
sdk/postman/in this repository
Licensed under the MIT License. Use of the en-decrypt API is governed by the en-decrypt Terms of Service at https://en-decrypt.com/terms/.
