ic-agent 0.46.0

Agent library to communicate with the Internet Computer, following the Public Specification.
Documentation
[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"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
features = ["wasm-bindgen"]

[features]
default = ["pem"]
pem = ["dep:pem"]
ring = ["dep:ring"]
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",
]
_internal_dynamic-routing = []
tracing = ["dep:tracing"] # Does very little right now.

[dependencies]
arc-swap = { workspace = true }
async-channel = { workspace = true }
async-lock = { workspace = true }
async-trait = { workspace = true }
async-watch = { workspace = true }
backoff = { workspace = true }
bytes = { workspace = true }
cached = { workspace = true, features = ["ahash"], default-features = false }
candid = { workspace = true }
ecdsa = { workspace = true }
# Note
# ed25519-consensus is kept as a dependency for backward compatibility.
# It is only used in the identity constructor `BasicIdentity::from_signing_key`.
# The actual signing and verification is done using `ic-ed25519`.
ed25519-consensus = { workspace = true }
elliptic-curve = { workspace = true }
futures-util = { workspace = true }
hex = { workspace = true }
http = { workspace = true }
http-body = { workspace = true }
http-body-util = { workspace = true }
ic-certification = { workspace = true }
ic-ed25519 = { workspace = true }
ic-transport-types = { workspace = true }
ic-verify-bls-signature = { workspace = true }
k256 = { workspace = true, features = ["pem"] }
leb128 = { workspace = true }
p256 = { workspace = true, features = ["pem"] }
pem = { workspace = true, optional = true }
pkcs8 = { workspace = true, features = ["std"] }
rand = { workspace = true }
rangemap = { workspace = true }
reqwest = { workspace = true, default-features = false, features = [
    "blocking",
    "json",
    "rustls",
    "stream",
] }
ring = { workspace = true, optional = true }
sec1 = { workspace = true, features = ["pem"] }
serde = { workspace = true, features = ["derive"] }
serde_bytes = { workspace = true }
serde_cbor = { workspace = true }
serde_repr = { workspace = true }
sha2 = { workspace = true }
stop-token = { workspace = true }
thiserror = { workspace = true }
time = { workspace = true }
tower-service = { workspace = true }
tracing = { workspace = true, optional = true }
url = { workspace = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
tokio = { workspace = true, default-features = false, features = ["time"] }

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { workspace = true, optional = true, features = ["wasm_js"] }
js-sys = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
web-sys = { workspace = true, optional = true, features = ["Window"] }

[dev-dependencies]
anyhow = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
mockito = { workspace = true }
tokio = { workspace = true, features = ["full"] }

[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen-test = { workspace = true }
web-sys = { workspace = true, features = [
    "Navigator",
    "ServiceWorkerContainer",
    "ServiceWorker",
    "ServiceWorkerRegistration",
    "ServiceWorkerState",
] }

[target.'cfg(unix)'.dev-dependencies]
ref-tests = { workspace = true }