@quicknode/sdk 1.0.0 → 1.1.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.
- package/README.md +2 -0
- package/cjs/index.js +443 -190
- package/esm/package.json +2 -1
- package/esm/package.json.js +3 -0
- package/esm/src/api/api.js +85 -0
- package/esm/src/api/controllers/contracts.js +34 -0
- package/esm/src/api/controllers/events.js +113 -0
- package/esm/src/api/controllers/nfts.js +227 -0
- package/esm/src/api/controllers/tokens.js +93 -0
- package/esm/src/api/controllers/transactions.js +120 -0
- package/esm/src/api/controllers/utils.js +53 -0
- package/esm/src/api/graphql/customUrqlClient.js +23 -0
- package/esm/src/api/graphql/generatedTypes.js +22 -0
- package/esm/src/api/graphql/modifyQueryForChain.js +27 -0
- package/esm/src/api/graphql/schema.json.js +3 -0
- package/esm/src/api/index.d.ts +2681 -0
- package/esm/src/api/index.js +2 -0
- package/esm/src/api/types/chains.js +7 -0
- package/esm/src/api/types/contracts/getContractDetails.js +12 -0
- package/esm/src/api/types/events/getAll.js +7 -0
- package/esm/src/api/types/events/getByContract.js +12 -0
- package/esm/src/api/types/nfts/getByContractAddress.js +10 -0
- package/esm/src/api/types/nfts/getByWalletAddress.js +18 -0
- package/esm/src/api/types/nfts/getCollectionDetails.js +11 -0
- package/esm/src/api/types/nfts/getCollectionEvents.js +12 -0
- package/esm/src/api/types/nfts/getNFTDetails.js +9 -0
- package/esm/src/api/types/nfts/getNFTEvents.js +13 -0
- package/esm/src/api/types/nfts/getTrendingCollections.js +7 -0
- package/esm/src/api/types/nfts/verifyOwnershipByAddress.js +12 -0
- package/esm/src/api/types/tokens/getBalancesByWalletAddress.js +12 -0
- package/esm/src/api/types/transactions/getByHash.js +11 -0
- package/esm/src/api/types/transactions/getBySearch.js +7 -0
- package/esm/src/api/types/utils/gasPrices.js +12 -0
- package/esm/src/api/utils/constants.js +3 -0
- package/esm/src/api/utils/helpers.js +11 -0
- package/esm/src/api/utils/isValidENSAddress.js +21 -0
- package/esm/src/api/utils/postQueryFormatter.js +24 -0
- package/esm/src/api/utils/removeNodesAndEdges.js +51 -0
- package/esm/src/client/client.js +9 -0
- package/esm/src/client/index.js +2 -0
- package/esm/src/core/addOns/nftTokenV2/actions.js +107 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_fetchNFTCollectionDetails.js +10 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_fetchNFTs.js +13 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_fetchNFTsByCollection.js +13 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_getTokenMetadataByContractAddress.js +10 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_getTokenMetadataBySymbol.js +11 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_getTransactionsByAddress.js +18 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_getTransfersByNFT.js +12 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_getWalletTokenBalance.js +12 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_getWalletTokenTransactions.js +14 -0
- package/esm/src/core/addOns/nftTokenV2/types/qn_verifyNFTsOwner.js +11 -0
- package/esm/src/core/addOns/shared/helpers.js +10 -0
- package/esm/src/core/chains.js +60 -0
- package/esm/src/core/core.js +24 -0
- package/esm/src/core/index.d.ts +555 -0
- package/esm/src/core/index.js +2 -0
- package/esm/src/index.js +10 -0
- package/esm/src/lib/errors/QNChainNotSupported.js +7 -0
- package/esm/src/lib/errors/QNInputValidationError.js +10 -0
- package/esm/src/lib/errors/QNInvalidEnpointUrl.js +7 -0
- package/esm/src/lib/helpers/globalFetch.js +13 -0
- package/esm/src/lib/validation/ValidateInput.js +35 -0
- package/esm/src/lib/validation/codegenDerivedValidators.js +28 -0
- package/esm/src/lib/validation/validators.js +105 -0
- package/index.d.ts +594 -41
- package/package.json +26 -4
- package/esm/index.js +0 -1160
package/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Client, GraphQLRequestParams } from '@urql/core';
|
|
2
2
|
export { gql } from '@urql/core';
|
|
3
|
-
import * as _urql_core_dist_urql_core_chunk from '@urql/core/dist/urql-core-chunk';
|
|
4
3
|
import { z, ZodError } from 'zod';
|
|
4
|
+
import { Chain, PublicClient } from 'viem';
|
|
5
|
+
import * as viem from 'viem';
|
|
6
|
+
export { viem };
|
|
5
7
|
|
|
6
8
|
type Maybe<T> = T | null;
|
|
7
9
|
type InputMaybe<T> = Maybe<T>;
|
|
@@ -421,13 +423,8 @@ type ResultOutput = Record<string | number | symbol, any>;
|
|
|
421
423
|
declare class CustomUrqlClient {
|
|
422
424
|
urqlClient: Client;
|
|
423
425
|
constructor(urqlClient: Client);
|
|
424
|
-
query<TVariables extends Record<string,
|
|
425
|
-
data:
|
|
426
|
-
operation: _urql_core_dist_urql_core_chunk.Operation<any, Record<string, any> | TVariables>;
|
|
427
|
-
error?: _urql_core_dist_urql_core_chunk.CombinedError | undefined;
|
|
428
|
-
extensions?: Record<string, any> | undefined;
|
|
429
|
-
stale: boolean;
|
|
430
|
-
hasNext: boolean;
|
|
426
|
+
query<TVariables extends Record<string, unknown>, KResults extends Record<string, unknown>, KResultsOutput extends ResultOutput>(options: GraphQLRequestParams<any, TVariables>): Promise<{
|
|
427
|
+
data: KResultsOutput | undefined;
|
|
431
428
|
}>;
|
|
432
429
|
}
|
|
433
430
|
|
|
@@ -486,7 +483,7 @@ declare const walletByAddressValidator: z.ZodObject<{
|
|
|
486
483
|
before?: string | null | undefined;
|
|
487
484
|
after?: string | null | undefined;
|
|
488
485
|
first?: number | null | undefined;
|
|
489
|
-
chain?: "ethereum" | "
|
|
486
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
490
487
|
}, {
|
|
491
488
|
address: string;
|
|
492
489
|
filter?: {
|
|
@@ -501,7 +498,7 @@ declare const walletByAddressValidator: z.ZodObject<{
|
|
|
501
498
|
before?: string | null | undefined;
|
|
502
499
|
after?: string | null | undefined;
|
|
503
500
|
first?: number | null | undefined;
|
|
504
|
-
chain?: "ethereum" | "
|
|
501
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
505
502
|
}>;
|
|
506
503
|
type WalletNFTsByAddressInput = z.infer<typeof walletByAddressValidator>;
|
|
507
504
|
type WalletNFTsByAddressResult = SimplifyType<{
|
|
@@ -518,11 +515,11 @@ declare const nftDetailsValidator: z.ZodObject<{
|
|
|
518
515
|
}, "strict", z.ZodTypeAny, {
|
|
519
516
|
contractAddress: string;
|
|
520
517
|
tokenId: string;
|
|
521
|
-
chain?: "ethereum" | "
|
|
518
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
522
519
|
}, {
|
|
523
520
|
contractAddress: string;
|
|
524
521
|
tokenId: string;
|
|
525
|
-
chain?: "ethereum" | "
|
|
522
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
526
523
|
}>;
|
|
527
524
|
type NFTDetailsInput = z.infer<typeof nftDetailsValidator>;
|
|
528
525
|
type NFTDetailsResult = SimplifyType<{
|
|
@@ -534,10 +531,10 @@ declare const nftCollectionDetailsValidator: z.ZodObject<{
|
|
|
534
531
|
chain: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ethereum", "polygon", "ethereumSepolia"]>>>;
|
|
535
532
|
}, "strict", z.ZodTypeAny, {
|
|
536
533
|
contractAddress: string;
|
|
537
|
-
chain?: "ethereum" | "
|
|
534
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
538
535
|
}, {
|
|
539
536
|
contractAddress: string;
|
|
540
|
-
chain?: "ethereum" | "
|
|
537
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
541
538
|
}>;
|
|
542
539
|
type NftCollectionDetailsInput = z.infer<typeof nftCollectionDetailsValidator>;
|
|
543
540
|
type NftCollectionDetailsResult = SimplifyType<{
|
|
@@ -553,12 +550,12 @@ declare const nftTrendingCollectionsValidator: z.ZodObject<{
|
|
|
553
550
|
before?: string | null | undefined;
|
|
554
551
|
after?: string | null | undefined;
|
|
555
552
|
first?: number | null | undefined;
|
|
556
|
-
chain?: "ethereum" | "
|
|
553
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
557
554
|
}, {
|
|
558
555
|
before?: string | null | undefined;
|
|
559
556
|
after?: string | null | undefined;
|
|
560
557
|
first?: number | null | undefined;
|
|
561
|
-
chain?: "ethereum" | "
|
|
558
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
562
559
|
}>;
|
|
563
560
|
type NFTTrendingCollectionsInput = z.infer<typeof nftTrendingCollectionsValidator>;
|
|
564
561
|
type NFTTrendingCollectionResult = SimplifyType<{
|
|
@@ -579,13 +576,13 @@ declare const nftsByContractAddressValidator: z.ZodObject<{
|
|
|
579
576
|
before?: string | null | undefined;
|
|
580
577
|
after?: string | null | undefined;
|
|
581
578
|
first?: number | null | undefined;
|
|
582
|
-
chain?: "ethereum" | "
|
|
579
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
583
580
|
}, {
|
|
584
581
|
contractAddress: string;
|
|
585
582
|
before?: string | null | undefined;
|
|
586
583
|
after?: string | null | undefined;
|
|
587
584
|
first?: number | null | undefined;
|
|
588
|
-
chain?: "ethereum" | "
|
|
585
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
589
586
|
}>;
|
|
590
587
|
type NFTsByContractAddressInput = z.infer<typeof nftsByContractAddressValidator>;
|
|
591
588
|
type NFTsByContractAddressResult = SimplifyType<{
|
|
@@ -616,7 +613,7 @@ declare const verifyOwnershipValidator: z.ZodObject<{
|
|
|
616
613
|
contractAddress: string;
|
|
617
614
|
tokenId?: string | undefined;
|
|
618
615
|
}[]];
|
|
619
|
-
chain?: "ethereum" | "
|
|
616
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
620
617
|
}, {
|
|
621
618
|
address: string;
|
|
622
619
|
nfts: [{
|
|
@@ -626,7 +623,7 @@ declare const verifyOwnershipValidator: z.ZodObject<{
|
|
|
626
623
|
contractAddress: string;
|
|
627
624
|
tokenId?: string | undefined;
|
|
628
625
|
}[]];
|
|
629
|
-
chain?: "ethereum" | "
|
|
626
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
630
627
|
}>;
|
|
631
628
|
type VerifyOwnershipByAddressInput = z.infer<typeof verifyOwnershipValidator>;
|
|
632
629
|
|
|
@@ -669,13 +666,13 @@ declare const balancesByWalletAddressValidator$1: z.ZodObject<{
|
|
|
669
666
|
before?: string | null | undefined;
|
|
670
667
|
after?: string | null | undefined;
|
|
671
668
|
first?: number | null | undefined;
|
|
672
|
-
chain?: "ethereum" | "
|
|
669
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
673
670
|
}, {
|
|
674
671
|
address: string;
|
|
675
672
|
before?: string | null | undefined;
|
|
676
673
|
after?: string | null | undefined;
|
|
677
674
|
first?: number | null | undefined;
|
|
678
|
-
chain?: "ethereum" | "
|
|
675
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
679
676
|
}>;
|
|
680
677
|
type BalancesByWalletAddressInput = z.infer<typeof balancesByWalletAddressValidator$1>;
|
|
681
678
|
type BalancesByWalletAddressResult = SimplifyType<{
|
|
@@ -758,7 +755,7 @@ declare const gasPricesValidator: z.ZodObject<{
|
|
|
758
755
|
} | null | undefined;
|
|
759
756
|
} | null | undefined;
|
|
760
757
|
returnInGwei?: boolean | null | undefined;
|
|
761
|
-
chain?: "ethereum" | "
|
|
758
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
762
759
|
}, {
|
|
763
760
|
filter?: {
|
|
764
761
|
blockNumber?: {
|
|
@@ -772,7 +769,7 @@ declare const gasPricesValidator: z.ZodObject<{
|
|
|
772
769
|
} | null | undefined;
|
|
773
770
|
} | null | undefined;
|
|
774
771
|
returnInGwei?: boolean | null | undefined;
|
|
775
|
-
chain?: "ethereum" | "
|
|
772
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
776
773
|
}>;
|
|
777
774
|
type GasPricesInput = z.infer<typeof gasPricesValidator>;
|
|
778
775
|
type GasPricesResult = SimplifyType<{
|
|
@@ -791,10 +788,10 @@ declare const contractDetailsValidator: z.ZodObject<{
|
|
|
791
788
|
chain: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ethereum", "polygon", "ethereumSepolia"]>>>;
|
|
792
789
|
}, "strict", z.ZodTypeAny, {
|
|
793
790
|
contractAddress: string;
|
|
794
|
-
chain?: "ethereum" | "
|
|
791
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
795
792
|
}, {
|
|
796
793
|
contractAddress: string;
|
|
797
|
-
chain?: "ethereum" | "
|
|
794
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
798
795
|
}>;
|
|
799
796
|
type ContractDetailsInput = z.infer<typeof contractDetailsValidator>;
|
|
800
797
|
type ContractDetailsResult = SimplifyType<{
|
|
@@ -1153,7 +1150,7 @@ declare const contractEventsValidator: z.ZodObject<{
|
|
|
1153
1150
|
before?: string | null | undefined;
|
|
1154
1151
|
after?: string | null | undefined;
|
|
1155
1152
|
first?: number | null | undefined;
|
|
1156
|
-
chain?: "ethereum" | "
|
|
1153
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
1157
1154
|
}, {
|
|
1158
1155
|
contractAddress: string;
|
|
1159
1156
|
filter?: {
|
|
@@ -1219,7 +1216,7 @@ declare const contractEventsValidator: z.ZodObject<{
|
|
|
1219
1216
|
before?: string | null | undefined;
|
|
1220
1217
|
after?: string | null | undefined;
|
|
1221
1218
|
first?: number | null | undefined;
|
|
1222
|
-
chain?: "ethereum" | "
|
|
1219
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
1223
1220
|
}>;
|
|
1224
1221
|
type ContractEventsInput = z.infer<typeof contractEventsValidator>;
|
|
1225
1222
|
type ContractEventsResult = SimplifyType<{
|
|
@@ -1572,7 +1569,7 @@ declare const collectionEventsValidator: z.ZodObject<{
|
|
|
1572
1569
|
before?: string | null | undefined;
|
|
1573
1570
|
after?: string | null | undefined;
|
|
1574
1571
|
first?: number | null | undefined;
|
|
1575
|
-
chain?: "ethereum" | "
|
|
1572
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
1576
1573
|
}, {
|
|
1577
1574
|
contractAddress: string;
|
|
1578
1575
|
filter?: {
|
|
@@ -1638,7 +1635,7 @@ declare const collectionEventsValidator: z.ZodObject<{
|
|
|
1638
1635
|
before?: string | null | undefined;
|
|
1639
1636
|
after?: string | null | undefined;
|
|
1640
1637
|
first?: number | null | undefined;
|
|
1641
|
-
chain?: "ethereum" | "
|
|
1638
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
1642
1639
|
}>;
|
|
1643
1640
|
type CollectionEventsInput = z.infer<typeof collectionEventsValidator>;
|
|
1644
1641
|
type CollectionEventsResult = SimplifyType<{
|
|
@@ -1993,7 +1990,7 @@ declare const nftEventsValidator: z.ZodObject<{
|
|
|
1993
1990
|
before?: string | null | undefined;
|
|
1994
1991
|
after?: string | null | undefined;
|
|
1995
1992
|
first?: number | null | undefined;
|
|
1996
|
-
chain?: "ethereum" | "
|
|
1993
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
1997
1994
|
}, {
|
|
1998
1995
|
contractAddress: string;
|
|
1999
1996
|
tokenId: string;
|
|
@@ -2060,7 +2057,7 @@ declare const nftEventsValidator: z.ZodObject<{
|
|
|
2060
2057
|
before?: string | null | undefined;
|
|
2061
2058
|
after?: string | null | undefined;
|
|
2062
2059
|
first?: number | null | undefined;
|
|
2063
|
-
chain?: "ethereum" | "
|
|
2060
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2064
2061
|
}>;
|
|
2065
2062
|
type NFTEventsInput = z.infer<typeof nftEventsValidator>;
|
|
2066
2063
|
type NFTEventsResult = SimplifyType<{
|
|
@@ -2411,7 +2408,7 @@ declare const allEventsValidator: z.ZodObject<{
|
|
|
2411
2408
|
before?: string | null | undefined;
|
|
2412
2409
|
after?: string | null | undefined;
|
|
2413
2410
|
first?: number | null | undefined;
|
|
2414
|
-
chain?: "ethereum" | "
|
|
2411
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2415
2412
|
}, {
|
|
2416
2413
|
filter?: {
|
|
2417
2414
|
blockNumber?: {
|
|
@@ -2476,7 +2473,7 @@ declare const allEventsValidator: z.ZodObject<{
|
|
|
2476
2473
|
before?: string | null | undefined;
|
|
2477
2474
|
after?: string | null | undefined;
|
|
2478
2475
|
first?: number | null | undefined;
|
|
2479
|
-
chain?: "ethereum" | "
|
|
2476
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2480
2477
|
}>;
|
|
2481
2478
|
type AllEventsInput = z.infer<typeof allEventsValidator>;
|
|
2482
2479
|
type AllEventsResult = SimplifyType<{
|
|
@@ -2505,13 +2502,13 @@ declare const balancesByWalletAddressValidator: z.ZodObject<{
|
|
|
2505
2502
|
before?: string | null | undefined;
|
|
2506
2503
|
after?: string | null | undefined;
|
|
2507
2504
|
first?: number | null | undefined;
|
|
2508
|
-
chain?: "ethereum" | "
|
|
2505
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2509
2506
|
}, {
|
|
2510
2507
|
address: string;
|
|
2511
2508
|
before?: string | null | undefined;
|
|
2512
2509
|
after?: string | null | undefined;
|
|
2513
2510
|
first?: number | null | undefined;
|
|
2514
|
-
chain?: "ethereum" | "
|
|
2511
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2515
2512
|
}>;
|
|
2516
2513
|
type TransactionsByWalletAddressInput = z.infer<typeof balancesByWalletAddressValidator>;
|
|
2517
2514
|
type TransactionsByWalletAddressResult = SimplifyType<{
|
|
@@ -2648,7 +2645,7 @@ declare const transactionsBySearchValidator: z.ZodObject<{
|
|
|
2648
2645
|
before?: string | null | undefined;
|
|
2649
2646
|
after?: string | null | undefined;
|
|
2650
2647
|
first?: number | null | undefined;
|
|
2651
|
-
chain?: "ethereum" | "
|
|
2648
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2652
2649
|
}, {
|
|
2653
2650
|
filter?: {
|
|
2654
2651
|
blockNumber?: {
|
|
@@ -2675,7 +2672,7 @@ declare const transactionsBySearchValidator: z.ZodObject<{
|
|
|
2675
2672
|
before?: string | null | undefined;
|
|
2676
2673
|
after?: string | null | undefined;
|
|
2677
2674
|
first?: number | null | undefined;
|
|
2678
|
-
chain?: "ethereum" | "
|
|
2675
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2679
2676
|
}>;
|
|
2680
2677
|
type TransactionsBySearchInput = z.infer<typeof transactionsBySearchValidator>;
|
|
2681
2678
|
type TransactionsBySearchResult = SimplifyType<{
|
|
@@ -2688,10 +2685,10 @@ declare const transactionsByHashValidator: z.ZodObject<{
|
|
|
2688
2685
|
chain: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ethereum", "polygon", "ethereumSepolia"]>>>;
|
|
2689
2686
|
}, "strict", z.ZodTypeAny, {
|
|
2690
2687
|
hash: string;
|
|
2691
|
-
chain?: "ethereum" | "
|
|
2688
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2692
2689
|
}, {
|
|
2693
2690
|
hash: string;
|
|
2694
|
-
chain?: "ethereum" | "
|
|
2691
|
+
chain?: "ethereum" | "polygon" | "ethereumSepolia" | null | undefined;
|
|
2695
2692
|
}>;
|
|
2696
2693
|
type TransactionsByHashInput = z.infer<typeof transactionsByHashValidator>;
|
|
2697
2694
|
type TransactionsByHashResult = SimplifyType<{
|
|
@@ -2731,8 +2728,556 @@ declare class API {
|
|
|
2731
2728
|
private createUrqlClient;
|
|
2732
2729
|
}
|
|
2733
2730
|
|
|
2731
|
+
type NftTrait = {
|
|
2732
|
+
trait_type: string;
|
|
2733
|
+
value: string;
|
|
2734
|
+
};
|
|
2735
|
+
type RpcNftAsset = {
|
|
2736
|
+
collectionName: string;
|
|
2737
|
+
collectionTokenId: string;
|
|
2738
|
+
collectionAddress: string;
|
|
2739
|
+
name: string;
|
|
2740
|
+
description: string;
|
|
2741
|
+
imageUrl: string;
|
|
2742
|
+
traits: NftTrait[];
|
|
2743
|
+
chain: string;
|
|
2744
|
+
network: string;
|
|
2745
|
+
};
|
|
2746
|
+
type RPCTokenMetadata = {
|
|
2747
|
+
name: string | null;
|
|
2748
|
+
symbol: string | null;
|
|
2749
|
+
contractAddress: string;
|
|
2750
|
+
decimals: string | null;
|
|
2751
|
+
genesisBlock: string | null;
|
|
2752
|
+
genesisTransaction: string | null;
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
declare const qnFetchNFTInputSchema: z.ZodObject<{
|
|
2756
|
+
wallet: z.ZodString;
|
|
2757
|
+
contracts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2758
|
+
omitFields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2759
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2760
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2761
|
+
}, "strict", z.ZodTypeAny, {
|
|
2762
|
+
wallet: string;
|
|
2763
|
+
contracts?: string[] | null | undefined;
|
|
2764
|
+
omitFields?: string[] | null | undefined;
|
|
2765
|
+
perPage?: number | null | undefined;
|
|
2766
|
+
page?: number | null | undefined;
|
|
2767
|
+
}, {
|
|
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
|
+
type QNFetchNFTInput = z.infer<typeof qnFetchNFTInputSchema>;
|
|
2775
|
+
type QNFetchNFTResult = {
|
|
2776
|
+
owner: string;
|
|
2777
|
+
assets: RpcNftAsset[];
|
|
2778
|
+
totalPages: number;
|
|
2779
|
+
totalItems: number;
|
|
2780
|
+
pageNumber: number;
|
|
2781
|
+
};
|
|
2782
|
+
|
|
2783
|
+
declare const qnFetchNFTCollectionDetailsInputSchema: z.ZodObject<{
|
|
2784
|
+
contracts: z.ZodArray<z.ZodString, "many">;
|
|
2785
|
+
}, "strict", z.ZodTypeAny, {
|
|
2786
|
+
contracts: string[];
|
|
2787
|
+
}, {
|
|
2788
|
+
contracts: string[];
|
|
2789
|
+
}>;
|
|
2790
|
+
type QNFetchNFTCollectionDetailsInput = z.infer<typeof qnFetchNFTCollectionDetailsInputSchema>;
|
|
2791
|
+
type RPCNftCollectionDetails = {
|
|
2792
|
+
name: string;
|
|
2793
|
+
address: string;
|
|
2794
|
+
description: string;
|
|
2795
|
+
erc1155: boolean;
|
|
2796
|
+
erc721: boolean;
|
|
2797
|
+
totalSupply: number;
|
|
2798
|
+
circulatingSupply: number;
|
|
2799
|
+
genesisBlock: number | null;
|
|
2800
|
+
genesisTransaction: string | null;
|
|
2801
|
+
};
|
|
2802
|
+
type QNFetchNFTCollectionDetailsResult = RPCNftCollectionDetails[];
|
|
2803
|
+
|
|
2804
|
+
declare const qnFetchNFTsByCollectionInputSchema: z.ZodObject<{
|
|
2805
|
+
collection: z.ZodString;
|
|
2806
|
+
omitFields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2807
|
+
tokens: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2808
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2809
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2810
|
+
}, "strict", z.ZodTypeAny, {
|
|
2811
|
+
collection: string;
|
|
2812
|
+
omitFields?: string[] | null | undefined;
|
|
2813
|
+
tokens?: string[] | null | undefined;
|
|
2814
|
+
perPage?: number | null | undefined;
|
|
2815
|
+
page?: number | null | undefined;
|
|
2816
|
+
}, {
|
|
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
|
+
type QNFetchNFTsByCollectionInput = z.infer<typeof qnFetchNFTsByCollectionInputSchema>;
|
|
2824
|
+
type QNFetchNFTsByCollectionResult = {
|
|
2825
|
+
collection: string;
|
|
2826
|
+
tokens: RpcNftAsset[];
|
|
2827
|
+
};
|
|
2828
|
+
|
|
2829
|
+
declare const qnGetTransfersByNFTInputSchema: z.ZodObject<{
|
|
2830
|
+
collection: z.ZodString;
|
|
2831
|
+
collectionTokenId: z.ZodString;
|
|
2832
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2833
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2834
|
+
}, "strict", z.ZodTypeAny, {
|
|
2835
|
+
collection: string;
|
|
2836
|
+
collectionTokenId: string;
|
|
2837
|
+
perPage?: number | null | undefined;
|
|
2838
|
+
page?: number | null | undefined;
|
|
2839
|
+
}, {
|
|
2840
|
+
collection: string;
|
|
2841
|
+
collectionTokenId: string;
|
|
2842
|
+
perPage?: number | null | undefined;
|
|
2843
|
+
page?: number | null | undefined;
|
|
2844
|
+
}>;
|
|
2845
|
+
type QNGetTransfersByNFTInput = z.infer<typeof qnGetTransfersByNFTInputSchema>;
|
|
2846
|
+
type TransfersByNFTTransfer = {
|
|
2847
|
+
blockNumber: number;
|
|
2848
|
+
date: string;
|
|
2849
|
+
from: string;
|
|
2850
|
+
to: string;
|
|
2851
|
+
txHash: string;
|
|
2852
|
+
};
|
|
2853
|
+
type QNGetTransfersByNFTResult = {
|
|
2854
|
+
collection: string;
|
|
2855
|
+
transfers: TransfersByNFTTransfer[];
|
|
2856
|
+
totalPages: number;
|
|
2857
|
+
pageNumber: number;
|
|
2858
|
+
totalItems: number;
|
|
2859
|
+
};
|
|
2860
|
+
|
|
2861
|
+
declare const qnVerifyNFTsOwnerInputSchema: z.ZodObject<{
|
|
2862
|
+
wallet: z.ZodString;
|
|
2863
|
+
contracts: z.ZodArray<z.ZodString, "many">;
|
|
2864
|
+
}, "strict", z.ZodTypeAny, {
|
|
2865
|
+
wallet: string;
|
|
2866
|
+
contracts: string[];
|
|
2867
|
+
}, {
|
|
2868
|
+
wallet: string;
|
|
2869
|
+
contracts: string[];
|
|
2870
|
+
}>;
|
|
2871
|
+
type QNVerifyNFTsOwnerInput = z.infer<typeof qnVerifyNFTsOwnerInputSchema>;
|
|
2872
|
+
type QNVerifyNFTsOwnerResult = {
|
|
2873
|
+
owner: string;
|
|
2874
|
+
assets: string[];
|
|
2875
|
+
};
|
|
2876
|
+
|
|
2877
|
+
declare const qnGetTokenMetadataByCAInputSchema: z.ZodObject<{
|
|
2878
|
+
contract: z.ZodString;
|
|
2879
|
+
}, "strict", z.ZodTypeAny, {
|
|
2880
|
+
contract: string;
|
|
2881
|
+
}, {
|
|
2882
|
+
contract: string;
|
|
2883
|
+
}>;
|
|
2884
|
+
type QNGetTokenMetadataByCAInput = z.infer<typeof qnGetTokenMetadataByCAInputSchema>;
|
|
2885
|
+
type QNGetTokenMetadataByCAResult = RPCTokenMetadata;
|
|
2886
|
+
|
|
2887
|
+
declare const qnGetTokenMetadataBySymbolInputSchema: z.ZodObject<{
|
|
2888
|
+
symbol: z.ZodString;
|
|
2889
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2890
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2891
|
+
}, "strict", z.ZodTypeAny, {
|
|
2892
|
+
symbol: string;
|
|
2893
|
+
perPage?: number | null | undefined;
|
|
2894
|
+
page?: number | null | undefined;
|
|
2895
|
+
}, {
|
|
2896
|
+
symbol: string;
|
|
2897
|
+
perPage?: number | null | undefined;
|
|
2898
|
+
page?: number | null | undefined;
|
|
2899
|
+
}>;
|
|
2900
|
+
type QNGetTokenMetadataBySymbolInput = z.infer<typeof qnGetTokenMetadataBySymbolInputSchema>;
|
|
2901
|
+
type QNGetTokenMetadataBySymbolResult = {
|
|
2902
|
+
tokens: RPCTokenMetadata[];
|
|
2903
|
+
};
|
|
2904
|
+
|
|
2905
|
+
declare const qnGetTransactionsByAddressInputSchema: z.ZodEffects<z.ZodObject<{
|
|
2906
|
+
address: z.ZodString;
|
|
2907
|
+
fromBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2908
|
+
toBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2909
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2910
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2911
|
+
}, "strict", z.ZodTypeAny, {
|
|
2912
|
+
address: string;
|
|
2913
|
+
fromBlock?: number | null | undefined;
|
|
2914
|
+
toBlock?: number | null | undefined;
|
|
2915
|
+
perPage?: number | null | undefined;
|
|
2916
|
+
page?: number | null | undefined;
|
|
2917
|
+
}, {
|
|
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
|
+
type QNGetTransactionsByAddressInput = z.infer<typeof qnGetTransactionsByAddressInputSchema>;
|
|
2937
|
+
interface RPCTransactionByAddress {
|
|
2938
|
+
blockTimestamp: string;
|
|
2939
|
+
transactionHash: string;
|
|
2940
|
+
blockNumber: string;
|
|
2941
|
+
transactionIndex: number;
|
|
2942
|
+
fromAddress: string;
|
|
2943
|
+
toAddress: string;
|
|
2944
|
+
contractAddress: string | null;
|
|
2945
|
+
value: string;
|
|
2946
|
+
}
|
|
2947
|
+
type QNGetTransactionsByAddressResult = {
|
|
2948
|
+
paginatedItems: RPCTransactionByAddress[];
|
|
2949
|
+
totalItems: number;
|
|
2950
|
+
totalPages: number;
|
|
2951
|
+
pageNumber: number;
|
|
2952
|
+
};
|
|
2953
|
+
|
|
2954
|
+
declare const qnGetWalletTokenBalanceInputSchema: z.ZodObject<{
|
|
2955
|
+
wallet: z.ZodString;
|
|
2956
|
+
contracts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2957
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2958
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2959
|
+
}, "strict", z.ZodTypeAny, {
|
|
2960
|
+
wallet: string;
|
|
2961
|
+
contracts?: string[] | null | undefined;
|
|
2962
|
+
perPage?: number | null | undefined;
|
|
2963
|
+
page?: number | null | undefined;
|
|
2964
|
+
}, {
|
|
2965
|
+
wallet: string;
|
|
2966
|
+
contracts?: string[] | null | undefined;
|
|
2967
|
+
perPage?: number | null | undefined;
|
|
2968
|
+
page?: number | null | undefined;
|
|
2969
|
+
}>;
|
|
2970
|
+
type QNGetWalletTokenBalanceInput = z.infer<typeof qnGetWalletTokenBalanceInputSchema>;
|
|
2971
|
+
type RPCWalletTokenBalance = {
|
|
2972
|
+
quantityIn: string;
|
|
2973
|
+
quantityOut: string;
|
|
2974
|
+
name: string | null;
|
|
2975
|
+
symbol: string | null;
|
|
2976
|
+
decimals: string | null;
|
|
2977
|
+
address: string;
|
|
2978
|
+
totalBalance: string;
|
|
2979
|
+
};
|
|
2980
|
+
type QNGetWalletTokenBalanceResult = {
|
|
2981
|
+
result: RPCWalletTokenBalance[];
|
|
2982
|
+
totalItems: number;
|
|
2983
|
+
totalPages: number;
|
|
2984
|
+
pageNumber: number;
|
|
2985
|
+
};
|
|
2986
|
+
|
|
2987
|
+
declare const qnGetWalletTokenTransactionsInputSchema: z.ZodObject<{
|
|
2988
|
+
address: z.ZodString;
|
|
2989
|
+
contract: z.ZodString;
|
|
2990
|
+
fromBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2991
|
+
toBlock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2992
|
+
perPage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2993
|
+
page: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2994
|
+
}, "strict", z.ZodTypeAny, {
|
|
2995
|
+
address: string;
|
|
2996
|
+
contract: string;
|
|
2997
|
+
fromBlock?: number | null | undefined;
|
|
2998
|
+
toBlock?: number | null | undefined;
|
|
2999
|
+
perPage?: number | null | undefined;
|
|
3000
|
+
page?: number | null | undefined;
|
|
3001
|
+
}, {
|
|
3002
|
+
address: string;
|
|
3003
|
+
contract: string;
|
|
3004
|
+
fromBlock?: number | null | undefined;
|
|
3005
|
+
toBlock?: number | null | undefined;
|
|
3006
|
+
perPage?: number | null | undefined;
|
|
3007
|
+
page?: number | null | undefined;
|
|
3008
|
+
}>;
|
|
3009
|
+
type QNGetWalletTokenTransactionsInput = z.infer<typeof qnGetWalletTokenTransactionsInputSchema>;
|
|
3010
|
+
type RPCFullTokenMetadata = {
|
|
3011
|
+
address: string;
|
|
3012
|
+
genesisBlock: string | null;
|
|
3013
|
+
genesisTransaction: string | null;
|
|
3014
|
+
name: string | null;
|
|
3015
|
+
symbol: string | null;
|
|
3016
|
+
decimals: string | null;
|
|
3017
|
+
contractAddress: string;
|
|
3018
|
+
};
|
|
3019
|
+
type RPCTokenTransaction = {
|
|
3020
|
+
name: string | null;
|
|
3021
|
+
symbol: string | null;
|
|
3022
|
+
decimals: string | null;
|
|
3023
|
+
address: string;
|
|
3024
|
+
quantityIn: string;
|
|
3025
|
+
quantityOut: string;
|
|
3026
|
+
blockNumber: string;
|
|
3027
|
+
transactionHash: string;
|
|
3028
|
+
timestamp: string;
|
|
3029
|
+
totalBalance: string;
|
|
3030
|
+
};
|
|
3031
|
+
type QNGetWalletTokenTransactionsResult = {
|
|
3032
|
+
paginatedItems: RPCTokenTransaction[];
|
|
3033
|
+
totalItems: number;
|
|
3034
|
+
totalPages: number;
|
|
3035
|
+
pageNumber: number;
|
|
3036
|
+
token: RPCFullTokenMetadata;
|
|
3037
|
+
};
|
|
3038
|
+
|
|
3039
|
+
type NFTAndTokenActions = {
|
|
3040
|
+
/**
|
|
3041
|
+
* Returns aggregated data on NFTs for a given wallet.
|
|
3042
|
+
*
|
|
3043
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_fetchNFTs_v2
|
|
3044
|
+
*
|
|
3045
|
+
* @param args - {@link QNFetchNFTInput}
|
|
3046
|
+
* @returns response - {@link QNFetchNFTsResult}
|
|
3047
|
+
*
|
|
3048
|
+
* @example
|
|
3049
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3050
|
+
*
|
|
3051
|
+
* const core = new QuickNode.Core({
|
|
3052
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3053
|
+
* config: {
|
|
3054
|
+
* addOns: { nftTokenV2: true }
|
|
3055
|
+
* }
|
|
3056
|
+
* }
|
|
3057
|
+
*
|
|
3058
|
+
* const response = await core.client.qn_fetchNFTs({
|
|
3059
|
+
* wallet: "0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6",
|
|
3060
|
+
* contracts: ['0x2106C00Ac7dA0A3430aE667879139E832307AeAa'],
|
|
3061
|
+
* });
|
|
3062
|
+
*/
|
|
3063
|
+
qn_fetchNFTs: (args: SimplifyType<QNFetchNFTInput>) => Promise<SimplifyType<QNFetchNFTResult>>;
|
|
3064
|
+
/**
|
|
3065
|
+
* Returns aggregated data on NFTs for a given wallet.
|
|
3066
|
+
*
|
|
3067
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_fetchNFTCollectionDetails_v2
|
|
3068
|
+
*
|
|
3069
|
+
* @param args - {@link QNFetchNFTCollectionDetailsInput}
|
|
3070
|
+
* @returns response - {@link QNFetchNFTCollectionDetailsResult}
|
|
3071
|
+
*
|
|
3072
|
+
* @example
|
|
3073
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3074
|
+
*
|
|
3075
|
+
* const core = new QuickNode.Core({
|
|
3076
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3077
|
+
* config: {
|
|
3078
|
+
* addOns: { nftTokenV2: true }
|
|
3079
|
+
* }
|
|
3080
|
+
* }
|
|
3081
|
+
*
|
|
3082
|
+
* const response = await core.client.qn_fetchNFTCollectionDetails({
|
|
3083
|
+
* contracts: [
|
|
3084
|
+
* "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
|
|
3085
|
+
* "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7",
|
|
3086
|
+
* ]
|
|
3087
|
+
* });
|
|
3088
|
+
*/
|
|
3089
|
+
qn_fetchNFTCollectionDetails: (args: SimplifyType<QNFetchNFTCollectionDetailsInput>) => Promise<SimplifyType<QNFetchNFTCollectionDetailsResult>>;
|
|
3090
|
+
/**
|
|
3091
|
+
* Returns aggregated data on NFTs within a given collection.
|
|
3092
|
+
*
|
|
3093
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_fetchNFTsByCollection_v2
|
|
3094
|
+
*
|
|
3095
|
+
* @param args - {@link QNFetchNFTsByCollectionInput}
|
|
3096
|
+
* @returns response - {@link QNFetchNFTsByCollectionResult}
|
|
3097
|
+
*
|
|
3098
|
+
* @example
|
|
3099
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3100
|
+
*
|
|
3101
|
+
* const core = new QuickNode.Core({
|
|
3102
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3103
|
+
* config: {
|
|
3104
|
+
* addOns: { nftTokenV2: true }
|
|
3105
|
+
* }
|
|
3106
|
+
* }
|
|
3107
|
+
*
|
|
3108
|
+
* const response = await core.client.qn_fetchNFTsByCollection({
|
|
3109
|
+
* collection: "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
|
|
3110
|
+
* })
|
|
3111
|
+
*/
|
|
3112
|
+
qn_fetchNFTsByCollection: (args: SimplifyType<QNFetchNFTsByCollectionInput>) => Promise<SimplifyType<QNFetchNFTsByCollectionResult>>;
|
|
3113
|
+
/**
|
|
3114
|
+
* Returns transfers by given NFT.
|
|
3115
|
+
*
|
|
3116
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_getTransfersByNFT_v2
|
|
3117
|
+
*
|
|
3118
|
+
* @param args - {@link QNGetTransfersByNFTInput}
|
|
3119
|
+
* @returns response - {@link QNGetTransfersByNFTResult}
|
|
3120
|
+
*
|
|
3121
|
+
* @example
|
|
3122
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3123
|
+
*
|
|
3124
|
+
* const core = new QuickNode.Core({
|
|
3125
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3126
|
+
* config: {
|
|
3127
|
+
* addOns: { nftTokenV2: true }
|
|
3128
|
+
* }
|
|
3129
|
+
* }
|
|
3130
|
+
*
|
|
3131
|
+
* const response = await core.client.qn_getTransfersByNFT({
|
|
3132
|
+
* collection: "0x60E4d786628Fea6478F785A6d7e704777c86a7c6",
|
|
3133
|
+
7 * collectionTokenId: "1",
|
|
3134
|
+
* })
|
|
3135
|
+
*/
|
|
3136
|
+
qn_getTransfersByNFT: (args: SimplifyType<QNGetTransfersByNFTInput>) => Promise<SimplifyType<QNGetTransfersByNFTResult>>;
|
|
3137
|
+
/**
|
|
3138
|
+
* Confirms ownership of specified NFTs for a given wallet.
|
|
3139
|
+
*
|
|
3140
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_verifyNFTsOwner_v2
|
|
3141
|
+
*
|
|
3142
|
+
* @param args - {@link QNVerifyNFTsOwnerInput}
|
|
3143
|
+
* @returns response - {@link QNVerifyNFTsOwnerResult}
|
|
3144
|
+
*
|
|
3145
|
+
* @example
|
|
3146
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3147
|
+
*
|
|
3148
|
+
* const core = new QuickNode.Core({
|
|
3149
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3150
|
+
* config: {
|
|
3151
|
+
* addOns: { nftTokenV2: true }
|
|
3152
|
+
* }
|
|
3153
|
+
* }
|
|
3154
|
+
*
|
|
3155
|
+
* const response = await core.client.qn_verifyNFTsOwner({
|
|
3156
|
+
* wallet: "0x91b51c173a4bdaa1a60e234fc3f705a16d228740",
|
|
3157
|
+
* contracts: [
|
|
3158
|
+
* "0x2106c00ac7da0a3430ae667879139e832307aeaa:3643",
|
|
3159
|
+
* "0xd07dc4262bcdbf85190c01c996b4c06a461d2430:133803",
|
|
3160
|
+
* ],
|
|
3161
|
+
* })
|
|
3162
|
+
*
|
|
3163
|
+
*/
|
|
3164
|
+
qn_verifyNFTsOwner: (args: SimplifyType<QNVerifyNFTsOwnerInput>) => Promise<SimplifyType<QNVerifyNFTsOwnerResult>>;
|
|
3165
|
+
/**
|
|
3166
|
+
* Returns token details for specified contract.
|
|
3167
|
+
*
|
|
3168
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_getTokenMetadataByContractAddress_v2
|
|
3169
|
+
*
|
|
3170
|
+
* @param args - {@link QNGetTokenMetadataByCAInput}
|
|
3171
|
+
* @returns response - {@link QNGetTokenMetadataByCAResult}
|
|
3172
|
+
*
|
|
3173
|
+
* @example
|
|
3174
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3175
|
+
*
|
|
3176
|
+
* const core = new QuickNode.Core({
|
|
3177
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3178
|
+
* config: {
|
|
3179
|
+
* addOns: { nftTokenV2: true }
|
|
3180
|
+
* }
|
|
3181
|
+
* }
|
|
3182
|
+
*
|
|
3183
|
+
* const response = await core.client.qn_getTokenMetadataByContractAddress({
|
|
3184
|
+
* contract: "0x2106c00ac7da0a3430ae667879139e832307aeaa",
|
|
3185
|
+
* })
|
|
3186
|
+
*/
|
|
3187
|
+
qn_getTokenMetadataByContractAddress: (args: SimplifyType<QNGetTokenMetadataByCAInput>) => Promise<SimplifyType<QNGetTokenMetadataByCAResult | null>>;
|
|
3188
|
+
/**
|
|
3189
|
+
* Returns token details for specified token symbol.
|
|
3190
|
+
*
|
|
3191
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_getTokenMetadataBySymbol_v2
|
|
3192
|
+
*
|
|
3193
|
+
* @param args - {@link QNGetTokenMetadataBySymbolInput}
|
|
3194
|
+
* @returns response - {@link QNGetTokenMetadataBySymbolResult}
|
|
3195
|
+
*
|
|
3196
|
+
* @example
|
|
3197
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3198
|
+
*
|
|
3199
|
+
* const core = new QuickNode.Core({
|
|
3200
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3201
|
+
* config: {
|
|
3202
|
+
* addOns: { nftTokenV2: true }
|
|
3203
|
+
* }
|
|
3204
|
+
* }
|
|
3205
|
+
*
|
|
3206
|
+
* const response = await core.client.qn_getTokenMetadataBySymbol({
|
|
3207
|
+
* symbol: "DAI",
|
|
3208
|
+
* })
|
|
3209
|
+
*/
|
|
3210
|
+
qn_getTokenMetadataBySymbol: (args: SimplifyType<QNGetTokenMetadataBySymbolInput>) => Promise<SimplifyType<QNGetTokenMetadataBySymbolResult>>;
|
|
3211
|
+
/**
|
|
3212
|
+
* Returns transactions within a specified wallet address.
|
|
3213
|
+
*
|
|
3214
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_getTransactionsByAddress_v2
|
|
3215
|
+
*
|
|
3216
|
+
* @param args - {@link QNGetTransactionsByAddressInput}
|
|
3217
|
+
* @returns response - {@link QNGetTransactionsByAddressResult}
|
|
3218
|
+
*
|
|
3219
|
+
* @example
|
|
3220
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3221
|
+
*
|
|
3222
|
+
* const core = new QuickNode.Core({
|
|
3223
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3224
|
+
* config: {
|
|
3225
|
+
* addOns: { nftTokenV2: true }
|
|
3226
|
+
* }
|
|
3227
|
+
* }
|
|
3228
|
+
*
|
|
3229
|
+
* const response = await core.client.qn_getTransactionsByAddress({
|
|
3230
|
+
* address: "0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6"
|
|
3231
|
+
* })
|
|
3232
|
+
*/
|
|
3233
|
+
qn_getTransactionsByAddress: (args: SimplifyType<QNGetTransactionsByAddressInput>) => Promise<SimplifyType<QNGetTransactionsByAddressResult>>;
|
|
3234
|
+
/**
|
|
3235
|
+
* Returns ERC-20 tokens and token balances within a wallet.
|
|
3236
|
+
*
|
|
3237
|
+
* - Docs: https://www.quicknode.com/docs/ethereum/qn_getWalletTokenBalance_v2
|
|
3238
|
+
*
|
|
3239
|
+
* @param args - {@link QNGetWalletTokenBalanceInput}
|
|
3240
|
+
* @returns response - {@link QNGetWalletTokenBalanceResult}
|
|
3241
|
+
*
|
|
3242
|
+
* @example
|
|
3243
|
+
* import QuickNode from '@quicknode/sdk';
|
|
3244
|
+
*
|
|
3245
|
+
* const core = new QuickNode.Core({
|
|
3246
|
+
* endpointUrl: "https://some-cool-name.quiknode.pro/abcd1234",
|
|
3247
|
+
* config: {
|
|
3248
|
+
* addOns: { nftTokenV2: true }
|
|
3249
|
+
* }
|
|
3250
|
+
* }
|
|
3251
|
+
*
|
|
3252
|
+
* const response = await core.client.qn_getWalletTokenBalance({
|
|
3253
|
+
* address: "0xD10E24685c7CDD3cd3BaAA86b09C92Be28c834B6"
|
|
3254
|
+
* })
|
|
3255
|
+
*/
|
|
3256
|
+
qn_getWalletTokenBalance: (args: SimplifyType<QNGetWalletTokenBalanceInput>) => Promise<SimplifyType<QNGetWalletTokenBalanceResult>>;
|
|
3257
|
+
qn_getWalletTokenTransactions: (args: SimplifyType<QNGetWalletTokenTransactionsInput>) => Promise<SimplifyType<QNGetWalletTokenTransactionsResult>>;
|
|
3258
|
+
};
|
|
3259
|
+
|
|
3260
|
+
interface CoreArguments {
|
|
3261
|
+
endpointUrl: string;
|
|
3262
|
+
chain?: Chain;
|
|
3263
|
+
config?: QNCoreClientConfig;
|
|
3264
|
+
}
|
|
3265
|
+
type QNCoreClientConfig = {
|
|
3266
|
+
addOns?: {
|
|
3267
|
+
nftTokenV2: boolean;
|
|
3268
|
+
};
|
|
3269
|
+
};
|
|
3270
|
+
type QNCoreClient = PublicClient & NFTAndTokenActions;
|
|
3271
|
+
|
|
3272
|
+
declare class Core {
|
|
3273
|
+
readonly endpointUrl: string;
|
|
3274
|
+
readonly client: QNCoreClient;
|
|
3275
|
+
constructor({ endpointUrl, chain, config }: CoreArguments);
|
|
3276
|
+
}
|
|
3277
|
+
|
|
2734
3278
|
declare const QuickNode: {
|
|
2735
3279
|
API: typeof API;
|
|
3280
|
+
Core: typeof Core;
|
|
2736
3281
|
};
|
|
2737
3282
|
|
|
2738
3283
|
type WalletNFTsByEnsQueryVariables = CodegenEthMainnetWalletNFTsByEnsQueryVariables;
|
|
@@ -2763,4 +3308,12 @@ declare class QNInputValidationError extends Error {
|
|
|
2763
3308
|
});
|
|
2764
3309
|
}
|
|
2765
3310
|
|
|
2766
|
-
|
|
3311
|
+
declare class QNInvalidEndpointUrl extends Error {
|
|
3312
|
+
constructor();
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
declare class QNChainNotSupported extends Error {
|
|
3316
|
+
constructor(endpointUrl: string);
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
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 };
|