-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
32 lines (32 loc) · 907 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { z } from 'zod'
import type { TrendingResponse, TrendingItem } from 'coingecko-api-v3'
const MainPageSettings = z.object({
currency: z.string().optional()
})
export type IMainPageSettings = z.infer<typeof MainPageSettings>
export type TrendingNft = {
id: string,
name: string,
symbol: string,
thumb: string,
nft_contract_id: number,
native_currency_symbol: string,
floor_price_in_native_currency: number
floor_price_24h_percentage_change: number
}
interface TrendingCoin extends TrendingItem {
price_btc: number
}
export interface Trending extends TrendingResponse {
coins: { item?: TrendingCoin }[],
nfts: TrendingNft[]
}
const ListToken = z.object({
name: z.string(),
symbol: z.string(),
address: z.string(),
chainId: z.number(),
decimals: z.number(),
logoURI: z.string()
})
export type IListToken = z.infer<typeof ListToken>