P2PSDK is a native network runtime exposed through platform wrappers. The wrapper translates platform lifecycle and consent decisions into a stable SDK instance while keeping transport policy outside application code.
Responsibility boundary
Section titled “Responsibility boundary”| Your application owns | The SDK owns |
|---|---|
| Where the feature is offered | Native runtime and handle lifetime inside the wrapper |
| Reward presentation and business eligibility | Consent result verification and local decision storage |
| Holding one instance for the required lifetime | Device identity derivation and persistence fallback |
| Responding to connected/disconnected events | Connection attempts, reconnect, battery, and DNS policy |
| User-facing revoke entry point | Posting revoke and closing after success |
| Sanitized telemetry | Native error mapping and platform callback dispatch |
Runtime sequence
Section titled “Runtime sequence”After connect() starts the supervisor, the SDK performs its control-plane and transport setup. Only the connected event marks the peer online. If connectivity or policy interrupts the owner connection, the SDK reports a reason and applies its assigned reconnect behavior.
What application code cannot configure
Section titled “What application code cannot configure”Application code does not select connection endpoints, runtime bearer tokens, reconnect delays, DNS servers, battery thresholds, or protocol features. These are controlled by the SDK and its authenticated runtime policy.
Network activity and streams
Section titled “Network activity and streams”The owner connection can accept independent network streams after the SDK is online. Stream parsing, bounded buffers, target failures, and cancellation remain internal. An application should not attempt to inspect or route individual streams through wrapper APIs.
Failure isolation
Section titled “Failure isolation”A malformed or failed stream should not terminate unrelated streams. A failed owner connection moves the SDK offline, emits a disconnected reason, and can be retried by the internal supervisor. Callback failures are contained by supported wrappers so they do not cross native runtime boundaries.