Menu 0.6.0 preview

Reference

Agent Docs: SDK API

trueseal-sync

trueseal-sync is the Rust library that does the work behind every TrueSeal SDK. It pairs devices, keeps the member list, seals each message for each recipient, holds unsent messages in an outbox, and runs the app’s handler for each message it receives. The Swift, Kotlin and TypeScript SDKs are thin wrappers around it, so all three behave the same way.

What it owns

  • Device identity. Two keypairs per device, generated on first use and kept in Session State: X25519 for encryption and for the device’s address on the relay, Ed25519 for signatures.
  • Pairing. The Pairing Token, the Pending Join and the join request, as Pairing describes.
  • Membership. The signed Group Manifest, admissions, removals, leaving, and re-applying a change that a concurrent one overwrote.
  • Sealing. One sealed Envelope per recipient device, encrypted to that device’s key and signed by the sender.
  • Delivery. The outbox, retries with backoff, acknowledging a message only after the app’s handler finishes, and dropping duplicates by Message ID.
  • The relay connection. Short Push Sessions for outgoing messages and one long-lived Receive Session, reconnecting on its own.
  • Stored data. Session State in an embedded SQLite database, migrated forward on upgrade.

What it leaves to the app

  • What the bytes in a message mean.
  • Resolving two conflicting changes. Messages from one device arrive in the order it sent them, and there is no order across devices.
  • Sending history to a new member. A new member receives only messages sent after the others learn it joined.
  • Roles and permissions. Every current member can admit, remove and destroy the group.
  • Splitting data larger than the Protocol Size Limit of 61,440 bytes (60 KiB).

API

Apps use one object, TrueSeal, with the same operations, names, events and errors in all three SDKs. Only the syntax follows each platform. The Agent Docs hold the full API reference; the guides under Integrate explain each part:

Rust apps can depend on the core directly through its git tags. It isn’t published to crates.io in the preview, and its Rust API carries no stability promise.

Build and release

trueseal-sync and the three SDKs release together as one TrueSeal Release, starting at 0.6.0, and share one version number even when a package hasn’t changed. The core is released only as git tags. Developer preview explains the version scheme and what a 0.x release may break.

Source: github.com/julianbonomini/trueseal-sync.

Further reading

  • Envelopes and Blobs: the sealed Envelope, addressed encryption, the Message ID and the Replay Window.
  • Group Manifest: the membership record and how concurrent changes converge.
  • Session State: what the library stores on the device, and how it survives crashes and upgrades.