Skip to Content
Getting StartedQuickstart

Quickstart

Create an app, connect the host wallet, and read from storage.

app.ts
import { createApp } from "@parity/product-sdk"; const app = await createApp({ logLevel: "info", }); // Connect to host-provided accounts. const { accounts } = await app.wallet.connect(); console.log("Connected accounts:", accounts); // Persist a value. Namespaced under the app name in host storage. await app.localStorage.set("lastVisit", new Date().toISOString()); const lastVisit = await app.localStorage.get("lastVisit"); console.log("Last visit:", lastVisit);

Configuration is optional: await createApp() uses the defaults. Wallet accounts use the full product ID supplied by the host. The app name and local-storage prefix omit its final domain suffix: my-app.dot uses my-app, preserving existing storage under that name. app.getAppInfo().name reports the app name. Local development IDs such as localhost:3000 stay unchanged.

The name option is deprecated, ignored, and emits a warning when supplied.