tokenOwner

This is a work in progress, please reach out to us on Telegram for support. For the most reliable data, reference our existing graphql docs.

Returns token owner by tokenId and contractAddress.

tokenOwner({tokenId: string, contractAddress: string, network: "mainnet" | "testnet"})

This is an example of a data api method.

Example:

queryTokens.ts
import { tokenOwner } from "@mintbase-js/data";

const props = {
  tokenId: "1",
  contractAddress: "mintbase.mintbase1.near",
  network: "mainnet"
}

const { data, error } = await tokenOwner(props);

if (error) {
  console.log("error", error);
}

console.log(data); // => "nate.near"

Last updated