UI Helpers
Base Url: box-v3.api.decent.xyz/api
Developers can access all of the functionality in Decent's hooks directly via API requests. This is particularly useful for any team primarily building with Decent server side.
All requests will require your Decent API key.
User Token Balances
Endpoint: /getTokens
Query Parameters
Parameter | Description | Type | Required | Default |
---|---|---|---|---|
address | Wallet address to evaluate. | 0x${string} | true | N/A |
chainId | Id of chain on which to return tokens. | ChainId | true | N/A |
The useUsersBalances
hook enables developers to return token balances across chains in a single call. Loop through chain Id's to mimic that functionality via API requests.