getAssets
Call this function to get the current NFTs for the user across all blockchains. The user must be logged in for this call to succeed. You can confirm a user has been logged in by calling hallidayClient.getUserInfo()
Example Usage
import {Halliday} from "halliday-sdk";
/**
* Gets the player's NFTs.
*
*/
const getAssetsResponse = await hallidayClient.getAssets(userInGameId)
Inputs
Name | Type | Description |
---|---|---|
userInGameId | string | User's id in your application (must be unique) |
Outputs
Promise to a GetAssetsResponse object.
Name | Type | Description |
---|---|---|
num_assets | number | Number of different ERC 721 tokens in user's wallet |
assets | Array of ERC-721 Token Data | Details of ERC 721 tokens owned by user |
ERC-721 Token Data Format
Name | Type | Description |
---|---|---|
blockchain_type | string | Blockchain this NFT exists on |
collection_address | string | Contract address of this NFT |
token_id | string | Token Id of this NFT |
Updated about 15 hours ago
What’s Next