Getting started
This section is dedicated to understanding all it takes to install and setup the PAKT SDK on your NodeJS project.
Installation
Before you can use the PAKT SDK, you need to install it by running thenpm
command. To do so run:
or
Get your API keys
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can access your APIs or generate an API key from the API menu within Pakt's Command Center. Before attempting to access, ensure you have a paid and deployed Chainsite.
To deploy and activate a Chainsite follow this guide on Deploying a Pakt Chainsite
Initialization
To initialize, use the following code block:
Make your first request
The above code initializes the PAKT SDK and ensures the API Key is generated from the Command Center.
To make calls with the PAKT SDK is very easy. See below code blocks for examples. The SDK is also typed with the models and wrapped with a default ResponseDto<T>
.
ResponseDto<T>
is declared as:
Last updated