Crates.io | identity_account |
lib.rs | identity_account |
version | 0.6.3 |
source | src |
created_at | 2020-08-08 02:26:57.057306 |
updated_at | 2023-08-17 15:28:28.446812 |
description | High-level interface for managing IOTA DID Documents. |
homepage | https://www.iota.org |
repository | https://github.com/iotaledger/identity.rs |
max_upload_size | |
id | 274205 |
size | 106,430 |
The Account
is an interface for creating and managing identities on the IOTA Tangle, handling publishing and secure storage automatically. It provides convenience functions for:
Creating an Account
is done through the AccountBuilder
.
let account: Account = Account::builder()
.create_identity(IdentitySetup::default())
.await?;
Updating a DID Document can be performed through the update_identity
function on the Account
. For example, adding a new verification method to the DID Document:
account
.update_identity()
.create_method()
.content(MethodContent::GenerateEd25519)
.fragment("my-next-key")
.apply()
.await?;
The above code generates a new Ed25519 keypair, writes it to Storage
, embeds it in a new verification method, and publishes the updated DID Document to the Tangle.
See the IdentityUpdater
for a list of provided update operations.