Expand description
A rust library for working with Correlation Vectors. The library provides a struct for CorrelationVector and methods for working with them. Learn more about the methods in the Readme or in the specification.
use cvlib::CorrelationVector;
let mut cv = CorrelationVector::new(); // e.g. wC71fJEqSPuHrPQ9ZoXrKg.0
cv.extend(); // e.g. wC71fJEqSPuHrPQ9ZoXrKg.0.0
cv.increment(); // e.g. wC71fJEqSPuHrPQ9ZoXrKg.0.1
let cv_string = cv.to_string(); // create string representation of CV
let cv_parsed = CorrelationVector::parse(&cv_string); // parse the string representation of the correlation vector
Structs§
- Correlation
Vector - The Correlation Vector struct
- Spin
Params - The parameters for the spin operation
Enums§
- Correlation
Vector Parse Error - The error type for the correlation vector parse function
- Spin
Counter Interval - The number of ticks to drop from the UTC timestamp
- Spin
Counter Periodicity - The number of bits to use from the UTC timestamp
- Spin
Entropy - How many entropy bytes to use