UNPKG

dcl-catalyst-client

Version:

A client to query and perform changes on Decentraland's catalyst servers

219 lines 9.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getThirdPartyIntegrations = exports.getOutfits = exports.getAvatarDetails = exports.getAvatarsDetailsByPost = exports.getRealms = exports.getHotScenes = exports.validateSignature = exports.getDenylistedUserNames = exports.getPois = exports.getCatalystServers = exports.searchWearables = exports.getThirdPartyCollection = exports.getThirdPartyWearables = exports.getLands = exports.getNames = exports.getEmotes = exports.getWearables = exports.getStandardErc721 = exports.getImage = exports.getThumbnail = exports.getCollections = exports.getLambdaStatus = void 0; /** * Generated by orval v6.20.0 🍺 * Do not edit manually. * API Specification for the Decentraland Catalyst Server (BETA) * A Catalyst is a Server that runs different services. These services currently work as the backbone for Decentraland and work in a decentralized network. The current specification details the following services: <br/><br/>- Archipelago <br/>- Content Server <br/>- Lambdas Service <br/> <br/>WARNING: We are working to close the version 1.0 of the Catalyst Protocol defined by this API. So far this is what we have and it's public but we are still working on refinement and during this process we may decided to deprecate or change some of the endpoints. * OpenAPI spec version: 1.0 */ const fetcher_1 = require("../utils/fetcher"); /** * Retrieve detailed information about the services * @summary Catalyst Server status */ const getLambdaStatus = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/status`, method: 'get' }); }; exports.getLambdaStatus = getLambdaStatus; /** * Retrieve the list of collections URNs * @summary Get Collections */ const getCollections = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/collections`, method: 'get' }); }; exports.getCollections = getCollections; /** * Downloads a thumbnail image for the specified urn * @summary Download thumbnail image */ const getThumbnail = (urn) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/collections/contents/${urn}/thumbnail`, method: 'get', responseType: 'blob' }); }; exports.getThumbnail = getThumbnail; /** * Downloads the image for the specified urn * @summary Download URN image */ const getImage = (urn) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/collections/contents/${urn}/image`, method: 'get', responseType: 'blob' }); }; exports.getImage = getImage; /** * Retrieve ERC721/NFT Entity details * @summary Get ERC721 Entity */ const getStandardErc721 = (chainId, contract, option, emission) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/collections/standard/erc721/${chainId}/${contract}/${option}/${emission}`, method: 'get' }); }; exports.getStandardErc721 = getStandardErc721; /** * Get a list of wearables owned by the given address * @summary Get list of wearables for an address */ const getWearables = (address, params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/users/${address}/wearables`, method: 'get', params }); }; exports.getWearables = getWearables; /** * Get a list of emotes owned by the given address * @summary Get list of emotes for an address */ const getEmotes = (address, params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/users/${address}/emotes`, method: 'get', params }); }; exports.getEmotes = getEmotes; /** * Get a list of names owned by the given address * @summary Get list of names for an address */ const getNames = (address, params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/users/${address}/names`, method: 'get', params }); }; exports.getNames = getNames; /** * Get a list of lands owned by the given address * @summary Get list of lands for an address */ const getLands = (address, params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/users/${address}/lands`, method: 'get', params }); }; exports.getLands = getLands; /** * Returns the list of third party wearables for the provided address * @summary Returns the list of third party wearables for the provided address */ const getThirdPartyWearables = (address, params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/users/${address}/third-party-wearables`, method: 'get', params }); }; exports.getThirdPartyWearables = getThirdPartyWearables; /** * Returns the list of third party wearables for the given collection * @summary Returns the list of third party wearables for the given collection */ const getThirdPartyCollection = (address, collectionId, params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/users/${address}/third-party-wearables/${collectionId}`, method: 'get', params }); }; exports.getThirdPartyCollection = getThirdPartyCollection; /** * Search for wearables based on the applied filters and retrieve detailed information * @deprecated * @summary Search Wearables */ const searchWearables = (params) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/collections/wearables`, method: 'get', params }); }; exports.searchWearables = searchWearables; /** * Retrieve the list of Catalyst Servers * @summary Get Catalyst Servers */ const getCatalystServers = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/contracts/servers`, method: 'get' }); }; exports.getCatalystServers = getCatalystServers; /** * Retrieve the Point of Interest list of coordinates * @summary Retrieve DCL Point of Interests */ const getPois = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/contracts/pois`, method: 'get' }); }; exports.getPois = getPois; /** * Retrieve list of forbidden user names. The prohibition of these names is decided through the DAO and need to be voted, the list lives in a Smart Contract and the Catalyst just consumes this information to present it to the client. In order to add a new name a new proposal needs to be created, approved and a transaction should be sent by a DAO committee member. * @summary Denylisted user names */ const getDenylistedUserNames = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/contracts/denylisted-names`, method: 'get' }); }; exports.getDenylistedUserNames = getDenylistedUserNames; /** * Given a signed message and it's AuthChain, validate it's authenticity. A message can be signed, for example, to prove ownership of the Entity pointers that they want to modify. * @deprecated * @summary Validate signed message */ const validateSignature = (validateSignatureBody) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/crypto/validate-signature`, method: 'post', headers: { 'Content-Type': 'application/json; charset=utf-8' }, data: validateSignatureBody }); }; exports.validateSignature = validateSignature; /** * Returns the list of scenes where there are more users with coordinates and the list of parcels that compose the scene. * @summary Hot Scenes */ const getHotScenes = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/explore/hot-scenes`, method: 'get' }); }; exports.getHotScenes = getHotScenes; /** * Returns the list of realms with details about the users in it * @summary Get Realms status */ const getRealms = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/explore/realms`, method: 'get' }); }; exports.getRealms = getRealms; /** * Returns all the Avatars details associated with the Ethereum addresses in the body * @summary Get Avatars details */ const getAvatarsDetailsByPost = (postProfiles) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/profiles`, method: 'post', headers: { 'Content-Type': 'application/json; charset=utf-8' }, data: postProfiles }); }; exports.getAvatarsDetailsByPost = getAvatarsDetailsByPost; /** * Given a Ethereum address of a user, return the Avatars details associated with it. * @summary Get Avatar details */ const getAvatarDetails = (id) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/profiles/${id}`, method: 'get' }); }; exports.getAvatarDetails = getAvatarDetails; /** * Given a Ethereum address of a user, return the Outfits entity. * @summary Get Outfits */ const getOutfits = (id) => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/outfits/${id}`, method: 'get' }); }; exports.getOutfits = getOutfits; /** * Returns the list of third party integrations and collections * @summary Returns the list of third party integrations as well as collections */ const getThirdPartyIntegrations = () => { return (0, fetcher_1.useCustomClient)({ url: `/lambdas/third-party-integrations`, method: 'get' }); }; exports.getThirdPartyIntegrations = getThirdPartyIntegrations; //# sourceMappingURL=lambdas-client.js.map