@covalenthq/client-sdk 1.0.2 → 2.0.1

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 (192) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +223 -282
  3. package/dist/cjs/index.d.ts +17 -20
  4. package/dist/cjs/index.js +2331 -7659
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/src/GoldRushClient.d.ts +20 -0
  7. package/dist/cjs/src/services/BalanceService.d.ts +125 -0
  8. package/dist/cjs/src/services/BaseService.d.ts +161 -0
  9. package/dist/cjs/src/services/NftService.d.ts +157 -0
  10. package/dist/cjs/src/services/PricingService.d.ts +25 -0
  11. package/dist/cjs/src/services/SecurityService.d.ts +28 -0
  12. package/dist/cjs/src/services/TransactionService.d.ts +128 -0
  13. package/dist/cjs/src/utils/functions/bigIntParser.d.ts +1 -0
  14. package/dist/cjs/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  15. package/dist/cjs/src/utils/functions/debugOutput.d.ts +2 -0
  16. package/dist/cjs/src/utils/functions/endpointGenerator.d.ts +4 -0
  17. package/dist/cjs/src/utils/functions/execution.d.ts +11 -0
  18. package/dist/cjs/src/utils/functions/isValidApiKey.d.ts +1 -0
  19. package/dist/cjs/src/utils/functions/paginateEndpoint.d.ts +7 -0
  20. package/dist/cjs/src/utils/functions/prettifyCurrency.d.ts +2 -0
  21. package/dist/{esm/util/types/BalanceServiceTypes.d.ts → cjs/src/utils/types/BalanceService.types.d.ts} +91 -27
  22. package/dist/{es/util/types/BaseServiceTypes.d.ts → cjs/src/utils/types/BaseService.types.d.ts} +68 -18
  23. package/dist/cjs/src/utils/types/Generic.types.d.ts +477 -0
  24. package/dist/{esm/util/types/NftServiceTypes.d.ts → cjs/src/utils/types/NftService.types.d.ts} +53 -83
  25. package/dist/cjs/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  26. package/dist/{esm/util/types/SecurityServiceTypes.d.ts → cjs/src/utils/types/SecurityService.types.d.ts} +8 -7
  27. package/dist/{esm/util/types/TransactionServiceTypes.d.ts → cjs/src/utils/types/TransactionService.types.d.ts} +110 -24
  28. package/dist/es/index.d.ts +17 -20
  29. package/dist/es/index.js +2327 -7649
  30. package/dist/es/index.js.map +1 -1
  31. package/dist/es/src/GoldRushClient.d.ts +20 -0
  32. package/dist/es/src/services/BalanceService.d.ts +125 -0
  33. package/dist/es/src/services/BaseService.d.ts +161 -0
  34. package/dist/es/src/services/NftService.d.ts +157 -0
  35. package/dist/es/src/services/PricingService.d.ts +25 -0
  36. package/dist/es/src/services/SecurityService.d.ts +28 -0
  37. package/dist/es/src/services/TransactionService.d.ts +128 -0
  38. package/dist/es/src/utils/functions/bigIntParser.d.ts +1 -0
  39. package/dist/es/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  40. package/dist/es/src/utils/functions/debugOutput.d.ts +2 -0
  41. package/dist/es/src/utils/functions/endpointGenerator.d.ts +4 -0
  42. package/dist/es/src/utils/functions/execution.d.ts +11 -0
  43. package/dist/es/src/utils/functions/isValidApiKey.d.ts +1 -0
  44. package/dist/es/src/utils/functions/paginateEndpoint.d.ts +7 -0
  45. package/dist/es/src/utils/functions/prettifyCurrency.d.ts +2 -0
  46. package/dist/{cjs/util/types/BalanceServiceTypes.d.ts → es/src/utils/types/BalanceService.types.d.ts} +91 -27
  47. package/dist/{esm/util/types/BaseServiceTypes.d.ts → es/src/utils/types/BaseService.types.d.ts} +68 -18
  48. package/dist/es/src/utils/types/Generic.types.d.ts +477 -0
  49. package/dist/{cjs/util/types/NftServiceTypes.d.ts → es/src/utils/types/NftService.types.d.ts} +53 -83
  50. package/dist/es/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  51. package/dist/{util/types/SecurityServiceTypes.d.ts → es/src/utils/types/SecurityService.types.d.ts} +8 -7
  52. package/dist/{cjs/util/types/TransactionServiceTypes.d.ts → es/src/utils/types/TransactionService.types.d.ts} +110 -24
  53. package/dist/esm/index.d.ts +17 -20
  54. package/dist/esm/index.js +2327 -7649
  55. package/dist/esm/index.js.map +1 -1
  56. package/dist/esm/src/GoldRushClient.d.ts +20 -0
  57. package/dist/esm/src/services/BalanceService.d.ts +125 -0
  58. package/dist/esm/src/services/BaseService.d.ts +161 -0
  59. package/dist/esm/src/services/NftService.d.ts +157 -0
  60. package/dist/esm/src/services/PricingService.d.ts +25 -0
  61. package/dist/esm/src/services/SecurityService.d.ts +28 -0
  62. package/dist/esm/src/services/TransactionService.d.ts +128 -0
  63. package/dist/esm/src/utils/functions/bigIntParser.d.ts +1 -0
  64. package/dist/esm/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  65. package/dist/esm/src/utils/functions/debugOutput.d.ts +2 -0
  66. package/dist/esm/src/utils/functions/endpointGenerator.d.ts +4 -0
  67. package/dist/esm/src/utils/functions/execution.d.ts +11 -0
  68. package/dist/esm/src/utils/functions/isValidApiKey.d.ts +1 -0
  69. package/dist/esm/src/utils/functions/paginateEndpoint.d.ts +7 -0
  70. package/dist/esm/src/utils/functions/prettifyCurrency.d.ts +2 -0
  71. package/dist/{util/types/BalanceServiceTypes.d.ts → esm/src/utils/types/BalanceService.types.d.ts} +91 -27
  72. package/dist/{cjs/util/types/BaseServiceTypes.d.ts → esm/src/utils/types/BaseService.types.d.ts} +68 -18
  73. package/dist/esm/src/utils/types/Generic.types.d.ts +477 -0
  74. package/dist/{util/types/NftServiceTypes.d.ts → esm/src/utils/types/NftService.types.d.ts} +53 -83
  75. package/dist/esm/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  76. package/dist/{es/util/types/SecurityServiceTypes.d.ts → esm/src/utils/types/SecurityService.types.d.ts} +8 -7
  77. package/dist/{util/types/TransactionServiceTypes.d.ts → esm/src/utils/types/TransactionService.types.d.ts} +110 -24
  78. package/package.json +25 -12
  79. package/dist/cjs/services/BalanceService.d.ts +0 -638
  80. package/dist/cjs/services/BaseService.d.ts +0 -571
  81. package/dist/cjs/services/CovalentClient.d.ts +0 -57
  82. package/dist/cjs/services/NftService.d.ts +0 -686
  83. package/dist/cjs/services/PricingService.d.ts +0 -103
  84. package/dist/cjs/services/SecurityService.d.ts +0 -162
  85. package/dist/cjs/services/TransactionService.d.ts +0 -711
  86. package/dist/cjs/services/XykService.d.ts +0 -1018
  87. package/dist/cjs/util/ApiHelpers.d.ts +0 -6
  88. package/dist/cjs/util/ApiKeyValidator.d.ts +0 -8
  89. package/dist/cjs/util/Chains.d.ts +0 -223
  90. package/dist/cjs/util/backoff.d.ts +0 -12
  91. package/dist/cjs/util/prettifyCurrency.d.ts +0 -2
  92. package/dist/cjs/util/types/GenericTypes.d.ts +0 -116
  93. package/dist/cjs/util/types/SecurityServiceTypes.d.ts +0 -121
  94. package/dist/cjs/util/types/XykServiceTypes.d.ts +0 -687
  95. package/dist/es/services/BalanceService.d.ts +0 -638
  96. package/dist/es/services/BaseService.d.ts +0 -571
  97. package/dist/es/services/CovalentClient.d.ts +0 -57
  98. package/dist/es/services/NftService.d.ts +0 -686
  99. package/dist/es/services/PricingService.d.ts +0 -103
  100. package/dist/es/services/SecurityService.d.ts +0 -162
  101. package/dist/es/services/TransactionService.d.ts +0 -711
  102. package/dist/es/services/XykService.d.ts +0 -1018
  103. package/dist/es/util/ApiHelpers.d.ts +0 -6
  104. package/dist/es/util/ApiKeyValidator.d.ts +0 -8
  105. package/dist/es/util/Chains.d.ts +0 -223
  106. package/dist/es/util/backoff.d.ts +0 -12
  107. package/dist/es/util/prettifyCurrency.d.ts +0 -2
  108. package/dist/es/util/types/BalanceServiceTypes.d.ts +0 -378
  109. package/dist/es/util/types/GenericTypes.d.ts +0 -116
  110. package/dist/es/util/types/NftServiceTypes.d.ts +0 -303
  111. package/dist/es/util/types/TransactionServiceTypes.d.ts +0 -388
  112. package/dist/es/util/types/XykServiceTypes.d.ts +0 -687
  113. package/dist/esm/services/BalanceService.d.ts +0 -638
  114. package/dist/esm/services/BaseService.d.ts +0 -571
  115. package/dist/esm/services/CovalentClient.d.ts +0 -57
  116. package/dist/esm/services/NftService.d.ts +0 -686
  117. package/dist/esm/services/PricingService.d.ts +0 -103
  118. package/dist/esm/services/SecurityService.d.ts +0 -162
  119. package/dist/esm/services/TransactionService.d.ts +0 -711
  120. package/dist/esm/services/XykService.d.ts +0 -1018
  121. package/dist/esm/util/ApiHelpers.d.ts +0 -6
  122. package/dist/esm/util/ApiKeyValidator.d.ts +0 -8
  123. package/dist/esm/util/Chains.d.ts +0 -223
  124. package/dist/esm/util/backoff.d.ts +0 -12
  125. package/dist/esm/util/prettifyCurrency.d.ts +0 -2
  126. package/dist/esm/util/types/GenericTypes.d.ts +0 -116
  127. package/dist/esm/util/types/XykServiceTypes.d.ts +0 -687
  128. package/dist/index.d.ts +0 -20
  129. package/dist/index.js +0 -21
  130. package/dist/index.js.map +0 -1
  131. package/dist/services/BalanceService.d.ts +0 -638
  132. package/dist/services/BalanceService.js +0 -959
  133. package/dist/services/BalanceService.js.map +0 -1
  134. package/dist/services/BaseService.d.ts +0 -571
  135. package/dist/services/BaseService.js +0 -1202
  136. package/dist/services/BaseService.js.map +0 -1
  137. package/dist/services/CovalentClient.d.ts +0 -57
  138. package/dist/services/CovalentClient.js +0 -49
  139. package/dist/services/CovalentClient.js.map +0 -1
  140. package/dist/services/NftService.d.ts +0 -686
  141. package/dist/services/NftService.js +0 -1490
  142. package/dist/services/NftService.js.map +0 -1
  143. package/dist/services/PricingService.d.ts +0 -103
  144. package/dist/services/PricingService.js +0 -155
  145. package/dist/services/PricingService.js.map +0 -1
  146. package/dist/services/SecurityService.d.ts +0 -162
  147. package/dist/services/SecurityService.js +0 -249
  148. package/dist/services/SecurityService.js.map +0 -1
  149. package/dist/services/TransactionService.d.ts +0 -711
  150. package/dist/services/TransactionService.js +0 -1687
  151. package/dist/services/TransactionService.js.map +0 -1
  152. package/dist/services/XykService.d.ts +0 -1018
  153. package/dist/services/XykService.js +0 -1827
  154. package/dist/services/XykService.js.map +0 -1
  155. package/dist/util/ApiHelpers.d.ts +0 -6
  156. package/dist/util/ApiHelpers.js +0 -87
  157. package/dist/util/ApiHelpers.js.map +0 -1
  158. package/dist/util/ApiKeyValidator.d.ts +0 -8
  159. package/dist/util/ApiKeyValidator.js +0 -13
  160. package/dist/util/ApiKeyValidator.js.map +0 -1
  161. package/dist/util/CalculatePrettyBalance.d.ts +0 -1
  162. package/dist/util/CalculatePrettyBalance.js +0 -32
  163. package/dist/util/CalculatePrettyBalance.js.map +0 -1
  164. package/dist/util/Chains.d.ts +0 -223
  165. package/dist/util/Chains.js +0 -225
  166. package/dist/util/Chains.js.map +0 -1
  167. package/dist/util/backoff.d.ts +0 -12
  168. package/dist/util/backoff.js +0 -47
  169. package/dist/util/backoff.js.map +0 -1
  170. package/dist/util/prettifyCurrency.d.ts +0 -2
  171. package/dist/util/prettifyCurrency.js +0 -69
  172. package/dist/util/prettifyCurrency.js.map +0 -1
  173. package/dist/util/types/BalanceServiceTypes.js +0 -2
  174. package/dist/util/types/BalanceServiceTypes.js.map +0 -1
  175. package/dist/util/types/BaseServiceTypes.d.ts +0 -276
  176. package/dist/util/types/BaseServiceTypes.js +0 -2
  177. package/dist/util/types/BaseServiceTypes.js.map +0 -1
  178. package/dist/util/types/GenericTypes.d.ts +0 -116
  179. package/dist/util/types/GenericTypes.js +0 -2
  180. package/dist/util/types/GenericTypes.js.map +0 -1
  181. package/dist/util/types/NftServiceTypes.js +0 -2
  182. package/dist/util/types/NftServiceTypes.js.map +0 -1
  183. package/dist/util/types/PricingServiceTypes.d.ts +0 -33
  184. package/dist/util/types/PricingServiceTypes.js +0 -2
  185. package/dist/util/types/PricingServiceTypes.js.map +0 -1
  186. package/dist/util/types/SecurityServiceTypes.js +0 -2
  187. package/dist/util/types/SecurityServiceTypes.js.map +0 -1
  188. package/dist/util/types/TransactionServiceTypes.js +0 -2
  189. package/dist/util/types/TransactionServiceTypes.js.map +0 -1
  190. package/dist/util/types/XykServiceTypes.d.ts +0 -687
  191. package/dist/util/types/XykServiceTypes.js +0 -2
  192. package/dist/util/types/XykServiceTypes.js.map +0 -1
@@ -1,103 +0,0 @@
1
- import { Chain, ChainID, Quote, Source } from "./CovalentClient";
2
- import { Chains } from "../util/Chains";
3
- declare class TokenPricesResponse {
4
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
5
- contract_decimals: number;
6
- /** * The string returned by the `name()` method. */
7
- contract_name: string;
8
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
9
- contract_ticker_symbol: string;
10
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
11
- contract_address: string;
12
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
13
- supports_erc: string[];
14
- /** * The contract logo URL. */
15
- logo_url: string;
16
- update_at: Date;
17
- /** * The requested quote currency eg: `USD`. */
18
- quote_currency: string;
19
- /** * The contract logo URLs. */
20
- logo_urls: LogoUrls;
21
- /** * List of response items. */
22
- prices: Price[];
23
- /** * List of response items. */
24
- items: Price[];
25
- constructor(data: TokenPricesResponse);
26
- }
27
- declare class LogoUrls {
28
- /** * The token logo URL. */
29
- token_logo_url: string;
30
- /** * The protocol logo URL. */
31
- protocol_logo_url: string;
32
- /** * The chain logo URL. */
33
- chain_logo_url: string;
34
- constructor(data: LogoUrls);
35
- }
36
- declare class Price {
37
- contract_metadata: ContractMetadata;
38
- /** * The date of the price capture. */
39
- date: Date;
40
- /** * The price in the requested `quote-currency`. */
41
- price: number;
42
- /** * A prettier version of the price for rendering purposes. */
43
- pretty_price: string;
44
- constructor(data: Price);
45
- }
46
- declare class ContractMetadata {
47
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
48
- contract_decimals: number;
49
- /** * The string returned by the `name()` method. */
50
- contract_name: string;
51
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
52
- contract_ticker_symbol: string;
53
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
54
- contract_address: string;
55
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
56
- supports_erc: string[];
57
- /** * The contract logo URL. */
58
- logo_url: string;
59
- constructor(data: ContractMetadata);
60
- }
61
- export interface GetTokenPricesQueryParamOpts {
62
- /** * The start day of the historical price range (YYYY-MM-DD). */
63
- from?: string;
64
- /** * The end day of the historical price range (YYYY-MM-DD). */
65
- to?: string;
66
- /** * Sort the prices in chronological ascending order. By default, it's set to `false` and returns prices in chronological descending order. */
67
- pricesAtAsc?: boolean;
68
- }
69
- /**
70
- * Pricing APIs
71
- *
72
- */
73
- export declare class Response<T> {
74
- data: Array<T>;
75
- error: boolean;
76
- error_code: number;
77
- error_message: string;
78
- }
79
- export declare class PricingService {
80
- private apiKey;
81
- private debug;
82
- private threadCount;
83
- private is_key_valid;
84
- private enableRetry;
85
- private source;
86
- private LIMIT;
87
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
88
- /**
89
- *
90
- * Commonly used to get historic prices of a token between date ranges. Supports native tokens.
91
- *
92
- * @param {string} chainName - The chain name eg: `eth-mainnet`.
93
- * @param {string} quoteCurrency - The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
94
- * @param {string} contractAddress - Contract address for the token. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically. Supports multiple contract addresses separated by commas.
95
- * @param {GetTokenPricesQueryParamOpts} queryParamOpts
96
- * - `from`: The start day of the historical price range (YYYY-MM-DD).
97
- * - `to`: The end day of the historical price range (YYYY-MM-DD).
98
- * - `pricesAtAsc`: Sort the prices in chronological ascending order. By default, it's set to `false` and returns prices in chronological descending order.
99
- *
100
- */
101
- getTokenPrices(chainName: Chain | Chains | ChainID, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
102
- }
103
- export {};
@@ -1,162 +0,0 @@
1
- import { Chain, Response, ChainID, Source } from "./CovalentClient";
2
- import { Chains } from "../util/Chains";
3
- declare class ApprovalsResponse {
4
- /** * The requested address. */
5
- address: string;
6
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
7
- updated_at: Date;
8
- /** * The requested quote currency eg: `USD`. */
9
- quote_currency: string;
10
- /** * The requested chain ID eg: `1`. */
11
- chain_id: number;
12
- /** * The requested chain name eg: `eth-mainnet`. */
13
- chain_name: string;
14
- /** * List of response items. */
15
- items: TokensApprovalItem[];
16
- constructor(data: ApprovalsResponse);
17
- }
18
- declare class TokensApprovalItem {
19
- /** * The address for the token that has approvals. */
20
- token_address: string;
21
- /** * The name for the token that has approvals. */
22
- token_address_label: string;
23
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
24
- ticker_symbol: string;
25
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
26
- contract_decimals: number;
27
- /** * The contract logo URL. */
28
- logo_url: string;
29
- /** * The exchange rate for the requested quote currency. */
30
- quote_rate: number;
31
- /** * Wallet balance of the token. */
32
- balance: bigint | null;
33
- /** * Value of the wallet balance of the token. */
34
- balance_quote: number;
35
- /** * A prettier version of the quote for rendering purposes. */
36
- pretty_balance_quote: string;
37
- /** * Total amount at risk across all spenders. */
38
- value_at_risk: string;
39
- /** * Value of total amount at risk across all spenders. */
40
- value_at_risk_quote: number;
41
- /** * A prettier version of the quote for rendering purposes. */
42
- pretty_value_at_risk_quote: string;
43
- /** * Contracts with non-zero approvals for this token. */
44
- spenders: TokenSpenderItem[];
45
- constructor(data: TokensApprovalItem);
46
- }
47
- declare class TokenSpenderItem {
48
- /** * The height of the block. */
49
- block_height: number;
50
- /** * The offset is the position of the tx in the block. */
51
- tx_offset: number;
52
- /** * The offset is the position of the log entry within an event log." */
53
- log_offset: number;
54
- /** * The block signed timestamp in UTC. */
55
- block_signed_at: Date;
56
- /** * Most recent transaction that updated approval amounts for the token. */
57
- tx_hash: string;
58
- /** * Address of the contract with approval for the token. */
59
- spender_address: string;
60
- /** * Name of the contract with approval for the token. */
61
- spender_address_label: string;
62
- /** * Remaining number of tokens granted to the spender by the approval. */
63
- allowance: string;
64
- /** * Value of the remaining allowance specified by the approval. */
65
- allowance_quote: number;
66
- /** * A prettier version of the quote for rendering purposes. */
67
- pretty_allowance_quote: string;
68
- /** * Amount at risk for spender. */
69
- value_at_risk: string;
70
- /** * Value of amount at risk for spender. */
71
- value_at_risk_quote: number;
72
- /** * A prettier version of the quote for rendering purposes. */
73
- pretty_value_at_risk_quote: string;
74
- risk_factor: string;
75
- constructor(data: TokenSpenderItem);
76
- }
77
- declare class NftApprovalsResponse {
78
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
79
- updated_at: Date;
80
- /** * The requested chain ID eg: `1`. */
81
- chain_id: number;
82
- /** * The requested chain name eg: `eth-mainnet`. */
83
- chain_name: string;
84
- /** * The requested address. */
85
- address: string;
86
- /** * List of response items. */
87
- items: NftApprovalsItem[];
88
- constructor(data: NftApprovalsResponse);
89
- }
90
- declare class NftApprovalsItem {
91
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
92
- contract_address: string;
93
- /** * The label of the contract address. */
94
- contract_address_label: string;
95
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
96
- contract_ticker_symbol: string;
97
- /** * List of asset balances held by the user. */
98
- token_balances: NftApprovalBalance[];
99
- /** * Contracts with non-zero approvals for this token. */
100
- spenders: NftApprovalSpender[];
101
- constructor(data: NftApprovalsItem);
102
- }
103
- declare class NftApprovalBalance {
104
- /** * The token's id. */
105
- token_id: bigint | null;
106
- /** * The NFT's token balance. */
107
- token_balance: bigint | null;
108
- constructor(data: NftApprovalBalance);
109
- }
110
- declare class NftApprovalSpender {
111
- /** * The height of the block. */
112
- block_height: number;
113
- /** * The offset is the position of the tx in the block. */
114
- tx_offset: number;
115
- /** * The offset is the position of the log entry within an event log." */
116
- log_offset: number;
117
- /** * The block signed timestamp in UTC. */
118
- block_signed_at: Date;
119
- /** * Most recent transaction that updated approval amounts for the token. */
120
- tx_hash: string;
121
- /** * Address of the contract with approval for the token. */
122
- spender_address: string;
123
- /** * Name of the contract with approval for the token. */
124
- spender_address_label: string;
125
- /** * The token ids approved. */
126
- token_ids_approved: string;
127
- /** * Remaining number of tokens granted to the spender by the approval. */
128
- allowance: string;
129
- constructor(data: NftApprovalSpender);
130
- }
131
- /**
132
- * Approvals API
133
- *
134
- */
135
- export declare class SecurityService {
136
- private apiKey;
137
- private debug;
138
- private threadCount;
139
- private is_key_valid;
140
- private enableRetry;
141
- private source;
142
- private LIMIT;
143
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
144
- /**
145
- *
146
- * Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet’s assets.
147
- *
148
- * @param {string} chainName - The chain name eg: `eth-mainnet`.
149
- * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
150
- *
151
- */
152
- getApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ApprovalsResponse>>;
153
- /**
154
- *
155
- * @param {string} chainName - The chain name eg: `eth-mainnet`.
156
- * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
157
-
158
- *
159
- */
160
- getNftApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
161
- }
162
- export {};