DID Registry Functions (Authdid)
How to use Authdid model using mitumjs SDK.
Authdid is a DID registry model primarily used for account abstraction in Mitum. Users can create DIDs and manage DID documents by creating or updating them.
Create a contract-account first using function of contract class. The account must be deployed on the Mitum network. (Create an operation with
contract.createWallet()
, and useoperation.sign()
andoperation.send()
, or usecontract.touch()
to sign and send at once.)Create a register model operation using function
registerModel()
of authdid class with did method name parameter.Sign and send the operation to Mitum network. (You can check whether the model information has been properly registered using the
getModelInfo()
function.)Every user account can create their own did to the contract. Create operation using
create()
, Since a did document is created first when creating a DID, additional information for the did document must be provided.Sign and send the operation to Mitum network. (Check the did using
getDID()
method, did document usinggetDocument()
)The owner of a DID can update their DID document using the
update-document
operation, which is created throughupdateDocument()
. TheupdateDocument()
method takes the DID document itself as an argument and updates it. Therefore, the document must strictly follow the required DID document format. Refer to the example of theupdateDocument()
method for details.
Last updated