@covalenthq/client-sdk 0.4.2 → 0.5.2

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 (73) hide show
  1. package/README.md +62 -40
  2. package/dist/cjs/index.js +956 -239
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/services/BalanceService.d.ts +100 -0
  5. package/dist/cjs/services/BaseService.d.ts +17 -0
  6. package/dist/cjs/services/CovalentClient.d.ts +3 -3
  7. package/dist/cjs/services/NftService.d.ts +137 -1
  8. package/dist/cjs/services/SecurityService.d.ts +62 -0
  9. package/dist/cjs/services/TransactionService.d.ts +65 -0
  10. package/dist/cjs/services/XykService.d.ts +4 -0
  11. package/dist/cjs/util/types/BalanceServiceTypes.d.ts +38 -0
  12. package/dist/cjs/util/types/BaseServiceTypes.d.ts +16 -0
  13. package/dist/cjs/util/types/NftServiceTypes.d.ts +76 -0
  14. package/dist/cjs/util/types/SecurityServiceTypes.d.ts +50 -0
  15. package/dist/cjs/util/types/TransactionServiceTypes.d.ts +27 -0
  16. package/dist/es/index.js +956 -239
  17. package/dist/es/index.js.map +1 -1
  18. package/dist/es/services/BalanceService.d.ts +100 -0
  19. package/dist/es/services/BaseService.d.ts +17 -0
  20. package/dist/es/services/CovalentClient.d.ts +3 -3
  21. package/dist/es/services/NftService.d.ts +137 -1
  22. package/dist/es/services/SecurityService.d.ts +62 -0
  23. package/dist/es/services/TransactionService.d.ts +65 -0
  24. package/dist/es/services/XykService.d.ts +4 -0
  25. package/dist/es/util/types/BalanceServiceTypes.d.ts +38 -0
  26. package/dist/es/util/types/BaseServiceTypes.d.ts +16 -0
  27. package/dist/es/util/types/NftServiceTypes.d.ts +76 -0
  28. package/dist/es/util/types/SecurityServiceTypes.d.ts +50 -0
  29. package/dist/es/util/types/TransactionServiceTypes.d.ts +27 -0
  30. package/dist/esm/index.js +956 -239
  31. package/dist/esm/index.js.map +1 -1
  32. package/dist/esm/services/BalanceService.d.ts +100 -0
  33. package/dist/esm/services/BaseService.d.ts +17 -0
  34. package/dist/esm/services/CovalentClient.d.ts +3 -3
  35. package/dist/esm/services/NftService.d.ts +137 -1
  36. package/dist/esm/services/SecurityService.d.ts +62 -0
  37. package/dist/esm/services/TransactionService.d.ts +65 -0
  38. package/dist/esm/services/XykService.d.ts +4 -0
  39. package/dist/esm/util/types/BalanceServiceTypes.d.ts +38 -0
  40. package/dist/esm/util/types/BaseServiceTypes.d.ts +16 -0
  41. package/dist/esm/util/types/NftServiceTypes.d.ts +76 -0
  42. package/dist/esm/util/types/SecurityServiceTypes.d.ts +50 -0
  43. package/dist/esm/util/types/TransactionServiceTypes.d.ts +27 -0
  44. package/dist/services/BalanceService.d.ts +100 -0
  45. package/dist/services/BalanceService.js +193 -6
  46. package/dist/services/BalanceService.js.map +1 -1
  47. package/dist/services/BaseService.d.ts +17 -0
  48. package/dist/services/BaseService.js +23 -12
  49. package/dist/services/BaseService.js.map +1 -1
  50. package/dist/services/CovalentClient.d.ts +3 -3
  51. package/dist/services/CovalentClient.js +1 -1
  52. package/dist/services/NftService.d.ts +137 -1
  53. package/dist/services/NftService.js +294 -16
  54. package/dist/services/NftService.js.map +1 -1
  55. package/dist/services/PricingService.js +2 -2
  56. package/dist/services/PricingService.js.map +1 -1
  57. package/dist/services/SecurityService.d.ts +62 -0
  58. package/dist/services/SecurityService.js +103 -2
  59. package/dist/services/SecurityService.js.map +1 -1
  60. package/dist/services/TransactionService.d.ts +65 -0
  61. package/dist/services/TransactionService.js +116 -7
  62. package/dist/services/TransactionService.js.map +1 -1
  63. package/dist/services/XykService.d.ts +4 -0
  64. package/dist/services/XykService.js +34 -28
  65. package/dist/services/XykService.js.map +1 -1
  66. package/dist/util/ApiHelpers.js +1 -1
  67. package/dist/util/ApiHelpers.js.map +1 -1
  68. package/dist/util/types/BalanceServiceTypes.d.ts +38 -0
  69. package/dist/util/types/BaseServiceTypes.d.ts +16 -0
  70. package/dist/util/types/NftServiceTypes.d.ts +76 -0
  71. package/dist/util/types/SecurityServiceTypes.d.ts +50 -0
  72. package/dist/util/types/TransactionServiceTypes.d.ts +27 -0
  73. package/package.json +2 -1
