Prerequisites
- Node.js v18 or later
- A package manager like npm, yarn, or pnpm
- Basic knowledge of JavaScript
Make a new project
Create a new directory for your project and navigate into it.Install the SDK
Install the SDK using your favorite package manager.Add
"type": "module"
to your package.json
file. This is required to use
ES6 modules in Node.js.Get your API key
You will need an API key to use the SDK. You can get it from the Gateway Protocol dashboard. Once you are logged in to the dashboard, navigate to theDeveloper Access
section and you can find your API key there.
Create a new file
Create a new file calledindex.js
and add the following code to it.
your-api-key
and your-token
with your actual API key and token.
Run the code
Run the code using your favorite JavaScript runtime.createPDA
mutation in the console.
That’s it! You have successfully created a new PDA using the Gateway Protocol SDK.