Add NIP-PL iOS push notification foundation#1924
Open
tlongwell-block wants to merge 3 commits into
Open
Conversation
… vectors Add tests/vectors/app_attest_transcripts.json — deterministic known-answer vectors (exact transcript bytes + SHA-256) for all five NIP-PL App Attest operations: enroll, delegate, rotate_endpoint, revoke_delegation, revoke_installation — generated by the gateway's own transcript() encoder, plus in-crate tests asserting the encoder reproduces the fixture byte-for-byte. The fixture is shared ground truth for client-side canonical encoders (the Swift NIP-PL iOS client): a client that fails to reproduce these bytes exactly fails every attested call with invalid_attestation and no diagnostic (Swift JSONSerialization's \/ escaping is the known trap). Any future change to the Rust encoder now breaks a test instead of silently stranding clients. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
BuzzPushKit SwiftPM package with a hand-rolled ordered-compact-JSON transcript encoder for all five App Attest domains (enroll / delegate / rotate-endpoint / revoke-delegation / revoke-installation), verified byte-for-byte + SHA-256 against the gateway-generated known-answer vectors in crates/buzz-push-gateway/tests/vectors/app_attest_transcripts.json. JSONSerialization is deliberately not used anywhere near these bytes: it escapes '/' as '\/' and does not guarantee member order, either of which silently strands every iOS client with 401 invalid_attestation. Non-ASCII input fails closed per the NIP-PL ASCII profile. The 'audience' member is a fixed NIP-PL protocol constant (https://push.buzz.xyz/v1/...) hardcoded by the gateway for cross-route domain separation — clients must never derive it from a discovered gateway base URL or relay host. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Validation
swift test --package-path mobile/ios/BuzzPushKitcd mobile && flutter analyzecd mobile && flutter test test/shared/push/push_models_test.dartcd mobile && swiftc -typecheck ios/NotificationService/NotificationService.swiftcd mobile && plutil -lint ios/Runner/Info.plist ios/NotificationService/Info.plist ios/Runner/Runner.entitlements ios/NotificationService/NotificationService.entitlements--no-verifybecause the firstgit pushran all suites but exited 1 after test success without a visible failure in captured outputKnown gap
The NSE foundation currently preserves safe fallback unless it can read relay data. Production authenticated rich replacement still needs native NIP-98/NIP-42 Schnorr signing/keychain integration; this PR does not fake that path.
Local build blocker
xcodebuild -list -project mobile/ios/Runner.xcodeprojis blocked on this machine by Xcode plugin mismatch (IDESimulatorFoundation/DVTDownloads; xcodebuild suggestsxcodebuild -runFirstLaunch), so the Xcode target was validated by plist lint/project inspection and Swift typecheck instead of a full Xcode build.