import { Web3Provider, Provider } from '@ethersproject/providers'; import { Contract, Signer, ethers } from 'ethers'; import { InfinityMintBundle, InfinityMintDeployedProject, InfinityMintDeploymentLive, InfinityMintProjectAsset, InfinityMintProjectPath } from 'infinitymint/dist/app/interfaces'; import { InfinityMintClient } from '../client'; import { MimeType } from '../utils/helpers'; import { InfinityMint } from 'infinitymint/dist/typechain-types/InfinityMint'; import { InfinityMintStorage } from 'infinitymint/dist/typechain-types/InfinityMintStorage'; import { InfinityMintValues } from 'infinitymint/dist/typechain-types/InfinityMintValues'; import { InfinityMintProject } from 'infinitymint/dist/typechain-types/InfinityMintProject'; import { InfinityMintLinker } from 'infinitymint/dist/typechain-types/InfinityMintLinker'; import { InfinityMintApi } from 'infinitymint/dist/typechain-types/InfinityMintApi'; import { Dictionary } from 'infinitymint/dist/app/helpers'; import { Resources } from './resources'; import { Token } from './token'; export type ProjectSource = 'ipfs' | 'public' | 'api' | 'any' | 'localstorage' | 'unknown'; export declare class Project { source: ProjectSource; deployedProject: InfinityMintDeployedProject; client: InfinityMintClient; private contracts; private signedContracts; private provider; private staticProvider; private defaultSigner; private resources; private tokens; constructor(deployedProject: InfinityMintDeployedProject, client: InfinityMintClient); hasCustomRenderer(): boolean; getCustomRenderer(): any; setProvider(provider: Web3Provider | Provider | ethers.providers.Web3Provider): void; setStaticProvider(provider: Provider | Web3Provider): void; get name(): string; get version(): { tag: string; version: string; }; get description(): string; initializeResources(): Promise; get projectFullName(): string; get projectNameAndVersion(): string; get collectionName(): string; get collectionShortName(): string; getImports(): Dictionary; getBundle(): InfinityMintBundle; getGem(gemName: string): any; /** * Returns a list of gem names that are vailable for this project, optionally filtering out disabled gems * @param filterDisabled * @returns */ getGemKeys(filterDisabled?: boolean): string[]; hasProvider(): boolean; getProvider(): Web3Provider | Provider | ethers.providers.Web3Provider; /** * Used in some api endpoints to find the project * @returns */ sourceName(): string; hasGemEnabled(gemName: string): any; getPath(pathId: number): InfinityMintProjectPath; getTokenPrice(format?: boolean): Promise; maxSupply(): Promise; hasToken(tokenId: number): Promise; totalMints(): Promise; getToken(tokenId: number, fetchPathExport?: boolean, abortController?: AbortController, force?: boolean): Promise; private createToken; getPathExportObject(pathId: number): import("infinitymint/dist/app/interfaces").InfinityMintProjectPathExport; getAsset(assetId: number): InfinityMintProjectAsset; getAssetExportObject(assetId: number): import("infinitymint/dist/app/interfaces").InfinityMintProjectPathExport; getAssetSections(): Dictionary; fetchAssetExport(assetId?: number, type?: string, abortController?: AbortController, source?: ProjectSource): Promise; /** * Will return the path export from the pathId. Will be in the form of a blob * @param pathId * @param type * @param abortController * @param source * @returns */ fetchExport(path?: InfinityMintProjectPath | InfinityMintProjectAsset, type?: string, abortController?: AbortController, source?: ProjectSource): Promise; /** * Will return the path export from the pathId. Will be in the form of a blob * @param pathId * @param type * @param abortController * @param source * @returns */ fetchPathExport(pathId?: number, type?: string, abortController?: AbortController, source?: ProjectSource): Promise; getPathExportExtension(pathId: number, type?: string): string; getPathLocalSource(pathId: number, type?: string): import("infinitymint/dist/app/imports").ImportType; getAssetExportExtension(assetId: number, type?: string): string; getAssetIPFSLocation(assetId: number): string; getAssetPublicLocation(assetId: number): string; getPathIPFSLocation(pathId: number): string; getPathPublicLocation(pathId: number): string; isPathAudio(pathId: number): boolean; isPathIPFS(pathId: number): boolean; isAssetIPFS(assetId: number): boolean; isPathVideo(pathId: number): boolean; isAdmin(address?: string): Promise; getPathMimeType(pathId: number, type?: string): MimeType; getAssetMimeType(assetId: number, type?: string): MimeType; /** * Returns a contract for you to read values from. Will use the static provider by default unless specified otherwise. * @param contractName * @param provider * @param force * @param useStaticProvider * @returns */ getContract(contractName: string, provider?: Web3Provider | Provider | ethers.providers.Web3Provider, force?: boolean, useStaticProvider?: boolean): Contract; getSignedContract(contractName: string, signer: Signer, provider?: Web3Provider | Provider, force?: boolean): Contract; getBalance(address?: string): Promise; collectionToken(plural?: boolean): string; get collectionSymbol(): string; getDeployment(contractName: string): InfinityMintDeploymentLive; isApproved(contractName: string, address: string): boolean; fetchDeployment(contractName: string, abortController?: AbortController): Promise; getModuleDeployment(moduleName: string): InfinityMintDeploymentLive; getModule(moduleName: string, signer: Signer): Contract; erc721(signer?: Signer, useStaticProvider?: boolean): InfinityMint; storage(signer?: Signer, useStaticProvider?: boolean): InfinityMintStorage; /** * Fetches a project fron the web3 provider. If the project is a JSON string, it will parse it and return it. Otherwise, it will fetch it from the URL. * @param abortController * @returns */ fetchProjectFromWeb3(abortController?: AbortController): Promise; project(signer?: Signer, useStaticProvider?: boolean): InfinityMintProject; values(signer?: Signer, useStaticProvider?: boolean): InfinityMintValues; /** * Will save the project to the local storage */ save(): void; setLocalStorage(key: string, value: string): void; getLocalStorage(key: string): any; /** * Will remove the project from the local storage */ wipe(): void; /** * Returns a new project instance with the same configuration but a new version and/or network * @param newVersion * @param network * @returns */ clone(newVersion?: string, network?: { name: string; chainId: number; url?: string; tokenSymbol?: string; }): Project; api(signer?: Signer, useStaticProvider?: boolean): InfinityMintApi; linker(signer?: Signer, useStaticProvider?: boolean): InfinityMintLinker; checkForUpdates(): Promise<{ hasUpdated: boolean; currentVersion?: string; newVersion?: string; }>; static create(project: InfinityMintDeployedProject, client: InfinityMintClient): Project; /** * Will load a project from the local storage * @param projectName * @param projectVersion * @param client * @param network * @returns */ static load(projectName: string, projectVersion: string, client: InfinityMintClient, network?: string): Project; } export declare const fetchProject: (projectName: string, projectVersion: string, network: string, client: InfinityMintClient, abortController?: AbortController, usePublic?: boolean) => Promise; export declare const hasSavedProject: (projectName: string, projectVersion: string, projectNetwork: string) => boolean; //# sourceMappingURL=project.d.ts.map