presence_token 0.1.0 copy "presence_token: ^0.1.0" to clipboard
presence_token: ^0.1.0 copied to clipboard

Rotating, unlinkable anonymous device tokens for privacy-preserving proximity counting. A token is derived from a random per-install seed hashed with a time window: strangers can count nearby devices [...]

presence_token #

Rotating, unlinkable anonymous tokens for privacy-preserving proximity counting — no plugins, no server, no identity.

A token is derived from a random per-install seed hashed together with a 15-minute time window. Anyone nearby can count how many devices are present right now, but cannot recognize the same device in the next window, the next day, or tie it back to a person or account. Counting is purely peer-to-peer — no server is involved and nothing is ever uploaded.

Extracted from ParkerUp's BLE presence beacon: while the map screen is open, the app advertises a rotating token and listens for others, showing a live "verified cars nearby" count with zero location or identity leakage.

What it's for #

  • Anonymous crowd/occupancy counting — "how many of us are in this room right now" without a check-in system or accounts
  • Privacy-first proximity features — presence signals that can't be used to track a specific person over time
  • BLE beacon payloads — pair with any BLE advertise/scan plugin (ParkerUp uses flutter_blue_plus); this package only does the token math

Usage #

import 'package:presence_token/presence_token.dart';

// Generate this device's current token — rotates automatically as time
// windows pass, using a seed you persist per install.
final token = currentPresenceToken(installSeed);

// Advertise `token` over BLE; when you hear someone else's token, it's a
// live nearby device — you cannot learn anything else about it.

API names above are illustrative — see lib/presence_token.dart for the exact surface until 0.1.0 is published.

Status #

Pre-publication extraction (2026-07-20): code and unit tests are lifted verbatim from the production app. Before the pub.flutter-io.cn release: finalize the public API surface, add an example/, and wire CI.

License #

MIT

0
likes
140
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Rotating, unlinkable anonymous device tokens for privacy-preserving proximity counting. A token is derived from a random per-install seed hashed with a time window: strangers can count nearby devices right now, but can't recognize the same device across windows, days, or link it to an identity. Pure Dart, no plugins. Extracted from the ParkerUp parking app's BLE presence beacon.

Topics

#privacy #proximity #anonymous #bluetooth #ble

License

MIT (license)

Dependencies

crypto

More

Packages that depend on presence_token