Blockchain and Layer 2

The Horizon Network SDK also provides support for various functions that directly retrieve information from the blockchain, such as getting the user's balance, asset owner, metadata, and more. These functions enable developers to build powerful decentralized applications that interact seamlessly with the blockchain, providing users with access to critical data in real-time.

Get user balance

const userAddress: "0x0dD768A47eA2395bbE5574E3252505fe1202C4A8"

const result = await client.getUserBalance(userAddress);

Get asset owner

const opts = {
  tokenAddress: "0x88Ef499ab1688DE727c21f1b72fAaEe1A3F455AD",
  tokenId: "1",
};

const result = await client.getAssetOwner(opts);

Get asset metadata URI

const opts = {
  tokenAddress: "0x88Ef499ab1688DE727c21f1b72fAaEe1A3F455AD",
  tokenId: "1",
};

const result = await client.getAssetMetadataURI(opts);

Last updated