@pokt-network/aat-js
TypeScript icon, indicating that this package has built-in type declarations

0.1.3-rc • Public • Published

Pocket-AAT-JS

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.

Overview


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Requirements

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.

Installation

npm install --save @pokt-network/aat-js

Documentation

// 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);
  }
})();

Running the tests

npm run test

Contributing

Please read CONTRIBUTING.md for details on contributions and the process of submitting pull requests.

Support & Contact

License

This project is licensed under the MIT License; see the LICENSE.md file for details.

Dependencies (5)

Dev Dependencies (19)

Package Sidebar

Install

npm i @pokt-network/aat-js

Weekly Downloads

28

Version

0.1.3-rc

License

MIT

Unpacked Size

25.6 kB

Total Files

18

Last publish

Collaborators

  • crisog
  • luyzdeleon