forked from MystenLabs/sui-rust-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
104 lines (90 loc) · 3.39 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[package]
name = "sui-crypto"
version = "0.0.1"
authors = ["Brandon Williams <[email protected]>"]
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"]
secp256r1 = ["dep:p256", "dep:rand_core"]
secp256k1 = ["dep:k256", "dep:rand_core", "signature/std"]
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",
]
pem = [
"dep:pkcs8",
"dep:pem-rfc7468",
"ed25519-dalek?/pkcs8",
"p256?/pkcs8",
"k256?/pkcs8",
"ed25519-dalek?/pem",
"p256?/pem",
"k256?/pem",
]
[dependencies]
signature = "2.2"
sui-sdk-types = { version = "0.0.1", path = "../sui-sdk-types", default-features = false, features = ["hash", "serde"] }
# 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.2", 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.12.0", optional = true }
itertools = { version = "0.13.0", optional = true }
serde = { version = "1.0.210", optional = true }
serde_derive = { version = "1.0.210", optional = true }
serde_json = { version = "1.0.128", optional = true }
# pkcs8 der and pem support
pkcs8 = { version = "0.10", optional = true, features = ["std"] }
pem-rfc7468 = { version = "0.7", optional = true, features = ["std"] }
[dev-dependencies]
bcs = { version = "0.1.6" }
hex = "0.4.3"
serde_json = { version = "1.0.128" }
# 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.4.0"
[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)'] }