@premai/api-sdk TypeScript client runs inside a react-native-bare-kit worklet. It encrypts each request on the device, before the request leaves the phone. The Prem API Gateway sees only ciphertext. The enclave opens the request inside a Trusted Execution Environment (TEE).
The encryption path is identical to the standard client. The worklet runs the same WASM cryptography, so the security model and attestation guarantees also apply on mobile. This is the same method that powers Sotto, Prem’s confidential dictation app.
Pass an assets directory
Pass anassets directory to new Worklet(...). bare-kit extracts the bundled assets to that directory at startup. It then rewrites the paths to real file:// URLs. The WASM module loads from disk on the fast path.
If you omit
assets, the SDK falls back to an inline base64 copy of the WASM bytes. The disk path is faster, so pass assets when you can.Related
reticle-expo example
Clone the example Expo app and use it as a scaffold.
Attestation
See how the device verifies real confidential hardware.
Confidential Proxy
Learn the proxy modes, routes, keys, and daemon controls.
Quickstart
Send your first encrypted request with the TypeScript client.

