UNPKG

pulsar_sdk_js

Version:

A convenient way for you to interact with Pulsar's Third Party APIs, using typified classes.

403 lines (402 loc) 10.8 kB
import { TierKeys, DebtType, OrderType, TokenType, ChainKeys, OptionType, AnnualReturnType, TimeseriesEventKey } from "../constants/enums"; export declare class TokenChain { type: TokenType; value: string; } declare class TokenChainInfo { chain: ChainKeys; id: TokenChain; decimals?: number; } export declare class BaseToken { name: string; denom: string; id: string; display_id: string; image?: string; latest_price?: string; price_24h_change?: string; chain_properties?: TokenChainInfo; } export declare class BaseWallet { address: string; chain: string; } export declare class NFTCollectionMarketplace { indexer_id: string; slug_id?: string; url?: string; marketplace_id?: string; } export declare class NFTCollectionStats { price_timeseries?: Record<string, string>; } export declare class NFTCollection { id: string; chain: string; low_volume: boolean; unknown_volume: boolean; is_fully_index: boolean; marketplaces: NFTCollectionMarketplace[]; available_traits?: string[]; name?: string; avatar?: string; banner?: string; volume?: string; volume_usd?: string; address?: string; token?: BaseToken; market_cap?: string; market_cap_usd?: string; floor_price?: string; floor_price_usd?: string; description?: string; average_price?: string; number_of_assets?: number; number_of_owners?: number; last_24h_change?: string; stats?: NFTCollectionStats; last_24h_change_percentage?: string; } export declare class NFTItem { name: string; id: string; token_id: string; chain: string; traits: Record<string, string>; urls: Record<string, string>; traits_hash?: string; creator_address?: string; owner_address?: string; token?: BaseToken; wallet?: BaseWallet; collection?: NFTCollection; description?: string; avatar?: string; video_avatar?: string; price?: string; url?: string; rarity_score?: number; rank?: number; } export declare class WalletNFTError { indexer_id: string; chain: ChainKeys; } export declare class WalletNFTs { errors: WalletNFTError[]; items?: NFTItem[]; } export declare class WalletNFTsErrors extends WalletNFTs { } export declare class ResolvedName { main_name: string; main_address: string; service: string; } export declare class NFTTraitsFilter { traits: Record<string, string[]>; constructor(traits: Record<string, string[]>); } export declare class ResolvedAddress { main_name: string; service: string; } export declare class PaginatedNFTItem { response: NFTItem[]; total: number; } export declare class TimeseriesEvent { event_key: TimeseriesEventKey; event_data: Record<any, any>; } export declare class Timeseries { wallet: BaseWallet; tier: TierKeys; events: Record<number, TimeseriesEvent[]>; timeseries?: Record<number, number>; } export declare class NetworthStats { current_networth?: number; networth_difference?: number; percentage_difference?: number; } export declare class TimeseriesWithStats extends Timeseries { stats: NetworthStats; } export declare class RecipeData { key: string; name: string; chain: string; } export declare class ProtocolData { key: string; name: string; chains: string[]; image: string; url: string; recipes: Record<string, RecipeData[]>; integration_types: string[]; tags: string[]; description?: string; twitter_url?: string; telegram_url?: string; categories?: string[]; } export declare class ExtendedInformation { description?: string; categories?: string[]; url_learn_more?: string; } export declare class TokenChainWithDecimals extends TokenChain { decimals?: number; } export declare class ExtendedToken extends BaseToken { addresses: Record<ChainKeys, TokenChainWithDecimals>; extended_information?: ExtendedInformation; } export declare class PaginatedNFTCollection { response: NFTCollection[]; total: number; } export declare class WalletToken { token: BaseToken; wallet: BaseWallet; balance: string; usd_value?: string; } export declare class WalletTokenStats extends WalletToken { } export declare class SimpleToken { token_id: string; name: string; denom: string; image?: string; } export declare class TokenError { token: SimpleToken; chain: ChainKeys; } export declare class WalletTokens { stats: WalletToken[]; errors: TokenError[]; } export declare class AggregateWalletTokens extends WalletTokens { } export declare class ProtocolTimeseries { tier: string; tvl_timeseries?: Record<number, number>; chain_tvl_timeseries?: Record<string, Record<number, number>>; } export declare class TokenPriceTimeseries { tier: TierKeys; timeseries?: Record<number, number>; } export declare class TokenStats { market_cap: string; total_liquidity?: string; price_oracles?: string[]; last_24_hour_price?: string; last_24_hour_change?: string; last_24_hour_change_percentage?: string; last_7_day_price?: string; last_7_day_change?: string; last_7_day_change_percentage?: string; } export declare class TokenWithStats { token: ExtendedToken; stats: TokenStats; } export declare class PaginatedTokens { response: TokenWithStats[]; total: number; } export declare class APYStats { value?: string; type?: string; } export declare class TvlStatsTokens { token: BaseToken; amount: string; usd_value?: string; } export declare class TvlStats { usd_value: string; tokens: TvlStatsTokens[]; } export declare class BorrowStats { min_collateral_rate?: string; } export declare class AirdropStats { latest_round?: string; } export declare class ValidatorStats { name?: string; status?: string; address?: string; commission_percentage?: string; } export declare class StakingStats { staking_type?: string; validator?: ValidatorStats; } export declare class TokenApys { token: BaseToken; apr: string; } export declare class MultiplierStats { total_apy?: string; base_apy?: string; rewards_apr?: string; reward_apr_per_token?: TokenApys[]; sample_count?: string; variance_coefficient?: string; multiplier_deviation?: string; } export declare class ImpermanentLossStats { percentage?: string; value?: string; time_ago?: string; } export declare class RiskScoreStats { leverage_score?: string; impermanent_loss_score?: string; yield_outlook_score?: string; reward_token_score?: string; tvl_score?: string; global_score?: string; } export declare class IntegrationStats { breakdown: BaseToken[]; nft_breakdown: NFTCollection[]; apy?: APYStats; tvl?: TvlStats; borrow_stats?: BorrowStats; airdrop_stats?: AirdropStats; staking_stats?: StakingStats; multiplier_stats?: MultiplierStats; impermanent_loss_stats?: ImpermanentLossStats; risk_score_stats?: RiskScoreStats; } export declare class BaseIntegration { recipe_id: string; integration_id: string; chain: ChainKeys; stats: IntegrationStats; name: string; platform: string; type: string; address?: string; position_id?: string; } export declare class IntegrationTokenStats { token: BaseToken; wallet: BaseWallet; balance: string; balance_type: string; usd_value?: string; unlock_timestamp?: number; } export declare class IntegrationNFTStats { nft_collection: NFTCollection; wallet: BaseWallet; balance: string; balance_type: string; usd_value?: string; unlock_timestamp?: number; } export declare class WalletIntegrationBorrowStats { interest_rate?: string; leverage_rate?: string; debt_type?: DebtType; min_collateral_rate?: string; interest_rate_type?: AnnualReturnType; health_rate?: number; } export declare class WalletIntegrationAirdropStats { was_in_last_round: boolean; } export declare class WalletIntegrationOptionStats { option_type?: OptionType; expiration_timestamp?: number; strike_price?: string; base_asset_name?: string; } export declare class PartialToken { name: string; denom: string; } export declare class WalletIntegrationOrderBookStats { base_token?: BaseToken | PartialToken; quote_token?: BaseToken | PartialToken; order_type?: OrderType; limit_price?: string; order_creation_timestamp?: number; } export declare class WalletIntegrationApyStats extends APYStats { } export declare class WalletYieldStats { daily_base_rate?: number; daily_rewards_rate?: number; daily_yield?: number; } export declare class WalletIntegrationLabelStats { name?: string; } export declare class WalletIntegrationStats { borrow_stats?: WalletIntegrationBorrowStats; airdrop_stats?: WalletIntegrationAirdropStats; option_stats?: WalletIntegrationOptionStats; order_book_stats?: WalletIntegrationOrderBookStats; apy?: WalletIntegrationApyStats; yield_stats?: WalletYieldStats; integration_label?: WalletIntegrationLabelStats; } export declare class WalletIntegration { wallet: BaseWallet; integration: BaseIntegration; balances: IntegrationTokenStats[]; nft_balances: IntegrationNFTStats[]; wallet_stats?: WalletIntegrationStats; } export declare class Recipe { recipe_id: string; platform: string; type: string; } export declare class RecipeError { recipe: Recipe; chain: ChainKeys; } export declare class WalletIntegrations { stats: WalletIntegration[]; errors: RecipeError[]; } export declare class AggregateWalletIntegrations extends WalletIntegrations { } export declare class ProtocolStats { total_tvl: string; chain_tvl: Record<string, string>; created_date?: string; } export declare class ProtocolWithStats { protocol: ProtocolData; stats: ProtocolStats; } export declare class PaginatedProtocolWithStats { response: ProtocolWithStats[]; total: number; } export declare class WalletRequestSettings { ignore_cache: boolean; ignore_empty_wallet_cache: boolean; hide_nfts: Array<string>; hide_tokens: Array<string>; hide_recipes: Array<string>; hide_integrations: Array<string>; fetch_nfts: boolean; fetch_tokens: boolean; fetch_integrations: boolean; constructor(ignore_cache?: boolean, ignore_empty_wallet_cache?: boolean, hide_nfts?: Iterable<string>, hide_tokens?: Iterable<string>, hide_recipes?: Iterable<string>, hide_integrations?: Iterable<string>, fetch_nfts?: boolean, fetch_tokens?: boolean, fetch_integrations?: boolean); } export {};