@useragent-kit/productkit-adapter-scale
v0.3.12
Published
SCALE-backed adapter that mounts ProductKit over SCALE messages for Triangle User Agent integrations
Downloads
80
Maintainers
Readme
@useragent-kit/productkit-adapter-scale
Product-bundled SCALE adapter that mounts @useragent-kit/productkit over a
SCALE host bridge or an existing host bridge.
Install
npm install @useragent-kit/productkit-adapter-scale @useragent-kit/productkitUse mountScaleProductKit() from product code to install the narrow ProductKit
surface on window.host. Hosts do not need to inject ProductKit by default.
Positioning
This adapter exists for the narrow ProductKit compatibility layer, not for the full TrUAPI surface.
- use it when you have a SCALE-backed host bridge that only needs the ProductKit subset
- prefer
@useragent-kit/product-sdkfor most new product integrations - use TrUAPI through
@useragent-kit/sdk/truapiif you need the canonical full contract rather than the narrow compatibility subset
Minimal example
import { mountScaleProductKit } from "@useragent-kit/productkit-adapter-scale";
mountScaleProductKit({
productAccountId: "browse.dot",
});Compatibility
- product-side package
- peer dependency on
@useragent-kit/productkit - intended for products running against a SCALE-backed bridge such as
window.__HOST_API_PORT__
Documentation
- Web product guide: https://github.com/paritytech/useragent-kit/blob/main/site/src/content/docs/getting-started/web-product.md
- Positioning: https://github.com/paritytech/useragent-kit/blob/main/site/src/content/docs/ecosystem/productkit-vs-truapi.md
- Quickstart: https://github.com/paritytech/useragent-kit/blob/main/site/src/content/docs/getting-started/index.md
