@polkadot-apps/product-sdk
v0.3.14
Published
Product-side TypeScript SDK for apps running inside a Triangle User Agent via window.host
Downloads
91
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.
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
