Documentation Index
Fetch the complete documentation index at: https://docs.trustware.io/llms.txt
Use this file to discover all available pages before exploring further.
This quickstart covers the React SDK integration path. For server-side or backend integrations, start with the API Overview.
Install the package
Add The SDK requires React 18.2+ or React 19. Install the peer dependencies if you haven’t already:
@trustware/sdk to your project using your preferred package manager:The package is published as
@trustware/sdk on npm.react and react-dom are marked as optional peer dependencies; if your app already has them installed, no extra step is needed. viem is required.Get an API key
apiKey is a required field in TrustwareConfigOptions. Create one in the Client Dashboard: create an organization, create a project, then spin up an SDK key. The raw key is shown only once, so copy it immediately. See the Client Dashboard section below for the full tour.Store the key as an environment variable:Configure TrustwareConfigOptions
The
See configuration overview for the full reference of every field.
routes.toChain and routes.toToken fields are required; everything else is optional:| Field | Required | Description |
|---|---|---|
apiKey | Yes | Your Trustware API key |
routes.toChain | Yes | Destination chain ID as a string |
routes.toToken | Yes | Destination token address |
routes.toAddress | No | Recipient address. Can be updated at runtime via Trustware.setDestinationAddress |
routes.defaultSlippage | No | Slippage percentage. Defaults to 1 |
routes.options | No | Refresh and amount-constraint settings (routeRefreshMs, fixedFromAmount, minAmountOut, maxAmountOut) |
autoDetectProvider | No | Enable SDK-managed wallet discovery. Defaults to false |
messages | No | Override widget title and description copy |
theme | No | Widget color and radius overrides |
walletConnect | No | WalletConnect connector overrides |
retry | No | Rate-limit retry behavior |
features | No | Feature flags (tokensPagination, balanceStreaming, shouldAllowGA4) |
onError, onSuccess, onEvent | No | Lifecycle callbacks |
Wrap your app with TrustwareProvider
Mount All
TrustwareProvider once near the root of your component tree and pass in your config:TrustwareWidget instances and useTrustware calls within the tree share this config and wallet state.Full working example
Here’s the complete setup in a single file, copied directly from the SDK README:Client Dashboard
The Client Dashboard is where you manage everything about your Trustware integration: your organization, your projects, your SDK keys, and the transaction and analytics data flowing through the SDK. You can run multiple projects under a single organization, each with its own SDK keys and isolated data. This is useful for separating environments (e.g. staging vs. production) or distinct products.Quick start
Sign in
You land on the Overview tab, which shows the account you’re signed in as and your authentication status.
Create an organization
On first sign-in you’re prompted to name your organization (a description is optional).
Spin up an SDK key
Go to the Projects tab, select your project, and create a key. Creating the org and project does not create a key automatically. You do this step manually.
TrustwareConfigOptions as shown in the steps above and start routing transactions.
Navigation
The dashboard has six tabs in the left sidebar, plus quick switchers for your organization, project, and account (and a sign-out control). Overview. Your home base. Shows your account and authentication status, the tenants and workspaces you can access, and shortcut sections: Jump back in (pills into a project’s access and analytics pages), Quick actions (manage projects, manage members, view analytics, update profile), At a glance (current setup state with a recommended next step), and Common paths (invite a teammate, set up project access, review SDK usage). Organizations. View organization status, create new organizations, and switch between the orgs you belong to. Shows the creation date, seat/member count, and a member list with each person’s role, status, last active time, and email, including who the owners and admins are. Note: only owners can change owner rows, and an org must always keep at least one active owner. Projects. Choose between projects or create a new one. Each project shows its active status, creation date, slug, and SDK key limit (default 3). This is where you manage SDK keys:- Create keys (owners and admins only) with a label, an optional origin URL, and optional notes. Each key shows its creation date, SDK ID, and active status. The raw key appears once on creation via a copy-to-clipboard pop-up.
- Edit, rotate, revoke, or delete keys as needed.
- Manage project members and roles: grant admin access or suspend accounts.
Coming soon: Paymaster management will live in the Projects tab, letting you link and manage paymasters per project. This isn’t available in production yet.
Need help?
Reach the team any time at support@trustware.io.Next steps
- Bring your own wallet: if your app already manages wallet connection through Wagmi or viem, see Host wallet bridge.
- Control the widget programmatically: open and close the widget from your own UI with Controlled widget.
- Build a custom UI: skip the widget entirely and use the Headless core API.
- Customize appearance: adjust colors, radius, and copy in Configuration.
