All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fmgp.did.comm.DynamicResolver.scala Maven / Gradle / Ivy

There is a newer version: 0.1.0-M25
Show newest version
package fmgp.did.comm

import zio._

import fmgp.did._
import fmgp.crypto.error._

//TODO move out of the JVM into the
final case class DynamicResolver(resolver: Resolver) extends Resolver {
  override protected def didDocumentOf(did: FROMTO): IO[DidFail, DIDDocument] =
    for {
      docFromResolver <- resolver.didDocument(did)
      // sm <- transportManager.get
      doc = DIDDocumentClass(
        id = docFromResolver.id,
        alsoKnownAs = docFromResolver.alsoKnownAs,
        controller = docFromResolver.controller,
        verificationMethod = docFromResolver.verificationMethod,
        authentication = docFromResolver.authentication,
        assertionMethod = docFromResolver.assertionMethod,
        keyAgreement = docFromResolver.keyAgreement,
        capabilityInvocation = docFromResolver.capabilityInvocation,
        capabilityDelegation = docFromResolver.capabilityDelegation,
        service = docFromResolver.service, // TODO data from sm
      )
    } yield (doc)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy