πŸ†”
ID++ SDK Docs
  • πŸ†”Introduction
  • ❓Why use the ID++ SDK?
  • πŸ’‘Key concepts
    • ℹ️Decentralized Web Node (DWN)
    • ℹ️Decentralized identities (DID)
    • ℹ️Schemas
    • ℹ️Records
  • πŸ€“Reference
    • βš™οΈInstallation
    • βš™οΈConfiguration
    • βš™οΈInitialization
    • πŸ“ƒRecords
      • πŸ“–Queries
        • πŸ“‘How to query records
      • βš’οΈCRUD Operations
        • πŸ†•Create a record
        • πŸ“šRead a record
        • πŸ“‘Update a record
        • ❌Delete a record
    • πŸ›‘οΈVerifiable Credentials
      • πŸ’³Credentials
      • πŸ“œPresentations
  • πŸ—ΊοΈGuides
    • πŸ“Handling files
    • πŸš€Sharing records
Powered by GitBook
On this page
  • Use the CDN
  • Install the package
  • Update type declarations
  1. Reference

Installation

PreviousRecordsNextConfiguration

Last updated 1 year ago

The SDK is available on or via . The CDN is the preferred method of installation for any Node.js (v16+) or Browser environment.

Use the CDN

In the head of your root HTML file, you can add the following module to access the CDN.

<script type="module" crossorigin="anonymous">
  import { IDDwn } from "https://cdn.jsdelivr.net/npm/@dwn-protocol/id-sdk@latest/dist/browser.mjs";
  window.IDDwn = IDDwn;
</script>

You can now reference the in your JavaScript using window.IDDwn

Install the package

To install the package for Node or Browser, you can run the following command:

## If using npm:
npm i @dwn-protocol/id-sdk@latest

## If using yarn:
yarn add @dwn-protocol/id-sdk@latest

Update type declarations

If you are using Create React App or a similar technology, you can update your type declarations to include the SDK's types.

// Existing code
declare module '@dwn-protocol/id-sdk';
πŸ€“
βš™οΈ
npmjs.com
CDN
DWN