Skip to main content

Canister Endpoints

ICQuests exposes several public canister endpoints for reading XP, quests, campaigns, and leaderboard data.

Key Endpoints

Get All Quests

public query func getAllQuests() : async [Quest]

Returns all available quests.

Get All Campaigns

public query func getAllCampaigns() : async [Campaign]

Returns all campaigns.

Get User Data

public func getUser(principal : Text) : async ?UserData

Returns the user's XP balance and completed quests.

Fetch XP Rate

public func fetchXPRate(principal : Text) : async Nat

Returns the XP balance for a principal.

Fetch Leaderboard Position

public func fetchLeaderboardPosition(principal : Text) : async ?Nat

Returns the user's position on the leaderboard (by XP).

Note: All endpoints are read-only and do not expose any personal data.