DID
Manage DID operation using DID APIs
Please generate access token before proceeding. Once you generated the access_token, you can pass this token as bearer authorization token in the header for all APIs.
There are 3 steps involved in DID creation:
Generate a DID Document: Generate the data structure of the DID document.
Sign a DID Document (optional): Sign the DID Document using verification method.
Register a DID Document (optional) : Registers the signed DID Document on the blockchain network.
Create a DID
Generates the a new DID and DID Document.
Bearer <access_token>
Origin as you set in application cors
Namespace to be added in did.
testnetMethodSpecificId to be added in did
0x19d73aeeBcc6FEf2d0342375090401301Fe9663FDID Created
Error occured at the time of creating did
Duplicate key error
Request Body Parameters
Namespace: DID name space. Possible value is
testnet
Optional Parameters
MethodSpecificId: Custom Id string which you want to attach with the DID. Please read did:hid method spec for details about possible format.
Options.keyTypes: We support
Ed25519VerificationKey2020,EcdsaSecp256k1RecoveryMethod2020verification method key types. So only these two are possible values. Read the full specification here.Options.publicKey: Please pass the
options.publickeyproperty only forEd25519VerificationKey2020verification method key type. ForEcdsaSecp256k1RecoveryMethod2020, this property can be kept blank. Its value would be publickey (in multi base format)Options.walletAddress: Please pass
options.walletAddressfor keyTypeEcdsaSecp256k1RecoveryMethod2020Options.chainId: ChainId in HEX format. For example for Etheruem main net, the chain id would be
0x1. This property is only required for keytypeEcdsaSecp256k1RecoveryMethod2020
Register a DID
Registers a Signed DID Document in DID registry. The Gas fee (network fee) for this DID registration will be done by applications' walletAddress.
Bearer <access_token>
Origin as you set in application cors
Verification Method id for did registration
did:hid:testnet:........#key-${idx}IClientSpec 'eth-personalSign' or 'cosmos-ADR036'
eth-personalSignSignature for clientSpec
afafljagahgp9agjagknaglkj/kagka=DID Registred
Error occured at the time of creating did
Request Parameters
didDocument : DID documented generated using
/api1/v1/did/createAPIverificationMethodId : Verification Method id of referred verification method in the didDocument
Optional Parameters
clientSpec : Wallet specifications which are used to sign the didDocument string. Use
eth-personalSignfor Metamask andcosmos-ADR036for Keplr wallet. Learn more about client specifications here.signature: If didDocument is signed using client wallets (Metamask or Keply) then pass the signature hex string.
Note: Read how to use Metamask to create Hypersign DID.
Resolve a DID
Given a DID Id (example: did:hid:testnet:0x123123123123), this API will resolve the corresponding DID Document from the DID registry (or Hypersign Blockchain).
Bearer <access_token>
Origin as you set in application cors
DID Resolved
DID Resolved
Fetch all DIDs for your apps
Page value
1Fetch limited list of data
10Bearer <access_token>
Origin as you set in application cors
DID List
Error in finding resource
Update a DID
Update a DIDDocument
Bearer <access_token>
Origin as you set in application cors
Field to check if to deactivate did or to update it
falseVerification Method id for did updation
did:hid:testnet:........#key-${idx}IClientSpec 'eth-personalSign' or 'cosmos-ADR036'
eth-personalSignSignature for clientSpec
afafljagahgp9agjagknaglkj/kagka=DID Updated
Invalid didDoc
Resource not found
Request Parameters
didDocument : DID documented to be updated
verificationMethodId : Verification Method id of referred verification method in the didDocument
deactivate :
trueis you want to deactivate this DID,falseotherwise.
Optional Parameters
clientSpec : Wallet specifications which are used to sign the didDocument string. Use
eth-personalSignfor Metamask andcosmos-ADR036for Keplr wallet. Learn more about client specifications here.signature: If didDocument is signed using client wallets (Metamask or Keply) then pass the signature hex string.
Last updated