## DID-SDK This SDK aims to help the development of integrations with DidStorage smart-contracts that use JavaScript. - [Everscale DID Registry](https://git.defispace.com/ssi-4/everscale-did-registry) - [npmjs-package](https://www.npmjs.com/package/everscale-did-sdk-radiance) - [Specification `docs/spec-did-core.md`](https://git.defispace.com/ssi-4/everscale-did-sdk-core/-/blob/master/docs/spec-did-core.md) ### Contents - [`src/did-client-core.js`](https://git.defispace.com/ssi-4/everscale-did-sdk-core/-/blob/master/src/did-client-core.js) - sdk uses TonClient(@tonclient/core) for node js and web front ### How to install ```shell npm i everscale-did-sdk-radiance ``` ### Example use did-core for Node js ```javascript const { libNode } = require("@tonclient/lib-node"); const core = require('everscale-did-sdk-radiance'); async function main() { core.initSettings("devNet", libNode); const did = 'did:everscale:d760f69f830dfa0668f2e7923392217589ec8d62dcb90f2c06656665dba7fb4d'; res = await core.resolveDIDDocument(did); console.log(res); } ``` ### Example use did-core for Web ```javascript import { libWeb } from "@tonclient/lib-web"; import core from 'everscale-did-sdk-radiance'; async function main() { core.initSettings("devNet", libWeb); const did = 'did:everscale:d760f69f830dfa0668f2e7923392217589ec8d62dcb90f2c06656665dba7fb4d'; res = await core.resolveDIDDocument(did); console.log(res); } ``` ### Example use did-core for Node js or Web [Check file `test/run.js`](https://git.defispace.com/ssi-4/everscale-did-sdk-core/-/blob/master/test/run.js) ### How to test set params (address and keys) for giver contract in [`test/GiverContract.json`](https://git.defispace.com/ssi-4/everscale-did-sdk-core/-/blob/master/test/GiverContract.json) file and run ```shell npm install npm run test ``` Output ``` tests are completed Result of tests start tests: success Test 1 - Create did smart-contract: success Test 2 - resolve did: success Test 3 - update json did document: success Test 4 - update Issuer Address of did document smart-contract: success Test 5 - deactivate did document smart-contract: success Test 6 - sign data: success Test 7 - verify signature: success ```