DID
Manage DID operation using DID APIs
Last updated
Manage DID operation using DID APIs
Last updated
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.
Note: Some of these APIs are on-chain APIs which means they need network fee to successfully execute, so make sure that your application wallet address has $hid tokens. Read network fee section for more details.
Entity Studio SSI API base URL: https://api.entity.hypersign.id
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.
Note: You can choose not to register a DID on blockchain, in that case, the DID is concidered as private DID. We support Ed25519VerificationKey2020
for private DIDs. Kindly read difference between private and public DID in this section.
Generates the a new DID and DID Document.
Namespace: DID name space. Possible value is testnet
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
, EcdsaSecp256k1RecoveryMethod2020
verification method key types. So only these two are possible values. Read the full specification here.
Options.publicKey: Please pass the options.publickey
property only for Ed25519VerificationKey2020
verification method key type. For EcdsaSecp256k1RecoveryMethod2020
, this property can be kept blank. Its value would be publickey (in multi base format)
Options.walletAddress: Please pass options.walletAddress
for keyType EcdsaSecp256k1RecoveryMethod2020
Options.chainId: ChainId in HEX format. For example for Etheruem main net, the chain id would be 0x1
. This property is only required for keytype EcdsaSecp256k1RecoveryMethod2020
Note: If no optional parameters are provided then, did will be created of verification key method type Ed25519VerificationKey2020
Note: If you want to create DID for blockchain wallet addresses like EVM wallets, Cosmos wallets, you should use keyType as . Read EcdsaSecp256k1RecoveryMethod2020
Registers a Signed DID Document in DID registry. The Gas fee (network fee) for this DID registration will be done by applications' walletAddress.
didDocument : DID documented generated using /api1/v1/did/create
API
verificationMethodId : 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-personalSign
for Metamask and cosmos-ADR036
for 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.
Given a DID Id (example: did:hid:testnet:0x123123123123
), this API will resolve the corresponding DID Document from the DID registry (or Hypersign Blockchain).
Update a DIDDocument
didDocument : DID documented to be updated
verificationMethodId : Verification Method id of referred verification method in the didDocument
deactivate : true
is you want to deactivate this DID, false
otherwise.
Optional Parameters
clientSpec : Wallet specifications which are used to sign the didDocument string. Use eth-personalSign
for Metamask and cosmos-ADR036
for 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.
/api/v1/did/create
Bearer <access_token>
Origin as you set in application cors
Namespace to be added in did.
testnet
MethodSpecificId to be added in did
0x19d73aeeBcc6FEf2d0342375090401301Fe9663F
keyType used for verification
{"keyType":"Ed25519VerificationKey2020","chainId":"0x1","publicKey":"z76tzt4XCb6FNqC3CPZvsxRfEDX5HHQc2VPux4DeZYndW","walletAddress":"0x01978e553Df0C54A63e2E063DFFe71c688d91C76","verificationRelationships":["assertionMethod","authentication"]}
/api/v1/did/register
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-personalSign
Signature for clientSpec
afafljagahgp9agjagknaglkj/kagka=
Did doc to be registered
/api/v1/did/resolve/{did}
Bearer <access_token>
Origin as you set in application cors
/api/v1/did
Page value
Fetch limited list of data
Bearer <access_token>
Origin as you set in application cors
/api/v1/did
Bearer <access_token>
Origin as you set in application cors
Field to check if to deactivate did or to update it
false
Verification Method id for did updation
did:hid:testnet:........#key-${idx}
IClientSpec 'eth-personalSign' or 'cosmos-ADR036'
eth-personalSign
Signature for clientSpec
afafljagahgp9agjagknaglkj/kagka=
Did doc to be updated