docs(mwa): add quick-start, method reference, cache guide, and migration guide#6
Open
Zurcusa wants to merge 11 commits into
Open
docs(mwa): add quick-start, method reference, cache guide, and migration guide#6Zurcusa wants to merge 11 commits into
Zurcusa wants to merge 11 commits into
Conversation
50ab718 to
37fc64b
Compare
780f463 to
7912091
Compare
de05078 to
8f9883c
Compare
67e50a7 to
8863367
Compare
- Guard null/empty address in PrimaryAccountPublicKeyBytes - Private constructors on DeauthorizeResult and ReconnectResult - Null-result check in JsonRpc20Client.ReceiverRaw - Cache auth token refresh in sign_and_send authorize action - LogoutSuppressed + OnWalletDisconnected on auth revocation paths - Fix base64 → base58 typo in method reference
- Return base58-encoded signatures instead of base64 (Solana RPC compat) - Remove duplicate sendOptions wire field (MWA v2 spec uses "options" only) - Gate Debug.Log wire messages behind UNITY_EDITOR || MWA_VERBOSE_WIRE - Remove unused LegacyPkKey constant from PlayerPrefsAuthorizationCache - Make _warnedThisSession static for once-per-session semantics - Add SIWS fallback length guard for signed payloads < 64 bytes - Enable BouncyCastle for Editor platform (fixes EditMode test loading) - Add namespace to JsonRpcErrorCodes - Fix SchemaVersion default to match ExpectedSchemaVersion (2) - Fix DeauthorizeTests missing _gate reflection init (4 test failures) - Fix ConcurrencyTests assertion for GetUninitializedObject compatibility - Fix ReconnectTests platform guard for non-Android EditMode runs - Remove invalid LegacyPk_DeletedOnConstruction test
- DeauthorizeRequestWireTest: use RpcMethodNames.Deauthorize in assertion instead of hardcoded string - ReconnectTests: promote _gate lookup to static field with OneTimeSetUp guard so reflection drift fails fast with a clear message
LoginWithSignInInternal SIWS fallback was the last AuthorizeAsync call site that discarded the return value, losing token rotations.
- Null-safe constructor: default solanaWalletOptions to prevent NPE - Validate payload elements are non-null before sending to wallet - Treat missing auth_token in clone_authorization as protocol error - Use LoadValidCachedRecordAsync in ReloadAuthTokenFromCacheIfNeeded to enforce schema/chain validation on cached records - Guard null authorization in ReconnectInternal success path - Remove unused using in ConcurrencyTests
8f9883c to
fbbfc6c
Compare
Semaphore gate: - Wrap _Login, _SignAllTransactions, SignMessage, GetCapabilities in TryAcquireGate/ReleaseGate to prevent concurrent state corruption Bug fixes: - Preserve WaitForCommitmentToSendNextTransaction when backfilling MinContextSlot - Set WalletBase.Account on LoginWithSignIn success - Default null mwaOptions in SolanaWalletAdapter so cache injection works Upstream PR magicblock-labs#283 test compat: - Update IAdapterOperationsContractTests for v2 AuthorizeAsync API - Rewrite SolanaMobileWalletAdapterPrefsTests for v2 cache-based migration - Fix MobileWalletAdapterClientLifecycleTests Authorize → AuthorizeAsync
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.
Problem
The MWA v2 SDK has no user-facing documentation. Developers have to read source code to understand the API.
Solution
Five markdown docs under
docs/:mwa-quick-start.md— install, configure, first wallet connectionmwa-method-reference.md— all 13 public methods with signatures, return types, result variants, concurrency behaviormwa-cache-guide.md— IAuthorizationCache interface, default/custom implementations, validation rulesmwa-migration-v1-to-v2.md— Logout→Disconnect/Deauthorize, cache changes, new methodssign-and-send-investigation.md— Backpacksign_and_send_transactionsfailure analysis with cross-wallet comparison (Phantom, Solflare, Backpack)Also removes
docs/from.gitignore(was incorrectly ignored).Links to the published demo app: https://github.com/Zurcusa/unity-solana-mwa-example
Known Issue: Backpack
sign_and_send_transactionssign_and_send_transactionsfails with Backpack wallet. The transaction is successfully created, signed, and submitted on-chain — the issue is only in receiving the response back in the dApp. Backpack's WebSocket server crashes during the RPC submission phase, corrupting the local association before the response can be delivered. Phantom and Solflare handle the same flow correctly.sign_transactionsworks with all wallets including Backpack. Full investigation indocs/sign-and-send-investigation.md.Deploy Notes
Documentation only. No code changes.
Testing Matrix
Tested on Pixel 7 emulator and Solana Seeker (real device).
Wallets Tested
Functionality Coverage