/* tslint:disable */ /* eslint-disable */ // @ts-nocheck /** * Audius API * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { ArtistCoinFees } from './ArtistCoinFees'; import { ArtistCoinFeesFromJSON, ArtistCoinFeesFromJSONTyped, ArtistCoinFeesToJSON, } from './ArtistCoinFees'; import type { ArtistLocker } from './ArtistLocker'; import { ArtistLockerFromJSON, ArtistLockerFromJSONTyped, ArtistLockerToJSON, } from './ArtistLocker'; import type { DynamicBondingCurveInsights } from './DynamicBondingCurveInsights'; import { DynamicBondingCurveInsightsFromJSON, DynamicBondingCurveInsightsFromJSONTyped, DynamicBondingCurveInsightsToJSON, } from './DynamicBondingCurveInsights'; import type { RewardPool } from './RewardPool'; import { RewardPoolFromJSON, RewardPoolFromJSONTyped, RewardPoolToJSON, } from './RewardPool'; /** * A coin object * @export * @interface Coin */ export interface Coin { /** * The mint address of the coin * @type {string} * @memberof Coin */ mint: string; /** * The coin symbol/ticker * @type {string} * @memberof Coin */ ticker: string; /** * The number of decimals for the coin * @type {number} * @memberof Coin */ decimals: number; /** * The coin name * @type {string} * @memberof Coin */ name: string; /** * The URI for the coin's logo image * @type {string} * @memberof Coin */ logoUri?: string; /** * The URI for the coin's banner image * @type {string} * @memberof Coin */ bannerImageUrl?: string; /** * The description of the coin * @type {string} * @memberof Coin */ description?: string; /** * X (Twitter) handle for the coin * @type {string} * @memberof Coin */ xHandle?: string; /** * Instagram handle for the coin * @type {string} * @memberof Coin */ instagramHandle?: string; /** * TikTok handle for the coin * @type {string} * @memberof Coin */ tiktokHandle?: string; /** * Website URL for the coin * @type {string} * @memberof Coin */ website?: string; /** * Generic link URL for the coin * @type {string} * @memberof Coin */ link1?: string; /** * Generic link URL for the coin * @type {string} * @memberof Coin */ link2?: string; /** * Generic link URL for the coin * @type {string} * @memberof Coin */ link3?: string; /** * Generic link URL for the coin * @type {string} * @memberof Coin */ link4?: string; /** * Whether the coin has a Discord server * @type {boolean} * @memberof Coin */ hasDiscord?: boolean; /** * The date and time when the coin was created * @type {Date} * @memberof Coin */ createdAt: Date; /** * The date and time when the coin was last updated * @type {Date} * @memberof Coin */ updatedAt?: Date; /** * The user ID of the coin owner * @type {string} * @memberof Coin */ ownerId?: string; /** * The escrow recipient address for custom-created coins without DBCs * @type {string} * @memberof Coin */ escrowRecipient?: string; /** * * @type {DynamicBondingCurveInsights} * @memberof Coin */ dynamicBondingCurve?: DynamicBondingCurveInsights; /** * * @type {ArtistLocker} * @memberof Coin */ artistLocker?: ArtistLocker; /** * * @type {ArtistCoinFees} * @memberof Coin */ artistFees?: ArtistCoinFees; /** * * @type {RewardPool} * @memberof Coin */ rewardPool?: RewardPool; /** * Current price in USD * @type {number} * @memberof Coin */ price?: number; /** * Market capitalization in USD * @type {number} * @memberof Coin */ marketCap?: number; /** * Total volume traded in USD (all time) * @type {number} * @memberof Coin */ totalVolumeUSD?: number; /** * Number of holders * @type {number} * @memberof Coin */ holder?: number; /** * Total supply of the token * @type {number} * @memberof Coin */ totalSupply?: number; /** * Current liquidity in USD * @type {number} * @memberof Coin */ liquidity?: number; /** * Circulating supply of the token * @type {number} * @memberof Coin */ circulatingSupply?: number; /** * 24h price change in percent * @type {number} * @memberof Coin */ priceChange24hPercent?: number; /** * Display price (client-computed, e.g. for display formatting) * @type {number} * @memberof Coin */ displayPrice?: number; /** * Display market cap (client-computed) * @type {number} * @memberof Coin */ displayMarketCap?: number; } /** * Check if a given object implements the Coin interface. */ export function instanceOfCoin(value: object): value is Coin { let isInstance = true; isInstance = isInstance && "mint" in value && value["mint"] !== undefined; isInstance = isInstance && "ticker" in value && value["ticker"] !== undefined; isInstance = isInstance && "decimals" in value && value["decimals"] !== undefined; isInstance = isInstance && "name" in value && value["name"] !== undefined; isInstance = isInstance && "createdAt" in value && value["createdAt"] !== undefined; return isInstance; } export function CoinFromJSON(json: any): Coin { return CoinFromJSONTyped(json, false); } export function CoinFromJSONTyped(json: any, ignoreDiscriminator: boolean): Coin { if ((json === undefined) || (json === null)) { return json; } return { 'mint': json['mint'], 'ticker': json['ticker'], 'decimals': json['decimals'], 'name': json['name'], 'logoUri': !exists(json, 'logo_uri') ? undefined : json['logo_uri'], 'bannerImageUrl': !exists(json, 'banner_image_url') ? undefined : json['banner_image_url'], 'description': !exists(json, 'description') ? undefined : json['description'], 'xHandle': !exists(json, 'x_handle') ? undefined : json['x_handle'], 'instagramHandle': !exists(json, 'instagram_handle') ? undefined : json['instagram_handle'], 'tiktokHandle': !exists(json, 'tiktok_handle') ? undefined : json['tiktok_handle'], 'website': !exists(json, 'website') ? undefined : json['website'], 'link1': !exists(json, 'link_1') ? undefined : json['link_1'], 'link2': !exists(json, 'link_2') ? undefined : json['link_2'], 'link3': !exists(json, 'link_3') ? undefined : json['link_3'], 'link4': !exists(json, 'link_4') ? undefined : json['link_4'], 'hasDiscord': !exists(json, 'has_discord') ? undefined : json['has_discord'], 'createdAt': (new Date(json['created_at'])), 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), 'ownerId': !exists(json, 'owner_id') ? undefined : json['owner_id'], 'escrowRecipient': !exists(json, 'escrow_recipient') ? undefined : json['escrow_recipient'], 'dynamicBondingCurve': !exists(json, 'dynamicBondingCurve') ? undefined : DynamicBondingCurveInsightsFromJSON(json['dynamicBondingCurve']), 'artistLocker': !exists(json, 'artist_locker') ? undefined : ArtistLockerFromJSON(json['artist_locker']), 'artistFees': !exists(json, 'artist_fees') ? undefined : ArtistCoinFeesFromJSON(json['artist_fees']), 'rewardPool': !exists(json, 'reward_pool') ? undefined : RewardPoolFromJSON(json['reward_pool']), 'price': !exists(json, 'price') ? undefined : json['price'], 'marketCap': !exists(json, 'marketCap') ? undefined : json['marketCap'], 'totalVolumeUSD': !exists(json, 'totalVolumeUSD') ? undefined : json['totalVolumeUSD'], 'holder': !exists(json, 'holder') ? undefined : json['holder'], 'totalSupply': !exists(json, 'totalSupply') ? undefined : json['totalSupply'], 'liquidity': !exists(json, 'liquidity') ? undefined : json['liquidity'], 'circulatingSupply': !exists(json, 'circulatingSupply') ? undefined : json['circulatingSupply'], 'priceChange24hPercent': !exists(json, 'priceChange24hPercent') ? undefined : json['priceChange24hPercent'], 'displayPrice': !exists(json, 'displayPrice') ? undefined : json['displayPrice'], 'displayMarketCap': !exists(json, 'displayMarketCap') ? undefined : json['displayMarketCap'], }; } export function CoinToJSON(value?: Coin | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'mint': value.mint, 'ticker': value.ticker, 'decimals': value.decimals, 'name': value.name, 'logo_uri': value.logoUri, 'banner_image_url': value.bannerImageUrl, 'description': value.description, 'x_handle': value.xHandle, 'instagram_handle': value.instagramHandle, 'tiktok_handle': value.tiktokHandle, 'website': value.website, 'link_1': value.link1, 'link_2': value.link2, 'link_3': value.link3, 'link_4': value.link4, 'has_discord': value.hasDiscord, 'created_at': (value.createdAt.toISOString()), 'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), 'owner_id': value.ownerId, 'escrow_recipient': value.escrowRecipient, 'dynamicBondingCurve': DynamicBondingCurveInsightsToJSON(value.dynamicBondingCurve), 'artist_locker': ArtistLockerToJSON(value.artistLocker), 'artist_fees': ArtistCoinFeesToJSON(value.artistFees), 'reward_pool': RewardPoolToJSON(value.rewardPool), 'price': value.price, 'marketCap': value.marketCap, 'totalVolumeUSD': value.totalVolumeUSD, 'holder': value.holder, 'totalSupply': value.totalSupply, 'liquidity': value.liquidity, 'circulatingSupply': value.circulatingSupply, 'priceChange24hPercent': value.priceChange24hPercent, 'displayPrice': value.displayPrice, 'displayMarketCap': value.displayMarketCap, }; }