Enables the creation of a decentralized identity on-chain for your given entity.
Parameter
Type
EVM
Substrate
Description
name
string
Required
Required
Name of the DID to be created.
address
string
Required
Optional
Wallet address that is used to create the DID Document. If seed set for substrate, defaults to public address for that seed.
seed
string
N/A
Optional
Mnemonic phrase used in Substrate instances to execute write transactions on behalf of the wallet. Not necessary when seed set at instance creation.
customDocumentFields
CustomDocumentFields
Optional
Optional
Used to set specific fields of the DID Document. If none is set, an empty document will be generated with id and controller set to the signer’s address.
Allows a user to read a previously created DID from the chain.
Parameter
Type
EVM
Substrate
Description
name
string
Required
Required
Name of the DID stored.
address
string
Required
Optional
Address of the wallet that created the DID Document. Reading from an EVM tx requires an address to be explicitly set. If a seed has been set for Substrate, the address tied to that phrase will be used.
wssBaseUrl
string
Required
Optional
WSS URL must be used to read DID Document. EVM must explicitly set WSS (Substrate has it stored during instance creation).
Allows the owner of the DID Document to update a previously created one. Uses the same parameters as createDid() function above for the Custom Document Fields.
Parameter
Type
EVM
Substrate
Description
name
string
Required
Required
Name of the DID to be updated.
address
string
Required
Optional
Wallet address that has the authority to update the DID Document. If Substrate seed at initialization, will default to the public address for that seed.
wssBaseUrl
string
Required
N/A
WSS URL must be used to read a DID Document. Used to read the previous DID Document at that location when updating a DID Document.
seed
string
N/A
Optional
If not set at instance creation, allows user to define who sends the Substrate Transactions.
customDocumentFields
CustomDocumentFields
Optional
Optional
Used to update specific fields of the DID Document. Overwrites the previous DID Document so make sure you keep track of data previously stored.