Skip to content

Commit

Permalink
added serviceType
Browse files Browse the repository at this point in the history
  • Loading branch information
mineme0110 committed Sep 16, 2022
1 parent 5de6037 commit cdf6946
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit cdf6946

Please sign in to comment.