Prerequisites
Install the BlackSwan JavaScript SDK:Client Setup
Create a shared client instance to use across your components:Fetching the Trust Ratio
UsegetTrustRatio to retrieve the raw trust score for a wallet address:
Visual Trust Indicator
The trust ratio maps to a letter tier. Render a colored badge that reflects that tier so users can immediately understand their credit standing:Trust Progress Bar
A progress bar gives users an intuitive sense of how close they are to the next tier. The trust ratio is a value from0 to 10000, so divide by 100 to express it as a 0–100% bar width: