This is the official SDK for the The Things Stack for LoRaWAN.
$ yarn add ttnimport TTN from 'ttn'
const token = 'paste-your-token-here'
const ttn = new TTN(token, {
connectionType: 'http',
baseURL: 'http://localhost:1885/api/v3',
defaultUserId: 'testuser',
})const appData = {
ids: {
application_id: 'first-app',
},
name: 'Test App',
description: 'Some description',
}
// Via Applications object.
const firstApp = await ttn.Applications.create('testuser', appData)
// Via Application class.
const secondApp = new ttn.Application(appData)
await secondApp.save()$ yarn run buildThis will transpile the source to /dist
$ yarn run watch$ yarn run jestThere are some basic usage examples in /src/examples