UNPKG

@magiceden/magiceden-sdk

Version:

A TypeScript SDK for interacting with Magic Eden's API across multiple chains.

268 lines (267 loc) 7.67 kB
import { z } from 'zod'; import { Blockchain } from '../../chains'; import { EvmProtocolType } from '../../protocol'; import { MintStageKind } from './shared'; /** * Parameters for minting NFTs */ export declare const BaseMintParamsSchema: z.ZodObject<{ /** * The chain to mint on */ chain: z.ZodNativeEnum<typeof Blockchain>; /** * The collection ID to mint from */ collectionId: z.ZodString; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; /** * The ID of the mint stage */ stageId: z.ZodOptional<z.ZodString>; /** * The kind of mint stage */ kind: z.ZodNativeEnum<typeof MintStageKind>; }, "strip", z.ZodTypeAny, { chain: Blockchain; kind: MintStageKind; collectionId: string; nftAmount: number; stageId?: string | undefined; }, { chain: Blockchain; kind: MintStageKind; collectionId: string; nftAmount: number; stageId?: string | undefined; }>; export declare const EvmMintParamsSchema: z.ZodObject<z.objectUtil.extendShape<{ /** * The chain to mint on */ chain: z.ZodNativeEnum<typeof Blockchain>; /** * The collection ID to mint from */ collectionId: z.ZodString; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; /** * The ID of the mint stage */ stageId: z.ZodOptional<z.ZodString>; /** * The kind of mint stage */ kind: z.ZodNativeEnum<typeof MintStageKind>; }, { /** * The EVM chain to mint on */ chain: z.ZodEnum<[Blockchain.ETHEREUM, Blockchain.BASE, Blockchain.POLYGON, Blockchain.SEI, Blockchain.ARBITRUM, Blockchain.APECHAIN, Blockchain.BERACHAIN, Blockchain.MONAD_TESTNET, Blockchain.BSC, Blockchain.ABSTRACT]>; /** * The token protocol type */ protocol: z.ZodNativeEnum<typeof EvmProtocolType>; /** * The token ID for ERC-1155 */ tokenId: z.ZodOptional<z.ZodNumber>; }>, "strip", z.ZodTypeAny, { chain: Blockchain.ETHEREUM | Blockchain.POLYGON | Blockchain.BASE | Blockchain.SEI | Blockchain.ARBITRUM | Blockchain.APECHAIN | Blockchain.BERACHAIN | Blockchain.MONAD_TESTNET | Blockchain.BSC | Blockchain.ABSTRACT; kind: MintStageKind; protocol: EvmProtocolType; collectionId: string; nftAmount: number; tokenId?: number | undefined; stageId?: string | undefined; }, { chain: Blockchain.ETHEREUM | Blockchain.POLYGON | Blockchain.BASE | Blockchain.SEI | Blockchain.ARBITRUM | Blockchain.APECHAIN | Blockchain.BERACHAIN | Blockchain.MONAD_TESTNET | Blockchain.BSC | Blockchain.ABSTRACT; kind: MintStageKind; protocol: EvmProtocolType; collectionId: string; nftAmount: number; tokenId?: number | undefined; stageId?: string | undefined; }>; export declare const SolanaMintParamsSchema: z.ZodObject<z.objectUtil.extendShape<{ /** * The chain to mint on */ chain: z.ZodNativeEnum<typeof Blockchain>; /** * The collection ID to mint from */ collectionId: z.ZodString; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; /** * The ID of the mint stage */ stageId: z.ZodOptional<z.ZodString>; /** * The kind of mint stage */ kind: z.ZodNativeEnum<typeof MintStageKind>; }, { /** * The Solana chain to mint on */ chain: z.ZodLiteral<Blockchain.SOLANA>; /** * The candy machine ID */ candyMachineId: z.ZodString; /** * The collection symbol */ symbol: z.ZodEffects<z.ZodString, string, string>; /** * The recipient address */ recipient: z.ZodOptional<z.ZodString>; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; }>, "strip", z.ZodTypeAny, { symbol: string; chain: Blockchain.SOLANA; kind: MintStageKind; collectionId: string; candyMachineId: string; nftAmount: number; stageId?: string | undefined; recipient?: string | undefined; }, { symbol: string; chain: Blockchain.SOLANA; kind: MintStageKind; collectionId: string; candyMachineId: string; nftAmount: number; stageId?: string | undefined; recipient?: string | undefined; }>; export type EvmMintParams = z.infer<typeof EvmMintParamsSchema>; export type SolanaMintParams = z.infer<typeof SolanaMintParamsSchema>; export declare const MintParams: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{ /** * The chain to mint on */ chain: z.ZodNativeEnum<typeof Blockchain>; /** * The collection ID to mint from */ collectionId: z.ZodString; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; /** * The ID of the mint stage */ stageId: z.ZodOptional<z.ZodString>; /** * The kind of mint stage */ kind: z.ZodNativeEnum<typeof MintStageKind>; }, { /** * The EVM chain to mint on */ chain: z.ZodEnum<[Blockchain.ETHEREUM, Blockchain.BASE, Blockchain.POLYGON, Blockchain.SEI, Blockchain.ARBITRUM, Blockchain.APECHAIN, Blockchain.BERACHAIN, Blockchain.MONAD_TESTNET, Blockchain.BSC, Blockchain.ABSTRACT]>; /** * The token protocol type */ protocol: z.ZodNativeEnum<typeof EvmProtocolType>; /** * The token ID for ERC-1155 */ tokenId: z.ZodOptional<z.ZodNumber>; }>, "strip", z.ZodTypeAny, { chain: Blockchain.ETHEREUM | Blockchain.POLYGON | Blockchain.BASE | Blockchain.SEI | Blockchain.ARBITRUM | Blockchain.APECHAIN | Blockchain.BERACHAIN | Blockchain.MONAD_TESTNET | Blockchain.BSC | Blockchain.ABSTRACT; kind: MintStageKind; protocol: EvmProtocolType; collectionId: string; nftAmount: number; tokenId?: number | undefined; stageId?: string | undefined; }, { chain: Blockchain.ETHEREUM | Blockchain.POLYGON | Blockchain.BASE | Blockchain.SEI | Blockchain.ARBITRUM | Blockchain.APECHAIN | Blockchain.BERACHAIN | Blockchain.MONAD_TESTNET | Blockchain.BSC | Blockchain.ABSTRACT; kind: MintStageKind; protocol: EvmProtocolType; collectionId: string; nftAmount: number; tokenId?: number | undefined; stageId?: string | undefined; }>, z.ZodObject<z.objectUtil.extendShape<{ /** * The chain to mint on */ chain: z.ZodNativeEnum<typeof Blockchain>; /** * The collection ID to mint from */ collectionId: z.ZodString; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; /** * The ID of the mint stage */ stageId: z.ZodOptional<z.ZodString>; /** * The kind of mint stage */ kind: z.ZodNativeEnum<typeof MintStageKind>; }, { /** * The Solana chain to mint on */ chain: z.ZodLiteral<Blockchain.SOLANA>; /** * The candy machine ID */ candyMachineId: z.ZodString; /** * The collection symbol */ symbol: z.ZodEffects<z.ZodString, string, string>; /** * The recipient address */ recipient: z.ZodOptional<z.ZodString>; /** * The number of NFTs to mint */ nftAmount: z.ZodNumber; }>, "strip", z.ZodTypeAny, { symbol: string; chain: Blockchain.SOLANA; kind: MintStageKind; collectionId: string; candyMachineId: string; nftAmount: number; stageId?: string | undefined; recipient?: string | undefined; }, { symbol: string; chain: Blockchain.SOLANA; kind: MintStageKind; collectionId: string; candyMachineId: string; nftAmount: number; stageId?: string | undefined; recipient?: string | undefined; }>]>; export type MintParams = z.infer<typeof MintParams>;