@useragent-kit/product-sdk
v0.0.1
Published
Product-side TypeScript SDK for apps running inside a Triangle User Agent via window.host
Maintainers
Readme
@polkadot-apps/product-sdk
Product-side TypeScript SDK for apps running inside a Triangle User Agent.
Use this package when you are building the product or dApp that runs inside a
host-provided webview or iframe and talks to the shell through window.host.
Install
npm install @polkadot-apps/product-sdkMinimal example
import { data, files, media, mesh, navigateTo } from "@polkadot-apps/product-sdk";
await navigateTo("browse.dot");
await files.save({
filename: "example.txt",
bytes: new TextEncoder().encode("hello"),
});This package is pure TypeScript. It does not depend on the host-side WASM runtime packages.
Positioning
@polkadot-apps/product-sdk is the recommended high-level product package for
most new products in this ecosystem.
- use
@polkadot-apps/product-sdkfor the normal typed product-facing path - use
@polkadot/api-protocolif you need direct access to the canonical full contract or want to build a custom facade/transport layer - use
@polkadot-apps/productkitonly when you intentionally want the narrow compatibility subset
Compatibility
- Node.js 18+ for local builds
- runs in guest/product code, not the host shell
- expects a compatible
window.hostbridge from the embedding Triangle User Agent
Documentation
- Web product guide: https://github.com/paritytech/host-sdk/blob/main/site/src/content/docs/getting-started/web-product.md
- Positioning: https://github.com/paritytech/host-sdk/blob/main/site/src/content/docs/ecosystem/productkit-vs-api-protocol.md
- Migration guide: https://github.com/paritytech/host-sdk/blob/main/site/src/content/docs/ecosystem/productkit-migration.md
- Quickstart: https://github.com/paritytech/host-sdk/blob/main/site/src/content/docs/getting-started/index.md
