DID
JavaScript Decentralized Identity APIs
Last updated
JavaScript Decentralized Identity APIs
Last updated
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
Name | Parameters Description | Response |
---|---|---|
getDIDList(address)
address
: wallet address
data: a list of DID
createDID(address)
address
: wallet address
DID: user DID (new one if none existed)
message: message to be signed
updated:updated time
queryDIDDetail(DID)
did
: DID string
controllers: DID controller information
public_keys: device public key
current_public_key: public key
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
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)
resolveDID(DID)
DID
: DID string
N/A
preDIDLogin(DID)
DID
: DID string
DID: user DID (new one if none existed)
message: message to be signed
updated: updated time
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