Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

API Reference

Auto-generated rustdoc for the generated KeyOS API crates, types, functions, methods, traits, and the source view, with working cross-linking and search.

Open the full API Reference →

The API Reference includes every enabled KeyOS snapshot in one bundle. Use its version selector to match your app’s minimum KeyOS version; the SDK release number is independent.

The same bundle ships with the SDK for offline use. Run foundation docs to open it in your browser, or foundation docs --url to print its location.

Where to start

If you’re building your first app, these are the high-traffic crates:

  • fs, filesystem (FileSystem, File, Dir, Location, OpenFlags)
  • quantum_link, QuantumLink connection status and exchange rates (the rest is reserved for Foundation-signed apps)
  • gui_server_api, register your app with the GUI, draw, animate, handle input
  • security, secure element, seed access, device identity
  • settings, typed system settings get / set / subscribe
  • app_manager, app lifecycle, metadata, third-party certificates

The full set of SDK API crates is app_manager, backup, camera, crypto, fs, gui_server_api, haptics, nfc, quantum_link, rgb_led, security and settings, plus server (the typed IPC helpers the client handles are built on) and foundation_manifest (parsing and inspecting app manifests). Jump to the API Reference landing to browse them.

How the API surface works

Every service crate ships:

  • A client handle (e.g. FileSystem, QuantumLinkApi) that owns a checked connection to the corresponding service
  • A use_api! macro that wires the handle up against your app’s generated permissions type
  • A messages submodule with the raw IPC wire types, apps don’t use these directly; the client handle is the public surface

The methods on a client handle are bound by where P: MessageAllowed<...> constraints, so the compiler refuses to build if you try to call something you haven’t declared in app-config.toml’s [permissions] block. Those bounds are a developer convenience that turns a missing permission into a compile error, not the security boundary: the real enforcement happens at runtime, where the app manager, the name server and the kernel together check every message against your app’s signed manifest and the permissions the user granted.

See Building Apps for the manifest format and KeyOS, Permissions for the security model behind it.