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

scorex.crypto.authds.AuthenticatedDictionary.scala Maven / Gradle / Ivy

There is a newer version: 1.2.0-RC3
Show newest version
package scorex.crypto.authds

import scorex.crypto.authds.storage.{KVStorage, StorageType}

trait AuthenticatedDictionary[Proof <: DataProof, ST <: StorageType] {
  type Key
  type Value = Array[Byte]

  protected val seq: KVStorage[Key, Value, ST]

  def size: Long = seq.size

  def element(index: Key): Option[Array[Byte]] = seq.get(index)

  def elementAndProof(index: Key): Option[AuthData[Proof]]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy