Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
a6d2be1
chore(bindings): spike a ble-to-wi-fi fast link between android and ios
mizanxali Nov 16, 2026
1447c1b
docs: decide and specify the ble-to-wi-fi fast link
mizanxali Nov 17, 2026
0f69543
feat(sealed): reserve the __fast_link__ prefix inside the 1:1 session
mizanxali Nov 17, 2026
821b78d
feat(sealed): advertise the fast-link capability in the key package
mizanxali Nov 17, 2026
d50844d
feat(protocol): run the fast link state machine in the engine
mizanxali Nov 17, 2026
d8fc580
feat(uniffi): expose the fast link across the ffi
mizanxali Nov 17, 2026
1677aff
perf(protocol): send sixteen media chunks in flight on the peer-strea…
mizanxali Nov 17, 2026
303028e
feat(bindings): host and join a fast link on android, and expose it t…
mizanxali Nov 17, 2026
9029f49
feat(bindings): join a fast link on ios
mizanxali Nov 17, 2026
4ca42b1
fix(protocol): let only large bodies hold a fast link up
mizanxali Nov 17, 2026
740a760
fix(protocol): carry fast-link frames over bluetooth and refuse late …
mizanxali Nov 17, 2026
ebe61c2
fix(protocol): withdraw a fast-link directive the platform never took
mizanxali Nov 17, 2026
4dbf930
fix(bindings): an offer android cannot join is refused, not a crash
mizanxali Nov 17, 2026
0061bc4
fix(bindings): take a fast-link group down while paused, and start none
mizanxali Nov 17, 2026
2f59bdf
fix(protocol): a peer whose network was declined cannot prompt again …
mizanxali Nov 17, 2026
f7e8aac
fix(protocol): remember a close that overtakes its offer
mizanxali Nov 17, 2026
01e3f79
fix(bindings): group formation waits while a fast link holds the radio
mizanxali Nov 17, 2026
399df3b
fix(protocol): blocking a peer ends its fast link
mizanxali Nov 17, 2026
17453e1
fix(protocol): a second offer while joining is refused, not swapped in
mizanxali Nov 17, 2026
a1c1d10
fix(bindings): an android that loses the host tie-break joins once it…
mizanxali Nov 17, 2026
317637d
fix(protocol): a decline counts after the peer closed its link
mizanxali Nov 17, 2026
efb6a0b
fix(bindings): an android joiner dials the group owner, not the offer…
mizanxali Nov 17, 2026
b64ecb9
fix(bindings): remove a fast-link group that comes up after its link …
mizanxali Nov 17, 2026
734bb1d
docs: point custody at the renamed state-machine invariant heading
mizanxali Nov 17, 2026
2abc9e1
fix(protocol): a host stops answering a peer whose links go unused
mizanxali Nov 17, 2026
152f589
docs: changelog and permissions for the fast link
mizanxali Nov 17, 2026
605ebdd
docs(sealed): say the leaf advertises no fast link today
mizanxali Nov 17, 2026
8ed3f41
fix(bindings): regenerate the c# local api and the rn bridge adapters
mizanxali Nov 17, 2026
b178958
fix(protocol): a peer that closes its unused links cannot dodge the h…
mizanxali Nov 17, 2026
0f018b2
fix(protocol): only a transfer on the link holds it off the idle limit
mizanxali Nov 17, 2026
5ca21ce
fix(protocol): pausing the engine ends a fast link
mizanxali Nov 17, 2026
ee814fe
fix(protocol): a hosting link's passphrase is redacted in debug
mizanxali Nov 17, 2026
b8653f1
docs: say where an android joiner dials, and the window-16 speed
mizanxali Nov 17, 2026
63fc771
fix(protocol): grow the peer-stream window in bytes, not ratchet gene…
mizanxali Nov 17, 2026
582e640
test(uniffi): pin the fast-link tokens the bridges send
mizanxali Nov 17, 2026
fa212a9
feat(bindings): let an app choose whether it takes part in a peer's f…
mizanxali Nov 17, 2026
aa1b4f0
fix(protocol): a peer's decline never pauses that peer's own offers
mizanxali Nov 17, 2026
22b56bb
fix(protocol): a transfer on a fast link fails as soon as the link ends
mizanxali Nov 17, 2026
0850fb1
fix(protocol): stopping the engine ends a fast link
mizanxali Nov 17, 2026
5cc582b
fix(bindings): read a hotspot error's code only in its own domain
mizanxali Nov 17, 2026
bcb040c
fix(protocol): a fast-link frame that waited for the session is never…
mizanxali Nov 17, 2026
8a334f6
fix(bindings): an iphone dials a fast link only from the offered network
mizanxali Nov 17, 2026
118de5e
fix(bindings): an android fast link's state clears even with no channel
mizanxali Nov 17, 2026
7969e25
fix(bindings): name the wi-fi information entitlement an iphone join …
mizanxali Nov 17, 2026
cdc112d
fix(protocol): offers a peer leaves unanswered pause it like a decline
mizanxali Nov 17, 2026
6d19614
fix(protocol): a hosted fast link that is up is never swapped for an …
mizanxali Nov 17, 2026
ab2ff62
fix(protocol): a host closing its own unasked offers declined still c…
mizanxali Nov 17, 2026
a416d03
fix(protocol): asking again after a lost offer joins the network stil…
mizanxali Nov 17, 2026
9598401
fix(protocol): a device that cannot join refuses an offer before givi…
mizanxali Nov 17, 2026
dce4827
fix(bindings): an android host removes a fast-link group its dead pro…
mizanxali Nov 17, 2026
a7ee060
docs: say a fast link's events are matched by peer, since its id can …
mizanxali Nov 17, 2026
8357c08
fix(bindings): an explicit null keeps the ios fast-link setting, as o…
mizanxali Nov 17, 2026
b6f13ec
docs: correct the fast link's activity size and where an android join…
mizanxali Nov 17, 2026
30cfa65
fix(protocol): a peer that asked for a fast link cannot then offer on…
mizanxali Nov 17, 2026
bb15fef
fix(bindings): an ios join that never reaches the offered network say…
mizanxali Nov 17, 2026
5fce194
fix(protocol): a fast link that came up and carried nothing still cou…
mizanxali Nov 17, 2026
5b277b5
fix(protocol): a fast-link miss long ago is not one in a row with a m…
mizanxali Nov 17, 2026
793caaf
fix(protocol): a resent fast-link offer carries only the lifetime it …
mizanxali Nov 17, 2026
64f3bed
fix(protocol): a fast-link offer must name a wi-fi direct group
mizanxali Nov 17, 2026
6cb56fe
fix(bindings): an iphone never dials an offer naming the network it i…
mizanxali Nov 17, 2026
c5da4b9
fix(bindings): stopping the transport ends a fast link as closed, nev…
mizanxali Nov 17, 2026
6346191
docs: name the fast-link residual of a peer that uses every link
mizanxali Nov 17, 2026
0013b58
fix(protocol): only an offer naming the waiting request answers it af…
mizanxali Nov 17, 2026
62d454b
docs(bindings): the android group builder's guard no longer says the …
mizanxali Nov 17, 2026
39cd247
docs: say how an iphone's fast link ends on leaving the foreground, p…
mizanxali Nov 17, 2026
9d2627e
fix(protocol): a close for a fast link is never refused as late
mizanxali Nov 17, 2026
23b73e8
docs(uniffi): list every reason a platform reports a fast link ended …
mizanxali Nov 17, 2026
2cf4ae7
test(uniffi): no bridge logs a fast-link directive whole
mizanxali Nov 17, 2026
27f54b8
fix(bindings): an iphone's transport stop ends its fast link closed b…
mizanxali Nov 17, 2026
a3da02b
fix(bindings): an iphone confirms the fast-link network by its gatewa…
mizanxali Nov 17, 2026
7de6b4b
fix(bindings): an android host records its fast-link group once it se…
mizanxali Nov 17, 2026
7ff4263
fix(bindings): an iphone gives up a join that never reaches the group
mizanxali Nov 17, 2026
c293b37
fix(bindings): an android host keeps its group's name while the group…
mizanxali Nov 17, 2026
a965414
docs: an offer's host is the network's gateway, which an iphone joine…
mizanxali Nov 17, 2026
3601f2a
fix(bindings): an iphone's fast-link dial retries when the stream tab…
mizanxali Nov 17, 2026
d94483b
fix(bindings): an iphone refuses an offer whose host is already its g…
mizanxali Nov 17, 2026
0a014d1
fix(protocol): a pending fast link gives way to a stream that reached…
mizanxali Nov 17, 2026
5e106bf
fix(protocol): a stream over the group is the fast link's own, and a …
mizanxali Nov 17, 2026
f1ed7b3
fix(protocol): a peer's superseded is not counted, and a stream prove…
mizanxali Nov 17, 2026
05ff587
fix(protocol): a host whose offer is not out gives way to a stream, a…
mizanxali Nov 17, 2026
1712dc9
chore: merge main into feat/ble-to-wifi-fast-link
mizanxali Nov 17, 2026
341ba45
fix(bindings): register fast_link_changed with the event parser, and …
mizanxali Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ Questions about a release, or about upgrading to one? Ask in the

