ncroot

package
v0.5.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ncroot provides Go bindings to the Rust FFI function that computes the Orchard note commitment tree root from a hex-encoded frontier.

The orchardTree field from lightwalletd's TreeState is a hex string encoding a serialized CommitmentTree. Computing the root requires Sinsemilla hashing which is only available in Rust. This package bridges Go ↔ Rust via CGo.

It requires the Rust static library to be built first:

cargo build --release --manifest-path sdk/circuits/Cargo.toml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractNcRoot

func ExtractNcRoot(orchardTreeHex string) ([32]byte, error)

ExtractNcRoot computes the Orchard note commitment tree root from a hex-encoded frontier string (the orchardTree field from lightwalletd).

Returns the 32-byte Sinsemilla-based root.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL