SendingNetwork
  • OVERVIEW
    • Getting Started
    • FAQs
  • Network Instructional Articles
    • Basics
      • Introducing the Edge, WatchDog, and Guardian Nodes
      • Overview
      • Messaging Solution
      • Privacy Solution
      • Rich Communication Solution
      • Multi-Platform Solution
      • Decentralized Identity
      • Multiple Chat Modes
      • How It Works
      • Token Utility
      • The Team
    • Key Concepts
      • Decentralized Identity
      • Social Graphs
      • Edge Node
  • SDK Documentation
    • Glossary
    • JavaScript client SDK
      • DID
      • User
      • Message
      • Room
      • Contact
      • Social Graph
    • iOS client SDK
      • Push
      • DID
      • User
      • Message
      • Room
      • Contact
    • Android client SDK
      • User
      • Room
    • Java SDK
      • DID
      • Room
      • Message
    • Node.js SDK
      • DID
      • Room
      • Message
    • Unreal SDK
      • DID
      • User
      • Message
      • Room
    • Unity SDK
      • DID
      • Room
      • Message
    • Website chat widget SDK
      • Customization
      • DID
      • User
      • Room
      • Message
      • Other
    • Bot SDKs
      • Golang Bot SDK
        • DID
        • User
        • Room
        • Message
    • Extensible Message Interface
    • Push Notifications
    • Flutter SDK
      • DID
      • User
      • Message
      • Room
    • PHP SDK
      • DID
      • Room
      • User
    • Developer Key
  • Acquisition Kit
    • Social Boost Development Instructions
  • WatchDog Agent
    • WatchDog Agent Guide
    • WatchDog Agent Deployment Tutorial
      • Linux Deployment Tutorial
    • One-Click Deployment
  • Edge Node
    • Edge Node Deployment Tutorial
    • VPS Setup Guide
      • Google Cloud Platform (GCP)
      • Amazon Web Services (AWS)
      • Contabo
    • Check Node Stats with Auto-Reply Bot in SendingMe App
    • Alpha-3 Testnet FAQs
  • delegation node
    • Delegation Node Deployment Tutorial
  • Private Delegation Node
  • Use Cases
    • Wallet-to-Wallet Messaging
    • Dapp Notifications
    • Identity Verification
    • Gamer Acquisition
    • Cross-platform Trading
Powered by GitBook
On this page
  • Get DID list
  • Create a DID
  • Query DID information
  • Save DID information
  • Update the DID
  • Resolve DID
  • Get DID login information
  • DID Login
  1. SDK Documentation
  2. JavaScript client SDK

DID

JavaScript Decentralized Identity APIs

Get DID list

Name
Parameters Description
Response

getDIDList(address)

address: wallet address

data: a list of DID

Create a DID

Name
Parameters Description
Response

createDID(address)

address: wallet address

  • DID: user DID (new one if none existed)

  • message: message to be signed

  • updated:updated time

Query DID information

Name
Parameters Description
Response

queryDIDDetail(DID)

did: DID string

  • controllers: DID controller information

  • public_keys: device public key

  • current_public_key: public key

Save DID information

Name
Parameters Description
Response

saveDID(DID, data)

  • DID: DID string

  • data:

    • signature: signature of the signed message (derived by web3.eth.personal.sign method)

    • operation: create, link, unlink, link_key, unlink_key

    • ids: an array of DID strings needed for unlink and unlink_key operation. Unecessary for the create, link and link_public operation.

    • address: a blockchain-specific wallet address needed for the link and create operation, e.g., did:pkh:eip155:1:wallet_address.

    • updated: time of the update

message

Update the DID

Name
Parameters Description
Response

updateDID(DID, data)

  • DID: DID string

  • data:

    • ids: the DID ids.

    • address: a blockchain-specific wallet address needed for the link and create operation, e.g., did:pkh:eip155:1:wallet_address.

  • updated:updated time

  • message: message to be signed

  • DID: user DID (new one if none existed)

Resolve DID

Name
Parameters Description
Response

resolveDID(DID)

DID: DID string

N/A

Get DID login information

Name
Parameters Description
Response

preDIDLogin(DID)

DID: DID string

  • DID: user DID (new one if none existed)

  • message: message to be signed

  • updated: updated time

DID Login

Name
Parameters Description
Response

DIDLogin(data)

data:

  • type: type of login, default set to m.login.did.identity

  • updated: the updated time returned by preDiDLogin(did)

  • device_id: device id (omit this field for a new device)

  • identifier: login information

    • DID: user DID

    • token: sign the message returned by preDiDLogin(did) withetherum.Sign(accounts.TextHash(message), privateKey) orpersonal_sign from metamask, then perform a base16 encoding.

  • access_token: the access token

  • user_id: user id

  • device_id: device id

PreviousJavaScript client SDKNextUser

Last updated 1 year ago