import

fun import(portableDid: PortableDid, keyManager: KeyManager = InMemoryKeyManager()): BearerDid

Instantiates a BearerDid object for the DID KEY method from a given PortableDid.

This method allows for the creation of a BearerDid object using a previously created DID's key material, DID document, and metadata.

Parameters

portableDid
  • The PortableDid object to import.

keyManager
  • Optionally specify an external Key Management System (KMS) used to generate keys and sign data. If not given, a new InMemoryKeyManager instance will be created and used.

Throws

if importing incorrect DID method