pub struct Account<C = Arc<Client>> where
    C: SharedPtr<Client>, 
{ /* private fields */ }
Expand description

An account manages one identity.

It handles private keys, writing to storage and publishing to the Tangle.

Implementations

Creates a new AccountBuilder.

Returns a reference counter to the Storage implementation.

Returns whether auto-publish is enabled.

Returns the auto-save configuration value.

Returns the total number of actions executed by this instance.

Returns the did of the managed identity.

Return the chain state of the identity.

Returns the DID document of the identity, which this account manages, with all updates applied.

Note: the returned document only has a valid signature after publishing an integration chain update. In general, for use cases where the signature is required, it is advisable to resolve the document from the Tangle.

Sets the ChainState for the identity this account manages, without doing any validation.

WARNING

This method is dangerous and can easily corrupt the internal state, potentially making the identity unusable. Only call this if you fully understand the implications!

Resolves the DID Document associated with this Account from the Tangle.

Returns the IdentityUpdater for this identity.

On this type, various operations can be executed that modify an identity, such as creating services or methods.

Overwrites the IotaDocument this account manages, without doing any validation.

WARNING

This method is dangerous and can easily corrupt the internal state, potentially making the identity unusable. Only call this if you fully understand the implications!

Removes the identity from the local storage entirely.

Note: This will remove all associated document updates and key material - recovery is NOT POSSIBLE!

Signs data with the key specified by fragment.

Push all unpublished changes to the tangle in a single message.

Push all unpublished changes to the Tangle in a single message, optionally choosing the signing key used or forcing an integration chain update.

See PublishOptions.

Fetches the latest document from the tangle and overwrites the local document.

If a DID is managed from distributed accounts, this should be called before making changes to the identity, to avoid publishing updates that would be ignored.

If the document has a RevocationBitmap service identified by fragment, revoke all credentials with a revocationBitmapIndex in credential_indices.

If the document has a RevocationBitmap service identified by fragment, unrevoke all credentials with a revocationBitmapIndex in credential_indices.

Encrypts the given plaintext with the specified encryption_algorithm and cek_algorithm.

Returns an EncryptedData instance.

Decrypts the given data with the key identified by fragment using the given encryption_algorithm and cek_algorithm.

Returns the decrypted text.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more