Integration

Frontend and SDK Integration

When integrating Moss, the real concerns are connector wiring, deployment metadata, permission checks, and smart-wallet context.

3 sectionsfrontend-and-sdk
01

Frontend Entry Points

  • The wallet connection layer handles connector integration.
  • `src/moss/lib/config.ts` aggregates environment variables and deployment metadata.
  • `ConnectWallet` and related wallet components manage smart-wallet detection and creation.
  • `MossWalletGate` is the guardrail for pages that require a Moss wallet context.
02

Reusable Packages

@mossdapp/sdk

External

TypeScript SDK for dApps, including smart-wallet address computation and signature flows.

@mossdapp/abi

Published ABI JSON exports for frontend and script reuse.

@mossdapp/deployments

Per-network deployment metadata for integration and environment setup.

03

Recommended Integration Path

Step 1

Prepare chain addresses

Confirm logic, App NFT, Registry, and system-module addresses first.

Step 2

Wire the connector

Make sure the frontend can enter the Moss smart-wallet context.

Step 3

Check installation and permission state

Before entering an app flow, verify App NFT ownership and authorization state.

Step 4

Design around system modules

Prefer reusing TokenManage / NFTManage rather than inventing a separate asset-control layer.

SDK integration diagram
The integration boundary is between the dApp UI, the SDK layer, and the SCW execution context.