DID
JavaScript Decentralized Identity APIs
Get DID list
getDIDList(address)
address: wallet address
data: a list of DID
Create a DID
createDID(address)
address: wallet address
- DID: user DID (new one if none existed) 
- message: message to be signed 
- updated:updated time 
Query DID information
queryDIDDetail(DID)
did: DID string
- controllers: DID controller information 
- public_keys: device public key 
- current_public_key: public key 
Save DID information
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
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
resolveDID(DID)
DID: DID string
N/A
Get DID login information
preDIDLogin(DID)
DID: DID string
- DID: user DID (new one if none existed) 
- message: message to be signed 
- updated: updated time 
DID Login
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)with- etherum.Sign(accounts.TextHash(message), privateKey)or- personal_signfrom
 
- access_token: the access token 
- user_id: user id 
- device_id: device id 
Last updated
