Skip to main content

Getting Started with the QuickNode SDK

Updated on
Oct 3, 2023

Overview

The QuickNode SDK is a powerful software development kit designed to facilitate interaction with the QuickNode infrastructure. This SDK offers a comprehensive JavaScript and TypeScript framework-agnostic library that seamlessly supports CommonJS and ES module systems.

The QuickNode SDK is open-source and its source code can be found at qn-oss repository.

Installation

The QuickNode SDK can be installed through the @quicknode/sdk npm package. Note that this package requires Node.js v16 or higher.

Enter the following commands in your Terminal to begin the installation:

npm install @quicknode/sdk

or

yarn add @quicknode/sdk

Quickstart

The following example uses the QuickNode SDK to easily grab the first 5 NFTs from a wallet:

import QuickNode from '@quicknode/sdk';
// if you are using CommonJS, use this line instead:
// const QuickNode = require('@quicknode/sdk')

const qn = new QuickNode.API();

qn.nfts
.getByWallet({
address: 'quicknode.eth',
first: 5,
})
.then((response) => console.log(response));

Modules

The QuickNode SDK has a modular architecture, mirroring the structure of QuickNode's services. Each module has a unique function:


  • API: Supports QuickNode's advanced APIs, including our robust Graph API. See the overview page for more info.
  • Core: Enables endpoint RPC functionality, allowing communication with your endpoint through both core and add-on RPC calls. See the overview page for more info.

Tree Shaking

The modules can be imported directly allowing for tree shaking with modern JavaScript bundlers:


  • API: import API from "@quicknode/sdk/api"
  • Core: import Core from "@quicknode/sdk/core"

We ❤️ Feedback

❓ We want to hear from you! Please take a few minutes to fill out our QuickNode SDK feedback form and let us know what you currently think about the SDK. This helps us further improve the SDK.

Share this doc