SDK to work with Polygon ID using JavaScript and TypeScript languages.
Polygon ID JS SDK is in public now. It may still contain bugs or missing functionality, that it will be added in next versions.
Installation:
npm install @0xpolygonid/js-sdk
See tests for examples on how to use SDK.
Run unit tests:
npm run test
Note: mtp / sig / auth / rhs files contain integration tests!
To run them, please set following variables:
export WALLET_KEY="...key in hex format"
export RPC_URL="...url to polygon network rpc node"
export RHS_URL="..reverse hash service url"
export IPFS_URL="url for ipfs"
And place actual circuits to test/proofs/testdata
-
Define path where documentation repository is located, for example:
const DOCS_DIR = '../js-sdk-tutorials/docs/api';
-
npm run tsc:declaration:watch
-
npm run doc:watch:website
Documentation can be found here