Kin Node Starter
This section is being worked on and is coming soon.
This will get your Node.js app Kin enabled in a few minutes. All you need to do is add a simple class file to your app, and you should be able to make calls to Kin’s blockchain immediately.
Make sure you have read Getting Started and have the required environment variables
1. Install the Kin SDK for Node to your project:
npm install @kinecosystem/kin-sdk-v2
# Or if you use yarn
yarn add @kinecosystem/kin-sdk-v2
2. Create a Node.js app and add the kin.ts class to your app
This class abstracts some calls to Kin’s official SDK and is fully usable out of the box. However, you can easily extend it to suite your custom needs.
3. Instantiate a new Kin client
We’re creating a new instance of our Kin wrapper and pass in the environment. In this example we’ll pick the Test network.
// Set up Kin client
const kin = new Kin(Environment.Test)
Congratulations! You now have a Kin enabled app running!
A demo App is included that you can run and test. To use the app:
- Pull https://github.com/kintegrate/kin-starter-node/ into a local folder
- Access the
/src/main.tsfile on your local.
- Use this code to test available methods