Chia-Network / chia_rs

Rust crate & wheel with consensus code
Apache License 2.0
19 stars 24 forks source link

Expose `from_seed` in `SecretKey` to python as well #590

Closed Quexington closed 2 months ago

Quexington commented 2 months ago

This is another method it would be helpful to have exposed on the python side

Rigidity commented 2 months ago

Two things - you'll need to update generate_type_stubs and run the file to update the chia_rs.pyi file rather than doing it by hand

And Self::from_seed is probably what you're trying to do here - this is an associated function on the struct rather than an instance method

Rigidity commented 2 months ago

Otherwise, lgtm

coveralls-official[bot] commented 2 months ago

Pull Request Test Coverage Report for Build 9687017499

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/chia-bls/src/secret_key.rs 0 3 0.0%
<!-- Total: 0 3 0.0% -->
Files with Coverage Reduction New Missed Lines %
crates/chia-protocol/src/classgroup.rs 1 0.0%
crates/chia-bls/src/error.rs 4 0.0%
crates/chia-traits/src/streamable.rs 9 92.54%
crates/chia-bls/src/secret_key.rs 11 89.29%
crates/chia-bls/src/signature.rs 19 93.94%
crates/chia-bls/src/public_key.rs 19 90.45%
wheel/src/api.rs 43 66.67%
crates/chia-bls/src/gtelement.rs 47 9.47%
crates/chia-bls/src/bls_cache.rs 51 73.16%
crates/chia-protocol/src/block_record.rs 83 0.0%
<!-- Total: 287 -->
Totals Coverage Status
Change from base Build 9645397669: 2.0%
Covered Lines: 11393
Relevant Lines: 14111

💛 - Coveralls