createDid
createDid(
submitterAccount
,keytype
,_mnemonic
?,didServiceEndpoint
?):Promise
<object
>
It creates a DID on chain, and returns the mnemonic and DID document.
Parameters
• submitterAccount: CordKeyringPair
The account that will be used to pay for the transaction.
• keytype: string
= 'sr25519'
(Optional) The type of cryptographic key to use for the DID (default: ‘sr25519’).
• _mnemonic?: string
(Optional) A secret phrase (mnemonic) for generating the DID keys. If not provided, a new mnemonic will be generated.
• didServiceEndpoint?
(Optional) An array of service endpoints to be associated with the DID.
Returns
Promise
<object
>
The mnemonic and the DID document.
document
document:
DidDocument
mnemonic
mnemonic:
string