Skip to content

0xPolygonID/js-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3dff826 · Mar 20, 2024
Feb 24, 2024
Nov 1, 2023
Nov 1, 2023
Mar 20, 2024
Mar 20, 2024
Sep 5, 2023
Aug 1, 2023
Jun 6, 2023
Mar 15, 2024
Jul 9, 2023
Aug 1, 2023
Mar 1, 2023
Jan 17, 2024
Nov 1, 2023
Mar 20, 2024
Mar 20, 2024
Nov 1, 2023
Nov 1, 2023
Apr 9, 2023

Repository files navigation

Polygon ID JS SDK

SDK to work with Polygon ID using JavaScript and TypeScript languages.

Disclaimer

Polygon ID JS SDK is in public now. It may still contain bugs or missing functionality, that it will be added in next versions.

Usage

Installation:

npm install @0xpolygonid/js-sdk

See tests for examples on how to use SDK.

Tests

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 network rpc node"
export RHS_URL="..reverse hash service url"
export IPFS_URL="url for ipfs"
export STATE_CONTRACT_ADDRESS="state contract address"
export RHS_CONTRACT_ADDRESS="reverse hash service contract address"

And place actual circuits to test/proofs/testdata

Documentation

Generate documentation

  1. Define path where documentation repository is located, for example:

        const DOCS_DIR = '../js-sdk-tutorials/docs/api';
  2.      npm run tsc:declaration:watch
  3.      npm run doc:watch:website

Documentation can be found here