Skip to main content
Building a mobile app? You get the same confidentiality and security as on the server. The @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.
Want a working starting point? The reticle-expo example app runs the worklet on iOS and Android. It verifies enclave attestation from the device, with no server-side proxy. Clone it and use it as a scaffold for your own app.

Pass an assets directory

Pass an assets 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.

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.