### Added

- **Two devices that meet only over Bluetooth can bring up Wi-Fi between
them: the fast link** ([ADR 0038](docs/adr/0038-a-fast-link-is-offered-inside-the-session.md)).
`requestFastLink(peer)` (React Native and Flutter; `request_fast_link` over
the FFI) asks a peer with a confirmed session for a Wi-Fi network: an
Android device hosts a Wi-Fi Direct group with fresh random credentials,
sealed to the peer in the session, and an iPhone joins it after a system
prompt. The stream over it fills the peer-stream slot, so transfers move to
it on their own: a 1 MiB file that took 197.7 s over Bluetooth took about
2.5 s on two phones. Progress arrives as `fast_link_changed` events; the
link ends after 60 s with nothing large to carry, when the iPhone app leaves
the foreground, or on `closeFastLink`, and ends `superseded` when another
connection, a shared home network say, reaches the peer before it comes up
and carries the traffic instead. An iOS app needs the Hotspot
Configuration entitlement, and an Android app `NEARBY_WIFI_DEVICES` (fine
location below Android 13); see [mobile permissions](docs/mobile-permissions.md#fast-link).
`wifiDirect.fastLink` decides how far an app takes part: `any` (the
default) also hosts for a peer's request and joins an offer it did not ask
for, `requestedOnly` takes part only in links the app asked for, `off`
never. Platforms declare what they can do through four new peer-stream
driver calls, `wifi_direct_set_fast_link_roles` and its siblings; a custom
platform that declares nothing is never asked to host or join.

- **Native iOS and Android applications get the SDK's built-in storage.**
`OfflineProtocolReferenceStorage` opens the Keychain or Keystore MLS store and
the app-container protocol-state store for one `(appId, profile)` account,
Expand Down Expand Up @@ -76,6 +98,15 @@ Questions about a release, or about upgrading to one? Ask in the
automated publishing. The first version is uploaded by hand
([docs/flutter-distribution.md](docs/flutter-distribution.md)).

### Changed

- **A file transfer over a peer stream keeps 512 KiB in flight, not 128 KiB:**
eight 64 KiB chunks instead of four of 32 KiB. Every peer-stream carrier
gets it (a fast link, a Wi-Fi Direct group, a LAN, AWDL): with the old
window, a 1 MiB file over a fast link took 8 s waiting on acknowledgements
rather than on the link. Bluetooth, internet and Nostr windows are
unchanged.

### Fixed

- **Flutter on Android now reports a lost MLS identity.** Its engine host
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ that are versioned, reviewable, and readable by people who are not an agent.
| `offline-protocol-core`: adding an import, a dependency, or a constructor | ADR [0020](docs/adr/0020-core-compiles-without-std.md) (it is dual std/no_std) |
| `offline-protocol-sealed`: the envelope codec, `derive_address`, canonical signing payloads, ratchet constants, the 1:1 control-frame prefixes, `KeyPackagePayload`, the identity assertion codec | ADR [0022](docs/adr/0022-one-sealed-layer-shared-with-the-leaf.md) (also dual std/no_std, and the one home for each) |
| `offline-protocol-leaf`: anything a device does at pairing, on a frame, or with its store | ADR [0021](docs/adr/0021-a-leaf-node-speaks-mls.md) and [docs/spec/leaf-provisioning.md](docs/spec/leaf-provisioning.md) (a time source, real entropy, durable-before-emit and authorization are obligations, not suggestions) |
| The fast link: bringing up Wi-Fi between two devices that meet over Bluetooth, the `__FAST_LINK__` frame, the bridges' host and join code | ADR [0038](docs/adr/0038-a-fast-link-is-offered-inside-the-session.md) and [the fast link state machine](docs/state-machines/fast-link.md) (credentials only ever travel sealed and ephemeral; the host admits only the invitee) |
| Replicated documents: the store, sync frames, attachments | [docs/spec/data-sync.md](docs/spec/data-sync.md), [the replication state machine](docs/state-machines/data-replication.md), ADR [0018](docs/adr/0018-data-layer-engine-and-storage-seams.md) and [0019](docs/adr/0019-remote-document-imports-are-contained-not-trusted.md) |
| Any binding: Swift, Kotlin, Python, TypeScript, C, Java, Ruby, the browser | [docs/bridges/](docs/bridges/README.md) |
| The C API: `offline-protocol-uniffi/src/capi`, `bindings/c` | [docs/bridges/c.md](docs/bridges/c.md) (the dispatcher is generated from the UDL; the header is generated by cbindgen and committed) |
Expand Down
6 changes: 6 additions & 0 deletions bindings/csharp/local_api_methods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ble_undersized_mtu_reports
block_user
cancel_connection_request
cancel_file_transfer
close_fast_link
close_file_stores
create_group
create_invite
Expand Down Expand Up @@ -146,6 +147,7 @@ release_transport_lock
remove_from_group
remove_transport
rename_group
request_fast_link
request_group_relay_registration
resolve_username
resume
Expand Down Expand Up @@ -209,8 +211,12 @@ update_transport_metrics
verify_identity_assertion
verify_signature
verify_signature_bytes
wifi_direct_fast_link_ended
wifi_direct_fast_link_hosting
wifi_direct_get_next_message
wifi_direct_message_received
wifi_direct_next_fast_link_directive
wifi_direct_peer_connected
wifi_direct_peer_disconnected
wifi_direct_set_fast_link_roles
wifi_direct_status_changed
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand Down Expand Up @@ -66,6 +66,9 @@ public Task<string> CancelConnectionRequestAsync(string? parametersJson = null,
public Task CancelFileTransferAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("cancel_file_transfer", parametersJson, cancellationToken);

public Task<string> CloseFastLinkAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("close_fast_link", parametersJson, cancellationToken);

public Task CloseFileStoresAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("close_file_stores", parametersJson, cancellationToken);

Expand Down Expand Up @@ -248,7 +251,4 @@ public Task<string> ListGroupsAsync(string? parametersJson = null, CancellationT

public Task MlsClearPendingWelcomeAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("mls_clear_pending_welcome", parametersJson, cancellationToken);

public Task<string> MlsCreateSessionAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("mls_create_session", parametersJson, cancellationToken);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand All @@ -12,6 +12,9 @@ namespace OfflineProtocol.Sdk;

public sealed partial class ProtocolEngine
{
public Task<string> MlsCreateSessionAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("mls_create_session", parametersJson, cancellationToken);

public Task<string> MlsDecryptAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("mls_decrypt", parametersJson, cancellationToken);

Expand Down Expand Up @@ -123,6 +126,9 @@ public Task RemoveTransportAsync(string? parametersJson = null, CancellationToke
public Task RenameGroupAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("rename_group", parametersJson, cancellationToken);

public Task<string> RequestFastLinkAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("request_fast_link", parametersJson, cancellationToken);

public Task<string> RequestGroupRelayRegistrationAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("request_group_relay_registration", parametersJson, cancellationToken);

Expand Down Expand Up @@ -245,10 +251,4 @@ public Task UpdateDorsConfigAsync(string? parametersJson = null, CancellationTok

public Task UpdateRelayConfigAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("update_relay_config", parametersJson, cancellationToken);

public Task UpdateRetryConfigAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("update_retry_config", parametersJson, cancellationToken);

public Task UpdateTransportMetricsAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("update_transport_metrics", parametersJson, cancellationToken);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand All @@ -12,24 +12,42 @@ namespace OfflineProtocol.Sdk;

public sealed partial class ProtocolEngine
{
public Task UpdateRetryConfigAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("update_retry_config", parametersJson, cancellationToken);

public Task UpdateTransportMetricsAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("update_transport_metrics", parametersJson, cancellationToken);

public Task<string> VerifySignatureAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("verify_signature", parametersJson, cancellationToken);

public Task<string> VerifySignatureBytesAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("verify_signature_bytes", parametersJson, cancellationToken);

public Task WifiDirectFastLinkEndedAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_fast_link_ended", parametersJson, cancellationToken);

public Task WifiDirectFastLinkHostingAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_fast_link_hosting", parametersJson, cancellationToken);

public Task<string> WifiDirectGetNextMessageAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("wifi_direct_get_next_message", parametersJson, cancellationToken);

public Task WifiDirectMessageReceivedAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_message_received", parametersJson, cancellationToken);

public Task<string> WifiDirectNextFastLinkDirectiveAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallWithResultAsync("wifi_direct_next_fast_link_directive", parametersJson, cancellationToken);

public Task WifiDirectPeerConnectedAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_peer_connected", parametersJson, cancellationToken);

public Task WifiDirectPeerDisconnectedAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_peer_disconnected", parametersJson, cancellationToken);

public Task WifiDirectSetFastLinkRolesAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_set_fast_link_roles", parametersJson, cancellationToken);

public Task WifiDirectStatusChangedAsync(string? parametersJson = null, CancellationToken cancellationToken = default) =>
CallAsync("wifi_direct_status_changed", parametersJson, cancellationToken);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated />
// Generated by tools/gen_csharp_local_api.py from offline_protocol.udl
// UDL_SHA256 = 3e28d977491b82d3b713c1fc274811e6f066a02f4f98dab6d1ede6512fd9a799
// UDL_SHA256 = d9a4bfe9da239313288180f511cab1c80981f1b6db53f2ba9a90b73c838e6a80
// Do not edit.

#nullable enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ internal object EngineMethodHandlers {
return com.offlineprotocol.ProtocolEngineHostBridge.clearServiceTopic(host, env.context, arguments)
}

@JvmStatic
fun closeFastLink(
host: ProtocolEngineHost,
env: FlutterEngineChannel.Environment,
arguments: Any?,
): Any? {
return com.offlineprotocol.ProtocolEngineHostBridge.closeFastLink(host, env.context, arguments)
}

@JvmStatic
fun create(
host: ProtocolEngineHost,
Expand Down Expand Up @@ -1338,6 +1347,15 @@ internal object EngineMethodHandlers {
return com.offlineprotocol.ProtocolEngineHostBridge.requestEnableBluetooth(host, activity, arguments)
}

@JvmStatic
fun requestFastLink(
host: ProtocolEngineHost,
env: FlutterEngineChannel.Environment,
arguments: Any?,
): Any? {
return com.offlineprotocol.ProtocolEngineHostBridge.requestFastLink(host, env.context, arguments)
}

@JvmStatic
fun resolveUsername(
host: ProtocolEngineHost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ object FlutterEngineChannel {
"cancelFileTransfer" -> EngineMethodHandlers.cancelFileTransfer(host, env, arguments)
"checkInternetPresence" -> EngineMethodHandlers.checkInternetPresence(host, env, arguments)
"clearServiceTopic" -> EngineMethodHandlers.clearServiceTopic(host, env, arguments)
"closeFastLink" -> EngineMethodHandlers.closeFastLink(host, env, arguments)
"create" -> EngineMethodHandlers.create(host, env, arguments)
"createInvite" -> EngineMethodHandlers.createInvite(host, env, arguments)
"dataAttachmentHash" -> EngineMethodHandlers.dataAttachmentHash(host, env, arguments)
Expand Down Expand Up @@ -169,6 +170,7 @@ object FlutterEngineChannel {
"releaseTransportLock" -> EngineMethodHandlers.releaseTransportLock(host, env, arguments)
"replayEvents" -> EngineMethodHandlers.replayEvents(host, env, arguments)
"requestEnableBluetooth" -> EngineMethodHandlers.requestEnableBluetooth(host, env, arguments)
"requestFastLink" -> EngineMethodHandlers.requestFastLink(host, env, arguments)
"resolveUsername" -> EngineMethodHandlers.resolveUsername(host, env, arguments)
"respondToServiceRequest" -> EngineMethodHandlers.respondToServiceRequest(host, env, arguments)
"resume" -> EngineMethodHandlers.resume(host, env, arguments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ enum FlutterEngineChannel {
return try ProtocolEngineHostBridge.checkInternetPresence(host: host, env: env, arguments: arguments)
case "clearServiceTopic":
return try ProtocolEngineHostBridge.clearServiceTopic(host: host, env: env, arguments: arguments)
case "closeFastLink":
return try ProtocolEngineHostBridge.closeFastLink(host: host, env: env, arguments: arguments)
case "create":
return try ProtocolEngineHostBridge.create(host: host, env: env, arguments: arguments)
case "createInvite":
Expand Down Expand Up @@ -297,6 +299,8 @@ enum FlutterEngineChannel {
return try ProtocolEngineHostBridge.replayEvents(host: host, env: env, arguments: arguments)
case "requestEnableBluetooth":
return try ProtocolEngineHostBridge.requestEnableBluetooth(host: host, env: env, arguments: arguments)
case "requestFastLink":
return try ProtocolEngineHostBridge.requestFastLink(host: host, env: env, arguments: arguments)
case "resolveUsername":
return try ProtocolEngineHostBridge.resolveUsername(host: host, env: env, arguments: arguments)
case "respondToServiceRequest":
Expand Down
8 changes: 8 additions & 0 deletions bindings/flutter/offline_protocol/lib/src/mesh_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ static Future<dynamic> checkInternetPresence([Map<String, dynamic>? args]) =>
static Future<dynamic> clearServiceTopic([Map<String, dynamic>? args]) =>
_invoke<dynamic>('clearServiceTopic', args);

/// Native `closeFastLink` (see React Native `OfflineProtocolNativeModule.closeFastLink`).
static Future<dynamic> closeFastLink([Map<String, dynamic>? args]) =>
_invoke<dynamic>('closeFastLink', args);

/// Native `createInvite` (see React Native `OfflineProtocolNativeModule.createInvite`).
static Future<dynamic> createInvite([Map<String, dynamic>? args]) =>
_invoke<dynamic>('createInvite', args);
Expand Down Expand Up @@ -536,6 +540,10 @@ static Future<dynamic> releaseTransportLock([Map<String, dynamic>? args]) =>
static Future<dynamic> requestEnableBluetooth([Map<String, dynamic>? args]) =>
_invoke<dynamic>('requestEnableBluetooth', args);

/// Native `requestFastLink` (see React Native `OfflineProtocolNativeModule.requestFastLink`).
static Future<dynamic> requestFastLink([Map<String, dynamic>? args]) =>
_invoke<dynamic>('requestFastLink', args);

/// Native `resolveUsername` (see React Native `OfflineProtocolNativeModule.resolveUsername`).
static Future<dynamic> resolveUsername([Map<String, dynamic>? args]) =>
_invoke<dynamic>('resolveUsername', args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class OfflineProtocol {
'cancelFileTransfer',
'checkInternetPresence',
'clearServiceTopic',
'closeFastLink',
'create',
'createInvite',
'dataAttachmentHash',
Expand Down Expand Up @@ -269,6 +270,7 @@ class OfflineProtocol {
'releaseTransportLock',
'replayEvents',
'requestEnableBluetooth',
'requestFastLink',
'resolveUsername',
'respondToServiceRequest',
'resume',
Expand Down
2 changes: 2 additions & 0 deletions bindings/flutter/offline_protocol/method_channel_methods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cancelConnectionRequest
cancelFileTransfer
checkInternetPresence
clearServiceTopic
closeFastLink
create
createInvite
dataAttachmentHash
Expand Down Expand Up @@ -135,6 +136,7 @@ rekeySession
releaseTransportLock
replayEvents
requestEnableBluetooth
requestFastLink
resolveUsername
respondToServiceRequest
resume
Expand Down
Loading
Loading