fuel-crypto 0.26.3

Fuel cryptographic primitives.
Documentation
[package]
name = "fuel-crypto"
version = { workspace = true }
authors = { workspace = true }
categories = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
keywords = ["blockchain", "cryptocurrencies", "cryptography"]
license = "Apache-2.0"
repository = { workspace = true }
description = "Fuel cryptographic primitives."

[dependencies]
borrown = "0.1"
coins-bip32 = { version = "0.7", default-features = false, optional = true }
coins-bip39 = { version = "0.7", default-features = false, optional = true }
fuel-types = { workspace = true, default-features = false }
lazy_static = { version = "1.4", optional = true }
rand = { version = "0.8", default-features = false, optional = true }
secp256k1 = { version = "0.24", default-features = false, features = ["recovery"], optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
sha2 = { version = "0.10", default-features = false }
zeroize = { version = "1.5", features = ["derive"] }

# Note that, while we don't use this dependency directly, we must specify it in
# order to enable the transitive dependency's "js" feature which is required
# for supporting the wasm32-unknown-unknown target.
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.8", default-features = false, features = ["js"] }

[dev-dependencies]
bincode = { version = "1.3", default-features = false }
criterion = "0.3"
fuel-crypto = { path = ".", default-features = false, features = ["random"] }
k256 = { version = "0.11", features = [ "ecdsa" ] }
rand = { version = "0.8", default-features = false, features = ["std_rng"] }
sha2 = "0.10"

[features]
default = ["fuel-types/default", "std"]
alloc = ["rand/alloc", "secp256k1/alloc"]
random = ["fuel-types/random", "rand"]
serde = ["dep:serde", "fuel-types/serde"]
# `rand-std` is used to further protect the blinders from side-channel attacks and won't compromise
# the deterministic arguments of the signature (key, nonce, message), as defined in the RFC-6979
std = ["alloc", "coins-bip32", "coins-bip39", "fuel-types/std", "lazy_static", "rand/std_rng", "secp256k1/rand-std", "serde?/default"]
wasm = ["secp256k1/rand"]

[[test]]
name = "test-mnemonic"
path = "tests/mnemonic.rs"
required-features = ["std"]

[[test]]
name = "test-serde"
path = "tests/serde.rs"
required-features = ["serde", "std"]

[[test]]
name = "test-signature"
path = "tests/signature.rs"
required-features = ["std"]

[[test]]
name = "test-signer"
path = "tests/signer.rs"
required-features = ["std"]

[[bench]]
name = "signature"
harness = false
required-features = ["std"]

# docs.rs-specific configuration
[package.metadata.docs.rs]
# document all features
all-features = true
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]