[package] name = "sui-crypto" version = "0.0.1" authors = ["Brandon Williams "] repository = "https://github.com/mystenlabs/sui-rust-sdk/" license = "Apache-2.0" edition = "2021" readme = "README.md" description = "Defines the interface for signing and verying messages in the Sui ecosystem" [package.metadata.docs.rs] # To build locally: # RUSTDOCFLAGS="--cfg=doc_cfg -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps --open all-features = true rustdoc-args = [ # Enable doc_cfg showing the required features. "--cfg=doc_cfg", # Generate links to definition in rustdoc source code pages # https://github.com/rust-lang/rust/pull/84176 "-Zunstable-options", "--generate-link-to-definition" ] [features] default = [] ed25519 = ["dep:ed25519-dalek", "dep:rand_core", "sui-sdk-types/hash", "sui-sdk-types/serde"] secp256r1 = ["dep:p256", "dep:rand_core", "sui-sdk-types/hash", "sui-sdk-types/serde"] secp256k1 = ["dep:k256", "dep:rand_core", "signature/std", "sui-sdk-types/hash", "sui-sdk-types/serde"] zklogin = [ "dep:ark-bn254", "dep:ark-ff", "dep:ark-groth16", "dep:ark-snark", "dep:ark-std", "dep:base64ct", "dep:bnum", "dep:itertools", "dep:serde", "dep:serde_derive", "dep:serde_json", "signature/std", "sui-sdk-types/hash", "sui-sdk-types/serde", ] [dependencies] signature = "2.2" sui-sdk-types = { version = "0.0.1", path = "../sui-sdk-types", default-features = false } # RNG support rand_core = { version = "0.6.4", optional = true } # ed25519 support ed25519-dalek = { version = "2.1.1", optional = true } # secp256r1 support p256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "std"], optional = true } # secp256k1 support k256 = { version = "0.13.4", default-features = false, features = ["ecdsa"], optional = true } # zklogin verification support ark-bn254 = { version = "0.4.0", optional = true } ark-ff = { version = "0.4.1", features = ["asm"], optional = true } ark-groth16 = { version = "0.4.0", default-features = false, optional = true } ark-snark = { version = "0.4.0", optional = true } ark-std = { version = "0.4.0", optional = true } base64ct = { version = "1.6.0", features = ["alloc"], optional = true } bnum = { version = "0.11.0", optional = true } itertools = { version = "0.10.5", optional = true } serde = { version = "1.0.190", optional = true } serde_derive = { version = "1.0.190", optional = true } serde_json = { version = "1.0.114", optional = true } [dev-dependencies] bcs = { version = "0.1.6" } hex = "0.4.3" serde_json = { version = "1.0.114" } # proptest support in tests # # Pin to this specific commit in order to work around an issue where proptest doesn't build properly in wasm environments # see https://github.com/proptest-rs/proptest/pull/270 for more info proptest = { git = "https://github.com/bmwill/proptest.git", rev = "bc36db126183bce18c8bc595f0c0cfeac48b870c", default-features = false, features = ["std"] } test-strategy = "0.3.1" [target.wasm32-unknown-unknown.dev-dependencies] wasm-bindgen-test = "0.3" getrandom = { version = "0.2", features = ["js"] } [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }