The deposit destination — chain, token, and recipient address — can be set upfront in your config or updated at runtime without remounting the provider. This is useful when the values aren’t known until after a user logs in, selects a target network, or an async lookup resolves.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.
Setting values in config at initialization
If all destination values are known when you create your config, set them directly in theroutes object:
Updating destination values at runtime
Three methods let you update the destination without remounting the provider. All returnTrustware for chaining.
setDestinationAddress
Updates routes.toAddress. Pass null or undefined to clear a previously set address.
setDestinationChain
Updates routes.toChain. Use this when the target network is selected dynamically — for example, when a user picks a destination chain from a dropdown.
setDestinationToken
Updates routes.toToken. Use this when the target token is determined at runtime.
Chaining all three
The three setters can be chained in a single expression:When to use each approach
| Situation | Recommended approach |
|---|---|
| All values known at app initialization | routes object in config |
| Address fetched after login or session setup | Trustware.setDestinationAddress() at runtime |
| User selects a destination network | Trustware.setDestinationChain() at runtime |
| User selects a destination token | Trustware.setDestinationToken() at runtime |
| Need to clear a previously set address | Trustware.setDestinationAddress(null) |
The widget reads the resolved config when the user reaches the confirm step. You do not need to set these values before the widget mounts — setting them before the user confirms is sufficient.
