[package] name = "ic-agent" version.workspace = true authors.workspace = true edition.workspace = true repository.workspace = true license.workspace = true rust-version.workspace = true description = "Agent library to communicate with the Internet Computer, following the Public Specification." homepage = "https://docs.rs/ic-agent" documentation = "https://docs.rs/ic-agent" readme = "README.md" categories = ["api-bindings", "data-structures", "no-std"] keywords = ["internet-computer", "agent", "icp", "dfinity"] include = ["src", "Cargo.toml", "../LICENSE", "README.md"] [dependencies] async-lock = "3.3" backoff = "0.4.0" cached = { version = "0.46", features = ["ahash"], default-features = false } candid = { workspace = true } ed25519-consensus = { version = "2" } futures-util = { workspace = true } hex = { workspace = true } http = "1.0.0" http-body = "1.0.0" ic-certification = { workspace = true } ic-transport-types = { workspace = true } ic-verify-bls-signature = "0.1" k256 = { version = "0.13.1", features = ["pem"] } p256 = { version = "0.13.2", features = ["pem"] } leb128 = { workspace = true } pkcs8 = { version = "0.10.2", features = ["std"] } sec1 = { version = "0.7.2", features = ["pem"] } rand = "0.8.5" rangemap = "1.4" ring = { workspace = true, features = ["std"] } serde = { workspace = true, features = ["derive"] } serde_bytes = { workspace = true } serde_cbor = { workspace = true } serde_repr = { workspace = true } sha2 = { workspace = true } simple_asn1 = "0.6.1" thiserror = { workspace = true } time = { workspace = true } url = "2.1.0" [dependencies.hyper] version = "1.0.1" features = ["client", "http2", "http1"] optional = true [dependencies.reqwest] version = "0.12.4" default-features = false features = ["blocking", "json", "rustls-tls-webpki-roots", "stream"] optional = true [dependencies.pem] version = "2.0.1" optional = true [target.'cfg(not(target_family = "wasm"))'.dependencies] http-body-to-bytes = { version = "0.2.0", optional = true } http-body-util = { version = "0.1.0", optional = true } hyper-util = { version = "0.1.3", features = [ "client", "client-legacy", "http2", ], optional = true } hyper-rustls = { version = "0.26.0", features = [ "webpki-roots", "http2", ], optional = true } tokio = { version = "1.24.2", features = ["time"] } tower = { version = "0.4.13", optional = true } rustls-webpki = "0.101.4" [target.'cfg(target_family = "wasm")'.dependencies] getrandom = { version = "0.2", features = ["js"], optional = true } js-sys = { version = "0.3", optional = true } wasm-bindgen = { version = "0.2", optional = true } wasm-bindgen-futures = { version = "0.4", optional = true } web-sys = { version = "0.3", features = ["Window"], optional = true } [dev-dependencies] serde_json = "1.0.79" [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] tokio = { version = "1.24.2", features = ["full"] } mockito = "1.0.2" [target.'cfg(target_family = "wasm")'.dev-dependencies] wasm-bindgen-test = "0.3.34" web-sys = { version = "0.3", features = [ "Navigator", "ServiceWorkerContainer", "ServiceWorker", "ServiceWorkerRegistration", "ServiceWorkerState", ] } [features] default = ["pem", "reqwest"] reqwest = ["dep:reqwest"] hyper = [ "dep:hyper", "dep:hyper-rustls", "dep:http-body-to-bytes", "dep:http-body-util", "dep:hyper-util", "dep:tower", ] ic_ref_tests = [ "default", ] # Used to separate integration tests for ic-ref which need a server running. wasm-bindgen = [ "dep:js-sys", "dep:wasm-bindgen", "dep:wasm-bindgen-futures", "dep:getrandom", "dep:web-sys", "time/wasm-bindgen", "backoff/wasm-bindgen", "cached/wasm", ] [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] rustdoc-args = ["--cfg=docsrs"] features = ["hyper"]