import Ajv from 'ajv'; import { ErrorObject } from 'ajv'; import { JSONSchemaType } from 'ajv'; import { KeywordDefinition } from 'ajv'; /** * Common structure to use types as values in TS. * @public */ export declare type AbstractTypedSchema = { schema: JSONSchema; validate: ValidateFunction; }; export declare type Account = { id: string; address: string; sales: number; purchases: number; spent: string; earned: string; royalties: string; }; export declare namespace Account { const schema: JSONSchema; const validate: ValidateFunction; } export declare type AccountFilters = { first?: number; skip?: number; sortBy?: AccountSortBy; id?: string; address?: string; network?: Network; }; export declare enum AccountSortBy { MOST_SALES = "most_sales", MOST_PURCHASES = "most_purchases", MOST_SPENT = "most_spent", MOST_EARNED = "most_earned", MOST_ROYALTIES = "most_royalties" } /** @public */ declare type Actions = typeof SCENE_UPDATE | typeof UPDATE; export { Ajv } export declare type AnalyticsDayData = { id: string; date: number; sales: number; volume: string; creatorsEarnings: string; daoEarnings: string; }; export declare type AnalyticsDayDataFilters = { from?: number; network?: Network; }; export declare enum AnalyticsDayDataSortBy { DATE = "date", MOST_SALES = "most_sales" } /** @alpha */ declare type AssetJson = { id: string; assetType: string; name: string; description: string; thumbnail: string; model: string; category: WearableCategory; rarity: Rarity; bodyShape: AssetWearableGender; }; /** @alpha */ declare namespace AssetJson { const schema: JSONSchema; const validate: ValidateFunction; } declare enum AssetWearableGender { MALE = "male", FEMALE = "female", BOTH = "both" } declare namespace AssetWearableGender { const schema: JSONSchema; const validate: ValidateFunction; } /** * AuthChain is an array of elements used to create and verify signatures * and ephemeral keys. * * @public */ export declare type AuthChain = AuthLink[]; /** @public */ export declare namespace AuthChain { const schema: JSONSchema; const validate: ValidateFunction; } /** * @public */ export declare type AuthLink = { type: AuthLinkType; payload: string; signature: string; }; /** * @public */ export declare namespace AuthLink { const schema: JSONSchema; const validate: ValidateFunction; } /** * @public */ export declare enum AuthLinkType { 'SIGNER' = "SIGNER", 'ECDSA_PERSONAL_EPHEMERAL' = "ECDSA_EPHEMERAL", 'ECDSA_PERSONAL_SIGNED_ENTITY' = "ECDSA_SIGNED_ENTITY", /** * See https://github.com/ethereum/EIPs/issues/1654 */ 'ECDSA_EIP_1654_EPHEMERAL' = "ECDSA_EIP_1654_EPHEMERAL", /** * See https://github.com/ethereum/EIPs/issues/1654 */ 'ECDSA_EIP_1654_SIGNED_ENTITY' = "ECDSA_EIP_1654_SIGNED_ENTITY" } /** * Avatar represents a profile avatar. Used both for comms, internal state of the * explorer and the deployed profiles. * @alpha */ export declare type Avatar = { userId: string; name: string; description: string; ethAddress: EthAddress; version: number; tutorialStep: number; email?: string; blocked?: string[]; muted?: string[]; interests?: string[]; hasClaimedName: boolean; avatar: AvatarInfo; /** * Whether or not the player has connected web3 wallet or is a guest user. * This is always true for deployed profiles. */ hasConnectedWeb3?: boolean; }; /** * Avatar * @alpha */ export declare namespace Avatar { const schema: JSONSchema; const validate: ValidateFunction; } /** * AvatarInfo * @alpha */ export declare type AvatarInfo = { bodyShape: WearableId; eyes: { color: Color3; }; hair: { color: Color3; }; skin: { color: Color3; }; wearables: WearableId[]; emotes?: { slot: number; urn: string; }[]; snapshots: Snapshots; }; /** * AvatarInfo * @alpha */ export declare namespace AvatarInfo { const schema: JSONSchema; const validate: ValidateFunction; } /** * @public * * Describes common properties to an item of a collection. */ declare type BaseItem = DisplayableDeployment & { id: string; name: string; description: string; i18n: I18N[]; thumbnail: string; image: string; metrics?: Metrics; }; export declare type Bid = { id: string; bidAddress: string; bidder: string; seller: string; price: string; fingerprint: string; status: ListingStatus; blockchainId: string; blockNumber: string; expiresAt: number; createdAt: number; updatedAt: number; contractAddress: string; tokenId: string; network: Network; chainId: ChainId; }; export declare namespace Bid { const schema: JSONSchema; const validate: ValidateFunction; } export declare type BidFilters = { first?: number; skip?: number; sortBy?: BidSortBy; bidAddress?: string; bidder?: string; seller?: string; contractAddress?: string; tokenId?: string; status?: ListingStatus; network?: Network; }; export declare enum BidSortBy { RECENTLY_OFFERED = "recently_offered", RECENTLY_UPDATED = "recently_updated", MOST_EXPENSIVE = "most_expensive" } /** @alpha */ export declare enum BodyShape { MALE = "urn:decentraland:off-chain:base-avatars:BaseMale", FEMALE = "urn:decentraland:off-chain:base-avatars:BaseFemale" } /** @alpha */ export declare namespace BodyShape { const schema: JSONSchema; const validate: ValidateFunction; } /** * Different supported chain ids * @alpha */ export declare enum ChainId { ETHEREUM_MAINNET = 168926, ETHEREUM_ROPSTEN = 3, ETHEREUM_RINKEBY = 4, ETHEREUM_GOERLI = 5, ETHEREUM_KOVAN = 42, MATIC_MAINNET = 137, MATIC_MUMBAI = 80001, ETHEREUM_DEEPSPACE = 999999999, ETHEREUM_168926 = 10000000 } /** * @alpha */ export declare namespace ChainId { const schema: JSONSchema; const validate: ValidateFunction; } /** * Different supported chain names * @alpha */ export declare enum ChainName { ETHEREUM_MAINNET = "Ethereum Mainnet", ETHEREUM_ROPSTEN = "Ropsten", ETHEREUM_RINKEBY = "Rinkeby", ETHEREUM_GOERLI = "Goerli", ETHEREUM_KOVAN = "Kovan", MATIC_MAINNET = "Polygon", MATIC_MUMBAI = "Mumbai", ETHEREUM_DEEPSPACE = "Deepspace", ETHEREUM_168926 = "E168926" } /** * @alpha */ export declare namespace ChainName { const schema: JSONSchema; const validate: ValidateFunction; } export declare type Collection = { urn: string; name: string; creator: string; contractAddress: string; isOnSale: boolean; size: number; createdAt: number; updatedAt: number; reviewedAt: number; network: Network; chainId: ChainId; }; export declare namespace Collection { const schema: JSONSchema; const validate: ValidateFunction; } export declare type CollectionFilters = { first?: number; skip?: number; sortBy?: CollectionSortBy; name?: string; search?: string; creator?: string; contractAddress?: string; urn?: string; isOnSale?: boolean; network?: Network; }; export declare enum CollectionSortBy { NEWEST = "newest", NAME = "name", RECENTLY_REVIEWED = "recently_reviewed", SIZE = "size" } /** * Color3 is a data type that describes a color using R, G and B components * @alpha */ export declare type Color3 = { r: number; g: number; b: number; }; /** * Color3 * @alpha */ export declare namespace Color3 { const schema: JSONSchema; const validate: ValidateFunction; } /** * Represents a content mapping. The Decentraland file system is * case-insensitive. `file` must be lower cased. * * Duplicated files will throw a validation error. * * .file is a relative path * .hash is a valid IPFS hash. * * @public */ export declare type ContentMapping = { file: string; hash: IPFSv1 | IPFSv2; }; /** @public */ export declare namespace ContentMapping { const schema: JSONSchema; const validate: ValidateFunction; } export declare type Contract = { name: string; address: string; category: NFTCategory; network: Network; chainId: ChainId; }; export declare namespace Contract { const schema: JSONSchema; const validate: ValidateFunction; } export declare type ContractFilters = { category?: NFTCategory; network?: Network; }; export declare enum ContractSortBy { NAME = "name" } /** * This type describes the minimum deployment + AuthChain needed to synchronize * a deployed entity across catalysts. * @public */ export declare type DeploymentWithAuthChain = { entityId: string; entityType: string; pointers: string[]; localTimestamp: number; authChain: AuthChain; }; /** * @public */ export declare namespace DeploymentWithAuthChain { const schema: JSONSchema; const validate: ValidateFunction; } /** * @public * * Describes common properties to display deployments. */ export declare type DisplayableDeployment = { /** Name of the file used as icon for the MenuBar */ menuBarIcon?: string; }; /** @alpha */ export declare type Emote = EmoteADR74; /** @alpha */ export declare namespace Emote { const schema: JSONSchema; const validate: ValidateFunction; } declare type EmoteADR74 = BaseItem & (StandardProps | ThirdPartyProps) & { emoteDataADR74: EmoteDataADR74; }; export declare enum EmoteCategory { SIMPLE = "simple" } export declare namespace EmoteCategory { const schema: JSONSchema; const validate: ValidateFunction; } export declare type EmoteDataADR74 = { category: EmoteCategory; representations: EmoteRepresentationADR74[]; tags: string[]; loop: boolean; }; export declare namespace EmoteDataADR74 { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type EmoteRepresentationADR74 = { bodyShapes: BodyShape[]; mainFile: string; contents: string[]; }; /** @alpha */ export declare namespace EmoteRepresentationADR74 { const schema: JSONSchema; const validate: ValidateFunction; } /** * Internal representation of an entity in the catalyst. * * This Entity's content mappings adhere to ADR45. * * @public */ export declare type Entity = { /** @deprecated ADR45 removed entity versions. */ version: string; id: IPFSv1 | IPFSv2; type: EntityType; pointers: string[]; timestamp: number; content: ContentMapping[]; metadata?: any; }; /** @public */ export declare namespace Entity { const schema: JSONSchema; const validate: ValidateFunction; } /** * Non-exhaustive list of EntityTypes. * @public */ export declare enum EntityType { SCENE = "scene", PROFILE = "profile", WEARABLE = "wearable", STORE = "store", EMOTE = "emote" } /** * EthAddress is a data type that describes an Ethereum address * @alpha */ export declare type EthAddress = string; /** * EthAddress * @alpha */ export declare namespace EthAddress { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type FeatureToggles = Record; /** @alpha */ export declare namespace FeatureToggles { const schema: JSONSchema; const validate: ValidateFunction; } /** * Generates a validator for a specific JSON schema of a type T * @public */ export declare function generateLazyValidator(schema: JSONSchema, keywordDefinitions?: KeywordDefinition[]): ValidateFunction; /** * Get chain id by chain name * @alpha */ export declare function getChainId(chainName: ChainName): ChainId | null; /** * Get the chain name by chain id * @alpha */ export declare function getChainName(chainId: ChainId): ChainName | null; /** * Get the chain name by chain id * @alpha */ export declare function getURNProtocol(chainId: ChainId): string; /** * Get World * @alpha */ export declare function getWorld(): World; /** @alpha */ export declare type I18N = { code: Locale; text: string; }; /** @alpha */ export declare namespace I18N { const schema: JSONSchema; const validate: ValidateFunction; } export declare interface IEmoteController { getLength(): Promise; isPlaying(): Promise; goTo(seconds: number): Promise; play(): Promise; pause(): Promise; stop(): Promise; } /** * @public */ export declare type IPFSv1 = string; /** * IPFSv1 * @public */ export declare namespace IPFSv1 { const schema: JSONSchema; const validate: ValidateFunction; } /** * IPFSv2 is a data type that describes an IPFS v2 hash * @public */ export declare type IPFSv2 = string; /** * IPFSv2 * @public */ export declare namespace IPFSv2 { const schema: JSONSchema; const validate: ValidateFunction; } export declare interface IPreviewController { scene: ISceneController; emote: IEmoteController; } export declare interface ISceneController { getScreenshot(width: number, height: number): Promise; getMetrics(): Promise; } /** * Check if is inside World Limits * @alpha */ export declare function isInsideWorldLimits(x: number, y: number): boolean; export declare function isStandard(item: T): item is T & StandardProps; export declare function isThirdParty(item: T): item is T & ThirdPartyProps; export declare type Item = { id: string; name: string; thumbnail: string; url: string; category: NFTCategory; contractAddress: string; itemId: string; rarity: Rarity; price: string; available: number; isOnSale: boolean; creator: string; beneficiary: string | null; createdAt: number; updatedAt: number; reviewedAt: number; soldAt: number; data: NFT['data']; network: Network; chainId: ChainId; }; export declare namespace Item { const schema: JSONSchema; const validate: ValidateFunction; } export declare type ItemFilters = { first?: number; skip?: number; sortBy?: ItemSortBy; category?: NFTCategory; creator?: string; rarities?: Rarity[]; isSoldOut?: boolean; isOnSale?: boolean; search?: string; isWearableHead?: boolean; isWearableAccessory?: boolean; isWearableSmart?: boolean; wearableCategory?: WearableCategory; wearableGenders?: WearableGender[]; emoteCategory?: EmoteCategory; emoteGenders?: WearableGender[]; contractAddress?: string; itemId?: string; network?: Network; }; export declare enum ItemSortBy { NAME = "name", NEWEST = "newest", RECENTLY_REVIEWED = "recently_reviewed", RECENTLY_SOLD = "recently_sold", CHEAPEST = "cheapest" } /** * This type alias exist only to avoid accidental refactors involving names of ajv * @public */ export declare type JSONSchema = JSONSchemaType; export declare enum ListingStatus { OPEN = "open", SOLD = "sold", CANCELLED = "cancelled" } export declare namespace ListingStatus { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare enum Locale { EN = "en", ES = "es" } /** @alpha */ export declare namespace Locale { const schema: JSONSchema; const validate: ValidateFunction; } /** * Merkle Proof * @alpha */ export declare type MerkleProof = { proof: string[]; index: number; hashingKeys: string[]; entityHash: string; }; /** * Merkle Proof * @alpha */ export declare namespace MerkleProof { const schema: JSONSchema; const validate: ValidateFunction; } /** @public */ declare type Messages = SceneUpdate | Update; /** * Meta-transaction to be relayed * @alpha */ export declare type MetaTransaction = { from: string; params: [string, string]; }; /** * @alpha */ export declare namespace MetaTransaction { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type Metrics = { triangles: number; materials: number; textures: number; meshes: number; bodies: number; entities: number; }; /** @alpha */ export declare namespace Metrics { const schema: JSONSchema; const validate: ValidateFunction; } export declare type Mint = { id: string; creator: string; beneficiary: string; minter: string; itemId: string; tokenId: string; issuedId: string; contractAddress: string; price: string | null; timestamp: number; network: Network; chainId: ChainId; }; export declare namespace Mint { const schema: JSONSchema; const validate: ValidateFunction; } export declare type MintFilters = { first?: number; skip?: number; sortBy?: MintSortBy; creator?: string; beneficiary?: string; minter?: string; contractAddress?: string; itemId?: string; tokenId?: string; issuedId?: string; isSale?: boolean; network?: Network; }; export declare enum MintSortBy { RECENTLY_MINTED = "recently_minted", MOST_EXPENSIVE = "most_expensive" } declare type MultiPosition = { x: number[]; y: number[]; z: number[]; }; /** * Different supported networks * @alpha */ export declare enum Network { ETHEREUM = "ETHEREUM", MATIC = "MATIC" } /** * @alpha */ export declare namespace Network { const schema: JSONSchema; const validate: ValidateFunction; } export declare type NFT = { id: string; contractAddress: string; tokenId: string; activeOrderId: string | null; owner: string; name: string; category: NFTCategory; image: string; url: string; issuedId: string | null; itemId: string | null; data: { parcel?: { x: string; y: string; description: string | null; estate: { tokenId: string; name: string; } | null; }; estate?: { size: number; parcels: { x: number; y: number; }[]; description: string | null; }; wearable?: { description: string; category: WearableCategory; rarity: Rarity; bodyShapes: BodyShape[]; isSmart: boolean; }; ens?: { subdomain: string; }; emote?: { description: string; category: EmoteCategory; rarity: Rarity; bodyShapes: BodyShape[]; }; }; network: Network; chainId: ChainId; createdAt: number; updatedAt: number; soldAt: number; }; export declare namespace NFT { const schema: JSONSchema; const validate: ValidateFunction; } export declare enum NFTCategory { PARCEL = "parcel", ESTATE = "estate", WEARABLE = "wearable", ENS = "ens", EMOTE = "emote" } export declare namespace NFTCategory { const schema: JSONSchema; const validate: ValidateFunction; } export declare type NFTFilters = { first?: number; skip?: number; sortBy?: NFTSortBy; category?: NFTCategory; owner?: string; isOnSale?: boolean; search?: string; itemRarities?: Rarity[]; isLand?: boolean; isWearableHead?: boolean; isWearableAccessory?: boolean; isWearableSmart?: boolean; wearableCategory?: WearableCategory; wearableGenders?: WearableGender[]; emoteCategory?: EmoteCategory; emoteGenders?: WearableGender[]; contractAddresses?: string[]; tokenId?: string; itemId?: string; network?: Network; }; export declare enum NFTSortBy { NAME = "name", NEWEST = "newest", RECENTLY_LISTED = "recently_listed", RECENTLY_SOLD = "recently_sold", CHEAPEST = "cheapest" } export declare type Order = { id: string; marketplaceAddress: string; contractAddress: string; tokenId: string; owner: string; buyer: string | null; price: string; status: ListingStatus; expiresAt: number; createdAt: number; updatedAt: number; network: Network; chainId: ChainId; }; export declare namespace Order { const schema: JSONSchema; const validate: ValidateFunction; } export declare type OrderFilters = { first?: number; skip?: number; sortBy?: OrderSortBy; marketplaceAddress?: string; owner?: string; buyer?: string; contractAddress?: string; tokenId?: string; status?: ListingStatus; network?: Network; }; export declare enum OrderSortBy { RECENTLY_LISTED = "recently_listed", RECENTLY_UPDATED = "recently_updated", CHEAPEST = "cheapest" } export declare enum PreviewCamera { STATIC = "static", INTERACTIVE = "interactive" } /** @alpha */ export declare namespace PreviewCamera { const schema: JSONSchema; const validate: ValidateFunction; } export declare type PreviewConfig = { wearable?: WearableDefinition; wearables: WearableDefinition[]; bodyShape: BodyShape; skin: string; hair: string; eyes: string; zoom: number; type: PreviewType; face: boolean; background: { image?: string; color: string; transparent: boolean; }; emote: PreviewEmote; camera: PreviewCamera; autoRotateSpeed: number; centerBoundingBox: boolean; offsetX: number; offsetY: number; offsetZ: number; wheelZoom: number; wheelPrecision: number; wheelStart: number; }; export declare enum PreviewEmote { IDLE = "idle", CLAP = "clap", DAB = "dab", DANCE = "dance", FASHION = "fashion", FASHION_2 = "fashion-2", FASHION_3 = "fashion-3", FASHION_4 = "fashion-4", LOVE = "love", MONEY = "money", FIST_PUMP = "fist-pump", HEAD_EXPLODE = "head-explode" } /** @alpha */ export declare namespace PreviewEmote { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare enum PreviewEnv { PROD = "prod", DEV = "dev" } /** @alpha */ export declare namespace PreviewEnv { const schema: JSONSchema; const validate: ValidateFunction; } export declare type PreviewMessagePayload = T extends PreviewMessageType.READY ? null : T extends PreviewMessageType.LOAD ? null : T extends PreviewMessageType.ERROR ? { message: string; } : T extends PreviewMessageType.UPDATE ? { options: PreviewOptions; } : T extends PreviewMessageType.CONTROLLER_REQUEST ? { id: string; namespace: 'scene' | 'emote'; method: 'getScreenshot' | 'getMetrics' | 'getLength' | 'isPlaying' | 'play' | 'pause' | 'stop' | 'goTo'; params: any[]; } : T extends PreviewMessageType.CONTROLLER_RESPONSE ? { id: string; ok: true; result: any; } | { id: string; ok: false; error: string; } : unknown; export declare enum PreviewMessageType { READY = "ready", LOAD = "load", ERROR = "error", UPDATE = "update", CONTROLLER_REQUEST = "controller_request", CONTROLLER_RESPONSE = "controller_response" } /** @alpha */ export declare namespace PreviewMessageType { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type PreviewOptions = { contractAddress?: string | null; tokenId?: string | null; itemId?: string | null; profile?: string | null; bodyShape?: BodyShape | null; skin?: string | null; hair?: string | null; eyes?: string | null; urns?: string[] | null; urls?: string[] | null; base64s?: string[] | null; blob?: WearableWithBlobs | null; zoom?: number | null; emote?: PreviewEmote | null; camera?: PreviewCamera | null; autoRotateSpeed?: number | null; offsetX?: number | null; offsetY?: number | null; offsetZ?: number | null; wheelZoom?: number | null; wheelPrecision?: number | null; wheelStart?: number | null; background?: string | null; disableBackground?: boolean | null; disableAutoCenter?: boolean | null; disableAutoRotate?: boolean | null; disableFace?: boolean | null; disableDefaultWearables?: boolean | null; env?: PreviewEnv | null; }; /** @alpha */ export declare enum PreviewType { TEXTURE = "texture", WEARABLE = "wearable", AVATAR = "avatar" } /** @alpha */ export declare namespace PreviewType { const schema: JSONSchema; const validate: ValidateFunction; } /** * Profile containing one or multiple avatars * @alpha */ export declare type Profile = { avatars: Avatar[]; }; /** * Profile * @alpha */ export declare namespace Profile { const schema: JSONSchema; const validate: ValidateFunction; } /** @public */ declare enum ProjectType { SCENE = "scene", SMART_ITEM = "smart-item", PORTABLE_EXPERIENCE = "portable-experience", LIBRARY = "library" } /** @public */ declare namespace ProjectType { const schema: JSONSchema; const validate: ValidateFunction; } /** * Different supported providers * @alpha */ export declare enum ProviderType { INJECTED = "injected", FORTMATIC = "formatic", NETWORK = "network", WALLET_CONNECT = "wallet_connect", WALLET_LINK = "wallet_link" } /** * @alpha */ export declare namespace ProviderType { const schema: JSONSchema; const validate: ValidateFunction; } export declare enum Rarity { UNIQUE = "unique", MYTHIC = "mythic", LEGENDARY = "legendary", EPIC = "epic", RARE = "rare", UNCOMMON = "uncommon", COMMON = "common" } export declare namespace Rarity { const schema: JSONSchema; const validate: ValidateFunction; export function getMaxSupply(rarity: Rarity): number; export function getColor(rarity: Rarity): string; export function getGradient(rarity: Rarity): [string, string]; } /** @alpha */ export declare type RepresentationDefinition = Omit & { contents: { key: string; url: string; }[]; }; /** @alpha */ export declare type RepresentationWithBlobs = Omit & { contents: { key: string; blob: any; }[]; }; export declare type Sale = { id: string; type: SaleType; buyer: string; seller: string; itemId: string | null; tokenId: string; contractAddress: string; price: string; timestamp: number; txHash: string; network: Network; chainId: ChainId; }; export declare namespace Sale { const schema: JSONSchema; const validate: ValidateFunction; } export declare type SaleFilters = { first?: number; skip?: number; sortBy?: SaleSortBy; type?: SaleType; categories?: NFTCategory[]; buyer?: string; seller?: string; contractAddress?: string; itemId?: string; tokenId?: string; from?: number; to?: number; minPrice?: string; maxPrice?: string; network?: Network; }; export declare enum SaleSortBy { RECENTLY_SOLD = "recently_sold", MOST_EXPENSIVE = "most_expensive" } export declare enum SaleType { ORDER = "order", BID = "bid", MINT = "mint" } export declare namespace SaleType { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type Scene = DisplayableDeployment & { main: string; scene: SceneParcels; display?: { title?: string; /** @deprecated use menuBarIcon instead */ favicon?: string; description?: string; navmapThumbnail?: string; }; owner?: string; contact?: { name?: string; email?: string; im?: string; url?: string; }; tags?: string[]; source?: Source; spawnPoints?: SpawnPoint[]; requiredPermissions?: string[]; featureToggles?: FeatureToggles; }; /** @alpha */ export declare namespace Scene { const schema: JSONSchema; const validate: ValidateFunction; } /** @public */ declare const SCENE_UPDATE = "SCENE_UPDATE"; /** @alpha */ export declare type SceneParcels = { base: string; parcels: string[]; }; /** @alpha */ export declare namespace SceneParcels { const schema: JSONSchema; const schemaValidator: ValidateFunction; const validate: ValidateFunction; } /** @public */ declare type SceneUpdate = { type: typeof SCENE_UPDATE; payload: { sceneId: string; sceneType: string; }; }; /** @public */ declare namespace SceneUpdate { const schema: JSONSchema; const validate: ValidateFunction; } declare namespace sdk { export { Actions, Messages, SCENE_UPDATE, SceneUpdate, UPDATE, Update, ProjectType, AssetJson } } export { sdk } export declare const sendMessage: (window: { postMessage(event: any, targetOrigin: string): any; }, type: T, payload: PreviewMessagePayload, targetOrigin?: string) => void; declare type SinglePosition = { x: number; y: number; z: number; }; /** * Snapshots * @alpha */ export declare type Snapshots = { face256: IPFSv2; body: IPFSv2; }; /** * Snapshots * @alpha */ export declare namespace Snapshots { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type Source = { version?: number; origin: string; projectId: string; point?: { x: number; y: number; }; rotation?: 'north' | 'east' | 'south' | 'west'; layout?: { rows: number; cols: number; }; isEmpty?: boolean; }; /** @alpha */ export declare namespace Source { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type SpawnPoint = { name?: string; position: SinglePosition | MultiPosition; default?: boolean; cameraTarget?: SinglePosition; }; /** @alpha */ export declare namespace SpawnPoint { const schema: JSONSchema; const validate: ValidateFunction; } export declare type StandardProps = { collectionAddress: string; rarity: Rarity; }; export declare type Store = { id: string; owner: string; description: string; links: { name: string; url: string; }[]; images: { name: string; file: string; }[]; version: number; }; export declare namespace Store { const schema: JSONSchema; const validate: ValidateFunction; } export declare type ThirdPartyProps = { merkleProof: MerkleProof; content: Record; }; /** @public @deprecated */ declare const UPDATE = "update"; /** @public @deprecated */ declare type Update = { type: typeof UPDATE; }; /** @public @deprecated */ declare namespace Update { const schema: JSONSchema; const validate: ValidateFunction; } /** * This type is a subset of AJV's ValidateFunction, it exists to make * .d.ts bundles smaller and to not expose all of AJV context to the * world. * @public */ export declare interface ValidateFunction { (this: any, data: any, dataCxt?: any): data is T; errors?: null | ErrorObject[]; } /** * Validates a type with a schema in a functional way. * @public */ export declare function validateType(theType: Pick, 'validate'>, value: T): boolean; /** * World Range * @alpha */ export declare type ValidWorldRange = { xMin: number; yMin: number; xMax: number; yMax: number; }; /** @alpha */ export declare type Wearable = BaseItem & { data: { replaces: WearableCategory[]; hides: WearableCategory[]; tags: string[]; representations: WearableRepresentation[]; category: WearableCategory; }; } & (StandardProps | ThirdPartyProps); /** @alpha */ export declare namespace Wearable { const schema: JSONSchema; /** * Validates that the wearable metadata complies with the standard or third party wearable, and doesn't have repeated locales. * Some fields are defined as optional but those are validated to be present as standard XOR third party: * Standard Wearables should contain: * - collectionAddress * - rarity * Third Party Wearables should contain: * - merkleProof * - content */ const validate: ValidateFunction; } export declare enum WearableCategory { EYEBROWS = "eyebrows", EYES = "eyes", FACIAL_HAIR = "facial_hair", HAIR = "hair", HEAD = "head", BODY_SHAPE = "body_shape", MOUTH = "mouth", UPPER_BODY = "upper_body", LOWER_BODY = "lower_body", FEET = "feet", EARRING = "earring", EYEWEAR = "eyewear", HAT = "hat", HELMET = "helmet", MASK = "mask", TIARA = "tiara", TOP_HEAD = "top_head", SKIN = "skin" } export declare namespace WearableCategory { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type WearableDefinition = Omit & { data: Omit & { representations: RepresentationDefinition[]; }; emoteDataV0?: { loop: boolean; }; }; export declare enum WearableGender { MALE = "male", FEMALE = "female" } export declare namespace WearableGender { const schema: JSONSchema; const validate: ValidateFunction; } /** * @alpha */ export declare type WearableId = string; /** @alpha */ export declare type WearableRepresentation = { bodyShapes: BodyShape[]; mainFile: string; contents: string[]; overrideHides: WearableCategory[]; overrideReplaces: WearableCategory[]; }; /** @alpha */ export declare namespace WearableRepresentation { const schema: JSONSchema; const validate: ValidateFunction; } /** @alpha */ export declare type WearableWithBlobs = Omit & { data: Omit & { representations: RepresentationWithBlobs[]; }; }; /** * World * @alpha */ export declare type World = { validWorldRanges: Array; }; /** * @alpha */ export declare namespace World { const schema: JSONSchema; const validate: ValidateFunction; } export { }