2026-05-17 14:48:52 -04:00
# API Notes
2025-08-09 13:29:01 -04:00
2026-05-17 14:48:52 -04:00
## EnhancedSecureWebRTCManager
2025-08-09 13:29:01 -04:00
2026-05-17 14:48:52 -04:00
### Verification
2025-08-09 13:29:01 -04:00
2026-05-17 14:48:52 -04:00
- `confirmVerification(userCode)` validates a manually entered SAS code.
- Verification succeeds only after both local and remote confirmations are present.
- Protocol version `4.1` is enforced during offer/answer processing.
2025-08-21 15:45:07 -04:00
2026-05-17 14:48:52 -04:00
### Privacy mode
2025-08-21 15:45:07 -04:00
2026-05-17 14:48:52 -04:00
- relay-only configuration sets WebRTC `iceTransportPolicy` to `"relay"` .
- TURN availability is checked before claiming IP protection.
2025-08-09 13:29:01 -04:00
2026-05-17 14:48:52 -04:00
### File transfer callbacks
2025-08-09 13:29:01 -04:00
2026-05-17 14:48:52 -04:00
- `setFileTransferCallbacks(onProgress, onReceived, onError, onIncomingRequest)` updates manager fields and any live `EnhancedSecureFileTransfer` instance.
- Passing `null` values detaches callbacks from the active transfer system.
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
## EnhancedSecureFileTransfer
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
### Incoming transfers
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
- metadata is validated before prompting
- acceptance is explicit
- receive buffers are allocated only after consent
- file type acceptance is allowlist-based
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
### Cleanup
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
- pending sender consent promises are rejected on cleanup
- consent timeouts are cleared immediately
- retained received buffers are bounded
- evicted download handles fail with a user-facing availability message
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
## SecurePersistentKeyStorage
2025-08-27 13:25:26 -04:00
2026-05-17 14:48:52 -04:00
- metadata is encrypted before storage
- legacy plaintext records migrate lazily
- corrupted encrypted metadata is ignored safely