UNPKG

@evolutionland/evolution-js

Version:

evolution evolution-js evolutionland evolution-js-sdk evolution-land metaverse

54 lines (53 loc) 2.83 kB
import { ethers } from "ethers"; import type { CallbackType } from "../../../utils/ethers/contractHelper"; import { TransactionResponse } from "@ethersproject/providers"; /** * 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 ERC1155 contract address * @param callback Callback * @returns any */ export declare const erc1155IsApprovedForAll: (provider: ethers.providers.Provider, owner: string, spender: string, tokenContractAddress: string, callback?: CallbackType | undefined) => Promise<boolean>; /** * Get the balance of an account's tokens. * @param provider Provider * @param owner The address of the token holder * @param tokenId ID of the token * @param tokenContractAddress ERC1155 contract address * @param callback Callback * @returns The _owner's balance of the token type requested */ export declare const erc1155BalanceOf: (provider: ethers.providers.Provider, owner: string, tokenId: string, tokenContractAddress: string, callback?: CallbackType | undefined) => Promise<string>; /** * Get the balance of multiple account/token pairs * @param provider Provider * @param owners The addresses of the token holders * @param tokenIds ID of the tokens * @param tokenContractAddress ERC1155 contract address * @param callback Callback * @returns The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair) */ export declare const erc1155BalanceOfBatch: (provider: ethers.providers.Provider, owners: string[], tokenIds: string[], tokenContractAddress: string, callback?: CallbackType | undefined) => Promise<string>; /** * Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. * @param signer Signer * @param contractAddress ERC1155 contract address * @param spender Address of authorized operator * @param approved Approved or Cancel Approved * @param callback Callback * @returns any */ export declare const erc1155SetApprovalForAll: (signer: ethers.Signer, contractAddress: string, spender: string, approved: boolean, callback?: CallbackType | undefined) => Promise<TransactionResponse>; /** * Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). * @param signer Signer * @param contractAddress ERC1155 contract address * @param spender Address of authorized operator * @param approved Approved or Cancel Approved * @param callback Callback * @returns any */ export declare const erc1155SafeBatchTransferFrom: (signer: ethers.Signer, contractAddress: string, spender: string, approved: boolean, callback?: CallbackType | undefined) => Promise<TransactionResponse>;