diff --git a/mercury/prism-mediator/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala b/mercury/prism-mediator/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala new file mode 100644 index 0000000000..eaaa0344d8 --- /dev/null +++ b/mercury/prism-mediator/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala @@ -0,0 +1,27 @@ +package io.iohk.atala.mercury.protocol.invitation +import cats.implicits._ +import io.circe.syntax._ +import io.circe.generic.semiauto._ +import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} +import io.circe.{Decoder, Encoder, HCursor, Json} + +sealed trait ServiceType + +/** Service block + * @see + * https://github.com/hyperledger/aries-rfcs/tree/main/features/0434-outofband + * @param id + * @param `type` + * @param recipientKeys + * @param routingKeys + * @param serviceEndpoint + */ +case class Service( + id: String, + `type`: String, + recipientKeys: Seq[String], + routingKeys: Option[Seq[String]], + serviceEndpoint: String, +) extends ServiceType + +case class Did(did: String) extends ServiceType diff --git a/mercury/prism-mediator/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala b/mercury/prism-mediator/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala new file mode 100644 index 0000000000..a1c1693bb2 --- /dev/null +++ b/mercury/prism-mediator/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala @@ -0,0 +1,11 @@ +package io.iohk.atala.mercury.protocol + +import java.util.UUID + +package object invitation { + + /** provides new msg id + * @return + */ + def getNewMsgId: String = UUID.randomUUID().toString +}