Skip to content

refactor(deps): upgrade product-sdk + bulletin-deploy, migrate to product-sdk-keys#184

Merged
UtkarshBhardwaj007 merged 1 commit into
mainfrom
refactor/product-sdk-keys-migration
May 19, 2026
Merged

refactor(deps): upgrade product-sdk + bulletin-deploy, migrate to product-sdk-keys#184
UtkarshBhardwaj007 merged 1 commit into
mainfrom
refactor/product-sdk-keys-migration

Conversation

@UtkarshBhardwaj007
Copy link
Copy Markdown
Member

Summary

  • Bumps every @parity/product-sdk-* caret range and bulletin-deploy to current latest.
  • Migrates deriveProductAccountPublicKey from a local hand-rolled mirror to the canonical export in @parity/product-sdk-keys (Phase 3 of the product-account unification work; Phases 1+2 shipped in product-sdk#105; Phase 4 shipped in feat(init): show username and product account on success #182).

Upstream API audit

Package Old New Notes
@parity/product-sdk-address ^0.1.1 ^0.1.1 no change
@parity/product-sdk-bulletin ^0.4.0 ^0.4.2 transitive bumps only (host, chain-client, tx, descriptors)
@parity/product-sdk-chain-client ^0.4.0 ^0.4.2 transitive bumps only
@parity/product-sdk-contracts ^0.5.0 ^0.5.1 transitive bumps only (keys 0.3.0, signer 0.3.0, tx 0.2.4)
@parity/product-sdk-descriptors ^0.4.0 ^0.4.1 metadata refresh against live-chain runtime; no source-level API change
@parity/product-sdk-host ^0.3.0 ^0.4.0 additive: RemotePermission, requestPermission, SignerManagerOptions.onConnect
@parity/product-sdk-keys ^0.2.3 ^0.3.0 additive: deriveProductAccountPublicKey, createChainCode (the migration target)
@parity/product-sdk-logger ^0.1.1 ^0.1.1 no change
@parity/product-sdk-storage ^0.1.4 ^0.1.5 transitive bump (host 0.4.0)
@parity/product-sdk-terminal ^0.2.1 ^0.2.1 no change
@parity/product-sdk-tx ^0.2.3 ^0.2.4 transitive bump (keys 0.3.0)
@parity/product-sdk-utils ^0.1.1 ^0.1.1 no change
bulletin-deploy 0.7.20 0.7.24 PoP self-serve guidance, chunk-reupload retry hardening, auto-reprove on stale alias, DOTNS_ENVBULLETIN_DEPLOY_ENV rename (deprecation alias; CLI sets neither)

No CLI-side adaptation was needed beyond the migration itself. QueryResult<T> discriminated-union narrowing was already in place. pnpm.overrides entries left untouched — all three remain load-bearing per CLAUDE.md. bulletin-deploy stays at an explicit pin.

Migration

  • Deletes src/utils/productAccountDerivation.ts. Algorithm parity (CLI / mobile / desktop) is now locked by upstream frozen vectors in @parity/product-sdk-keys/src/product-account.test.ts.
  • Updates two import sites: src/utils/sessionSigner.ts and src/commands/init/identityLine.ts.
  • The local mirror used u32 for SCALE-encoded derivationIndex; upstream uses u64. Both encode 0 to identical bytes, and a sweep (grep -rn "derivationIndex" src/ e2e/ scripts/ tools/) confirms only derivationIndex: 0 is in use across the tree.
  • Adds src/utils/productAccount.test.ts (config + SDK import + ss58Encode wiring smoke test).
  • Adds src/utils/sessionSigner.test.ts (renamed-with-edits from the deleted productAccountDerivation.test.ts) to preserve regression coverage for createPlaygroundSessionSigner: init/deploy/playground-app address equivalence, and the rootAccountId-vs-remoteAccount.accountId guard.
  • Drops unused direct scale-ts dep from package.json (was only there for the deleted local mirror).

Pre-PR review

A Superpowers code-review subagent reviewed against upstream changelogs and the desktop/mobile reference repos before push. Two P1 findings, both addressed in the same commit:

  1. Restored the createPlaygroundSessionSigner regression tests in a new sessionSigner.test.ts.
  2. Removed the now-unused direct scale-ts dep.

P2 suggestions (strengthen productAccount.test.ts with a byte-frozen vector; add a TODO at src/utils/allowances/host.ts about 0.4.0's requestPermission/onConnect) deferred — neither is load-bearing.

Test plan

  • pnpm format:check
  • pnpm lint:license
  • pnpm test (532 passed, 1 skipped)
  • pnpm build
  • grep -rn "deriveProductAccountPublicKey" src/ shows imports from @parity/product-sdk-keys only
  • grep -rn "productAccountDerivation" src/ returns no matches
  • dot init against an existing session still renders the username + product account lines from feat(init): show username and product account on success #182 correctly

…duct-sdk-keys

- Bumps every @parity/product-sdk-* caret range and bulletin-deploy
  to current latest. Patch bumps (bulletin/chain-client/contracts/
  descriptors/storage/tx) are transitive-only. Minor bumps (host 0.4.0,
  keys 0.3.0) are additive — no CLI adaptation required. bulletin-deploy
  0.7.20 to 0.7.24 brings PoP self-serve guidance, chunk-reupload retry
  hardening, and auto-reprove on stale alias binding.
- Deletes src/utils/productAccountDerivation.ts and consumes the
  canonical deriveProductAccountPublicKey from @parity/product-sdk-keys.
  Two callsites updated: src/utils/sessionSigner.ts and
  src/commands/init/identityLine.ts. Algorithm parity with mobile and
  desktop is locked by upstream frozen vectors.
- Replaces the local algorithm tests with two thinner files:
  src/utils/productAccount.test.ts (wiring smoke test) and
  src/utils/sessionSigner.test.ts (preserves regression tests pinning
  the init/deploy/playground-app equivalence and the
  rootAccountId-vs-remoteAccount.accountId guard).
- Drops unused direct scale-ts dep from package.json.

Reviewed by superpowers code-review subagent before push.
@github-actions
Copy link
Copy Markdown
Contributor

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/refactor/product-sdk-keys-migration bash

@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit 220fc1b into main May 19, 2026
19 checks passed
@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the refactor/product-sdk-keys-migration branch May 19, 2026 15:58
@github-actions
Copy link
Copy Markdown
Contributor

E2E Test Pass · ✅ PASS

Tag: e2e-ci-pr · Branch: refactor/product-sdk-keys-migration · Commit: efceef7 · Run logs

Cell Result Time
pr-preflight ✅ PASS 1m50s
pr-mod ✅ PASS 1m17s
pr-deploy-cdm ✅ PASS 2m36s
pr-deploy-foundry ✅ PASS 1m23s
pr-deploy-frontend ✅ PASS 3m39s
pr-install ✅ PASS 1m31s
pr-init-session ✅ PASS 1m41s
${{ matrix.cell }} ⏭️ SKIP 0m00s
${{ matrix.cell }} ⏭️ SKIP 0m00s

Sentry traces: view spans for this run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant