Generate to-spec AAT tokens for your Pocket JavaScript applications easily using this SDK. Current supported version of the AAT specification supported by this library: 0.0.1
. For more details, please reference the AAT documentation.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You should have at least have a basic knowledge of blockchain technology and know your way around JavaScript. You will also need to install the NPM tool.
npm install --save @pokt-network/aat-js
// First require the PocketAAT class
const PocketAAT = require('@pokt-network/aat-js');
// Define the arguments needed to build an AAT
const clientPublicKey = 'b70382156da53d4274f655961e8b1aa0950aa7f4';
const applicationPublicKey = 'a85f3577dcfe59bfed60b3ed013c739ac875237f98a98735dfa13733b0ced42d';
const applicationPrivateKey = 'f70196f8f9246c957e4947c1be09da98c405aebc1a4e2...';
(async () => {
try {
// Create a new PocketAAT instance
var pocketAAT = await PocketAAT.from('0.0.1', clientPublicKey, applicationPublicKey, applicationPrivateKey);
// Example JSON output
console.log(JSON.stringify(pocketAAT));
} catch (e) {
console.log(e);
}
})();
npm run test
Please read CONTRIBUTING.md for details on contributions and the process of submitting pull requests.
This project is licensed under the MIT License; see the LICENSE.md file for details.