@quicknode/sdk 1.0.0-beta.1 → 1.1.0

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 (66) hide show
  1. package/README.md +2 -835
  2. package/cjs/index.js +342 -41
  3. package/esm/package.json +2 -1
  4. package/esm/package.json.js +3 -0
  5. package/esm/src/api/api.js +85 -0
  6. package/esm/src/api/controllers/contracts.js +36 -0
  7. package/esm/src/api/controllers/events.js +121 -0
  8. package/esm/src/api/controllers/nfts.js +244 -0
  9. package/esm/src/api/controllers/tokens.js +98 -0
  10. package/esm/src/api/controllers/transactions.js +125 -0
  11. package/esm/src/api/controllers/utils.js +55 -0
  12. package/esm/src/api/graphql/customUrqlClient.js +23 -0
  13. package/esm/src/api/graphql/generatedTypes.js +62 -0
  14. package/esm/src/api/graphql/schema.json.js +3 -0
  15. package/esm/src/api/index.d.ts +2687 -0
  16. package/esm/src/api/index.js +2 -0
  17. package/esm/src/api/types/chains.js +7 -0
  18. package/esm/src/api/types/contracts/getContractDetails.js +12 -0
  19. package/esm/src/api/types/events/getAll.js +7 -0
  20. package/esm/src/api/types/events/getByContract.js +12 -0
  21. package/esm/src/api/types/nfts/getByContractAddress.js +10 -0
  22. package/esm/src/api/types/nfts/getByWalletAddress.js +18 -0
  23. package/esm/src/api/types/nfts/getCollectionDetails.js +11 -0
  24. package/esm/src/api/types/nfts/getCollectionEvents.js +12 -0
  25. package/esm/src/api/types/nfts/getNFTDetails.js +9 -0
  26. package/esm/src/api/types/nfts/getNFTEvents.js +13 -0
  27. package/esm/src/api/types/nfts/getTrendingCollections.js +7 -0
  28. package/esm/src/api/types/nfts/verifyOwnershipByAddress.js +12 -0
  29. package/esm/src/api/types/tokens/getBalancesByWalletAddress.js +12 -0
  30. package/esm/src/api/types/transactions/getByHash.js +11 -0
  31. package/esm/src/api/types/transactions/getBySearch.js +7 -0
  32. package/esm/src/api/types/utils/gasPrices.js +12 -0
  33. package/esm/src/api/utils/constants.js +3 -0
  34. package/esm/src/api/utils/helpers.js +11 -0
  35. package/esm/src/api/utils/isValidENSAddress.js +21 -0
  36. package/esm/src/api/utils/postQueryFormatter.js +24 -0
  37. package/esm/src/api/utils/removeNodesAndEdges.js +51 -0
  38. package/esm/src/client/client.js +9 -0
  39. package/esm/src/client/index.js +2 -0
  40. package/esm/src/core/addOns/nftTokenV2/actions.js +107 -0
  41. package/esm/src/core/addOns/nftTokenV2/types/qn_fetchNFTCollectionDetails.js +10 -0
  42. package/esm/src/core/addOns/nftTokenV2/types/qn_fetchNFTs.js +13 -0
  43. package/esm/src/core/addOns/nftTokenV2/types/qn_fetchNFTsByCollection.js +13 -0
  44. package/esm/src/core/addOns/nftTokenV2/types/qn_getTokenMetadataByContractAddress.js +10 -0
  45. package/esm/src/core/addOns/nftTokenV2/types/qn_getTokenMetadataBySymbol.js +11 -0
  46. package/esm/src/core/addOns/nftTokenV2/types/qn_getTransactionsByAddress.js +18 -0
  47. package/esm/src/core/addOns/nftTokenV2/types/qn_getTransfersByNFT.js +12 -0
  48. package/esm/src/core/addOns/nftTokenV2/types/qn_getWalletTokenBalance.js +12 -0
  49. package/esm/src/core/addOns/nftTokenV2/types/qn_getWalletTokenTransactions.js +14 -0
  50. package/esm/src/core/addOns/nftTokenV2/types/qn_verifyNFTsOwner.js +11 -0
  51. package/esm/src/core/addOns/shared/helpers.js +10 -0
  52. package/esm/src/core/chains.js +60 -0
  53. package/esm/src/core/core.js +24 -0
  54. package/esm/src/core/index.d.ts +555 -0
  55. package/esm/src/core/index.js +2 -0
  56. package/esm/src/index.js +10 -0
  57. package/esm/src/lib/errors/QNChainNotSupported.js +7 -0
  58. package/esm/src/lib/errors/QNInputValidationError.js +10 -0
  59. package/esm/src/lib/errors/QNInvalidEnpointUrl.js +7 -0
  60. package/esm/src/lib/helpers/globalFetch.js +13 -0
  61. package/esm/src/lib/validation/ValidateInput.js +35 -0
  62. package/esm/src/lib/validation/codegenDerivedValidators.js +28 -0
  63. package/esm/src/lib/validation/validators.js +105 -0
  64. package/index.d.ts +612 -89
  65. package/package.json +25 -3
  66. package/esm/index.js +0 -1172
package/index.d.ts CHANGED
@@ -2,6 +2,9 @@ import { Client, GraphQLRequestParams } from '@urql/core';
2
2
  export { gql } from '@urql/core';
3
3
  import * as _urql_core_dist_urql_core_chunk from '@urql/core/dist/urql-core-chunk';
4
4
  import { z, ZodError } from 'zod';
5
+ import { Chain, PublicClient } from 'viem';
6
+ import * as viem from 'viem';
7
+ export { viem };
5
8
 
6
9
  type Maybe<T> = T | null;
7
10
  type InputMaybe<T> = Maybe<T>;
@@ -24,7 +27,6 @@ type Scalars = {
24
27
  };
25
28
  /** Gas Prices for a given block. Gas values are returned in Wei. */
