-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5de6037
commit cdf6946
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...col-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
11 changes: 11 additions & 0 deletions
11
...rotocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |