Repository navigation
feat: add mobile pairing Settings plugin #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2d54330
feat(pairing): add mobile pairing settings plugin
klopez4212 9b1e4b5
fix(tests): register pairing option in message fixture
klopez4212 31735b9
fix(pairing): require desktop code and preserve uncertain transfers
klopez4212 3bb845b
fix(pairing): retain uncertain delivery and terminal cancellation
klopez4212 99f8f5d
fix(pairing): preserve import outcome across cancellation
ea6cbe7
fix: gate mobile pairing on native identity mode
d8a57c5
refactor(pairing): group exchange context for clippy
afe6fea
fix: preserve post-publication pairing outcome on cancel
31343ab
fix: renew pairing before the sidecar connection expires
01d9320
fix: disambiguate nostr in the rebased lockfile
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| [workspace] | ||
| members = ["crates/plugin-manager", "crates/agent-controller", "crates/credential-store", "src-tauri"] | ||
| members = ["crates/pairing", "crates/plugin-manager", "crates/agent-controller", "crates/credential-store", "src-tauri"] | ||
| default-members = ["crates/plugin-manager"] | ||
| resolver = "2" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [package] | ||
| name = "buzz-pairing" | ||
| version = "0.0.0" | ||
| edition = "2021" | ||
| license = "Apache-2.0" | ||
| description = "Buzz NIP-AB device pairing protocol" | ||
|
|
||
| [dependencies] | ||
| nostr = { version = "0.44", features = ["nip44"] } | ||
| serde = { version = "1", features = ["derive"] } | ||
| serde_json = "1" | ||
| thiserror = "2" | ||
| hex = "0.4" | ||
| rand = "0.10" | ||
| subtle = "2.6" | ||
| zeroize = "1.8" | ||
| percent-encoding = "2.3" | ||
| url = "2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Buzz pairing protocol | ||
|
|
||
| Ported from [`block/buzz`](https://github.com/block/buzz/tree/ac0ad7c3004683e5db813492846d787404a2b475/crates/buzz-core/src/pairing), | ||
| PR [#8085](https://github.com/block/buzz/pull/8085), under the repository's | ||
| Apache-2.0 license. The imported protocol and tests preserve the source's | ||
| cryptography, event validation, timeout, replay protection, legacy confirmation, | ||
| and encrypted `desktop-code-v1` capability. Local changes extract the module as its | ||
| own crate, make kind 24134 local, update crate paths in documentation, and format | ||
| with this repository's pinned tools. | ||
|
|
||
| This crate has no network or Keychain access. Desktop transport and account | ||
| export are owned by `src-tauri/src/pairing`. Its tests include the exact source | ||
| protocol vectors and code-entry proof regressions. Run `bin/cargo test -p | ||
| buzz-pairing` for unit tests and doctests. | ||
|
|
||
| The source QR lifetime differs from upstream: `start_source_lifetime()` resets | ||
| its two-minute clock after desktop transport setup and immediately before the | ||
| visible QR is published. The desktop uses that same deadline for expiry. The | ||
| upstream reference starts the clock at session construction and expires the QR | ||
| at that original deadline; retaining that behavior here would shorten the | ||
| visible-QR contract after slow discovery or subscription. Keep this divergence | ||
| when syncing upstream. | ||
|
|
||
| The desktop-code port also fails closed when an oversized rejection cannot be | ||
| serialized: exhausting the guess budget clears the code and aborts before the | ||
| fallible reply construction. A regression covers that boundary. |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.