Created
August 8, 2019 15:24
-
-
Save bafonins/a3ac3afb601247314808baaf4d5a8015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const TTN = require('ttn-lw').default | |
| const ns = process.env.TTN_LW_NETWORK_SERVER_ADDRESS | |
| const token = process.env.access_token | |
| const ttnClient = new TTN( | |
| token, | |
| { | |
| stackConfig: { ns: `${ns}/api/v3` }, | |
| connectionType: 'http', | |
| proxy: false, | |
| } | |
| ); | |
| (async function () { | |
| const address = await ttnClient.Ns.generateDevAddress() | |
| console.log(address) | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment