Awesome
idOS JavaScript SDK
Folder | Contents |
---|---|
📁 idos-sdk-js | Source and docs for the idOS JavaScript SDK |
📁 idos-enclave | Source for the idOS Enclave hosted at enclave.idos.network |
📁 idos-data-dashboard | Source for the idOS data dashboard hosted at dashboard.idos.network |
📁 idos-example-dapp | A sample dapp demonstrating SDK usage. |
Installation
Get our NPM package and its dependencies with pnpm or the equivalent of your package manager of choice:
pnpm add @idos-network/idos-sdk ethers near-api-js
Quickstart
import { idOS } from "@idos-network/idos-sdk";
// Connect your user's wallet however you do it today, for example:
const provider = new ethers.BrowserProvider(window.ethereum);
await provider.send("eth_requestAccounts", []);
const signer = await provider.getSigner();
// Initialize the SDK
const idos = await idOS.init({ container: "#idos-container" });
await idos.setSigner("EVM", signer);
// Overview of user's credentials
await idos.data.list("credentials").then(console.log);
// [{ id: "4f4d...", issuer: "Fractal ID", type: "KYC"}, ...]
Support
Please follow the process outlined here: https://github.com/idos-network/.github/blob/main/profile/README.md