Skip to content

refactor(host): migrate host providers + chain client to @parity/product-sdk-host (phase 4)#14

Open
Imod7 wants to merge 3 commits into
paritytech:mainfrom
Imod7:domi-migrate-phase4-host-providers
Open

refactor(host): migrate host providers + chain client to @parity/product-sdk-host (phase 4)#14
Imod7 wants to merge 3 commits into
paritytech:mainfrom
Imod7:domi-migrate-phase4-host-providers

Conversation

@Imod7

@Imod7 Imod7 commented Jun 12, 2026

Copy link
Copy Markdown

What

Migrates packages/shared + packages/admin to the @parity/product-sdk-host facade (^0.6.0^0.9.0).

This is a semantic rewrite, not a path swap: the facade getters are async + nullable and throw, versus the old sync objects + neverthrow .match().

Changes

leaf utilities

  • cache/storage.ts: hostLocalStoragegetHostLocalStorage() (async, null-guarded)
  • host/navigation.ts: hostApi.navigateTogetTruApi().navigateTo (Result kept)
  • host/permissions.ts: facade requestPermission/requestDevicePermission
    (boolean + throw → .catch(() => false)); featureSupported via getTruApi()
  • host/theme.ts: createThemeProvider()getThemeProvider() (async, fire-and-forget)
  • admin/pages/debug.vue: dynamic hostApi import → getTruApi() (guarded)

host core

  • host/notifications.ts: notificationManagergetNotificationManager() (async, nullable)
  • host/wallet.ts: createAccountsProvidergetAccountsProvider(); drop injectSpektrExtension; requestResourceAllocation now takes the resource array directly and returns AllocationOutcome[] (no v1 envelope / no neverthrow); host signRaw → product-account signer signBytes
  • host/client.ts: createPapiProvider (sync) → getHostProvider() (async, nullable); useMainClient/useBulletinClient become async, awaited across contracts read/write/multicall, bulletin, event-watcher, allowances, debug

Dependencies

Only change: @parity/product-sdk-host ^0.6.0^0.9.0 (shared + admin).

@socket-security

socket-security Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​parity/​product-sdk-host@​0.6.0 ⏵ 0.10.077 +110071 +198 +2100

View full report

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