Identifiers
What is a Profile Identifier?
A Profile Identifier allows game developers to store information about their players directly on their profile. This can be a social account, or an external wallet address from any chain, EVM, Solana, Sui, and supporting both Aptos and BTC in the coming weeks.
Stardust Profiles can support an extensive array of identifier types, including Social and Custom Identifiers as well as External Wallet connections.
How to add an identifier
External wallets
Adding an external wallet is an extremely valauble piece of infromation every game developer should collect. By connecting an external wallet to a Stardust Profile, a game developer can gain insights on the value of players in their game; and how to increase their engagement.
EVM
import { StardustCustodialSDK } from '@stardust-gg/stardust-custodial-sdk';
const STARDUST_API_KEY = 'your-api-key';
const sdk = new StardustCustodialSDK(apiKey);
const profile = await sdk.getProfile(profileId);
const playerAddressEVM = '0x3B333e68ac5bdaB09cf1a402e07BBa3041AAf11D';
await profile.addEVMExternalWalletIdentifier(playerAddressEVM);
Solana
await profile.addSOLExternalWalletIdentifier(playerAddressSOL);
SUI
await profile.addSUIExternalWalletIdentifier(playerAddressSui);
Attaching Social Identifiers
Easily attach identifiers from popular socials to enhance user profile information.
Discord
const stardustIdentifier = await profile.addDiscordIdentifier(discordId);
Apple
const stardustIdentifier = await profile.addAppleIdentifier(appleId);
const stardustIdentifier = await profile.addGoogleIdentifier(googleId);
const stardustIdentifier = await profile.addFacebookIdentifier(facebookId);
const stardustIdentifier = await profile.addTwitterIdentifier(twitterId);
const stardustIdentifier = await profile.addEmailIdentifier(email);
Phone
const stardustIdentifier = await profile.addPhoneIdentifier(phoneNumber);
Twitch
const stardustIdentifier = await profile.addTwitchIdentifier(twitchId);
Steam
const stardustIdentifier = await profile.addSteamIdentifier(steamId);
Epic
const stardustIdentifier = await profile.addEpicIdentifier(epicId);
Adding custom identifers to a profile
Custom identifiers offer the flexibility to incorporate unique identifiers, tagged with a ‘service’ name, enhancing profile customization and integration capabilities.
import { StardustCustodialSDK } from '@stardust-gg/stardust-custodial-sdk';
const STARDUST_API_KEY = 'your-api-key';
const sdk = new StardustCustodialSDK(apiKey);
const profile = await sdk.getProfile(profileId);
const customServiceName = '<CUSTOM_SERVICE_NAME>';
const customId = '<PLACEHOLDER>';
await profile.addCustomIdentifier(customServiceName, customId);