UNPKG

@superfluid-finance/sdk-core

Version:
107 lines 5.06 kB
import Operation from "./Operation"; import { ERC721ApproveParams, ERC721BalanceOfParams, ERC721GetApprovedParams, ERC721IsApprovedForAllParams, ERC721OwnerOfParams, ERC721SafeTransferFromParams, ERC721SetApprovalForAllParams, ERC721TokenURIParams, ERC721TransferFromParams, ProviderOrSigner } from "./interfaces"; import { IERC721Metadata } from "./typechain-types"; export default class ERC721MetadataToken { readonly address: string; readonly contract: IERC721Metadata; constructor(address: string); /** ### ERC721 Token Contract Read Functions ### */ /** * Returns the ERC721 balanceOf the `owner`. * @param owner the owner you would like to query * @param providerOrSigner a provider or signer for executing a web3 call * @returns {Promise<string>} the token balance of `owner` */ balanceOf: (params: ERC721BalanceOfParams) => Promise<string>; /** * Returns the owner of the NFT specified by `tokenId`. * NOTE: Throws if `tokenId` is not a valid NFT. * @param tokenId the token id * @param providerOrSigner a provider or signer for executing a web3 call * @returns {string} the address of the owner of the NFT */ ownerOf: (params: ERC721OwnerOfParams) => Promise<string>; /** * Returns the approved address for a single NFT, or the zero address if there is none. * @param tokenId the token id * @param providerOrSigner a provider or signer for executing a web3 call * @returns {string} the approved address for this NFT, or the zero address if there is none */ getApproved: (params: ERC721GetApprovedParams) => Promise<string>; /** * Returns whether `operator` is approved for all of `owner`'s NFTs. * @param owner the owner of NFTs * @param operator an operator for the owner's NFTs * @param providerOrSigner a provider or signer for executing a web3 call * @returns {bool} */ isApprovedForAll: (params: ERC721IsApprovedForAllParams) => Promise<boolean>; /** * Returns the token name * @param providerOrSigner a provider or signer for executing a web3 call * @returns {string} the token name */ name: ({ providerOrSigner, }: { providerOrSigner: ProviderOrSigner; }) => Promise<string>; /** * Returns the token symbol * @param providerOrSigner a provider or signer for executing a web3 call * @returns {string} the token symbol */ symbol: ({ providerOrSigner, }: { providerOrSigner: ProviderOrSigner; }) => Promise<string>; /** * Returns the token URI * @param tokenId the token id * @returns {string} */ tokenURI: (params: ERC721TokenURIParams) => Promise<string>; /** ### ERC721 Token Contract Write Functions ### */ /** * Approve `approved` to spend `tokenId` NFT. * @param approved The receiver approved. * @param tokenId The tokenId approved. * @param overrides ethers overrides object for more control over the transaction sent. * @returns {Operation} An instance of Operation which can be executed. */ approve: (params: ERC721ApproveParams) => Operation; /** * Approve `operator` to spend all NFTs of the signer (`msg.sender`). * @param operator The operator approved. * @param approved The approved status. * @returns {Operation} An instance of Operation which can be executed. */ setApprovalForAll: (params: ERC721SetApprovalForAllParams) => Operation; /** * Transfer `tokenId` from `from` to `to` . * @param from The owner of the NFT. * @param to The receiver of the NFT. * @param tokenId The token to be transferred. * @param overrides ethers overrides object for more control over the transaction sent. * @returns {Operation} An instance of Operation which can be executed. */ transferFrom: (params: ERC721TransferFromParams) => Operation; /** * Safe transfer `tokenId` from `from` to `to` (see IERC721.sol OZ Natspec for more details). * Data is empty in this version of safeTransferFrom. * @param from The owner of the NFT. * @param to The receiver of the NFT. * @param tokenId The token to be transferred. * @param overrides ethers overrides object for more control over the transaction sent. * @returns {Operation} An instance of Operation which can be executed. */ safeTransferFrom: (params: ERC721TransferFromParams) => Operation; /** * Safe transfer `tokenId` from `from` to `to` with `data`. * @param from The owner of the NFT. * @param to The receiver of the NFT. * @param tokenId The token to be transferred. * @param data The data to be sent with the safe transfer check. * @param overrides ethers overrides object for more control over the transaction sent. * @returns {Operation} An instance of Operation which can be executed. */ safeTransferFromWithData: (params: ERC721SafeTransferFromParams) => Operation; } //# sourceMappingURL=ERC721Token.d.ts.map