26
29
  type CodegenGasPrice = {
27
- __typename?: 'GasPrice';
28
30
  /** The average gas price */
29
31
  average: Scalars['Float'];
30
32
  /** The block number */
@@ -70,9 +72,7 @@ type CodegenEthMainnetTransactionsByWalletENSQueryVariables = Exact<{
70
72
  after?: InputMaybe<Scalars['String']>;
71
73
  }>;
72
74
  type CodegenNftCollectionInfoFragment = {
73
- __typename?: 'EVMSchemaType';
74
75
  collection?: {
75
- __typename?: 'ERC721Collection';
76
76
  address: string;
77
77
  baseTokenUri?: string | null;
78
78
  circulatingSupply?: any | null;
@@ -84,14 +84,12 @@ type CodegenNftCollectionInfoFragment = {
84
84
  totalSupply?: any | null;
85
85
  twitterUsername?: string | null;
86
86
  bannerImage?: Array<{
87
- __typename?: 'TokenUpload';
88
87
  height?: number | null;
89
88
  mimeType?: string | null;
90
89
  url: string;
91
90
  width?: number | null;
92
91
  }> | null;
93
92
  contract?: {
94
- __typename?: 'NFTContract';
95
93
  address: string;
96
94
  isVerified?: boolean | null;
97
95
  name?: string | null;
@@ -99,14 +97,12 @@ type CodegenNftCollectionInfoFragment = {
99
97
  supportedErcInterfaces?: Array<string> | null;
100
98
  } | null;
101
99
  image?: Array<{
102
- __typename?: 'TokenUpload';
103
100
  height?: number | null;
104
101
  mimeType?: string | null;
105
102
  url: string;
106
103
  width?: number | null;
107
104
  }> | null;
108
105
  ohlcvChart?: Array<{
109
- __typename?: 'CollectionOHLCVChart';
110
106
  average?: number | null;
111
107
  close?: number | null;
112
108
  count: number;
@@ -117,13 +113,11 @@ type CodegenNftCollectionInfoFragment = {
117
113
  timestamp: any;
118
114
  }> | null;
119
115
  openseaMetadata?: {
120
- __typename?: 'OpenSeaMetadata';
121
116
  isHidden?: boolean | null;
122
117
  isVerified?: boolean | null;
123
118
  unsafeSlug?: string | null;
124
119
  } | null;
125
120
  } | {
126
- __typename?: 'ERC1155Collection';
127
121
  address: string;
128
122
  baseTokenUri?: string | null;
129
123
  circulatingSupply?: any | null;
@@ -135,14 +129,12 @@ type CodegenNftCollectionInfoFragment = {
135
129
  totalSupply?: any | null;
136
130
  twitterUsername?: string | null;
137
131
  bannerImage?: Array<{
138
- __typename?: 'TokenUpload';
139
132
  height?: number | null;
140
133
  mimeType?: string | null;
141
134
  url: string;
142
135
  width?: number | null;
143
136
  }> | null;
144
137
  contract?: {
145
- __typename?: 'NFTContract';
146
138
  address: string;
147
139
  isVerified?: boolean | null;
148
140
  name?: string | null;
@@ -150,14 +142,12 @@ type CodegenNftCollectionInfoFragment = {
150
142
  supportedErcInterfaces?: Array<string> | null;
151
143
  } | null;
152
144
  image?: Array<{
153
- __typename?: 'TokenUpload';
154
145
  height?: number | null;
155
146
  mimeType?: string | null;
156
147
  url: string;
157
148
  width?: number | null;
158
149
  }> | null;
159
150
  ohlcvChart?: Array<{
160
- __typename?: 'CollectionOHLCVChart';
161
151
  average?: number | null;
162
152
  close?: number | null;
163
153
  count: number;
@@ -168,7 +158,6 @@ type CodegenNftCollectionInfoFragment = {
168
158
  timestamp: any;
169
159
  }> | null;
170
160
  openseaMetadata?: {
171
- __typename?: 'OpenSeaMetadata';
172
161
  isHidden?: boolean | null;
173
162
  isVerified?: boolean | null;
174
163
  unsafeSlug?: string | null;
@@ -176,9 +165,8 @@ type CodegenNftCollectionInfoFragment = {
176
165
  } | null;
177
166
  };
178
167
  type CodegenNftDetailsFragment = {
179
- __typename?: 'EVMSchemaType';
180
168
  nft?: {
181
- __typename?: 'ERC721NFT';
169
+ __typename: 'ERC721NFT';
182
170
  animationUrl?: string | null;
183
171
  collectionSlug?: string | null;
184
172
  contractAddress: string;
@@ -188,12 +176,11 @@ type CodegenNftDetailsFragment = {
188
176
  name?: string | null;
189
177
  tokenId: any;
190
178
  wallet?: {
191
- __typename?: 'Wallet';
192
179
  address: string;
193
180
  ensName?: string | null;
194
181
  } | null;
195
182
  } | {
196
- __typename?: 'ERC1155NFT';
183
+ __typename: 'ERC1155NFT';
197
184
  animationUrl?: string | null;
198
185
  collectionSlug?: string | null;
199
186
  contractAddress: string;
@@ -203,11 +190,8 @@ type CodegenNftDetailsFragment = {
203
190
  name?: string | null;
204
191
  tokenId: any;
205
192
  wallets: {
206
- __typename?: 'ERC1155NFTWalletsConnection';
207
193
  edges: Array<{
208
- __typename?: 'ERC1155NFTWalletsConnectionEdge';
209
194
  node: {
210
- __typename?: 'Wallet';
211
195
  address: string;
212
196
  ensName?: string | null;
213
197
  };
@@ -216,7 +200,7 @@ type CodegenNftDetailsFragment = {
216
200
  } | null;
217
201
  };
218
202
  type CodegenERC1155NFTNodeFragment = {
219
- __typename?: 'ERC1155NFT';
203
+ __typename: 'ERC1155NFT';
220
204
  animationUrl?: string | null;
221
205
  collectionSlug?: string | null;
222
206
  contractAddress: string;
@@ -226,11 +210,8 @@ type CodegenERC1155NFTNodeFragment = {
226
210
  name?: string | null;
227
211
  tokenId: any;
228
212
  wallets: {
229
- __typename?: 'ERC1155NFTWalletsConnection';
230
213
  edges: Array<{
231
- __typename?: 'ERC1155NFTWalletsConnectionEdge';
232
214
  node: {
233
- __typename?: 'Wallet';
234
215
  address: string;
235
216
  ensName?: string | null;
236
217
  };
@@ -238,7 +219,7 @@ type CodegenERC1155NFTNodeFragment = {
238
219
  };
239
220
  };
240
221
  type CodegenERC721NFTNodeFragment = {
241
- __typename?: 'ERC721NFT';
222
+ __typename: 'ERC721NFT';
242
223
  animationUrl?: string | null;
243
224
  collectionSlug?: string | null;
244
225
  contractAddress: string;
@@ -248,18 +229,15 @@ type CodegenERC721NFTNodeFragment = {
248
229
  name?: string | null;
249
230
  tokenId: any;
250
231
  attributes?: Array<{
251
- __typename?: 'TokenAttribute';
252
232
  name: string;
253
233
  value: string;
254
234
  }> | null;
255
235
  wallet?: {
256
- __typename?: 'Wallet';
257
236
  address: string;
258
237
  ensName?: string | null;
259
238
  } | null;
260
239
  };
261
240
  type CodegenTransactionsNodeFragment = {
262
- __typename?: 'Transaction';
263
241
  blockNumber: number;
264
242
  blockTimestamp: any;
265
243
  contractAddress?: string | null;
@@ -279,7 +257,6 @@ type CodegenTransactionsNodeFragment = {
279
257
  value?: any | null;
280
258
  };
281
259
  type CodegenTrendingCollectionInfo_CodegenERC721Collection_CodegenFragment = {
282
- __typename?: 'ERC721Collection';
283
260
  address: string;
284
261
  baseTokenUri?: string | null;
285
262
  circulatingSupply?: any | null;
@@ -290,21 +267,18 @@ type CodegenTrendingCollectionInfo_CodegenERC721Collection_CodegenFragment = {
290
267
  totalSupply?: any | null;
291
268
  twitterUsername?: string | null;
292
269
  image?: Array<{
293
- __typename?: 'TokenUpload';
294
270
  height?: number | null;
295
271
  mimeType?: string | null;
296
272
  url: string;
297
273
  width?: number | null;
298
274
  }> | null;
299
275
  openseaMetadata?: {
300
- __typename?: 'OpenSeaMetadata';
301
276
  isHidden?: boolean | null;
302
277
  isVerified?: boolean | null;
303
278
  unsafeSlug?: string | null;
304
279
  } | null;
305
280
  };
306
281
  type CodegenTrendingCollectionInfo_CodegenERC1155Collection_CodegenFragment = {
307
- __typename?: 'ERC1155Collection';
308
282
  address: string;
309
283
  baseTokenUri?: string | null;
310
284
  circulatingSupply?: any | null;
@@ -315,14 +289,12 @@ type CodegenTrendingCollectionInfo_CodegenERC1155Collection_CodegenFragment = {
315
289
  totalSupply?: any | null;
316
290
  twitterUsername?: string | null;
317
291
  image?: Array<{
318
- __typename?: 'TokenUpload';
319
292
  height?: number | null;
320
293
  mimeType?: string | null;
321
294
  url: string;
322
295
  width?: number | null;
323
296
  }> | null;
324
297
  openseaMetadata?: {
325
- __typename?: 'OpenSeaMetadata';
326
298
  isHidden?: boolean | null;
327
299
  isVerified?: boolean | null;
328
300
  unsafeSlug?: string | null;
@@ -330,9 +302,7 @@ type CodegenTrendingCollectionInfo_CodegenERC1155Collection_CodegenFragment = {
330
302
  };
331
303
  type CodegenTrendingCollectionInfoFragment = CodegenTrendingCollectionInfo_CodegenERC721Collection_CodegenFragment | CodegenTrendingCollectionInfo_CodegenERC1155Collection_CodegenFragment;
332
304
  type CodegenWalletNFTNodeFragment = {
333
- __typename?: 'WalletNFT';
334
305
  nft?: {
335
- __typename?: 'ERC721NFT';
336
306
  animationUrl?: string | null;
337
307
  collectionSlug?: string | null;
338
308
  contractAddress: string;
@@ -342,7 +312,6 @@ type CodegenWalletNFTNodeFragment = {
342
312
  name?: string | null;
343
313
  tokenId: any;
344
314
  } | {
345
- __typename?: 'ERC1155NFT';
346
315
  animationUrl?: string | null;
347
316
  collectionSlug?: string | null;
348
317
  contractAddress: string;
@@ -354,7 +323,7 @@ type CodegenWalletNFTNodeFragment = {
354
323
  } | null;
355
324
  };
356
325
  type CodegenContractInfo_CodegenNFTContract_CodegenFragment = {
357
- __typename?: 'NFTContract';
326
+ __typename: 'NFTContract';
358
327
  abi?: any | null;
359
328
  address: string;
360
329
  isVerified?: boolean | null;
@@ -363,7 +332,7 @@ type CodegenContractInfo_CodegenNFTContract_CodegenFragment = {
363
332
  symbol?: string | null;
364
333
  };
365
334
  type CodegenContractInfo_CodegenTokenContract_CodegenFragment = {
366
- __typename?: 'TokenContract';
335
+ __typename: 'TokenContract';
367
336
  decimals?: any | null;
368
337
  abi?: any | null;
369
338
  address: string;
@@ -374,10 +343,8 @@ type CodegenContractInfo_CodegenTokenContract_CodegenFragment = {
374
343
  };
375
344
  type CodegenContractInfoFragment = CodegenContractInfo_CodegenNFTContract_CodegenFragment | CodegenContractInfo_CodegenTokenContract_CodegenFragment;
376
345
  type CodegenTokenBalanceNodeFragment = {
377
- __typename?: 'WalletTokenBalance';
378
346
  totalBalance: any;
379
347
  contract?: {
380
- __typename?: 'TokenContract';
381
348
  address: string;
382
349
  decimals?: any | null;
383
350
  name?: string | null;
@@ -385,7 +352,7 @@ type CodegenTokenBalanceNodeFragment = {
385
352
  } | null;
386
353
  };
387
354
  type CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment = {
388
- __typename?: 'TokenBurnEvent';
355
+ __typename: 'TokenBurnEvent';
389
356
  tokenId?: any | null;
390
357
  tokenQuantity: any;
391
358
  blockNumber: number;
@@ -397,7 +364,7 @@ type CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment = {
397
364
  type: CodegenTokenTransferType;
398
365
  };
399
366
  type CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment = {
400
- __typename?: 'TokenMintEvent';
367
+ __typename: 'TokenMintEvent';
401
368
  tokenQuantity: any;
402
369
  blockNumber: number;
403
370
  fromAddress: string;
@@ -408,7 +375,7 @@ type CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment = {
408
375
  type: CodegenTokenTransferType;
409
376
  };
410
377
  type CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment = {
411
- __typename?: 'TokenSaleEvent';
378
+ __typename: 'TokenSaleEvent';
412
379
  marketplace?: CodegenMarketplace | null;
413
380
  receivedTokenContractAddress?: string | null;
414
381
  receivedTokenId?: any | null;
@@ -422,7 +389,7 @@ type CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment = {
422
389
  type: CodegenTokenTransferType;
423
390
  };
424
391
  type CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment = {
425
- __typename?: 'TokenSwapEvent';
392
+ __typename: 'TokenSwapEvent';
426
393
  blockNumber: number;
427
394
  fromAddress: string;
428
395
  timestamp: any;
@@ -432,7 +399,7 @@ type CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment = {
432
399
  type: CodegenTokenTransferType;
433
400
  };
434
401
  type CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment = {
435
- __typename?: 'TokenTransferEvent';
402
+ __typename: 'TokenTransferEvent';
436
403
  tokenId?: any | null;
437
404
  contractAddress: string;
438
405
  tokenQuantity: any;
@@ -446,7 +413,6 @@ type CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment = {
446
413
  };
447
414
  type CodegenTokenEventInfoFragment = CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment;
448
415
  type CodegenPaginationFragment = {
449
- __typename?: 'PageInfo';
450
416
  endCursor?: string | null;
451
417
  hasNextPage: boolean;
452
418
  hasPreviousPage: boolean;
@@ -455,13 +421,10 @@ type CodegenPaginationFragment = {
455
421
 
456
422
  type ResultOutput = Record<string | number | symbol, any>;
457
423
 
458
- interface InternalOptions {
459
- keepTypename?: boolean;
460
- }
461
424
  declare class CustomUrqlClient {
462
425
  urqlClient: Client;
463
426
  constructor(urqlClient: Client);
464
- query<TVariables extends Record<string, any>, KResults extends Record<string, any>, KResultsOutput extends ResultOutput>(options: GraphQLRequestParams<any, TVariables> & InternalOptions): Promise<{
427
+ query<TVariables extends Record<string, any>, KResults extends Record<string, any>, KResultsOutput extends ResultOutput>(options: GraphQLRequestParams<any, TVariables>): Promise<{
465
428
  data: any;
466
429
  operation: _urql_core_dist_urql_core_chunk.Operation<any, Record<string, any> | TVariables>;
467
430
  error?: _urql_core_dist_urql_core_chunk.CombinedError | undefined;
@@ -474,6 +437,10 @@ declare class CustomUrqlClient {
474
437
  declare const supportedChains: readonly ["ethereum", "polygon", "ethereumSepolia"];
475
438
  type ChainName = (typeof supportedChains)[number];
476
439
 
440
+ type SimplifyType<T> = T extends object ? {
441
+ [K in keyof T]: SimplifyType<T[K]>;
442
+ } : T;
443
+
477
444
  declare const walletByAddressValidator: z.ZodObject<{
478
445
  filter: z.ZodOptional<z.ZodObject<{
479
446
  contractTokens: z.ZodArray<z.ZodObject<{
@@ -540,12 +507,12 @@ declare const walletByAddressValidator: z.ZodObject<{
540
507
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
541
508
  }>;
542
509
  type WalletNFTsByAddressInput = z.infer<typeof walletByAddressValidator>;
543
- type WalletNFTsByAddressResult = {
510
+ type WalletNFTsByAddressResult = SimplifyType<{
544
511
  address: string;
545
512
  ensName: string;
546
513
  results: CodegenWalletNFTNodeFragment['nft'][];
547
514
  pageInfo: CodegenPaginationFragment;
548
- };
515
+ }>;
549
516
 
550
517
  declare const nftDetailsValidator: z.ZodObject<{
551
518
  contractAddress: z.ZodString;
@@ -561,9 +528,9 @@ declare const nftDetailsValidator: z.ZodObject<{
561
528
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
562
529
  }>;
563
530
  type NFTDetailsInput = z.infer<typeof nftDetailsValidator>;
564
- type NFTDetailsResult = {
531
+ type NFTDetailsResult = SimplifyType<{
565
532
  nft: CodegenNftDetailsFragment['nft'];
566
- };
533
+ }>;
567
534
 
568
535
  declare const nftCollectionDetailsValidator: z.ZodObject<{
569
536
  contractAddress: z.ZodString;
@@ -576,9 +543,9 @@ declare const nftCollectionDetailsValidator: z.ZodObject<{
576
543
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
577
544
  }>;
578
545
  type NftCollectionDetailsInput = z.infer<typeof nftCollectionDetailsValidator>;
579
- type NftCollectionDetailsResult = {
546
+ type NftCollectionDetailsResult = SimplifyType<{
580
547
  collection: CodegenNftCollectionInfoFragment['collection'];
581
- };
548
+ }>;
582
549
 
583
550
  declare const nftTrendingCollectionsValidator: z.ZodObject<{
584
551
  before: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -597,10 +564,10 @@ declare const nftTrendingCollectionsValidator: z.ZodObject<{
597
564
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
598
565
  }>;
599
566
  type NFTTrendingCollectionsInput = z.infer<typeof nftTrendingCollectionsValidator>;
600
- type NFTTrendingCollectionResult = {
567
+ type NFTTrendingCollectionResult = SimplifyType<{
601
568
  results: CodegenTrendingCollectionInfoFragment[];
602
569
  pageInfo: CodegenPaginationFragment;
603
- };
570
+ }>;
604
571
 
605
572
  type NftErcStandards = 'ERC721' | 'ERC1155';
606
573
 
@@ -624,11 +591,11 @@ declare const nftsByContractAddressValidator: z.ZodObject<{
624
591
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
625
592
  }>;
626
593
  type NFTsByContractAddressInput = z.infer<typeof nftsByContractAddressValidator>;
627
- type NFTsByContractAddressResult = {
594
+ type NFTsByContractAddressResult = SimplifyType<{
628
595
  standard: NftErcStandards | null;
629
596
  results: [CodegenERC721NFTNodeFragment | CodegenERC1155NFTNodeFragment][];
630
597
  pageInfo: CodegenPaginationFragment;
631
- };
598
+ }>;
632
599
 
633
600
  declare const verifyOwnershipValidator: z.ZodObject<{
634
601
  address: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodString]>;
@@ -687,12 +654,12 @@ type NonQueryInput = {
687
654
  };
688
655
 
689
656
  type BalancesByWalletENSInput = CodegenEthMainnetBalancesByWalletENSQueryVariables & NonQueryInput;
690
- type BalancesByWalletENSResult = {
657
+ type BalancesByWalletENSResult = SimplifyType<{
691
658
  address: string;
692
659
  ensName: string;
693
660
  results: CodegenTokenBalanceNodeFragment[];
694
661
  pageInfo: CodegenPaginationFragment;
695
- };
662
+ }>;
696
663
 
697
664
  declare const balancesByWalletAddressValidator$1: z.ZodObject<{
698
665
  before: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -714,12 +681,12 @@ declare const balancesByWalletAddressValidator$1: z.ZodObject<{
714
681
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
715
682
  }>;
716
683
  type BalancesByWalletAddressInput = z.infer<typeof balancesByWalletAddressValidator$1>;
717
- type BalancesByWalletAddressResult = {
684
+ type BalancesByWalletAddressResult = SimplifyType<{
718
685
  address: string;
719
686
  ensName: string;
720
687
  results: CodegenTokenBalanceNodeFragment[];
721
688
  pageInfo: CodegenPaginationFragment;
722
- };
689
+ }>;
723
690
 
724
691
  declare class TokensController {
725
692
  private client;
@@ -811,9 +778,9 @@ declare const gasPricesValidator: z.ZodObject<{
811
778
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
812
779
  }>;
813
780
  type GasPricesInput = z.infer<typeof gasPricesValidator>;
814
- type GasPricesResult = {
781
+ type GasPricesResult = SimplifyType<{
815
782
  gasPrices: CodegenGasPrice[];
816
- };
783
+ }>;
817
784
 
818
785
  declare class UtilsController {
819
786
  private client;
@@ -833,9 +800,9 @@ declare const contractDetailsValidator: z.ZodObject<{
833
800
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
834
801
  }>;
835
802
  type ContractDetailsInput = z.infer<typeof contractDetailsValidator>;
836
- type ContractDetailsResult = {
803
+ type ContractDetailsResult = SimplifyType<{
837
804
  contract: CodegenContractInfoFragment | null;
838
- };
805
+ }>;
839
806
 
840
807
  declare class ContractsController {
841
808
  private client;
@@ -1258,10 +1225,10 @@ declare const contractEventsValidator: z.ZodObject<{
1258
1225
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
1259
1226
  }>;
1260
1227
  type ContractEventsInput = z.infer<typeof contractEventsValidator>;
1261
- type ContractEventsResult = {
1228
+ type ContractEventsResult = SimplifyType<{
1262
1229
  results: CodegenTokenEventInfoFragment[];
1263
1230
  pageInfo: CodegenPaginationFragment;
1264
- };
1231
+ }>;
1265
1232
 
1266
1233
  declare const collectionEventsValidator: z.ZodObject<{
1267
1234
  contractAddress: z.ZodString;
@@ -1677,10 +1644,10 @@ declare const collectionEventsValidator: z.ZodObject<{
1677
1644
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
1678
1645
  }>;
1679
1646
  type CollectionEventsInput = z.infer<typeof collectionEventsValidator>;
1680
- type CollectionEventsResult = {
1647
+ type CollectionEventsResult = SimplifyType<{
1681
1648
  results: CodegenTokenEventInfoFragment[];
1682
1649
  pageInfo: CodegenPaginationFragment;
1683
- };
1650
+ }>;
1684
1651
 
1685
1652
  declare const nftEventsValidator: z.ZodObject<{
1686
1653
  contractAddress: z.ZodString;
@@ -2099,10 +2066,10 @@ declare const nftEventsValidator: z.ZodObject<{
2099
2066
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
2100
2067
  }>;
2101
2068
  type NFTEventsInput = z.infer<typeof nftEventsValidator>;
2102
- type NFTEventsResult = {
2069
+ type NFTEventsResult = SimplifyType<{
2103
2070
  results: CodegenTokenEventInfoFragment[];
2104
2071
  pageInfo: CodegenPaginationFragment;
2105
- };
2072
+ }>;
2106
2073
 
2107
2074
  declare const allEventsValidator: z.ZodObject<{
2108
2075
  filter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2515,10 +2482,10 @@ declare const allEventsValidator: z.ZodObject<{
2515
2482
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
2516
2483
  }>;
2517
2484
  type AllEventsInput = z.infer<typeof allEventsValidator>;
2518
- type AllEventsResult = {
2485
+ type AllEventsResult = SimplifyType<{
2519
2486
  results: CodegenTokenEventInfoFragment[];
2520
2487
  pageInfo: CodegenPaginationFragment;
2521
- };
2488
+ }>;
2522
2489
 
2523
2490
  declare class EventsController {
2524
2491
  private client;
@@ -2550,12 +2517,12 @@ declare const balancesByWalletAddressValidator: z.ZodObject<{
2550
2517
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
2551
2518
  }>;
2552
2519
  type TransactionsByWalletAddressInput = z.infer<typeof balancesByWalletAddressValidator>;
2553
- type TransactionsByWalletAddressResult = {
2520
+ type TransactionsByWalletAddressResult = SimplifyType<{
2554
2521
  address: string;
2555
2522
  ensName: string;
2556
2523
  results: CodegenTransactionsNodeFragment[];
2557
2524
  pageInfo: CodegenPaginationFragment;
2558
- };
2525
+ }>;
2559
2526
 
2560
2527
  declare const transactionsBySearchValidator: z.ZodObject<{
2561
2528
  filter: z.ZodOptional<z.ZodObject<{
@@ -2714,10 +2681,10 @@ declare const transactionsBySearchValidator: z.ZodObject<{
2714
2681
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
2715
2682
  }>;
2716
2683
  type TransactionsBySearchInput = z.infer<typeof transactionsBySearchValidator>;
2717
- type TransactionsBySearchResult = {
2684
+ type TransactionsBySearchResult = SimplifyType<{
2718
2685
  results: CodegenTransactionsNodeFragment[];
2719
2686
  pageInfo: CodegenPaginationFragment;
2720
- };
2687
+ }>;
2721
2688
 
2722
2689
  declare const transactionsByHashValidator: z.ZodObject<{
2723
2690
  hash: z.ZodString;
@@ -2730,9 +2697,9 @@ declare const transactionsByHashValidator: z.ZodObject<{
2730
2697
  chain?: "ethereum" | "ethereumSepolia" | "polygon" | null | undefined;
2731
2698
  }>;
2732
2699
  type TransactionsByHashInput = z.infer<typeof transactionsByHashValidator>;
2733
- type TransactionsByHashResult = {
2700
+ type TransactionsByHashResult = SimplifyType<{
2734
2701
  transaction: CodegenTransactionsNodeFragment | null;
2735
- };
2702
+ }>;
2736
2703
 
2737
2704
  declare class TransactionsController {
2738
2705
  private client;
@@ -2767,27 +2734,575 @@ declare class API {
2767
2734
  private createUrqlClient;
2768
2735
  }
2769
2736
 
2737
+ type NftTrait = {
2738
+ trait_type: string;
2739
+ value: string;
2740
+ };
2741
+ type RpcNftAsset = {
2742
+ collectionName: string;
2743
+ collectionTokenId: string;
2744
+ collectionAddress: string;
2745
+ name: string;
2746
+ description: string;
2747
+ imageUrl: string;
2748
+ traits: NftTrait[];
2749
+ chain: string;
2750
+ network: string;
2751
+ };
2752
+ type RPCTokenMetadata = {
2753
+ name: string | null;
2754
+ symbol: string | null;
2755
+ contractAddress: string;
2756
+ decimals: string | null;
2757
+ genesisBlock: string | null;
2758
+ genesisTransaction: string | null;
2759
+ };
2760
+
2761
+ declare const qnFetchNFTInputSchema: z.ZodObject<{
2762
+ wallet: z.ZodString;
2763
+ contracts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2764
+ omitFields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2765
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2766
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2767
+ }, "strict", z.ZodTypeAny, {
2768
+ wallet: string;
2769
+ contracts?: string[] | null | undefined;
2770
+ omitFields?: string[] | null | undefined;
2771
+ perPage?: number | null | undefined;
2772
+ page?: number | null | undefined;
2773
+ }, {
2774
+ wallet: string;
2775
+ contracts?: string[] | null | undefined;
2776
+ omitFields?: string[] | null | undefined;
2777
+ perPage?: number | null | undefined;
2778
+ page?: number | null | undefined;
2779
+ }>;
2780
+ type QNFetchNFTInput = z.infer<typeof qnFetchNFTInputSchema>;
2781
+ type QNFetchNFTResult = {
2782
+ owner: string;
2783
+ assets: RpcNftAsset[];
2784
+ totalPages: number;
2785
+ totalItems: number;
2786
+ pageNumber: number;
2787
+ };
2788
+
2789
+ declare const qnFetchNFTCollectionDetailsInputSchema: z.ZodObject<{
2790
+ contracts: z.ZodArray<z.ZodString, "many">;
2791
+ }, "strict", z.ZodTypeAny, {
2792
+ contracts: string[];
2793
+ }, {
2794
+ contracts: string[];
2795
+ }>;
2796
+ type QNFetchNFTCollectionDetailsInput = z.infer<typeof qnFetchNFTCollectionDetailsInputSchema>;
2797
+ type RPCNftCollectionDetails = {
2798
+ name: string;
2799
+ address: string;
2800
+ description: string;
2801
+ erc1155: boolean;
2802
+ erc721: boolean;
2803
+ totalSupply: number;
2804
+ circulatingSupply: number;
2805
+ genesisBlock: number | null;
2806
+ genesisTransaction: string | null;
2807
+ };
2808
+ type QNFetchNFTCollectionDetailsResult = RPCNftCollectionDetails[];
2809
+
2810
+ declare const qnFetchNFTsByCollectionInputSchema: z.ZodObject<{
2811
+ collection: z.ZodString;
2812
+ omitFields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2813
+ tokens: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2814
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2815
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2816
+ }, "strict", z.ZodTypeAny, {
2817
+ collection: string;
2818
+ omitFields?: string[] | null | undefined;
2819
+ tokens?: string[] | null | undefined;
2820
+ perPage?: number | null | undefined;
2821
+ page?: number | null | undefined;
2822
+ }, {
2823
+ collection: string;
2824
+ omitFields?: string[] | null | undefined;
2825
+ tokens?: string[] | null | undefined;
2826
+ perPage?: number | null | undefined;
2827
+ page?: number | null | undefined;
2828
+ }>;
2829
+ type QNFetchNFTsByCollectionInput = z.infer<typeof qnFetchNFTsByCollectionInputSchema>;
2830
+ type QNFetchNFTsByCollectionResult = {
2831
+ collection: string;
2832
+ tokens: RpcNftAsset[];
2833
+ };
2834
+
2835
+ declare const qnGetTransfersByNFTInputSchema: z.ZodObject<{
2836
+ collection: z.ZodString;
2837
+ collectionTokenId: z.ZodString;
2838
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2839
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2840
+ }, "strict", z.ZodTypeAny, {
2841
+ collection: string;
2842
+ collectionTokenId: string;
2843
+ perPage?: number | null | undefined;
2844
+ page?: number | null | undefined;
2845
+ }, {
2846
+ collection: string;
2847
+ collectionTokenId: string;
2848
+ perPage?: number | null | undefined;
2849
+ page?: number | null | undefined;
2850
+ }>;
2851
+ type QNGetTransfersByNFTInput = z.infer<typeof qnGetTransfersByNFTInputSchema>;
2852
+ type TransfersByNFTTransfer = {
2853
+ blockNumber: number;
2854
+ date: string;
2855
+ from: string;
2856
+ to: string;
2857
+ txHash: string;
2858
+ };
2859
+ type QNGetTransfersByNFTResult = {
2860
+ collection: string;
2861
+ transfers: TransfersByNFTTransfer[];
2862
+ totalPages: number;
2863
+ pageNumber: number;
2864
+ totalItems: number;
2865
+ };
2866
+
2867
+ declare const qnVerifyNFTsOwnerInputSchema: z.ZodObject<{
2868
+ wallet: z.ZodString;
2869
+ contracts: z.ZodArray<z.ZodString, "many">;
2870
+ }, "strict", z.ZodTypeAny, {
2871
+ wallet: string;
2872
+ contracts: string[];
2873
+ }, {
2874
+ wallet: string;
2875
+ contracts: string[];
2876
+ }>;
2877
+ type QNVerifyNFTsOwnerInput = z.infer<typeof qnVerifyNFTsOwnerInputSchema>;
2878
+ type QNVerifyNFTsOwnerResult = {
2879
+ owner: string;
2880
+ assets: string[];
2881
+ };
2882
+
2883
+ declare const qnGetTokenMetadataByCAInputSchema: z.ZodObject<{
2884
+ contract: z.ZodString;
2885
+ }, "strict", z.ZodTypeAny, {
2886
+ contract: string;
2887
+ }, {
2888
+ contract: string;
2889
+ }>;
2890
+ type QNGetTokenMetadataByCAInput = z.infer<typeof qnGetTokenMetadataByCAInputSchema>;
2891
+ type QNGetTokenMetadataByCAResult = RPCTokenMetadata;
2892
+
2893
+ declare const qnGetTokenMetadataBySymbolInputSchema: z.ZodObject<{
2894
+ symbol: z.ZodString;
2895
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2896
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2897
+ }, "strict", z.ZodTypeAny, {
2898
+ symbol: string;
2899
+ perPage?: number | null | undefined;
2900
+ page?: number | null | undefined;
2901
+ }, {
2902
+ symbol: string;
2903
+ perPage?: number | null | undefined;
2904
+ page?: number | null | undefined;
2905
+ }>;
2906
+ type QNGetTokenMetadataBySymbolInput = z.infer<typeof qnGetTokenMetadataBySymbolInputSchema>;
2907
+ type QNGetTokenMetadataBySymbolResult = {
2908
+ tokens: RPCTokenMetadata[];
2909
+ };
2910
+
2911
+ declare const qnGetTransactionsByAddressInputSchema: z.ZodEffects<z.ZodObject<{
2912
+ address: z.ZodString;
2913
+ fromBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2914
+ toBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2915
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2916
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2917
+ }, "strict", z.ZodTypeAny, {
2918
+ address: string;
2919
+ fromBlock?: number | null | undefined;
2920
+ toBlock?: number | null | undefined;
2921
+ perPage?: number | null | undefined;
2922
+ page?: number | null | undefined;
2923
+ }, {
2924
+ address: string;
2925
+ fromBlock?: number | null | undefined;
2926
+ toBlock?: number | null | undefined;
2927
+ perPage?: number | null | undefined;
2928
+ page?: number | null | undefined;
2929
+ }>, {
2930
+ address: string;
2931
+ fromBlock?: number | null | undefined;
2932
+ toBlock?: number | null | undefined;
2933
+ perPage?: number | null | undefined;
2934
+ page?: number | null | undefined;
2935
+ }, {
2936
+ address: string;
2937
+ fromBlock?: number | null | undefined;
2938
+ toBlock?: number | null | undefined;
2939
+ perPage?: number | null | undefined;
2940
+ page?: number | null | undefined;
2941
+ }>;
2942
+ type QNGetTransactionsByAddressInput = z.infer<typeof qnGetTransactionsByAddressInputSchema>;
2943
+ interface RPCTransactionByAddress {
2944
+ blockTimestamp: string;
2945
+ transactionHash: string;
2946
+ blockNumber: string;
2947
+ transactionIndex: number;
2948
+ fromAddress: string;
2949
+ toAddress: string;
2950
+ contractAddress: string | null;
2951
+ value: string;
2952
+ }
2953
+ type QNGetTransactionsByAddressResult = {
2954
+ paginatedItems: RPCTransactionByAddress[];
2955
+ totalItems: number;
2956
+ totalPages: number;
2957
+ pageNumber: number;
2958
+ };
2959
+
2960
+ declare const qnGetWalletTokenBalanceInputSchema: z.ZodObject<{
2961
+ wallet: z.ZodString;
2962
+ contracts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2963
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2964
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2965
+ }, "strict", z.ZodTypeAny, {
2966
+ wallet: string;
2967
+ contracts?: string[] | null | undefined;
2968
+ perPage?: number | null | undefined;
2969
+ page?: number | null | undefined;
2970
+ }, {
2971
+ wallet: string;
2972
+ contracts?: string[] | null | undefined;
2973
+ perPage?: number | null | undefined;
2974
+ page?: number | null | undefined;
2975
+ }>;
2976
+ type QNGetWalletTokenBalanceInput = z.infer<typeof qnGetWalletTokenBalanceInputSchema>;
2977
+ type RPCWalletTokenBalance = {
2978
+ quantityIn: string;
2979
+ quantityOut: string;
2980
+ name: string | null;
2981
+ symbol: string | null;
2982
+ decimals: string | null;
2983
+ address: string;
2984
+ totalBalance: string;
2985
+ };
2986
+ type QNGetWalletTokenBalanceResult = {
2987
+ result: RPCWalletTokenBalance[];
2988
+ totalItems: number;
2989
+ totalPages: number;
2990
+ pageNumber: number;
2991
+ };
2992
+
2993
+ declare const qnGetWalletTokenTransactionsInputSchema: z.ZodObject<{
2994
+ address: z.ZodString;
2995
+ contract: z.ZodString;
2996
+ fromBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2997
+ toBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2998
+ perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2999
+ page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3000
+ }, "strict", z.ZodTypeAny, {
3001
+ address: string;
3002
+ contract: string;
3003
+ fromBlock?: number | null | undefined;
3004
+ toBlock?: number | null | undefined;
3005
+ perPage?: number | null | undefined;
3006
+ page?: number | null | undefined;
3007
+ }, {
3008
+ address: string;
3009
+ contract: string;
3010
+ fromBlock?: number | null | undefined;
3011
+ toBlock?: number | null | undefined;
3012
+ perPage?: number | null | undefined;
3013
+ page?: number | null | undefined;
3014
+ }>;
3015
+ type QNGetWalletTokenTransactionsInput = z.infer<typeof qnGetWalletTokenTransactionsInputSchema>;
3016
+ type RPCFullTokenMetadata = {
3017
+ address: string;
3018
+ genesisBlock: string | null;
3019
+ genesisTransaction: string | null;
3020
+ name: string | null;
3021
+ symbol: string | null;
3022
+ decimals: string | null;
3023
+ contractAddress: string;
3024
+ };
3025
+ type RPCTokenTransaction = {
3026
+ name: string | null;
3027
+ symbol: string | null;
3028
+ decimals: string | null;
3029
+ address: string;
3030
+ quantityIn: string;
3031
+ quantityOut: string;
3032
+ blockNumber: string;
3033
+ transactionHash: string;
3034
+ timestamp: string;
3035
+ totalBalance: string;
3036
+ };
3037
+ type QNGetWalletTokenTransactionsResult = {
3038
+ paginatedItems: RPCTokenTransaction[];
3039
+ totalItems: number;
3040
+ totalPages: number;
3041
+ pageNumber: number;
3042
+ token: RPCFullTokenMetadata;
3043
+ };
3044
+
3045
+ type NFTAndTokenActions = {
3046
+ /**
3047
+ * Returns aggregated data on NFTs for a given wallet.
3048
+ *
3049
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_fetchNFTs_v2
3050
+ *
3051
+ * @param args - {@link QNFetchNFTInput}
3052
+ * @returns response - {@link QNFetchNFTsResult}
3053
+ *
3054
+ * @example
3055
+ * import QuickNode from '@quicknode/sdk';
3056
+ *
3057
+ * const core = new QuickNode.Core({
3058
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3059
+ * config: {
3060
+ * addOns: { nftTokenV2: true }
3061
+ * }
3062
+ * }
3063
+ *
3064
+ * const response = await core.client.qn_fetchNFTs({
3065
+ * wallet: "0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6",
3066
+ * contracts: ['0x2106C00Ac7dA0A3430aE667879139E832307AeAa'],
3067
+ * });
3068
+ */
3069
+ qn_fetchNFTs: (args: SimplifyType<QNFetchNFTInput>) => Promise<SimplifyType<QNFetchNFTResult>>;
3070
+ /**
3071
+ * Returns aggregated data on NFTs for a given wallet.
3072
+ *
3073
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_fetchNFTCollectionDetails_v2
3074
+ *
3075
+ * @param args - {@link QNFetchNFTCollectionDetailsInput}
3076
+ * @returns response - {@link QNFetchNFTCollectionDetailsResult}
3077
+ *
3078
+ * @example
3079
+ * import QuickNode from '@quicknode/sdk';
3080
+ *
3081
+ * const core = new QuickNode.Core({
3082
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3083
+ * config: {
3084
+ * addOns: { nftTokenV2: true }
3085
+ * }
3086
+ * }
3087
+ *
3088
+ * const response = await core.client.qn_fetchNFTCollectionDetails({
3089
+ * contracts: [
3090
+ * "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
3091
+ * "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7",
3092
+ * ]
3093
+ * });
3094
+ */
3095
+ qn_fetchNFTCollectionDetails: (args: SimplifyType<QNFetchNFTCollectionDetailsInput>) => Promise<SimplifyType<QNFetchNFTCollectionDetailsResult>>;
3096
+ /**
3097
+ * Returns aggregated data on NFTs within a given collection.
3098
+ *
3099
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_fetchNFTsByCollection_v2
3100
+ *
3101
+ * @param args - {@link QNFetchNFTsByCollectionInput}
3102
+ * @returns response - {@link QNFetchNFTsByCollectionResult}
3103
+ *
3104
+ * @example
3105
+ * import QuickNode from '@quicknode/sdk';
3106
+ *
3107
+ * const core = new QuickNode.Core({
3108
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3109
+ * config: {
3110
+ * addOns: { nftTokenV2: true }
3111
+ * }
3112
+ * }
3113
+ *
3114
+ * const response = await core.client.qn_fetchNFTsByCollection({
3115
+ * collection: "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
3116
+ * })
3117
+ */
3118
+ qn_fetchNFTsByCollection: (args: SimplifyType<QNFetchNFTsByCollectionInput>) => Promise<SimplifyType<QNFetchNFTsByCollectionResult>>;
3119
+ /**
3120
+ * Returns transfers by given NFT.
3121
+ *
3122
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_getTransfersByNFT_v2
3123
+ *
3124
+ * @param args - {@link QNGetTransfersByNFTInput}
3125
+ * @returns response - {@link QNGetTransfersByNFTResult}
3126
+ *
3127
+ * @example
3128
+ * import QuickNode from '@quicknode/sdk';
3129
+ *
3130
+ * const core = new QuickNode.Core({
3131
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3132
+ * config: {
3133
+ * addOns: { nftTokenV2: true }
3134
+ * }
3135
+ * }
3136
+ *
3137
+ * const response = await core.client.qn_getTransfersByNFT({
3138
+ * collection: "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
3139
+ 7 * collectionTokenId: "1",
3140
+ * })
3141
+ */
3142
+ qn_getTransfersByNFT: (args: SimplifyType<QNGetTransfersByNFTInput>) => Promise<SimplifyType<QNGetTransfersByNFTResult>>;
3143
+ /**
3144
+ * Confirms ownership of specified NFTs for a given wallet.
3145
+ *
3146
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_verifyNFTsOwner_v2
3147
+ *
3148
+ * @param args - {@link QNVerifyNFTsOwnerInput}
3149
+ * @returns response - {@link QNVerifyNFTsOwnerResult}
3150
+ *
3151
+ * @example
3152
+ * import QuickNode from '@quicknode/sdk';
3153
+ *
3154
+ * const core = new QuickNode.Core({
3155
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3156
+ * config: {
3157
+ * addOns: { nftTokenV2: true }
3158
+ * }
3159
+ * }
3160
+ *
3161
+ * const response = await core.client.qn_verifyNFTsOwner({
3162
+ * wallet: "0x91b51c173a4bdaa1a60e234fc3f705a16d228740",
3163
+ * contracts: [
3164
+ * "0x2106c00ac7da0a3430ae667879139e832307aeaa:3643",
3165
+ * "0xd07dc4262bcdbf85190c01c996b4c06a461d2430:133803",
3166
+ * ],
3167
+ * })
3168
+ *
3169
+ */
3170
+ qn_verifyNFTsOwner: (args: SimplifyType<QNVerifyNFTsOwnerInput>) => Promise<SimplifyType<QNVerifyNFTsOwnerResult>>;
3171
+ /**
3172
+ * Returns token details for specified contract.
3173
+ *
3174
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_getTokenMetadataByContractAddress_v2
3175
+ *
3176
+ * @param args - {@link QNGetTokenMetadataByCAInput}
3177
+ * @returns response - {@link QNGetTokenMetadataByCAResult}
3178
+ *
3179
+ * @example
3180
+ * import QuickNode from '@quicknode/sdk';
3181
+ *
3182
+ * const core = new QuickNode.Core({
3183
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3184
+ * config: {
3185
+ * addOns: { nftTokenV2: true }
3186
+ * }
3187
+ * }
3188
+ *
3189
+ * const response = await core.client.qn_getTokenMetadataByContractAddress({
3190
+ * contract: "0x2106c00ac7da0a3430ae667879139e832307aeaa",
3191
+ * })
3192
+ */
3193
+ qn_getTokenMetadataByContractAddress: (args: SimplifyType<QNGetTokenMetadataByCAInput>) => Promise<SimplifyType<QNGetTokenMetadataByCAResult | null>>;
3194
+ /**
3195
+ * Returns token details for specified token symbol.
3196
+ *
3197
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_getTokenMetadataBySymbol_v2
3198
+ *
3199
+ * @param args - {@link QNGetTokenMetadataBySymbolInput}
3200
+ * @returns response - {@link QNGetTokenMetadataBySymbolResult}
3201
+ *
3202
+ * @example
3203
+ * import QuickNode from '@quicknode/sdk';
3204
+ *
3205
+ * const core = new QuickNode.Core({
3206
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3207
+ * config: {
3208
+ * addOns: { nftTokenV2: true }
3209
+ * }
3210
+ * }
3211
+ *
3212
+ * const response = await core.client.qn_getTokenMetadataBySymbol({
3213
+ * symbol: "DAI",
3214
+ * })
3215
+ */
3216
+ qn_getTokenMetadataBySymbol: (args: SimplifyType<QNGetTokenMetadataBySymbolInput>) => Promise<SimplifyType<QNGetTokenMetadataBySymbolResult>>;
3217
+ /**
3218
+ * Returns transactions within a specified wallet address.
3219
+ *
3220
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_getTransactionsByAddress_v2
3221
+ *
3222
+ * @param args - {@link QNGetTransactionsByAddressInput}
3223
+ * @returns response - {@link QNGetTransactionsByAddressResult}
3224
+ *
3225
+ * @example
3226
+ * import QuickNode from '@quicknode/sdk';
3227
+ *
3228
+ * const core = new QuickNode.Core({
3229
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3230
+ * config: {
3231
+ * addOns: { nftTokenV2: true }
3232
+ * }
3233
+ * }
3234
+ *
3235
+ * const response = await core.client.qn_getTransactionsByAddress({
3236
+ * address: "0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6"
3237
+ * })
3238
+ */
3239
+ qn_getTransactionsByAddress: (args: SimplifyType<QNGetTransactionsByAddressInput>) => Promise<SimplifyType<QNGetTransactionsByAddressResult>>;
3240
+ /**
3241
+ * Returns ERC-20 tokens and token balances within a wallet.
3242
+ *
3243
+ * - Docs: https://www.quicknode.com/docs/ethereum/qn_getWalletTokenBalance_v2
3244
+ *
3245
+ * @param args - {@link QNGetWalletTokenBalanceInput}
3246
+ * @returns response - {@link QNGetWalletTokenBalanceResult}
3247
+ *
3248
+ * @example
3249
+ * import QuickNode from '@quicknode/sdk';
3250
+ *
3251
+ * const core = new QuickNode.Core({
3252
+ * endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
3253
+ * config: {
3254
+ * addOns: { nftTokenV2: true }
3255
+ * }
3256
+ * }
3257
+ *
3258
+ * const response = await core.client.qn_getWalletTokenBalance({
3259
+ * address: "0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6"
3260
+ * })
3261
+ */
3262
+ qn_getWalletTokenBalance: (args: SimplifyType<QNGetWalletTokenBalanceInput>) => Promise<SimplifyType<QNGetWalletTokenBalanceResult>>;
3263
+ qn_getWalletTokenTransactions: (args: SimplifyType<QNGetWalletTokenTransactionsInput>) => Promise<SimplifyType<QNGetWalletTokenTransactionsResult>>;
3264
+ };
3265
+
3266
+ interface CoreArguments {
3267
+ endpointUrl: string;
3268
+ chain?: Chain;
3269
+ config?: QNCoreClientConfig;
3270
+ }
3271
+ type QNCoreClientConfig = {
3272
+ addOns?: {
3273
+ nftTokenV2: boolean;
3274
+ };
3275
+ };
3276
+ type QNCoreClient = PublicClient & NFTAndTokenActions;
3277
+
3278
+ declare class Core {
3279
+ readonly endpointUrl: string;
3280
+ readonly client: QNCoreClient;
3281
+ constructor({ endpointUrl, chain, config }: CoreArguments);
3282
+ }
3283
+
2770
3284
  declare const QuickNode: {
2771
3285
  API: typeof API;
3286
+ Core: typeof Core;
2772
3287
  };
2773
3288
 
2774
3289
  type WalletNFTsByEnsQueryVariables = CodegenEthMainnetWalletNFTsByEnsQueryVariables;
2775
3290
  type WalletNFTsByEnsInput = WalletNFTsByEnsQueryVariables & NonQueryInput;
2776
- type WalletNFTsByEnsResult = {
3291
+ type WalletNFTsByEnsResult = SimplifyType<{
2777
3292
  address: string;
2778
3293
  ensName: string;
2779
3294
  results: CodegenWalletNFTNodeFragment['nft'][];
2780
3295
  pageInfo: CodegenPaginationFragment;
2781
- };
3296
+ }>;
2782
3297
 
2783
3298
  type TransactionsByWalletENSQueryVariables = CodegenEthMainnetTransactionsByWalletENSQueryVariables;
2784
3299
  type TransactionsByWalletENSInput = TransactionsByWalletENSQueryVariables & NonQueryInput;
2785
- type TransactionsByWalletENSResult = {
3300
+ type TransactionsByWalletENSResult = SimplifyType<{
2786
3301
  address: string;
2787
3302
  ensName: string;
2788
3303
  results: CodegenTransactionsNodeFragment[];
2789
3304
  pageInfo: CodegenPaginationFragment;
2790
- };
3305
+ }>;
2791
3306
 
2792
3307
  declare class QNInputValidationError extends Error {
2793
3308
  messages: string[];
@@ -2799,4 +3314,12 @@ declare class QNInputValidationError extends Error {
2799
3314
  });
2800
3315
  }
2801
3316
 
2802
- export { API, AllEventsInput, AllEventsResult, BalancesByWalletAddressInput, BalancesByWalletAddressResult, BalancesByWalletENSInput, BalancesByWalletENSResult, CollectionEventsInput, CollectionEventsResult, ContractDetailsInput, ContractDetailsResult, ContractEventsInput, ContractEventsResult, GasPricesInput, GasPricesResult, NFTDetailsInput, NFTDetailsResult, NFTEventsInput, NFTEventsResult, NFTTrendingCollectionResult, NFTTrendingCollectionsInput, NFTsByContractAddressInput, NFTsByContractAddressResult, NftCollectionDetailsInput, NftCollectionDetailsResult, QNInputValidationError, TransactionsByHashInput, TransactionsByHashResult, TransactionsBySearchInput, TransactionsBySearchResult, TransactionsByWalletAddressInput, TransactionsByWalletAddressResult, TransactionsByWalletENSInput, TransactionsByWalletENSResult, WalletNFTsByAddressInput, WalletNFTsByAddressResult, WalletNFTsByEnsInput, WalletNFTsByEnsResult, QuickNode as default };
3317
+ declare class QNInvalidEndpointUrl extends Error {
3318
+ constructor();
3319
+ }
3320
+
3321
+ declare class QNChainNotSupported extends Error {
3322
+ constructor(endpointUrl: string);
3323
+ }
3324
+
3325
+ export { API, AllEventsInput, AllEventsResult, BalancesByWalletAddressInput, BalancesByWalletAddressResult, BalancesByWalletENSInput, BalancesByWalletENSResult, CollectionEventsInput, CollectionEventsResult, ContractDetailsInput, ContractDetailsResult, ContractEventsInput, ContractEventsResult, Core, CoreArguments, GasPricesInput, GasPricesResult, NFTDetailsInput, NFTDetailsResult, NFTEventsInput, NFTEventsResult, NFTTrendingCollectionResult, NFTTrendingCollectionsInput, NFTsByContractAddressInput, NFTsByContractAddressResult, NftCollectionDetailsInput, NftCollectionDetailsResult, QNChainNotSupported, QNCoreClient, QNCoreClientConfig, QNFetchNFTCollectionDetailsInput, QNFetchNFTCollectionDetailsResult, QNFetchNFTInput, QNFetchNFTResult, QNFetchNFTsByCollectionInput, QNFetchNFTsByCollectionResult, QNGetTokenMetadataByCAInput, QNGetTokenMetadataByCAResult, QNGetTokenMetadataBySymbolInput, QNGetTokenMetadataBySymbolResult, QNGetTransactionsByAddressInput, QNGetTransactionsByAddressResult, QNGetTransfersByNFTInput, QNGetTransfersByNFTResult, QNGetWalletTokenBalanceInput, QNGetWalletTokenBalanceResult, QNGetWalletTokenTransactionsInput, QNGetWalletTokenTransactionsResult, QNInputValidationError, QNInvalidEndpointUrl, QNVerifyNFTsOwnerInput, QNVerifyNFTsOwnerResult, TransactionsByHashInput, TransactionsByHashResult, TransactionsBySearchInput, TransactionsBySearchResult, TransactionsByWalletAddressInput, TransactionsByWalletAddressResult, TransactionsByWalletENSInput, TransactionsByWalletENSResult, WalletNFTsByAddressInput, WalletNFTsByAddressResult, WalletNFTsByEnsInput, WalletNFTsByEnsResult, QuickNode as default };