![Discord](https://img.shields.io/discord/880505845090250794?color=g)
QuickNode SDK
Currently has support for getting started with Icy Tools GraphQL API in a blink!
Quick Start
import { QuickNodeSDK } from '@quicknode/sdk';
const client = new QuickNodeSDK();
client.nft
.getNFTsByWalletENS({
ensName: 'vitalik.eth',
first: 5,
})
.then((response) => console.log(response));
Full example implementation here
Providing a config object to the client
:warning: This client (and the underlying API) can be used without an icyApiKey, but its usage will be heavily rate limited, intended for trial and development purposes only.
import { QuickNodeSDK } from '@quicknode/sdk';
const client = new QuickNodeSDK({
icyApiKey: 'my-api-key',
});
Client config API
Property | Values | Example |
---|
icyApiKey | string | 1c1t00ls-4p10-k3y0-lu21-43405e3310 |
Methods
nft.getNFTsByWalletENS
Argument | Values | Optional | Description | Example |
---|
ensName | string | ❌ | Wallet ENS address | vitalik.eth |
first | number | ✅ | Number of results to return | 10 |
after | string | ✅ | Return results after end cursor | YXJyYXljb25uZWN0aW9uOjUwNQ= |
import { QuickNodeSDK } from '@quicknode/sdk';
const client = new QuickNodeSDK();
client.nft
.getNFTsByWalletENS({
ensName: 'vitalik.eth',
first: 5,
})
.then((response) => console.log(response));
nft.getNFTsByWalletAddress
Argument | Values | Optional | Description | Example |
---|
address | string | ❌ | Wallet address | 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 |
first | number | ✅ | Number of results to return | 10 |
after | string | ✅ | Return results after end cursor | YXJyYXljb25uZWN0aW9uOjUwNQ= |
import { QuickNodeSDK } from '@quicknode/sdk';
const client = new QuickNodeSDK();
client.nft
.getNFTsByWalletAddress({
address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
first: 5,
})
.then((response) => console.log(response));
nft.getNFTsByContractAddress
Argument | Values | Optional | Description | Example |
---|
address | string | ❌ | Contract address of NFT | 0x2106C00Ac7dA0A3430aE667879139E832307AeAa |
first | number | ✅ | Number of results to return | 10 |
after | string | ✅ | Return results after end cursor | YXJyYXljb25uZWN0aW9uOjUwNQ= |
import { QuickNodeSDK } from '@quicknode/sdk';
const client = new QuickNodeSDK();
client.nft
.getNFTsByContractAddress({
address: '0x2106C00Ac7dA0A3430aE667879139E832307AeAa',
first: 5,
})
.then((response) => console.log(response));
nft.getCollectionDetails
Argument | Values | Optional | Description | Example |
---|
address | string | ❌ | Contract address of NFT | 0x2106C00Ac7dA0A3430aE667879139E832307AeAa |
import { QuickNodeSDK } from '@quicknode/sdk';
const client = new QuickNodeSDK();
client.nft
.getCollectionDetails({
address: '0x2106C00Ac7dA0A3430aE667879139E832307AeAa',
})
.then((response) => console.log(response));
For functions that support pagination, use the first
property to specify the amount of results to return.
The returned data.tokensPageInfo.endCursor
property in the response can be used to access subsequent results. This value can be passed in to the after
property and will return the results after that endCursor
.
hasNextPage
can be used to determine the end of the results, where it will be false
.
For example, if a response contains:
"data: {
"tokensPageInfo": {
"hasNextPage": true,
"endCursor": 'YXJyYXljb25uZWN0aW9uOlk='
}
}
}
calling the following will get the next page of results
client.nft.getNFTsByWalletENS({
ensName: 'vitalik.eth',
first: 5,
after: 'YXJyYXljb25uZWN0aW9uOlk=',
});
Contributing corner
Building
Run nx build libs-api-sdk
to build the library.
Running unit tests
Run nx test libs-api-sdk
to execute the unit tests via Jest.
Running lint
Run nx lint libs-api-sdk
to execute the lint via ESLint.