Read a holder's totem, check eligibility and trigger an evolution from any wallet, game or community app.
evolve.ts
import { Totem } from "@totem/sdk";
const totem = Totem.community("totem.totem.near");
// time-weighted, not a one-block snapshot
const proof = await totem.eligibility("ada.near");
// { hold: true, streakDays: 34, quests: 1, tier: 3 }
if (proof.ready) {
await totem.evolve("ada.near", { branch: "meme-commander" });
}