@evolutionland/evolution-js
Version:
evolution evolution-js evolutionland evolution-js-sdk evolution-land metaverse
43 lines (42 loc) • 2.04 kB
TypeScript
import { ethers } from "ethers";
import type { CallbackType } from "../../../utils/ethers/contractHelper";
import { TransactionResponse } from "@ethersproject/providers";
/**
* ERC721 Owner of
* @param provider Provider
* @param tokenAddress ERC721 contract address
* @param tokenId Token Id
* @param callback Callback
* @returns The address of owner
*/
export declare const erc721OwnerOf: (provider: ethers.providers.Provider, tokenAddress: string, tokenId: string, callback?: CallbackType | undefined) => Promise<string>;
/**
* Query if an address is an authorized operator for another address
* @param provider Provider
* @param owner The address that owns the NFTs
* @param spender The address that acts on behalf of the owner
* @param tokenContractAddress ERC721 contract address
* @param callback Callback
* @returns any
*/
export declare const erc721IsApprovedForAll: (provider: ethers.providers.Provider, owner: string, spender: string, tokenContractAddress: string, callback?: CallbackType | undefined) => Promise<boolean>;
/**
* Returns whether `spender` is allowed to manage `tokenId`.
* @param provider Provider
* @param spender The address that acts on behalf of the owner
* @param tokenContractAddress The factory of tokenId.
* @param tokenId ERC721 token Id;
* @param callback Callback
* @returns any
*/
export declare const erc721IsApprovedOrOwner: (provider: ethers.providers.Provider, spender: string, tokenContractAddress: string, tokenId: string, callback?: CallbackType | undefined) => Promise<boolean>;
/**
* Change or reaffirm the approved address for all of NFT
* @param signer Signer
* @param contractAddress The factory of tokenId.
* @param spender The address that acts on behalf of the owner
* @param approved Approved or Cancel Approved
* @param callback Callback
* @returns any
*/
export declare const erc721SetApprovalForAll: (signer: ethers.Signer, contractAddress: string, spender: string, approved: boolean, callback?: CallbackType | undefined) => Promise<TransactionResponse>;