@elizaos/plugin-social-alpha 2.0.3-beta.5 → 2.0.3-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/clients.d.ts +354 -0
  2. package/dist/clients.d.ts.map +1 -0
  3. package/dist/clients.js +670 -0
  4. package/dist/clients.js.map +1 -0
  5. package/dist/config.d.ts +144 -0
  6. package/dist/config.d.ts.map +1 -0
  7. package/dist/config.js +122 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/events.d.ts +5 -0
  10. package/dist/events.d.ts.map +1 -0
  11. package/dist/events.js +426 -0
  12. package/dist/events.js.map +1 -0
  13. package/dist/frontend/LeaderboardView.helpers.d.ts +6 -0
  14. package/dist/frontend/LeaderboardView.helpers.d.ts.map +1 -0
  15. package/dist/frontend/LeaderboardView.helpers.js +59 -0
  16. package/dist/frontend/LeaderboardView.helpers.js.map +1 -0
  17. package/dist/frontend/SocialAlphaSpatialView.d.ts +52 -0
  18. package/dist/frontend/SocialAlphaSpatialView.d.ts.map +1 -0
  19. package/dist/frontend/SocialAlphaSpatialView.js +72 -0
  20. package/dist/frontend/SocialAlphaSpatialView.js.map +1 -0
  21. package/dist/frontend/SocialAlphaView.d.ts +35 -0
  22. package/dist/frontend/SocialAlphaView.d.ts.map +1 -0
  23. package/dist/frontend/SocialAlphaView.js +125 -0
  24. package/dist/frontend/SocialAlphaView.js.map +1 -0
  25. package/dist/index.d.ts +24 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +73 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/mockPriceService.d.ts +22 -0
  30. package/dist/mockPriceService.d.ts.map +1 -0
  31. package/dist/mockPriceService.js +21 -0
  32. package/dist/mockPriceService.js.map +1 -0
  33. package/dist/providers/socialAlphaProvider.d.ts +15 -0
  34. package/dist/providers/socialAlphaProvider.d.ts.map +1 -0
  35. package/dist/providers/socialAlphaProvider.js +261 -0
  36. package/dist/providers/socialAlphaProvider.js.map +1 -0
  37. package/dist/register-terminal-view.d.ts +15 -0
  38. package/dist/register-terminal-view.d.ts.map +1 -0
  39. package/dist/register-terminal-view.js +21 -0
  40. package/dist/register-terminal-view.js.map +1 -0
  41. package/dist/register.d.ts +10 -0
  42. package/dist/register.d.ts.map +1 -0
  43. package/dist/register.js +5 -0
  44. package/dist/register.js.map +1 -0
  45. package/dist/reports.d.ts +57 -0
  46. package/dist/reports.d.ts.map +1 -0
  47. package/dist/reports.js +455 -0
  48. package/dist/reports.js.map +1 -0
  49. package/dist/routes.d.ts +3 -0
  50. package/dist/routes.d.ts.map +1 -0
  51. package/dist/routes.js +59 -0
  52. package/dist/routes.js.map +1 -0
  53. package/dist/schemas.d.ts +151 -0
  54. package/dist/schemas.d.ts.map +1 -0
  55. package/dist/schemas.js +258 -0
  56. package/dist/schemas.js.map +1 -0
  57. package/dist/service.d.ts +306 -0
  58. package/dist/service.d.ts.map +1 -0
  59. package/dist/service.js +3078 -0
  60. package/dist/service.js.map +1 -0
  61. package/dist/services/balancedTrustScoreCalculator.d.ts +61 -0
  62. package/dist/services/balancedTrustScoreCalculator.d.ts.map +1 -0
  63. package/dist/services/balancedTrustScoreCalculator.js +207 -0
  64. package/dist/services/balancedTrustScoreCalculator.js.map +1 -0
  65. package/dist/services/historicalPriceService.d.ts +59 -0
  66. package/dist/services/historicalPriceService.d.ts.map +1 -0
  67. package/dist/services/historicalPriceService.js +291 -0
  68. package/dist/services/historicalPriceService.js.map +1 -0
  69. package/dist/services/index.d.ts +12 -0
  70. package/dist/services/index.d.ts.map +1 -0
  71. package/dist/services/index.js +17 -0
  72. package/dist/services/index.js.map +1 -0
  73. package/dist/services/priceEnrichmentService.d.ts +109 -0
  74. package/dist/services/priceEnrichmentService.d.ts.map +1 -0
  75. package/dist/services/priceEnrichmentService.js +780 -0
  76. package/dist/services/priceEnrichmentService.js.map +1 -0
  77. package/dist/services/simulationActorsV2.d.ts +54 -0
  78. package/dist/services/simulationActorsV2.d.ts.map +1 -0
  79. package/dist/services/simulationActorsV2.js +362 -0
  80. package/dist/services/simulationActorsV2.js.map +1 -0
  81. package/dist/services/simulationRunner.d.ts +113 -0
  82. package/dist/services/simulationRunner.d.ts.map +1 -0
  83. package/dist/services/simulationRunner.js +771 -0
  84. package/dist/services/simulationRunner.js.map +1 -0
  85. package/dist/services/tokenSimulationService.d.ts +34 -0
  86. package/dist/services/tokenSimulationService.d.ts.map +1 -0
  87. package/dist/services/tokenSimulationService.js +297 -0
  88. package/dist/services/tokenSimulationService.js.map +1 -0
  89. package/dist/services/trustScoreOptimizer.d.ts +110 -0
  90. package/dist/services/trustScoreOptimizer.d.ts.map +1 -0
  91. package/dist/services/trustScoreOptimizer.js +635 -0
  92. package/dist/services/trustScoreOptimizer.js.map +1 -0
  93. package/dist/simulationActors.d.ts +35 -0
  94. package/dist/simulationActors.d.ts.map +1 -0
  95. package/dist/simulationActors.js +160 -0
  96. package/dist/simulationActors.js.map +1 -0
  97. package/dist/social-alpha-view-bundle.d.ts +2 -0
  98. package/dist/social-alpha-view-bundle.d.ts.map +1 -0
  99. package/dist/social-alpha-view-bundle.js +5 -0
  100. package/dist/social-alpha-view-bundle.js.map +1 -0
  101. package/dist/types.d.ts +937 -0
  102. package/dist/types.d.ts.map +1 -0
  103. package/dist/types.js +46 -0
  104. package/dist/types.js.map +1 -0
  105. package/dist/views/brand/background/clouds_background.jpg +0 -0
  106. package/dist/views/brand/banners/eliza_banner.svg +20 -0
  107. package/dist/views/brand/banners/elizacloud_banner.svg +20 -0
  108. package/dist/views/brand/banners/elizaos_banner.svg +20 -0
  109. package/dist/views/brand/concepts/billboard_concept_1200.jpg +0 -0
  110. package/dist/views/brand/concepts/chibi_usb_concept_900.jpg +0 -0
  111. package/dist/views/brand/concepts/concept_minipc_900.jpg +0 -0
  112. package/dist/views/brand/concepts/concept_phone_800.jpg +0 -0
  113. package/dist/views/brand/concepts/concept_usbdrive_900.jpg +0 -0
  114. package/dist/views/brand/favicons/android-chrome-192x192.png +0 -0
  115. package/dist/views/brand/favicons/android-chrome-512x512.png +0 -0
  116. package/dist/views/brand/favicons/apple-touch-icon.png +0 -0
  117. package/dist/views/brand/favicons/favicon-16x16.png +0 -0
  118. package/dist/views/brand/favicons/favicon-32x32.png +0 -0
  119. package/dist/views/brand/favicons/favicon.ico +0 -0
  120. package/dist/views/brand/favicons/favicon.svg +17 -0
  121. package/dist/views/brand/logos/elizaOS_text_black.svg +3 -0
  122. package/dist/views/brand/logos/elizaOS_text_white.svg +3 -0
  123. package/dist/views/brand/logos/eliza_logotext.svg +26 -0
  124. package/dist/views/brand/logos/eliza_logotext_black.svg +26 -0
  125. package/dist/views/brand/logos/eliza_text_black.svg +3 -0
  126. package/dist/views/brand/logos/eliza_text_white.svg +3 -0
  127. package/dist/views/brand/logos/elizacloud_logotext.svg +26 -0
  128. package/dist/views/brand/logos/elizacloud_logotext_black.svg +26 -0
  129. package/dist/views/brand/logos/elizacloud_text_black.svg +3 -0
  130. package/dist/views/brand/logos/elizacloud_text_white.svg +3 -0
  131. package/dist/views/brand/logos/elizaos_logotext.svg +26 -0
  132. package/dist/views/brand/logos/elizaos_logotext_black.svg +26 -0
  133. package/dist/views/brand/logos/logo_blue_blackbg.svg +18 -0
  134. package/dist/views/brand/logos/logo_blue_nobg.svg +17 -0
  135. package/dist/views/brand/logos/logo_orange_blackbg.svg +18 -0
  136. package/dist/views/brand/logos/logo_orange_nobg.svg +17 -0
  137. package/dist/views/brand/logos/logo_white_blackbg.svg +25 -0
  138. package/dist/views/brand/logos/logo_white_bluebg.svg +25 -0
  139. package/dist/views/brand/logos/logo_white_graybg.svg +18 -0
  140. package/dist/views/brand/logos/logo_white_nobg.svg +24 -0
  141. package/dist/views/brand/logos/logo_white_orangebg.svg +25 -0
  142. package/dist/views/brand/ogembeds/eliza_ogembed.png +0 -0
  143. package/dist/views/brand/ogembeds/eliza_ogembed.svg +20 -0
  144. package/dist/views/brand/ogembeds/elizacloud_ogembed.png +0 -0
  145. package/dist/views/brand/ogembeds/elizacloud_ogembed.svg +20 -0
  146. package/dist/views/brand/ogembeds/elizaos_ogembed.png +0 -0
  147. package/dist/views/brand/ogembeds/elizaos_ogembed.svg +20 -0
  148. package/dist/views/bundle.js +268 -0
  149. package/dist/views/bundle.js.map +1 -0
  150. package/dist/views/site.webmanifest +19 -0
  151. package/package.json +5 -5
