UNPKG

@hirosystems/token-metadata-api-client

Version:

Client for @hirosystems/token-metadata-api

693 lines (691 loc) 27.1 kB
/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/metadata/v1/ft": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fungible Tokens * @description Retrieves a list of Fungible Tokens */ get: operations["getFungibleTokens"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/metadata/v1/ft/{principal}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Fungible Token Metadata * @description Retrieves metadata for a SIP-010 Fungible Token */ get: operations["getFtMetadata"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/metadata/v1/nft/{principal}/{token_id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Non-Fungible Token Metadata * @description Retrieves metadata for a SIP-009 Non-Fungible Token */ get: operations["getNftMetadata"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/metadata/v1/sft/{principal}/{token_id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Semi-Fungible Token Metadata * @description Retrieves metadata for a SIP-013 Semi-Fungible Token */ get: operations["getSftMetadata"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/metadata/v1/": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * API Status * @description Displays the status of the API and its current workload */ get: operations["getApiStatus"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } export type webhooks = Record<string, never>; export interface components { schemas: never; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record<string, never>; export interface operations { getFungibleTokens: { parameters: { query?: { name?: string; symbol?: string; /** * @description Stacks Address * @example SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9 */ address?: string; /** @description Result offset */ offset?: number; /** @description Results per page */ limit?: number; /** @description Parameter to order results by */ order_by?: "name" | "symbol"; /** @description Results order */ order?: "asc" | "desc"; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Default Response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @example 20 */ limit: number; /** @example 0 */ offset: number; /** @example 1 */ total: number; results: { /** @example Wrapped USD */ name?: string; /** @example xUSD */ symbol?: string; /** @example 8 */ decimals?: number; /** @example 9999980000000 */ total_supply?: string; /** * Format: uri * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json */ token_uri?: string; /** @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets */ description?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image_uri?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image_thumbnail_uri?: string; /** * Format: uri * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image_canonical_uri?: string; /** @example 0xef2ac1126e16f46843228b1dk4830e19eb7599129e4jf392cab9e65ae83a45c0 */ tx_id: string; /** @example ST399W7Z9WS0GMSNQGJGME5JAENKN56D65VGMGKGA */ sender_address: string; /** @example SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2 */ contract_principal: string; }[]; }; }; }; }; }; getFtMetadata: { parameters: { query?: { /** @description Metadata localization to retrieve */ locale?: string; }; header?: never; path: { /** * @description Principal for the contract which owns the SIP-010 token * @example SP32XCD69XPS3GKDEXAQ29PJRDSD5AR643GNEEBXZ.fari-token */ principal: string; }; cookie?: never; }; requestBody?: never; responses: { /** @description Default Response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @example Wrapped USD */ name?: string; /** @example xUSD */ symbol?: string; /** @example 8 */ decimals?: number; /** @example 9999980000000 */ total_supply?: string; /** * Format: uri * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json */ token_uri?: string; /** @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets */ description?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image_uri?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image_thumbnail_uri?: string; /** * Format: uri * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image_canonical_uri?: string; /** @example 0x5642ca7d68976b6b2a2055689d9a57de26d67f0dd8b016d1b0d94cb634454cdd */ tx_id: string; /** @example SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6 */ sender_address: string; /** @example SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6.token-ststx-earn-v1::stSTXearn */ asset_identifier: string; /** Metadata */ metadata?: { /** @example 16 */ sip: number; /** @example Satoshi's Team #12200 */ name?: string; /** @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets */ description?: string; /** * Format: uri * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ cached_image?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ cached_thumbnail_image?: string; attributes?: { /** @example Background */ trait_type: string; /** @example string */ display_type?: string; /** * Metadata Value * @example value */ value: unknown; }[]; /** * Metadata Properties * @example { * "collection": "Foo Collection", * "total_supply": "10000" * } */ properties?: { [key: string]: unknown; }; /** Metadata Localization */ localization?: { /** * Format: uri * @example http://token.com/metadata?hl={locale} */ uri: string; /** @example en */ default: string; /** @example [ * "en", * "jp" * ] */ locales: string[]; }; }; }; }; }; /** @description Default Response */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ error: "Token not found"; } | { /** @enum {string} */ error: "Contract not found"; }; }; }; /** @description Default Response */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ error: "Token metadata fetch in progress"; } | { /** @enum {string} */ error: "Locale not found"; } | { /** @enum {string} */ error: "Token error"; message: string; }; }; }; }; }; getNftMetadata: { parameters: { query?: { /** @description Metadata localization to retrieve */ locale?: string; }; header?: never; path: { /** * @description SIP-009 compliant smart contract principal * @example SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12 */ principal: string; /** * @description Token ID to retrieve * @example 35 */ token_id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description Default Response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * Format: uri * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json */ token_uri?: string; /** Metadata */ metadata?: { /** @example 16 */ sip: number; /** @example Satoshi's Team #12200 */ name?: string; /** @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets */ description?: string; /** * Format: uri * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ cached_image?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ cached_thumbnail_image?: string; attributes?: { /** @example Background */ trait_type: string; /** @example string */ display_type?: string; /** * Metadata Value * @example value */ value: unknown; }[]; /** * Metadata Properties * @example { * "collection": "Foo Collection", * "total_supply": "10000" * } */ properties?: { [key: string]: unknown; }; /** Metadata Localization */ localization?: { /** * Format: uri * @example http://token.com/metadata?hl={locale} */ uri: string; /** @example en */ default: string; /** @example [ * "en", * "jp" * ] */ locales: string[]; }; }; }; }; }; /** @description Default Response */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ error: "Token not found"; } | { /** @enum {string} */ error: "Contract not found"; }; }; }; /** @description Default Response */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ error: "Token metadata fetch in progress"; } | { /** @enum {string} */ error: "Locale not found"; } | { /** @enum {string} */ error: "Token error"; message: string; }; }; }; }; }; getSftMetadata: { parameters: { query?: { /** @description Metadata localization to retrieve */ locale?: string; }; header?: never; path: { /** * @description SIP-013 compliant smart contract principal * @example SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.key-alex-autoalex-v1 */ principal: string; /** * @description Token ID to retrieve * @example 35 */ token_id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description Default Response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * Format: uri * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json */ token_uri?: string; /** @example 6 */ decimals?: number; /** @example 250 */ total_supply?: string; /** Metadata */ metadata?: { /** @example 16 */ sip: number; /** @example Satoshi's Team #12200 */ name?: string; /** @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets */ description?: string; /** * Format: uri * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ image?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ cached_image?: string; /** * Format: uri * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png */ cached_thumbnail_image?: string; attributes?: { /** @example Background */ trait_type: string; /** @example string */ display_type?: string; /** * Metadata Value * @example value */ value: unknown; }[]; /** * Metadata Properties * @example { * "collection": "Foo Collection", * "total_supply": "10000" * } */ properties?: { [key: string]: unknown; }; /** Metadata Localization */ localization?: { /** * Format: uri * @example http://token.com/metadata?hl={locale} */ uri: string; /** @example en */ default: string; /** @example [ * "en", * "jp" * ] */ locales: string[]; }; }; }; }; }; /** @description Default Response */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ error: "Token not found"; } | { /** @enum {string} */ error: "Contract not found"; }; }; }; /** @description Default Response */ 422: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @enum {string} */ error: "Token metadata fetch in progress"; } | { /** @enum {string} */ error: "Locale not found"; } | { /** @enum {string} */ error: "Token error"; message: string; }; }; }; }; }; getApiStatus: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Default Response */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @example token-metadata-api v0.0.1 (master:a1b2c3) */ server_version: string; /** @example ready */ status: string; chain_tip: { /** @example 163541 */ block_height: number; }; /** Api Token Count */ tokens?: { /** @example 512 */ ft?: number; /** @example 493452 */ nft?: number; /** @example 44 */ sft?: number; }; /** Api Token Contract Count */ token_contracts?: { /** @example 3101 */ "sip-009"?: number; /** @example 512 */ "sip-010"?: number; /** @example 11 */ "sip-013"?: number; }; /** Api Job Count */ job_queue?: { /** @example 430562 */ pending?: number; /** @example 512 */ queued?: number; /** @example 12532 */ done?: number; /** @example 11 */ failed?: number; /** @example 20 */ invalid?: number; }; }; }; }; }; }; }