import type { Binary, EVMAddress, NftItem, NftTokenId, Part } from "@rarible/ethereum-api-client"; import type { Maybe, BigNumber } from "@rarible/types"; import type { Ethereum, EthereumTransaction } from "@rarible/ethereum-provider"; import type { SendFunction } from "../common/send-transaction"; import type { CommonNftCollection } from "../common/mint"; import type { RaribleEthereumApis } from "../common/apis"; import type { SimpleLazyNft } from "./sign-nft"; import type { ERC1155VersionEnum, ERC721VersionEnum, NFTContractVersion } from "./contracts/domain"; type Collection = CommonNftCollection & { version: V; }; type ERC721CollectionV1 = Collection; type ERC721CollectionV2 = Collection; type ERC721CollectionV3 = Collection; type ERC1155CollectionV1 = Collection; type ERC1155CollectionV2 = Collection; type CommonMintRequest = { uri: string; nftTokenId?: NftTokenId; }; export type ERC721RequestV1 = { collection: ERC721CollectionV1; } & CommonMintRequest; export type ERC721RequestV2 = { collection: ERC721CollectionV2; royalties?: Array; } & CommonMintRequest; export type ERC721RequestV3 = { collection: ERC721CollectionV3; lazy: boolean; creators?: Array; royalties?: Array; } & CommonMintRequest; export type ERC1155RequestV1 = { collection: ERC1155CollectionV1; supply: number; royalties?: Array; } & CommonMintRequest; export type ERC1155RequestV2 = { collection: ERC1155CollectionV2; supply: number; lazy: boolean; creators?: Array; royalties?: Array; } & CommonMintRequest; export type MintRequestERC721 = ERC721RequestV1 | ERC721RequestV2 | ERC721RequestV3; export type MintRequestERC1155 = ERC1155RequestV1 | ERC1155RequestV2; export type MintRequest = MintRequestERC721 | MintRequestERC1155; export type MintResponseCommon = { contract: EVMAddress; tokenId: BigNumber; owner: EVMAddress; itemId: string; }; export declare enum MintResponseTypeEnum { OFF_CHAIN = "off-chain", ON_CHAIN = "on-chain" } export type MintOffChainResponse = MintResponseCommon & { type: MintResponseTypeEnum.OFF_CHAIN; item: NftItem; }; export type MintOnChainResponse = MintResponseCommon & { type: MintResponseTypeEnum.ON_CHAIN; transaction: EthereumTransaction; }; export declare function mint(ethereum: Maybe, send: SendFunction, signNft: (nft: SimpleLazyNft<"signatures">) => Promise, getApis: () => Promise, data: MintRequest): Promise; export declare const isErc721v3Collection: (x: CommonNftCollection) => x is ERC721CollectionV3; export declare const isErc721v2Collection: (x: CommonNftCollection) => x is ERC721CollectionV2; export declare const isErc721v1Collection: (x: CommonNftCollection) => x is ERC721CollectionV1; export declare const isErc1155v2Collection: (x: CommonNftCollection) => x is ERC1155CollectionV2; export declare const isErc1155v1Collection: (x: CommonNftCollection) => x is ERC1155CollectionV1; export {};