@quicknode/sdk 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -111,6 +111,24 @@ client.nft
111
111
  .then((response) => console.log(response));
112
112
  ```
113
113
 
114
+ ### nft.getCollectionDetails
115
+
116
+ | Argument | Values | Optional | Description | Example |
117
+ | -------- | ------ | -------- | ----------------------- | ------------------------------------------ |
118
+ | address | string | ❌ | Contract address of NFT | 0x2106C00Ac7dA0A3430aE667879139E832307AeAa |
119
+
120
+ ```ts
121
+ import { QuickNodeSDK } from '@quicknode/sdk';
122
+
123
+ const client = new QuickNodeSDK();
124
+
125
+ client.nft
126
+ .getCollectionDetails({
127
+ address: '0x2106C00Ac7dA0A3430aE667879139E832307AeAa',
128
+ })
129
+ .then((response) => console.log(response));
130
+ ```
131
+
114
132
  ## Pagination
115
133
 
116
134
  For functions that support pagination, use the `first` property to specify the amount of results to return.
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "directory": "packages/libs/api/sdk"
7
7
  },
8
8
  "license": "MIT",
9
- "version": "0.1.0",
9
+ "version": "0.2.0",
10
10
  "main": "./src/index.js",
11
11
  "module": "./src/index.esm.js",
12
12
  "types": "./src/index.d.ts",
package/src/index.esm.js CHANGED
@@ -8010,6 +8010,34 @@ const getContractAddressNFTsRawQuery = gql `
8010
8010
  }
8011
8011
  `;
8012
8012
 
8013
+ const getCollectionDetailsRawQuery = gql `
8014
+ query CollectionDetails($address: String!) {
8015
+ contract(address: $address) {
8016
+ ... on ERC721Contract {
8017
+ address
8018
+ isVerified
8019
+ tokenStandard
8020
+ attributes {
8021
+ name
8022
+ rarity
8023
+ value
8024
+ valueCount
8025
+ }
8026
+ circulatingSupply
8027
+ name
8028
+ stats {
8029
+ average
8030
+ ceiling
8031
+ floor
8032
+ totalSales
8033
+ volume
8034
+ }
8035
+ symbol
8036
+ }
8037
+ }
8038
+ }
8039
+ `;
8040
+
8013
8041
  class NFTQueries {
8014
8042
  constructor(client) {
8015
8043
  this.client = client;
@@ -8038,6 +8066,14 @@ class NFTQueries {
8038
8066
  });
8039
8067
  });
8040
8068
  }
8069
+ getCollectionDetails(variables) {
8070
+ return __awaiter(this, void 0, void 0, function* () {
8071
+ return yield this.client.query({
8072
+ query: getCollectionDetailsRawQuery,
8073
+ variables,
8074
+ });
8075
+ });
8076
+ }
8041
8077
  }
8042
8078
 
8043
8079
  /**
package/src/index.js CHANGED
@@ -8018,6 +8018,34 @@ const getContractAddressNFTsRawQuery = gql `
8018
8018
  }
8019
8019
  `;
8020
8020
 
8021
+ const getCollectionDetailsRawQuery = gql `
8022
+ query CollectionDetails($address: String!) {
8023
+ contract(address: $address) {
8024
+ ... on ERC721Contract {
8025
+ address
8026
+ isVerified
8027
+ tokenStandard
8028
+ attributes {
8029
+ name
8030
+ rarity
8031
+ value
8032
+ valueCount
8033
+ }
8034
+ circulatingSupply
8035
+ name
8036
+ stats {
8037
+ average
8038
+ ceiling
8039
+ floor
8040
+ totalSales
8041
+ volume
8042
+ }
8043
+ symbol
8044
+ }
8045
+ }
8046
+ }
8047
+ `;
8048
+
8021
8049
  class NFTQueries {
8022
8050
  constructor(client) {
8023
8051
  this.client = client;
@@ -8046,6 +8074,14 @@ class NFTQueries {
8046
8074
  });
8047
8075
  });
8048
8076
  }
8077
+ getCollectionDetails(variables) {
8078
+ return __awaiter(this, void 0, void 0, function* () {
8079
+ return yield this.client.query({
8080
+ query: getCollectionDetailsRawQuery,
8081
+ variables,
8082
+ });
8083
+ });
8084
+ }
8049
8085
  }
8050
8086
 
8051
8087
  /**
@@ -0,0 +1,4 @@
1
+ export declare const getCollectionDetailsRawQuery: import("graphql/language/ast").DocumentNode;
2
+ export interface CollectionDetailsQueryVariables {
3
+ address: string;
4
+ }
@@ -3,11 +3,13 @@ import { CustomApolloClient } from '../../client/customApolloClient';
3
3
  import { WalletAddressNFTsQueryVariables } from './getNFTsByWalletAddress/getNFTsByWalletAddress';
4
4
  import { WalletENSNFTsQueryVariables } from './getNFTsByWalletENS/getNFTsByWalletENS';
5
5
  import { ContractAddressNFTsQueryVariables } from './getNFTsByContractAddress/getNFTsByContractAddress';
6
- import { ContractNFTsQueryResponse, WalletNFTsQueryResponse } from './sharedTypes';
6
+ import { CollectionDetailsQueryVariables } from './getCollectionDetails/getCollectionDetails';
7
+ import { ContractNFTsQueryResponse, WalletNFTsQueryResponse, CollectionDetailsQueryResponse } from './sharedTypes';
7
8
  export declare class NFTQueries {
8
9
  private client;
9
10
  constructor(client: CustomApolloClient);
10
11
  getNFTsByWalletAddress(variables: WalletAddressNFTsQueryVariables): Promise<ApolloQueryResult<WalletNFTsQueryResponse>>;
11
12
  getNFTsByWalletENS(variables: WalletENSNFTsQueryVariables): Promise<ApolloQueryResult<WalletNFTsQueryResponse>>;
12
13
  getNFTsByContractAddress(variables: ContractAddressNFTsQueryVariables): Promise<ApolloQueryResult<ContractNFTsQueryResponse>>;
14
+ getCollectionDetails(variables: CollectionDetailsQueryVariables): Promise<ApolloQueryResult<CollectionDetailsQueryResponse>>;
13
15
  }