index/functions/getTokenAnimatedUrl.md
getTokenAnimatedUrl(
tokenName,baseUrl,extension?):string
Get redirect URL for a token animated asset
Animated version of the token image (e.g., GIF or WebP with animation). Used in UI where motion attracts attention.
Backend: Redirects to S3 if available, otherwise returns static placeholder.
token name base url
Parameters
| Parameter | Type | Description |
|---|---|---|
tokenName | string | Token name (lowercase) |
baseUrl | string | API base URL |
extension? | string | File extension (optional, default: 'gif') |
token name base url
Returns
string
Full redirect URL to animated token image
Throws
Error if token name is invalid or extension format is incorrect
Example
const animUrl = getTokenAnimatedUrl('anime', 'https://api.example.com', 'webp');
// → "https://api.example.com/v1/tokens/anime/assets/animated.webp"
Since
7.3.0