@@ -0,0 +1,354 @@
1
+ import type { IAgentRuntime } from "@elizaos/core";
2
+ import type { DexScreenerData, DexScreenerPair, HolderData, Prices, TokenOverview, TokenSecurityData, TokenTradeData, WalletPortfolio } from "./types";
3
+ /**
4
+ * Represents the valid types that can be used for query parameters in a URL.
5
+ * It can either be a key-value pair object with string, number, boolean, null or undefined values,
6
+ * or an instance of the URLSearchParams class.
7
+ */
8
+ type QueryParams = Record<string, string | number | boolean | null | undefined> | URLSearchParams;
9
+ /**
10
+ * Interface representing retry options for a retry mechanism.
11
+ * @typedef {Object} RetryOptions
12
+ * @property {number} [maxRetries] - The maximum number of retries allowed.
13
+ * @property {number} [initialDelay] - The initial delay in milliseconds before the first retry.
14
+ * @property {number} [maxDelay] - The maximum delay in milliseconds between retries.
15
+ * @property {number} [backoffFactor] - The factor by which the delay increases between retries.
16
+ * @property {number[]} [retryableStatuses] - The array of HTTP status codes that are retryable.
17
+ */
18
+ interface RetryOptions {
19
+ maxRetries?: number;
20
+ initialDelay?: number;
21
+ maxDelay?: number;
22
+ backoffFactor?: number;
23
+ retryableStatuses?: number[];
24
+ }
25
+ /**
26
+ * Interface for defining options that can be passed in a request.
27
+ * @template RequestOptions
28
+ * @property {RetryOptions} [retryOptions] - Options for retrying the request
29
+ * @property {QueryParams} [params] - Query parameters for the request
30
+ */
31
+ interface RequestOptions extends RequestInit {
32
+ retryOptions?: RetryOptions;
33
+ params?: QueryParams;
34
+ }
35
+ /**
36
+ * HTTP utility functions for making requests and handling responses.
37
+ * @namespace http
38
+ */
39
+ export declare const http: {
40
+ request(url: string, options?: RequestOptions): Promise<Response>;
41
+ json<T = unknown>(url: string, options?: RequestOptions): Promise<T>;
42
+ get: {
43
+ request(url: string, params?: QueryParams, options?: RequestInit): Promise<Response>;
44
+ json<T = unknown>(url: string, params?: QueryParams, options?: RequestInit): Promise<T>;
45
+ };
46
+ post: {
47
+ request(url: string, body: object, options?: RequestOptions): Promise<Response>;
48
+ json<ReturnType = unknown, Body extends object = object>(url: string, body: Body, options?: RequestOptions): Promise<ReturnType>;
49
+ };
50
+ jsonrpc<_ReturnType = unknown, Params extends object = object>(url: string, method: string, params: Params, headers?: HeadersInit): Promise<_ReturnType>;
51
+ graphql<_ReturnType = unknown, Variables extends object = object>(url: string, query: string, variables: Variables, headers?: HeadersInit): Promise<_ReturnType>;
52
+ };
53
+ /**
54
+ * Options for Dexscreener.
55
+ * @typedef {Object} DexscreenerOptions
56
+ * @property {string|CacheOptions["expires"]} [expires] - The expiration time for the cache.
57
+ */
58
+ type DexscreenerOptions = {
59
+ expires?: string;
60
+ };
61
+ /**
62
+ * Client for interacting with DexScreener API.
63
+ */
64
+ export declare class DexscreenerClient {
65
+ private runtime;
66
+ /**
67
+ * Constructor for the class.
68
+ * @param {IAgentRuntime} runtime - The runtime passed as a parameter to the constructor.
69
+ */
70
+ constructor(runtime: IAgentRuntime);
71
+ /**
72
+ * Create a new DexscreenerClient instance using the provided agent runtime.
73
+ *
74
+ * @param {IAgentRuntime} runtime - The agent runtime to use for creating the DexscreenerClient instance.
75
+ * @returns {DexscreenerClient} A new instance of DexscreenerClient.
76
+ */
77
+ static createFromRuntime(runtime: IAgentRuntime): DexscreenerClient;
78
+ /**
79
+ * Makes an asynchronous HTTP request to the DexScreener API.
80
+ *
81
+ * @template T - The type of data expected to be returned
82
+ * @param {string} path - The endpoint path for the API request
83
+ * @param {QueryParams} [params] - Optional query parameters for the request
84
+ * @param {DexscreenerOptions} [options] - Optional options for the request
85
+ * @returns {Promise<T>} - A promise that resolves with the data returned from the API
86
+ */
87
+ request<T = unknown>(path: string, params?: QueryParams, options?: DexscreenerOptions): Promise<T>;
88
+ /**
89
+ * Asynchronously searches for DexScreener data based on the provided address.
90
+ *
91
+ * @param {string} address - The address to search for in DexScreener data.
92
+ * @param {DexscreenerOptions} [options] - Optional parameters for the request.
93
+ * @returns {Promise<DexScreenerData>} A promise that resolves with the DexScreener data.
94
+ */
95
+ search(address: string, options?: DexscreenerOptions): Promise<DexScreenerData>;
96
+ /**
97
+ * Asynchronously searches for the pair with the highest liquidity based on the given address.
98
+ *
99
+ * @param {string} address The address to search for liquidity pairs from.
100
+ * @param {string} [chain] The chain ID to filter the liquidity pairs by.
101
+ * @param {DexscreenerOptions} [options] Additional options for searching.
102
+ * @returns {Promise<DexScreenerPair | null>} The pair with the highest liquidity, or null if no pairs were found.
103
+ */
104
+ searchForHighestLiquidityPair(address: string, chain?: string, options?: DexscreenerOptions): Promise<DexScreenerPair | null>;
105
+ }
106
+ /**
107
+ * Represents a client for interacting with the Helius API.
108
+ */
109
+ export declare class HeliusClient {
110
+ private readonly apiKey;
111
+ private runtime;
112
+ /**
113
+ * Constructor for initializing an instance of class.
114
+ *
115
+ * @param apiKey - The API key to be used for authentication.
116
+ * @param _runtime - The runtime environment for the agent.
117
+ */
118
+ constructor(apiKey: string, runtime: IAgentRuntime);
119
+ /**
120
+ * Creates a new HeliusClient instance using the provided IAgentRuntime.
121
+ *
122
+ * @param {IAgentRuntime} runtime - The IAgentRuntime to use for creating the HeliusClient.
123
+ * @returns {HeliusClient} A new instance of HeliusClient.
124
+ * @throws {Error} Thrown if HELIUS_API_KEY is missing from the runtime settings.
125
+ */
126
+ static createFromRuntime(runtime: IAgentRuntime): HeliusClient;
127
+ /**
128
+ * Fetches the list of token holders for a given address asynchronously.
129
+ * If the option `expires` is provided and there is a cached version available, it returns the cached data.
130
+ * Otherwise, it fetches the data from the Helius API using the provided address.
131
+ *
132
+ * @param {string} address - The address for which to fetch the list of token holders.
133
+ * @param {Object} [options] - Optional parameters.
134
+ * @param {string | CacheOptions["expires"]} [options.expires] - The expiration date for caching the data.
135
+ *
136
+ * @returns {Promise<HolderData[]>} A promise that resolves to an array of HolderData objects representing the token holders.
137
+ */
138
+ fetchHolderList(address: string, options?: {
139
+ expires?: string;
140
+ }): Promise<HolderData[]>;
141
+ }
142
+ /**
143
+ * Options for Coingecko API.
144
+ * @typedef {Object} CoingeckoOptions
145
+ * @property {string | CacheOptions["expires"]} [expires] - The expiration date for the cache.
146
+ */
147
+ type CoingeckoOptions = {
148
+ expires?: string;
149
+ };
150
+ /**
151
+ * CoingeckoClient class for interacting with the Coingecko API.
152
+ * @constructor
153
+ * @param { string } apiKey - The API key required for accessing the Coingecko API.
154
+ * @param { IAgentRuntime } runtime - The IAgentRuntime object for accessing runtime settings.
155
+ */
156
+ export declare class CoingeckoClient {
157
+ private readonly apiKey;
158
+ private readonly runtime;
159
+ /**
160
+ * Constructor for initializing a new instance of the class.
161
+ * @param apiKey The API key used for authentication.
162
+ * @param runtime The agent runtime implementation.
163
+ */
164
+ constructor(apiKey: string, runtime: IAgentRuntime);
165
+ /**
166
+ * Creates a new instance of CoingeckoClient using the apiKey retrieved from the provided runtime.
167
+ * @param {IAgentRuntime} runtime - The runtime object that contains the COINGECKO_API_KEY setting.
168
+ * @throws {Error} If COINGECKO_API_KEY setting is missing in the runtime object.
169
+ * @returns {CoingeckoClient} A new instance of CoingeckoClient initialized with the apiKey and runtime.
170
+ */
171
+ static createFromRuntime(runtime: IAgentRuntime): CoingeckoClient;
172
+ /**
173
+ * Makes an asynchronous HTTP request to the Coingecko API.
174
+ * @template T
175
+ * @param {string} path - The API endpoint to call.
176
+ * @param {QueryParams} [params] - Optional query parameters to include in the request.
177
+ * @param {CoingeckoOptions} [options] - Additional options for the request.
178
+ * @returns {Promise<T>} The response data from the API.
179
+ */
180
+ request<T = unknown>(path: string, params?: QueryParams, options?: CoingeckoOptions): Promise<T>;
181
+ /**
182
+ * Fetches prices for specified cryptocurrencies from the Coingecko API.
183
+ *
184
+ * @param {CoingeckoOptions} [options] The options for the Coingecko API request.
185
+ * @returns {Promise<Prices>} A Promise that resolves to the prices of the specified cryptocurrencies.
186
+ */
187
+ fetchPrices(options?: CoingeckoOptions): Promise<Prices>;
188
+ /**
189
+ * Asynchronously fetches global data.
190
+ *
191
+ * @returns {Promise} The promise containing the global data.
192
+ */
193
+ fetchGlobal(): Promise<unknown>;
194
+ /**
195
+ * Asynchronously fetches a list of coin categories.
196
+ * @returns {Promise} The Promise object representing the result of the fetch operation.
197
+ */
198
+ fetchCategories(): Promise<unknown>;
199
+ }
200
+ /**
201
+ * Represents an item in a wallet token list with details such as address, name, symbol, decimals, balance, UI amount, chain ID, logo URI, price in USD, and value in USD.
202
+ * @typedef {Object} WalletTokenListItem
203
+ * @property {string} address - The address of the token
204
+ * @property {string} name - The name of the token
205
+ * @property {string} symbol - The symbol of the token
206
+ * @property {number} decimals - The decimals of the token
207
+ * @property {number} balance - The balance of the token
208
+ * @property {number} uiAmount - The UI amount of the token
209
+ * @property {string} chainId - The chain ID of the token
210
+ * @property {string} logoURI - The logo URI of the token
211
+ * @property {number} priceUsd - The price of the token in USD
212
+ * @property {number} valueUsd - The value of the token in USD
213
+ */
214
+ type WalletTokenListItem = {
215
+ address: string;
216
+ name: string;
217
+ symbol: string;
218
+ decimals: number;
219
+ balance: number;
220
+ uiAmount: number;
221
+ chainId: string;
222
+ logoURI: string;
223
+ priceUsd: number;
224
+ valueUsd: number;
225
+ };
226
+ /**
227
+ * Defines the structure of a WalletTokenList object, which includes the wallet name, total USD balance,
228
+ * and an array of WalletTokenListItem objects.
229
+ */
230
+ type WalletTokenList = {
231
+ wallet: string;
232
+ totalUsd: number;
233
+ items: WalletTokenListItem[];
234
+ };
235
+ /**
236
+ * Represents a type that can either be "solana" or "ethereum" for the BirdeyeXChain.
237
+ */
238
+ type BirdeyeXChain = "solana" | "ethereum";
239
+ /**
240
+ * Type representing headers for BirdeyeClient.
241
+ * @typedef {Object} BirdeyeClientHeaders
242
+ * @property {BirdeyeXChain} ["x-chain"] - Optional header for BirdeyeXChain.
243
+ */
244
+ type BirdeyeClientHeaders = {
245
+ "x-chain"?: BirdeyeXChain;
246
+ };
247
+ /**
248
+ * Options for making a Birdeye API request.
249
+ * @typedef {Object} BirdeyeRequestOptions
250
+ * @property {BirdeyeXChain} [chain] - The BirdeyeX chain.
251
+ * @property {string | CacheOptions["expires"]} [expires] - The expiration date for the request.
252
+ */
253
+ type BirdeyeRequestOptions = {
254
+ chain?: BirdeyeXChain;
255
+ expires?: string;
256
+ };
257
+ /**
258
+ * Class representing a client for interacting with the BirdEye API.
259
+ */
260
+ export declare class BirdeyeClient {
261
+ private readonly apiKey;
262
+ static readonly url = "https://public-api.birdeye.so/";
263
+ private runtime;
264
+ /**
265
+ * Send a request to the Birdeye API using the provided API key, path, query parameters, and headers.
266
+ *
267
+ * @param {string} apiKey - The API key for authenticating the request.
268
+ * @param {string} path - The endpoint path to send the request to.
269
+ * @param {QueryParams} [params] - Optional query parameters to include in the request.
270
+ * @param {BirdeyeClientHeaders} [headers] - Optional additional headers to include in the request.
271
+ * @returns {Promise<T>} A Promise that resolves with the data received from the API request.
272
+ */
273
+ static request<T = unknown>(apiKey: string, path: string, params?: QueryParams, headers?: BirdeyeClientHeaders): Promise<T>;
274
+ /**
275
+ * Constructor for initializing a new instance.
276
+ *
277
+ * @param apiKey The API key to be used.
278
+ * @param runtime The agent runtime for handling communication with the runtime environment.
279
+ */
280
+ constructor(apiKey: string, runtime: IAgentRuntime);
281
+ /**
282
+ * Create a new BirdeyeClient instance using the provided IAgentRuntime object.
283
+ *
284
+ * @param {IAgentRuntime} runtime - The IAgentRuntime object that provides access to runtime settings.
285
+ * @returns {BirdeyeClient} A new instance of BirdeyeClient initialized with the provided API key and runtime.
286
+ * @throws {Error} Thrown if the BIRDEYE_API_KEY setting is missing in the runtime object.
287
+ */
288
+ static createFromRuntime(runtime: IAgentRuntime): BirdeyeClient;
289
+ /**
290
+ * Performs a request to the specified path with given query parameters and options.
291
+ * @template T
292
+ * @param {string} path - The path to request.
293
+ * @param {QueryParams} params - The query parameters to include in the request.
294
+ * @param {BirdeyeRequestOptions} [options] - Optional request options.
295
+ * @param {boolean} [forceRefresh] - Flag to force refresh the cache.
296
+ * @returns {Promise<T>} The response data from the request.
297
+ */
298
+ request<T = unknown>(path: string, params: QueryParams, options?: BirdeyeRequestOptions, forceRefresh?: boolean): Promise<T>;
299
+ /**
300
+ * Fetches the price for a given address.
301
+ *
302
+ * @param {string} address - The address for which to fetch the price.
303
+ * @param {BirdeyeRequestOptions} [options] - The options for the Birdeye request.
304
+ * @returns {Promise<number>} The price value fetched for the given address.
305
+ */
306
+ fetchPrice(address: string, options?: BirdeyeRequestOptions): Promise<number>;
307
+ /**
308
+ * Fetches the latest prices for Bitcoin, Ethereum, and Solana in USD from the DeFi API.
309
+ * @returns {Promise<Prices>} The latest prices for Bitcoin, Ethereum, and Solana in USD.
310
+ */
311
+ fetchPrices(): Promise<Prices>;
312
+ /**
313
+ * Fetches token overview for a specific address.
314
+ *
315
+ * @param {string} address The address of the token for which overview is to be fetched.
316
+ * @param {BirdeyeRequestOptions} [options] Additional options for the Birdeye request.
317
+ * @param {boolean} [forceRefresh=false] Flag to force refresh the data.
318
+ * @returns {Promise<TokenOverview>} Promise that resolves to the token overview.
319
+ */
320
+ fetchTokenOverview(address: string, options?: BirdeyeRequestOptions, forceRefresh?: boolean): Promise<TokenOverview>;
321
+ /**
322
+ * Fetches token security data from the API for a given address.
323
+ * @param {string} address - The address of the token for which to fetch security data.
324
+ * @param {BirdeyeRequestOptions} [options] - Optional request options.
325
+ * @returns {Promise<TokenSecurityData>} A promise that resolves with the token security data.
326
+ */
327
+ fetchTokenSecurity(address: string, options?: BirdeyeRequestOptions): Promise<TokenSecurityData>;
328
+ /**
329
+ * Fetches token trade data for a specific address.
330
+ * @param {string} address - The address of the token.
331
+ * @param {BirdeyeRequestOptions} [options] - Optional request options.
332
+ * @returns {Promise<TokenTradeData>} - A promise that resolves with the token trade data.
333
+ */
334
+ fetchTokenTradeData(address: string, options?: BirdeyeRequestOptions): Promise<TokenTradeData>;
335
+ /**
336
+ * Fetches the wallet token list for a given address.
337
+ *
338
+ * @param {string} address - The address of the wallet to fetch the token list for.
339
+ * @param {BirdeyeRequestOptions} [options] - Additional options for the request.
340
+ * @returns {Promise<WalletTokenList>} The wallet token list for the specified address.
341
+ */
342
+ fetchWalletTokenList(address: string, options?: BirdeyeRequestOptions): Promise<WalletTokenList>;
343
+ /**
344
+ * Asynchronously fetches the portfolio value for a given address.
345
+ *
346
+ * @param {string} address - The address for which to fetch the portfolio value.
347
+ * @param {BirdeyeRequestOptions} [options] - The optional request options.
348
+ * @returns {Promise<WalletPortfolio>} - A promise that resolves to the wallet portfolio object containing total USD, total SOL, and portfolio items.
349
+ * @throws {Error} - If an error occurs while fetching the portfolio value.
350
+ */
351
+ fetchPortfolioValue(address: string, options?: BirdeyeRequestOptions): Promise<WalletPortfolio>;
352
+ }
353
+ export {};
354
+ //# sourceMappingURL=clients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,UAAU,EACV,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,eAAe,EAEf,MAAM,SAAS,CAAC;AASjB;;;;GAIG;AACH,KAAK,WAAW,GACb,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAC5D,eAAe,CAAC;AAmBnB;;;;;;;;GAQG;AACH,UAAU,YAAY;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,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