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

com.digitalasset.ledger.api.refinements.IdGenerator.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-snapshot.20240126.12648.0.va9dc2d63
Show newest version
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.ledger.api.refinements

import scalaz.{@@, Tag}

import scala.util.Random

class IdGenerator[TypeTag](seed: Long) {

  private val rand = new Random(seed)

  def generateRandom: String @@ TypeTag = Tag.apply(rand.nextLong().toHexString)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy