Const
ABI for NFTs
import { Contract, Provider, utils } from "koilib";const provider = new Provider("https://api.koinos.io");const nicknamesContract = new Contract({ id: "1KD9Es7LBBjA1FY3ViCgQJ7e6WH1ipKbhz", provider, abi: utils.nftAbi,});const nicknames = nicknamesContract.functions;...// get the address linked to the nickname "pob"const pobId = `0x${utils.toHexString(new TextEncoder().encode("pob"))}`;const { result } = await nicknames.ownerOf({ token_id: pobId });console.log(result);// { value: '159myq5YUhhoVWu3wsHKHiJYKPKGUrGiyv' }})();
Generated using TypeDoc
ABI for NFTs
Example