A Web5Agent instance that handles DIDs, DWNs and VCs requests. The agent manages the user keys and identities, and is responsible to sign and verify messages.
Exposed instance to the DID APIs, allow users to create and resolve DIDs
Exposed instance to the DWN APIs, allow users to read/write records
Exposed instance to the VC APIs, allow users to issue, present and verify VCs
Private
Static
cleanCleans up the DID, Keys and Identity. Primarily used by a failed WalletConnect import. Does not throw on error, but logs to console.
Static
connectConnects to a Web5Agent. Defaults to creating a local Web5UserAgent if one isn't provided.
If walletConnectOptions
are provided, a WalletConnect flow will be initiated to import a delegated DID from an external wallet.
If there is a failure at any point during connecting and processing grants, all created DIDs and Identities as well as the provided grants
will be cleaned up and an error thrown. This allows for subsequent Connect attempts to be made without any errors.
Optional overrides that can be provided when calling Web5.connect.
A promise that resolves to a Web5 instance and the connected DID.
Static
processA static method to process connected grants for a delegate DID.
This will store the grants as the DWN owner to be used later when impersonating the connected DID.
The main Web5 API interface. It manages the creation of a DID if needed, the connection to the local DWN and all the web5 main foundational APIs such as VC, syncing, etc.