avalanche-types 0.0.63

Avalanche types
Documentation
[package]
name = "avalanche-types"

# "avalanche-sdk" version must be consistent with this version
# e.g., "0.0.x" in "avalanche-types" maps to "0.x.y" in "avalanche-sdk" 
version = "0.0.63" # https://crates.io/crates/avalanche-types

edition = "2021"
rust-version = "1.64"
publish = true
description = "Avalanche types"
license = "BSD-3-Clause"
homepage = "https://avax.network"
repository = "https://github.com/ava-labs/avalanche-rust/tree/main/crates/avalanche-types"
readme = "README.md"

[dependencies]
bech32 = "0.9.1"
big-num-manager = "0.0.1"
bs58 = "0.4.0" # for "formatting", https://crates.io/crates/bs58
bytes = "1.2.1"
chrono = "0.4.22"
cmp-manager = "0.0.1"
futures = "0.3.24"
hex = "0.4.3"
lazy_static = "1.4.0"
log = "0.4.17"
num-bigint = "0.4.3"
prefix-manager = "0.0.2"
rfc-manager = "0.0.1"
ring = "0.16.20"
rust-embed = "6.4.1"
rustls-pemfile = "1.0.1"
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.85" # https://github.com/serde-rs/json/releases
serde_yaml = "0.9.13" # https://github.com/dtolnay/serde-yaml/releases
thiserror = "1.0.37"
zerocopy = "0.6.1"

# for "secp256k1" and "address"
ecdsa = { version = "0.14.8", optional = false }
ethereum-types = { version = "0.14.0" }
ethers = "0.17.0"
ethers-core = "0.17.0"
hmac = "0.12.1"
k256 = { version = "0.11.6", features = ["ecdsa", "keccak256"], optional = false }
rand = "0.8.5"
ripemd = { version = "0.1.3" }
sha2 = { version = "0.10.6", optional = false }
sha3 = { version = "0.10.5" }

# [OPTIONAL] for "libsecp256k1"
secp256k1 = { version = "0.24.0", features = ["global-context", "rand-std", "recovery"], optional = true } # https://crates.io/crates/secp256k1

# [OPTIONAL] for "cert"
rcgen = { version = "0.10.0", optional = true } # https://github.com/est31/rcgen
rsa = { version = "0.6.1", features = ["pem"], optional = true }
rustls = { version = "0.20.6", optional = true } # https://github.com/rustls/rustls/tags

# [OPTIONAL] for "message_compress_gzip"
flate2 = { version = "1.0.24", optional = true }

# [OPTIONAL] for "mnemonic"
bip32 = { version = "0.4.0", optional = true }
rand_core = { version = "0.6.4", features = ["std"], optional = true }

# [OPTIONAL] for "rpcchainvm"
avalanche-proto = { version = "0.16.1", features = ["aliasreader", "keystore", "sharedmemory", "subnetlookup", "rpcdb", "google_protobuf"], optional = true }
http = {version = "0.2.8", optional = true}
hyper = "0.14.20"
jsonrpc-core = {version = "18.0.0", optional = true }
jsonrpc-http-server = {version = "18.0.0", optional = true }
num-derive = { version = "0.3.3", optional = true }
num-traits = { version = "0.2.15", optional = true }
prost = { version = "0.11.0", optional = true } # prost-build requires "cmake", https://github.com/tokio-rs/prost/releases
semver = { version = "1.0.14", optional = true }
tokio = { version = "1.21.2", features = ["fs", "rt-multi-thread"], optional = true } # https://github.com/tokio-rs/tokio/releases
tokio-stream = { version = "0.1.10", features = ["net"], optional = true }
tonic = { version = "0.8.2", features = ["gzip"], optional = true } # https://github.com/hyperium/tonic/tags
tonic-health = { version = "0.7.1", optional = true }
tonic-reflection = { version = "0.5.0", optional = true }
tower-service = "0.3.2"

[dev-dependencies]
env_logger = "0.9.1"
random-manager = "0.0.1"
tempfile = "3.3.0"
tokio-stream = { version = "0.1.10", features = ["net"]}
tokio-test = "0.4.2"

# only include optional dependencies
[features]
default = ["cert", "jsonrpc", "message_compress_gzip", "mnemonic", "rpcchainvm"]
# default = ["cert", "jsonrpc", "message_compress_gzip", "mnemonic", "rpcchainvm", "avalanchego", "subnet_evm"]
cert = ["rcgen", "rsa", "rustls"]
libsecp256k1 = ["secp256k1"]
jsonrpc = []
avalanchego = []
subnet_evm = []
message_compress_gzip = ["flate2"]
mnemonic = ["bip32", "rand_core"]
rpcchainvm = ["avalanche-proto", "http", "jsonrpc-core", "num-derive", "num-traits", "prost", "semver", "tokio", "tokio-stream", "tonic", "tonic-health", "tonic-reflection"]

[[example]]
name = "key_cert"
required-features = ["cert"]

[[example]]
name = "key_mnemonic_derive_load"
required-features = ["mnemonic"]

[[test]]
name = "integration"
path = "tests/integration_tests.rs"
required-features = ["rpcchainvm"]

[package.metadata.cargo-udeps.ignore]
normal = ["rsa"]
development = ["tokio-test"]