Badges Methods
Retrieve badges earned by Polkadot addresses.
Available Methods
getBadges()
Get all badges for a user
getBadge()
Get a specific badge
getBadges()
Retrieves all badges earned by a user.
Usage
const badges = await client.getBadges(address);Parameters
address
string
Yes
Polkadot address of the user
signal
AbortSignal
No
Optional abort signal for request cancellation
Response Type
interface UserBadges {
address: string;
badges: UserBadge[];
count: number;
source?: 'app' | 'api';
}
interface UserBadge {
badgeKey: string;
achievedLevel: number;
achievedLevelKey: string;
achievedLevelTitle: string;
earnedAt?: string; // ISO 8601 date
}Example
Example Response
Badge Level Keys
Badges have multiple levels with different keys:
1
bronze
Entry-level achievement
2
silver
Intermediate achievement
3
gold
Advanced achievement
4
platinum
Expert achievement
5
diamond
Legendary achievement
getBadge()
Retrieves a specific badge with full definition details.
Usage
Parameters
address
string
Yes
Polkadot address of the user
badgeKey
string
Yes
Badge identifier
signal
AbortSignal
No
Optional abort signal for request cancellation
Response Type
Example
Example Response
Common Badge Keys
early_adopter
Early Adopter
Early network participation
governance_voter
Governance Voter
Voting participation
staking_champion
Staking Champion
Staking activity
identity_verified
Identity Verified
On-chain identity
parachain_explorer
Parachain Explorer
Cross-chain activity
Filtering Badges
By Badge Key
By Level
Sort by Achievement Date
Error Handling
Related
Last updated
