feat: migrate the complete Dawa library from whatsappbridge + NuGet packaging - #2
Open
martiendejong wants to merge 2 commits into
Open
feat: migrate the complete Dawa library from whatsappbridge + NuGet packaging#2martiendejong wants to merge 2 commits into
martiendejong wants to merge 2 commits into
Conversation
The standalone martiendejong/dawa repo held the original skeletal from-scratch Baileys port (~24 files, NoiseProcessor ~580 lines) that never fully connected — its crypto/framing bugs are exactly what the recent handshake work re-derived. Meanwhile the private martiendejong/whatsappbridge repo carried a far more complete, actively-maintained Dawa (NoiseProcessor ~4400 lines) with the real device-linking/pairing fixes, full Signal message decryption, LID support, history sync, media crypto, a self-updating WA version provider and DI extensions. This migrates that complete library wholesale into src/Dawa so the standalone repo becomes the canonical, up-to-date, packageable Dawa: - Adds MediaCrypto, WaVersionProvider, HistorySyncProto, SyncProto, SignalProto and the fuller Auth/Noise/Signal/Transport/WhatsAppClient implementations. - The csproj was already NuGet-ready (PackageId Dawa.WhatsApp, points at this repo); added a <None Include> so the repo README ships as the package readme. Builds clean; the full solution (samples included) compiles against the new API. Packs to Dawa.WhatsApp.0.1.0.nupkg. (Publish to nuget.org is pending a correctly scoped API key — the vault key is scoped to Hazina only.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers the deterministic layers a live handshake depends on, validating the complete (live-verified) Dawa: - XEdDSA sign+verify — Dawa's own Verify AND an independent BouncyCastle Ed25519 verifier (reconstructing the Edwards key from the Montgomery key, sign bit 0), the exact check WhatsApp runs on the signed pre-key. - AES-GCM counter transport / nonce-prefix / raw, with tamper + wrong-counter rejection. - HKDF determinism + DeriveKeys split ordering. - Curve25519 DH agreement; NoiseState.MixKey two-party transport agreement. - AuthState.CreateNew's signed pre-key verifies (offline lock of what pairing proved live). - Binary node encode->decode round-trips: raw strings+attrs, dictionary tokens, nested child nodes, JID attrs, >255B binary content; token-table shape. - JID parsing (user/server, device, group, round-trip, empty). The prior skeletal-era tests were removed — they asserted the old port's behaviour (os=Macintosh, a specific WA version const, encoder flag byte) which the complete version does differently and correctly (os=Ubuntu, self-updating version, flag byte handled at the transport layer). 19/19 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Makes the standalone
martiendejong/dawarepo the canonical, up-to-date, packageable Dawa.What
The standalone repo held the original skeletal from-scratch Baileys port (~24 files, NoiseProcessor ~580 lines) that never fully connected. The private
whatsappbridgerepo carried a far more complete Dawa (NoiseProcessor ~4400 lines) with the real device-linking/pairing fixes, full Signal message decryption, LID support, history sync, media crypto, a self-updating WA version provider and DI extensions. This migrates that complete library intosrc/Dawawholesale.PackageId=Dawa.WhatsApp, RepositoryUrl → this repo); added a<None Include>so the repo README ships as the package readme.Verified
dotnet build src/Dawaclean; full solution (incl. samples) compiles against the new API.dotnet pack→ Dawa.WhatsApp.0.1.0.nupkg produced.Publish status
Publishing to nuget.org is blocked: the only NuGet key in the vault is scoped to Hazina and nuget.org 403s a brand-new
Dawa.WhatsApppackage; the gh token lackswrite:packagesfor GitHub Packages. Needs a NuGet.org key with Push new packages + a glob coveringDawa.WhatsApp(or*), or a PAT withwrite:packages.Next: point
whatsappbridgeat the published package.🤖 Generated with Claude Code