@@ -137,6 +137,23 @@ declare class OhlcItem {
137
137
  pretty_quote: string;
138
138
  constructor(data: OhlcItem);
139
139
  }
140
+ declare class Erc20TransfersResponse {
141
+ /** * The requested address. */
142
+ address: string;
143
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
144
+ updated_at: Date;
145
+ /** * The requested quote currency eg: `USD`. */
146
+ quote_currency: string;
147
+ /** * The requested chain ID eg: `1`. */
148
+ chain_id: number;
149
+ /** * The requested chain name eg: `eth-mainnet`. */
150
+ chain_name: string;
151
+ /** * List of response items. */
152
+ items: BlockTransactionWithContractTransfers[];
153
+ /** * Pagination metadata. */
154
+ pagination: Pagination;
155
+ constructor(data: Erc20TransfersResponse);
156
+ }
140
157
  declare class BlockTransactionWithContractTransfers {
141
158
  /** * The block signed timestamp in UTC. */
142
159
  block_signed_at: Date;
@@ -178,6 +195,17 @@ declare class BlockTransactionWithContractTransfers {
178
195
  transfers: TokenTransferItem[];
179
196
  constructor(data: BlockTransactionWithContractTransfers);
180
197
  }
198
+ declare class Pagination {
199
+ /** * True is there is another page. */
200
+ has_more: boolean;
201
+ /** * The requested page number. */
202
+ page_number: number;
203
+ /** * The requested number of items on the current page. */
204
+ page_size: number;
205
+ /** * The total number of items across all pages for this request. */
206
+ total_count: number;
207
+ constructor(data: Pagination);
208
+ }
181
209
  declare class TokenTransferItem {
182
210
  /** * The block signed timestamp in UTC. */
183
211
  block_signed_at: Date;
@@ -300,6 +328,46 @@ declare class HistoricalBalanceItem {
300
328
  nft_data: NftData[];
301
329
  constructor(data: HistoricalBalanceItem);
302
330
  }
331
+ declare class TokenBalanceNativeResponse {
332
+ /** * The requested address. */
333
+ address: string;
334
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
335
+ updated_at: Date;
336
+ /** * The requested quote currency eg: `USD`. */
337
+ quote_currency: string;
338
+ /** * The requested chain ID eg: `1`. */
339
+ chain_id: number;
340
+ /** * The requested chain name eg: `eth-mainnet`. */
341
+ chain_name: string;
342
+ /** * List of response items. */
343
+ items: NativeBalanceItem[];
344
+ constructor(data: TokenBalanceNativeResponse);
345
+ }
346
+ declare class NativeBalanceItem {
347
+ /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
348
+ contract_decimals: number;
349
+ /** * The string returned by the `name()` method. */
350
+ contract_name: string;
351
+ /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
352
+ contract_ticker_symbol: string;
353
+ /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
354
+ contract_address: string;
355
+ /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
356
+ supports_erc: string;
357
+ /** * The contract logo URL. */
358
+ logo_url: string;
359
+ /** * The height of the block. */
360
+ block_height: number;
361
+ /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
362
+ balance: bigint | null;
363
+ /** * The exchange rate for the requested quote currency. */
364
+ quote_rate: number;
365
+ /** * The current balance converted to fiat in `quote-currency`. */
366
+ quote: number;
367
+ /** * A prettier version of the quote for rendering purposes. */
368
+ pretty_quote: string;
369
+ constructor(data: NativeBalanceItem);
370
+ }
303
371
  export interface GetTokenBalancesForWalletAddressQueryParamOpts {
304
372
  /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
305
373
  quoteCurrency?: Quote;
@@ -356,6 +424,12 @@ export interface GetHistoricalTokenBalancesForWalletAddressQueryParamOpts {
356
424
  /** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */
357
425
  date?: number;
358
426
  }
427
+ export interface GetNativeTokenBalanceQueryParamOpts {
428
+ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
429
+ quoteCurrency?: Quote;
430
+ /** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
431
+ blockHeight?: number;
432
+ }
359
433
  /**
360
434
  * Balances APIs
361
435
  *
@@ -409,6 +483,22 @@ export declare class BalanceService {
409
483
  *
410
484
  */
411
485
  getErc20TransfersForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
486
+ /**
487
+ *
488
+ * Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
489
+ *
490
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
491
+ * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
492
+ * @param {GetErc20TransfersForWalletAddressQueryParamOpts} queryParamOpts
493
+ * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
494
+ * - `contractAddress`: The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
495
+ * - `startingBlock`: The block height to start from, defaults to `0`.
496
+ * - `endingBlock`: The block height to end at, defaults to current block height.
497
+ * - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
498
+ * - `pageNumber`: 0-indexed page number to begin pagination.
499
+ *
500
+ */
501
+ getErc20TransfersForWalletAddressByPage(chainName: Chain, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
412
502
  /**
413
503
  *
414
504
  * Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to `latest`). Useful for building pie charts of token holders.
@@ -439,5 +529,15 @@ export declare class BalanceService {
439
529
  *
440
530
  */
441
531
  getHistoricalTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
532
+ /**
533
+ *
534
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
535
+ * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
536
+ * @param {GetNativeTokenBalanceQueryParamOpts} queryParamOpts
537
+ * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
538
+ * - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
539
+ *
540
+ */
541
+ getNativeTokenBalance(chainName: Chain, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
442
542
  }
443
543
  export {};
@@ -148,12 +148,29 @@ declare class ChainItem {
148
148
  black_logo_url: string;
149
149
  /** * A white png logo url for the chain. */
150
150
  white_logo_url: string;
151
+ /** * The color theme for the chain. */
152
+ color_theme: ColorTheme;
151
153
  /** * True if the chain is an AppChain. */
152
154
  is_appchain: boolean;
153
155
  /** * The ChainItem the appchain is a part of. */
154
156
  appchain_of: ChainItem;
155
157
  constructor(data: ChainItem);
156
158
  }
159
+ declare class ColorTheme {
160
+ /** * The red color code. */
161
+ red: number;
162
+ /** * The green color code. */
163
+ green: number;
164
+ /** * The blue color code. */
165
+ blue: number;
166
+ /** * The alpha color code. */
167
+ alpha: number;
168
+ /** * The hexadecimal color code. */
169
+ hex: string;
170
+ /** * The color represented in css rgb() functional notation. */
171
+ css_rgb: string;
172
+ constructor(data: ColorTheme);
173
+ }
157
174
  declare class AllChainsStatusResponse {
158
175
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
159
176
  updated_at: Date;
@@ -5,7 +5,7 @@ import { NftService } from "./NftService";
5
5
  import { PricingService } from "./PricingService";
6
6
  import { TransactionService } from "./TransactionService";
7
7
  import { XykService } from "./XykService";
8
- export type Chain = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet";
8
+ export type Chain = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet" | "taiko-jolnir-testnet" | "optimism-sepolia" | "bnb-opbnb-mainnet" | "telos-mainnet" | "telos-testnet";
9
9
  export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
10
10
  /**
11
11
  * @deprecated
@@ -13,7 +13,7 @@ export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY
13
13
  * @see #Chain
14
14
  * CovalentClient Class
15
15
  */
16
- export type Chains = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet";
16
+ export type Chains = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet" | "taiko-jolnir-testnet" | "optimism-sepolia" | "bnb-opbnb-mainnet" | "telos-mainnet" | "telos-testnet";
17
17
  /**
18
18
  * @deprecated
19
19
  * Please use {@link Quote} going forward! This type will be removed after Oct 31, 2023.
@@ -21,7 +21,7 @@ export type Chains = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-main
21
21
  * CovalentClient Class
22
22
  */
23
23
  export type Quotes = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
24
- export declare const userAgent = "com.covalenthq.sdk.typescript/0.4.2";
24
+ export declare const userAgent = "com.covalenthq.sdk.typescript/0.5.2";
25
25
  export declare class Response<T> {
26
26
  data: T;
27
27
  error: boolean;
@@ -1,4 +1,4 @@
1
- import { Chain, Response } from "./CovalentClient";
1
+ import { Chain, Quote, Response } from "./CovalentClient";
2
2
  declare class ChainCollectionItem {
3
3
  /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
4
4
  contract_address: string;
@@ -315,6 +315,88 @@ declare class NftOwnershipForCollectionItem {
315
315
  nft_data: NftData;
316
316
  constructor(data: NftOwnershipForCollectionItem);
317
317
  }
318
+ declare class NftMarketSaleCountResponse {
319
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
320
+ updated_at: Date;
321
+ /** * The requested address. */
322
+ address: string;
323
+ /** * The requested quote currency eg: `USD`. */
324
+ quote_currency: string;
325
+ /** * The requested chain name eg: `eth-mainnet`. */
326
+ chain_name: string;
327
+ /** * The requested chain ID eg: `1`. */
328
+ chain_id: number;
329
+ /** * List of response items. */
330
+ items: MarketSaleCountItem[];
331
+ constructor(data: NftMarketSaleCountResponse);
332
+ }
333
+ declare class MarketSaleCountItem {
334
+ /** * The timestamp of the date of sale. */
335
+ date: Date;
336
+ /** * The total amount of sales for the current day. */
337
+ sale_count: number;
338
+ constructor(data: MarketSaleCountItem);
339
+ }
340
+ declare class NftMarketVolumeResponse {
341
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
342
+ updated_at: Date;
343
+ /** * The requested address. */
344
+ address: string;
345
+ /** * The requested quote currency eg: `USD`. */
346
+ quote_currency: string;
347
+ /** * The requested chain name eg: `eth-mainnet`. */
348
+ chain_name: string;
349
+ /** * The requested chain ID eg: `1`. */
350
+ chain_id: number;
351
+ /** * List of response items. */
352
+ items: MarketVolumeItem[];
353
+ constructor(data: NftMarketVolumeResponse);
354
+ }
355
+ declare class MarketVolumeItem {
356
+ /** * The timestamp of the date of sale. */
357
+ date: Date;
358
+ /** * The ticker symbol for the native currency. */
359
+ native_ticker_symbol: string;
360
+ /** * The contract name of the native currency. */
361
+ native_name: string;
362
+ /** * The current volume converted to fiat in `quote-currency`. */
363
+ volume_quote: number;
364
+ /** * The current volume in native currency. */
365
+ volume_native_quote: number;
366
+ /** * A prettier version of the volume quote for rendering purposes. */
367
+ pretty_volume_quote: string;
368
+ constructor(data: MarketVolumeItem);
369
+ }
370
+ declare class NftMarketFloorPriceResponse {
371
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
372
+ updated_at: Date;
373
+ /** * The requested address. */
374
+ address: string;
375
+ /** * The requested quote currency eg: `USD`. */
376
+ quote_currency: string;
377
+ /** * The requested chain name eg: `eth-mainnet`. */
378
+ chain_name: string;
379
+ /** * The requested chain ID eg: `1`. */
380
+ chain_id: number;
381
+ /** * List of response items. */
382
+ items: MarketFloorPriceItem[];
383
+ constructor(data: NftMarketFloorPriceResponse);
384
+ }
385
+ declare class MarketFloorPriceItem {
386
+ /** * The timestamp of the date of sale. */
387
+ date: Date;
388
+ /** * The ticker symbol for the native currency. */
389
+ native_ticker_symbol: string;
390
+ /** * The contract name of the native currency. */
391
+ native_name: string;
392
+ /** * The current floor price in native currency. */
393
+ floor_price_native_quote: number;
394
+ /** * The current floor price converted to fiat in `quote-currency`. */
395
+ floor_price_quote: number;
396
+ /** * A prettier version of the floor price quote for rendering purposes. */
397
+ pretty_floor_price_quote: string;
398
+ constructor(data: MarketFloorPriceItem);
399
+ }
318
400
  export interface GetChainCollectionsQueryParamOpts {
319
401
  /** * Number of items per page. Omitting this parameter defaults to 100. */
320
402
  pageSize?: number;
@@ -355,6 +437,24 @@ export interface GetNftTransactionsForContractTokenIdQueryParamOpts {
355
437
  /** * If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`. */
356
438
  noSpam?: boolean;
357
439
  }
440
+ export interface GetNftMarketSaleCountQueryParamOpts {
441
+ /** * The number of days to return data for. Request up 365 days. Defaults to 30 days. */
442
+ days?: number;
443
+ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
444
+ quoteCurrency?: Quote;
445
+ }
446
+ export interface GetNftMarketVolumeQueryParamOpts {
447
+ /** * The number of days to return data for. Request up 365 days. Defaults to 30 days. */
448
+ days?: number;
449
+ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
450
+ quoteCurrency?: Quote;
451
+ }
452
+ export interface GetNftMarketFloorPriceQueryParamOpts {
453
+ /** * The number of days to return data for. Request up 365 days. Defaults to 30 days. */
454
+ days?: number;
455
+ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
456
+ quoteCurrency?: Quote;
457
+ }
358
458
  /**
359
459
  * NFT APIs
360
460
  *
@@ -480,5 +580,41 @@ export declare class NftService {
480
580
  *
481
581
  */
482
582
  checkOwnershipInNftForSpecificTokenId(chainName: Chain, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
583
+ /**
584
+ *
585
+ * Commonly used to build a time-series chart of the sales count of an NFT collection.
586
+ *
587
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
588
+ * @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
589
+ * @param {GetNftMarketSaleCountQueryParamOpts} queryParamOpts
590
+ * - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
591
+ * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
592
+ *
593
+ */
594
+ getNftMarketSaleCount(chainName: Chain, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
595
+ /**
596
+ *
597
+ * Commonly used to build a time-series chart of the transaction volume of an NFT collection.
598
+ *
599
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
600
+ * @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
601
+ * @param {GetNftMarketVolumeQueryParamOpts} queryParamOpts
602
+ * - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
603
+ * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
604
+ *
605
+ */
606
+ getNftMarketVolume(chainName: Chain, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
607
+ /**
608
+ *
609
+ * Commonly used to render a price floor chart for an NFT collection.
610
+ *
611
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
612
+ * @param {string} contractAddress - The requested contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
613
+ * @param {GetNftMarketFloorPriceQueryParamOpts} queryParamOpts
614
+ * - `days`: The number of days to return data for. Request up 365 days. Defaults to 30 days.
615
+ * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
616
+ *
617
+ */
618
+ getNftMarketFloorPrice(chainName: Chain, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
483
619
  }
484
620
  export {};
@@ -73,6 +73,60 @@ declare class TokenSpenderItem {
73
73
  risk_factor: string;
74
74
  constructor(data: TokenSpenderItem);
75
75
  }
76
+ declare class NftApprovalsResponse {
77
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
78
+ updated_at: Date;
79
+ /** * The requested chain ID eg: `1`. */
80
+ chain_id: number;
81
+ /** * The requested chain name eg: `eth-mainnet`. */
82
+ chain_name: string;
83
+ /** * The requested address. */
84
+ address: string;
85
+ /** * List of response items. */
86
+ items: NftApprovalsItem[];
87
+ constructor(data: NftApprovalsResponse);
88
+ }
89
+ declare class NftApprovalsItem {
90
+ /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
91
+ contract_address: string;
92
+ /** * The label of the contract address. */
93
+ contract_address_label: string;
94
+ /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
95
+ contract_ticker_symbol: string;
96
+ /** * List of asset balances held by the user. */
97
+ token_balances: NftApprovalBalance[];
98
+ /** * Contracts with non-zero approvals for this token. */
99
+ spenders: NftApprovalSpender[];
100
+ constructor(data: NftApprovalsItem);
101
+ }
102
+ declare class NftApprovalBalance {
103
+ /** * The token's id. */
104
+ token_id: bigint | null;
105
+ /** * The NFT's token balance. */
106
+ token_balance: bigint | null;
107
+ constructor(data: NftApprovalBalance);
108
+ }
109
+ declare class NftApprovalSpender {
110
+ /** * The height of the block. */
111
+ block_height: number;
112
+ /** * The offset is the position of the tx in the block. */
113
+ tx_offset: number;
114
+ /** * The offset is the position of the log entry within an event log." */
115
+ log_offset: number;
116
+ /** * The block signed timestamp in UTC. */
117
+ block_signed_at: Date;
118
+ /** * Most recent transaction that updated approval amounts for the token. */
119
+ tx_hash: string;
120
+ /** * Address of the contract with approval for the token. */
121
+ spender_address: string;
122
+ /** * Name of the contract with approval for the token. */
123
+ spender_address_label: string;
124
+ /** * The token ids approved. */
125
+ token_ids_approved: string;
126
+ /** * Remaining number of tokens granted to the spender by the approval. */
127
+ allowance: string;
128
+ constructor(data: NftApprovalSpender);
129
+ }
76
130
  /**
77
131
  * Approvals API
78
132
  *
@@ -92,5 +146,13 @@ export declare class SecurityService {
92
146
  *
93
147
  */
94
148
  getApprovals(chainName: Chain, walletAddress: string): Promise<Response<ApprovalsResponse>>;
149
+ /**
150
+ *
151
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
152
+ * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
153
+
154
+ *
155
+ */
156
+ getNftApprovals(chainName: Chain, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
95
157
  }
96
158
  export {};
@@ -62,6 +62,8 @@ declare class Transaction {
62
62
  lending_details: LendingReport;
63
63
  /** * The log events. */
64
64
  log_events: LogEvent[];
65
+ /** * The details related to the safe transaction. */
66
+ safe_details: SafeDetails[];
65
67
  constructor(data: Transaction);
66
68
  }
67
69
  declare class ContractMetadata {
@@ -299,6 +301,15 @@ declare class LogEvent {
299
301
  decoded: DecodedItem;
300
302
  constructor(data: LogEvent);
301
303
  }
304
+ declare class SafeDetails {
305
+ /** * The address that signed the safe transaction. */
306
+ owner_address: string;
307
+ /** * The signature of the owner for the safe transaction. */
308
+ signature: string;
309
+ /** * The type of safe signature used. */
310
+ signature_type: string;
311
+ constructor(data: SafeDetails);
312
+ }
302
313
  declare class DecodedItem {
303
314
  name: string;
304
315
  signature: string;
@@ -313,6 +324,13 @@ declare class Param {
313
324
  value: string;
314
325
  constructor(data: Param);
315
326
  }
327
+ declare class PaginationLinks {
328
+ /** * URL link to the next page. */
329
+ prev: string;
330
+ /** * URL link to the previous page. */
331
+ next: string;
332
+ constructor(data: PaginationLinks);
333
+ }
316
334
  declare class TransactionsBlockResponse {
317
335
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
318
336
  updated_at: Date;
@@ -355,6 +373,24 @@ declare class TransactionSummary {
355
373
  tx_detail_link: string;
356
374
  constructor(data: TransactionSummary);
357
375
  }
376
+ declare class TransactionsResponse {
377
+ /** * The requested address. */
378
+ address: string;
379
+ /** * The timestamp when the response was generated. Useful to show data staleness to users. */
380
+ updated_at: Date;
381
+ /** * The requested quote currency eg: `USD`. */
382
+ quote_currency: string;
383
+ /** * The requested chain ID eg: `1`. */
384
+ chain_id: number;
385
+ /** * The requested chain name eg: `eth-mainnet`. */
386
+ chain_name: string;
387
+ /** * The current page of the response. */
388
+ current_page: number;
389
+ links: PaginationLinks;
390
+ /** * List of response items. */
391
+ items: Transaction[];
392
+ constructor(data: TransactionsResponse);
393
+ }
358
394
  export interface GetTransactionQueryParamOpts {
359
395
  /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
360
396
  quoteCurrency?: Quote;
@@ -366,6 +402,8 @@ export interface GetTransactionQueryParamOpts {
366
402
  withNftSales?: boolean;
367
403
  /** * Decoded lending details including protocol (e.g. Aave), event (e.g. 'deposit') and tokens involved with prices. Additional 0.05 credits charged if data available. */
368
404
  withLending?: boolean;
405
+ /** * Include safe details. */
406
+ withSafe?: boolean;
369
407
  }
370
408
  export interface GetAllTransactionsForAddressQueryParamOpts {
371
409
  /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
@@ -374,6 +412,8 @@ export interface GetAllTransactionsForAddressQueryParamOpts {
374
412
  noLogs?: boolean;
375
413
  /** * Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order. */
376
414
  blockSignedAtAsc?: boolean;
415
+ /** * Include safe details. */
416
+ withSafe?: boolean;
377
417
  }
378
418
  export interface GetTransactionsForBlockQueryParamOpts {
379
419
  /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
@@ -381,6 +421,16 @@ export interface GetTransactionsForBlockQueryParamOpts {
381
421
  /** * Omit log events. */
382
422
  noLogs?: boolean;
383
423
  }
424
+ export interface GetTransactionsForAddressV3QueryParamOpts {
425
+ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
426
+ quoteCurrency?: Quote;
427
+ /** * Omit log events. */
428
+ noLogs?: boolean;
429
+ /** * Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order. */
430
+ blockSignedAtAsc?: boolean;
431
+ /** * Include safe details. */
432
+ withSafe?: boolean;
433
+ }
384
434
  export declare class TransactionService {
385
435
  private apiKey;
386
436
  private debug;
@@ -399,6 +449,7 @@ export declare class TransactionService {
399
449
  * - `withDex`: Decoded DEX details including protocol (e.g. Uniswap), event (e.g 'add_liquidity') and tokens involved with historical prices. Additional 0.05 credits charged if data available.
400
450
  * - `withNftSales`: Decoded NFT sales details including marketplace (e.g. Opensea) and cached media links. Additional 0.05 credits charged if data available.
401
451
  * - `withLending`: Decoded lending details including protocol (e.g. Aave), event (e.g. 'deposit') and tokens involved with prices. Additional 0.05 credits charged if data available.
452
+ * - `withSafe`: Include safe details.
402
453
  *
403
454
  */
404
455
  getTransaction(chainName: Chain, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
@@ -412,6 +463,7 @@ export declare class TransactionService {
412
463
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
413
464
  * - `noLogs`: Omit log events.
414
465
  * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
466
+ * - `withSafe`: Include safe details.
415
467
  *
416
468
  */
417
469
  getAllTransactionsForAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
@@ -436,5 +488,18 @@ export declare class TransactionService {
436
488
  *
437
489
  */
438
490
  getTransactionSummary(chainName: Chain, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
491
+ /**
492
+ *
493
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
494
+ * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
495
+ * @param {number} page - The requested page, 0-indexed.
496
+ * @param {GetTransactionsForAddressV3QueryParamOpts} queryParamOpts
497
+ * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
498
+ * - `noLogs`: Omit log events.
499
+ * - `blockSignedAtAsc`: Sort the transactions in ascending chronological order. By default, it's set to `false` and returns transactions in descending chronological order.
500
+ * - `withSafe`: Include safe details.
501
+ *
502
+ */
503
+ getTransactionsForAddressV3(chainName: Chain, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
439
504
  }
440
505
  export {};
@@ -524,12 +524,16 @@ declare class HealthData {
524
524
  export interface GetPoolsForTokenAddressQueryParamOpts {
525
525
  /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
526
526
  quoteCurrency?: Quote;
527
+ /** * The DEX name eg: `uniswap_v2`. */
528
+ dexName?: string;
527
529
  }
528
530
  export interface GetPoolsForWalletAddressQueryParamOpts {
529
531
  /** * The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically. */
530
532
  tokenAddress?: string;
531
533
  /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
532
534
  quoteCurrency?: Quote;
535
+ /** * The DEX name eg: `uniswap_v2`. */
536
+ dexName?: string;
533
537
  }
534
538
  /**
535
539
  * XYK APIs