Merkling

scalus.cardano.onchain.plutus.crypto.trie.Merkling
object Merkling

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Merkling.type

Members list

Value members

Concrete methods

def combine(left: ByteString, right: ByteString): ByteString

Combines two ByteStrings by concatenating them and taking their Blake2b hash

Combines two ByteStrings by concatenating them and taking their Blake2b hash

Attributes

Combines three ByteStrings by concatenating them and taking their Blake2b hash

Combines three ByteStrings by concatenating them and taking their Blake2b hash

Attributes

def merkle16(branch: BigInt, root: ByteString, neighbor8: ByteString, neighbor4: ByteString, neighbor2: ByteString, neighbor1: ByteString): ByteString

Calculates Merkle root for 16 elements

Calculates Merkle root for 16 elements

Value parameters

branch

Branch index (0-15)

neighbor_1

1-element neighbor hash

neighbor_2

2-element neighbor hash

neighbor_4

4-element neighbor hash

neighbor_8

8-element neighbor hash

root

Current node hash

Attributes

inline def merkle2(branch: BigInt, root: ByteString, neighbor: ByteString): ByteString

Calculates Merkle root for 2 elements

Calculates Merkle root for 2 elements

Attributes

def merkle4(branch: BigInt, root: ByteString, neighbor2: ByteString, neighbor1: ByteString): ByteString

Calculates Merkle root for 4 elements

Calculates Merkle root for 4 elements

Attributes

def merkle8(branch: BigInt, root: ByteString, neighbor4: ByteString, neighbor2: ByteString, neighbor1: ByteString): ByteString

Calculates Merkle root for 8 elements

Calculates Merkle root for 8 elements

Attributes

def nibble(self: ByteString, index: BigInt): BigInt

Extracts a nibble (4-bit value) from a specific position in the ByteString.

Extracts a nibble (4-bit value) from a specific position in the ByteString.

Attributes

def nibbles(path: ByteString, start: BigInt, end: BigInt): ByteString

Computes nibbles for a given branch node between start and end positions.

Computes nibbles for a given branch node between start and end positions.

Value parameters

end

Ending position (exclusive)

path

The source ByteString to extract nibbles from

start

Starting position

Attributes

Returns

ByteString containing the extracted nibbles

def sparseMerkle16(me: BigInt, meHash: ByteString, neighbor: BigInt, neighborHash: ByteString): ByteString

Calculates sparse Merkle root for 16 elements

Calculates sparse Merkle root for 16 elements

Attributes

def sparseMerkle4(me: BigInt, meHash: ByteString, neighbor: BigInt, neighborHash: ByteString): ByteString

Calculates sparse Merkle root for 4 elements

Calculates sparse Merkle root for 4 elements

Attributes

def sparseMerkle8(me: BigInt, meHash: ByteString, neighbor: BigInt, neighborHash: ByteString): ByteString

Calculates sparse Merkle root for 8 elements

Calculates sparse Merkle root for 8 elements

Attributes

def suffix(path: ByteString, cursor: BigInt): ByteString

Creates a suffix path based on cursor position.

Creates a suffix path based on cursor position.

Attributes

Concrete fields

By convention, the hash of a null tree/trie is the null hash. Note that we also cache trees made of empty trees to short-circuit the neighbor sparse-merkle tree calculation.

By convention, the hash of a null tree/trie is the null hash. Note that we also cache trees made of empty trees to short-circuit the neighbor sparse-merkle tree calculation.

Attributes

lazy val sirDeps: List[SIRModuleWithDeps]
lazy val sirModule: Module