ShaChain

object ShaChain
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case class Node(value: ByteVector32, height: Int, parent: Option[Node])

Types

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
Source:
Mirror.scala

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

Value members

Concrete methods

def addHash(receiver: ShaChain, hash: ByteVector32, index: Index): ShaChain
def addHash(receiver: ShaChain, hash: ByteVector32, index: Long): ShaChain
def derive(node: Node, direction: Boolean): Node
Value parameters:
direction

false means left, true means right

node

initial node

Returns:

the child of our node in the specified direction

Source:
ShaChain.scala
def derive(node: Node, directions: Seq[Boolean]): Node
def derive(node: Node, directions: Long): Node
def getHash(receiver: ShaChain, index: Index): Option[ByteVector32]
def getHash(receiver: ShaChain, index: Long): Option[ByteVector32]
def moves(index: Long): Vector[Boolean]
Value parameters:
index

64-bit integer

Returns:

a binary representation of index as a sequence of 64 booleans. Each bool represents a move down the tree

Source:
ShaChain.scala