#zcash #sapling #crypto #blockchain #cryptocurrency

wagyu-zcash-parameters

A library for loading Zcash Sapling parameters

2 unstable releases

0.2.0 Mar 31, 2020
0.1.0 Mar 31, 2020

#10 in #sapling

Download history 2155/week @ 2024-07-21 1427/week @ 2024-07-28 2170/week @ 2024-08-04 1673/week @ 2024-08-11 3366/week @ 2024-08-18 2315/week @ 2024-08-25 1473/week @ 2024-09-01 1119/week @ 2024-09-08 991/week @ 2024-09-15 1651/week @ 2024-09-22 1936/week @ 2024-09-29 1796/week @ 2024-10-06 1443/week @ 2024-10-13 2053/week @ 2024-10-20 1408/week @ 2024-10-27 979/week @ 2024-11-03

5,911 downloads per month
Used in 13 crates (6 directly)

MIT/Apache

51MB
112 lines

wagyu-zcash-parameters

Crates.io Authors License

This library imports Zcash Sapling parameters natively into your Rust code.

Usage

Use this library in your Rust code, add the following to your Cargo.toml:

[dependencies]
wagyu-zcash-parameters = { version = "0.2.0" }

In your Rust code, add the following:

use wagyu_zcash_parameters::load_sapling_parameters;

// Loads Zcash Sapling parameters as buffers
let (spend, output) = load_sapling_parameters();

println!("Number of bytes in Sapling spend parameter: {:?}", spend.len());
println!("Number of bytes in Sapling output parameter: {:?}", output.len());

Purpose

This crate dynamically produces the Zcash Sapling parameters by fetching and recombining the raw parameter data from a collection of crates published specifically for constructing the Zcash Sapling parameters.

Crates.io maintains a maximum size limit of 10,485,760 bytes for each published crate. This size restriction is beyond the capacity of the Zcash Sapling spend and output parameters, which are 47,958,396 bytes and 3,592,860 bytes respectively.

Developers

To run the test, run:

cargo test

To run the example, run:

cargo run --example load_sapling_parameters

The example should output:

Number of bytes in Sapling spend parameter: 47958396
Number of bytes in Sapling output parameter: 3592860

License

This work is licensed under either of the following licenses, at your discretion.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies