/* Copyright 2021 The caver-js Authors This file is part of the caver-js library. The caver-js library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The caver-js library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the caver-js. If not, see . */ import BigNumber from 'bignumber.js' import { IWallet } from '../../caver-wallet/src' import { Contract, SendOptions, SendOptionsWithFormatter } from '../../caver-contract/src' import { TransactionReceipt } from '../../caver-core/src' import { AbiItem } from '../../caver-utils/src' import { Data } from './kip7' export interface KIP37DeployParams { uri: string } export interface KIP37DetectedObject { IKIP37: boolean IKIP37Metadata: boolean IKIP37Mintable: boolean IKIP37Burnable: boolean IKIP37Pausable: boolean } export class KIP37 extends Contract { static wallet: IWallet static byteCode: string static abi: AbiItem[] static create(abi?: AbiItem[]): KIP37 static create(tokenAddress: string, abi?: AbiItem[]): KIP37 static deploy(tokenInfo: KIP37DeployParams, sendOptions: SendOptionsWithFormatter, wallet?: IWallet): Promise static deploy(tokenInfo: KIP37DeployParams, sendOptions: string | SendOptions, wallet?: IWallet): Promise static detectInterface(contractAddress: string): Promise constructor(abi?: AbiItem[]) constructor(tokenAddress: string, abi?: AbiItem[]) clone(tokenAddress?: string): KIP37 detectInterface(): Promise supportsInterface(interfaceId: string): Promise uri(id: string | number | BigNumber): Promise totalSupply(id: string | number | BigNumber): Promise balanceOf(account: string, id: string | number | BigNumber): Promise balanceOfBatch(accounts: string[], ids: Array): Promise isApprovedForAll(owner: string, operator: string): Promise paused(id?: string | number | BigNumber): Promise isPauser(account: string): Promise isMinter(account: string): Promise create( id: string | number | BigNumber, initialSupply: string | number | BigNumber, sendParam?: SendOptions ): Promise create( id: string | number | BigNumber, initialSupply: string | number | BigNumber, uri: string, sendParam?: SendOptions ): Promise setApprovalForAll(operator: string, approved: boolean, sendParam?: SendOptions): Promise safeTransferFrom( from: string, to: string, id: string | number | BigNumber, amount: string | number | BigNumber, sendParam?: SendOptions ): Promise safeTransferFrom( from: string, to: string, id: string | number | BigNumber, amount: string | number | BigNumber, data: Data, sendParam?: SendOptions ): Promise safeBatchTransferFrom( from: string, to: string, ids: Array, amounts: Array, sendParam?: SendOptions ): Promise safeBatchTransferFrom( from: string, to: string, ids: Array, amounts: Array, data: Data, sendParam?: SendOptions ): Promise mint( toList: string | string[], id: string | number | BigNumber, values: string | number | BigNumber | Array, sendParam?: SendOptions ): Promise mintBatch( to: string, ids: Array, values: Array, sendParam?: SendOptions ): Promise addMinter(account: string, sendParam?: SendOptions): Promise renounceMinter(sendParam?: SendOptions): Promise burn( account: string, id: string | number | BigNumber, value: string | number | BigNumber, sendParam?: SendOptions ): Promise burnBatch( account: string, ids: Array, values: Array, sendParam?: SendOptions ): Promise pause(sendParam?: SendOptions): Promise pause(id: string | number | BigNumber, sendParam?: SendOptions): Promise unpause(sendParam?: SendOptions): Promise unpause(id: string | number | BigNumber, sendParam?: SendOptions): Promise addPauser(account: string, sendParam?: SendOptions): Promise renouncePauser(sendParam?: SendOptions): Promise }