BlackSwanClient exposes six methods for reading on-chain credit data. All methods accept a wallet address string and return data sourced from the BlackSwan smart contracts.
get_credit_dashboard
Returns the complete lending profile for a wallet.Parameters
Return Value
CreditDashboard object with properties:
Example
Response
get_trust_ratio
Returns the raw trust score for a wallet.Parameters
Return Value
int — Trust score from 0 to 10000.
Example
get_current_apr
Returns the current APR index assigned to a wallet.Parameters
Return Value
int — APR in basis points. Divide by 1000 to get the percentage (e.g. 142 → 14.2%).
Example
balance_of
Checks whether a wallet holds a BlackSwan Soulbound Token (SBT).Parameters
Return Value
int — 1 if the wallet holds an SBT, 0 otherwise.