Player
Read the player's non-sensitive public profile to personalise your game.
const player = await gamma.getPlayer();
if (player) {
greet(player.displayName); // "Welcome back, Alex!"
}
Type:
interface Player {
id: string;
displayName: string;
avatar: string | null;
frame: string | null;
isSubscribed: boolean;
}
Returns null when unavailable (e.g. outside the app, or no authenticated user).
Privacy:
getPlayernever returns email, phone, coin balance, or any other sensitive field. Use it only for personalisation. For the balance, callgetCoins.
Ask:View .md