@urth/metatell-sdk - v0.1.0
    Preparing search index...

    Function getProfile

    • Get the profile of the current user (self).

      Returns the display name and other profile fields synchronously; no network round trip is performed. Useful, for example, to show the player's name inside a mini-game.

      Other users' profiles cannot be read with this function; use @urth/metatell-sdk/users for that.

      Returns UserProfile | undefined

      The current user's profile, or undefined when the metatell host is not ready or the display name has not been resolved yet. Always null-check the result (e.g. getProfile()?.displayName).

      import { getProfile } from "@urth/metatell-sdk/user";

      const profile = getProfile();
      console.log(profile?.displayName);