feat: migrate to product-sdk 0.9 (createTransaction signing, SDK allowances, cloud-storage, contracts 0.7)#245
Merged
Conversation
host-papp 0.8 emits a V2 pairing proposal (SCALE discriminant 0x01) that the Polkadot mobile app's native handshake codec (V1-only, EnumIndex(0)) rejects as 'Invalid QR code'. host-papp 0.7.9 final keeps the V1 QR while providing the same byte-identical createTransaction (RFC-0020) wire codec terminal 0.3.0 signs through, so the signed-extension fixes are unaffected. Drop the pin when the mobile app ships V2 pairing support.
The phone fetches the V1 offer's metadata field as a URL to render the Sign-In screen; terminal 0.3.0 dropped the option (host-papp 0.8 carries structured metadata inside the V2 proposal instead), so the field encoded as an empty string and pairing failed with 'Failed to load pairing request'. A pnpm patch on product-sdk-terminal restores the metadataUrl pass-through for the duration of the novasama 0.7.9 mobile-compat pin.
…7.9 pin The defensive session-decode translation no longer guards an active 0.8 incompatibility (the pin keeps the wire at 0.7.9, matching what released CLIs wrote); reframe its comments and message accordingly. Soften the changeset's end-to-end claim pending on-device signing validation, and record upstream's guidance that 0.7.9 is the recommended line until multi-device support ships V2 pairing.
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
createTransaction(RFC-0020) via@parity/product-sdk-terminal@0.3.0— the wallet builds and signs the extrinsic, so chain-declared signed extensions (AsPgas,AuthorizeValueTransfer, …) are forwarded verbatim, structurally eliminating the "PJS does not support this signed-extension" failures. The CLI keeps deriving the product-account key (sessionSigner.ts) and always feeds it to the SDK signer.@parity/product-sdk-terminal/host: the SDK's slot-key cache (~/.polkadot-apps/<appId>_AllowanceKeys.json) replaces our local shim, grant markers (~/.polkadot/allowances.json) and slot-key store (allowance-keys.json). All three resources (Bulletin, Statement Store, smart-contract gas) are requested in one dialog;getBulletinAllowanceSignerkeeps the on-chain quota check with a singleIncreaseretry.@parity/product-sdk-bulletin→@parity/product-sdk-cloud-storage(its successor;calculateCid,checkAuthorization,CloudStorageApi).cdm.json+ContractManager.fromLiveClientreplaces the hand-rolled live address resolution. Registry address and"@w3s/playground-registry": "latest"stay identical to playground-app — runtime convergence via the live CDM registry.polkadot-apideduped to a single 2.1.5.postinstallWASM patch removed (obsolete).The novasama pin (read before touching overrides)
@novasamatech/*is force-pinned to0.7.9viapnpm.overrides, with a small pnpm patch onproduct-sdk-terminalrestoring themetadataUrloption:0x01) that the mobile app cannot decode — its native handshake codec is V1-only, verified at app build 1227 and Android repo HEAD. Scanning shows "Invalid QR code".createTransactioncodec, so the signing fix is unaffected.patches/@parity__product-sdk-terminal.patch+TERMINAL_METADATA_URL. Without it pairing fails with "Failed to load pairing request".TERMINAL_METADATA_URLtogether, only when the mobile app ships V2 pairing, and re-verify on a real phone first. Details in CLAUDE.md.User-visible
Existing logins keep working (no re-pair). Resource allowances are re-requested once in a single phone dialog (cache moved to the SDK store). Changeset: minor.
Verification
pnpm format:check/pnpm lint:license/pnpm test(579) /pnpm buildGH_TOKEN-gated moddable cell, environmental)pnpm install --frozen-lockfileapplies the terminal patch from its recorded hashMobile signing is currently broken app-side, so these remain unverified on a real device and must be checked before release (or accepted as a known risk):
createTransactionsignature round-trip (Revive.map_accountor a deploy approval)