@kimjay112/cipherwire-core
v0.1.0
Published
End-to-end payload encryption protocol (X25519 + HKDF-SHA256 + AES-256-GCM) shared by all Cipherwire SDKs.
Maintainers
Readme
@kimjay112/cipherwire-core
The Cipherwire protocol: X25519 key agreement, HKDF-SHA256, AES-256-GCM. It works in Node 18+, browsers and React Native, with no native dependencies.
import { createCipherClient, createCipherFetch, generateKeyPair } from '@kimjay112/cipherwire-core';
const api = createCipherClient({ publicKey: 'cw_pk_…', baseUrl: 'https://api.example.com' });
const order = await api.post('/orders', { sku: 'A1' });
const secureFetch = createCipherFetch({ publicKey: 'cw_pk_…' }); // drop-in `fetch`Options: baseUrl, headers, fetch, strict (throw on unencrypted responses), allowPlaintextBodies, shouldEncrypt(url).
Most apps should install @kimjay112/cipherwire-node, @kimjay112/cipherwire-react or @kimjay112/cipherwire-react-native instead.
