ic-platform 0.6.16

Controlled Candid and IC runtime dependency boundary
Documentation
[package]
name = "ic-platform"
description = "Controlled Candid and IC runtime dependency boundary"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license = "MIT AND Apache-2.0"
repository.workspace = true
readme = "README.md"
publish = ["crates-io"]
include = ["src/**", "README.md", "LICENSE", "Cargo.toml"]

[features]
default = []
principal = ["dep:crc32fast", "dep:data-encoding", "dep:ic_principal", "dep:serde"]
agent = ["principal", "dep:ic-agent"]
bls = ["dep:ic-verify-bls-signature"]
candid = ["principal", "dep:candid", "candid/bignum"]
candid-parser = ["principal", "dep:candid_parser"]
candid-service = ["candid", "candid/printer"]
canister-sig-creation = ["principal", "dep:ic-certification", "dep:sha2"]
cdk = ["runtime", "dep:ic-platform-macros"]
runtime = ["principal", "executor", "ic0", "dep:pin-project-lite", "dep:thiserror"]
certification = ["dep:ic-certification"]
ecdsa = ["dep:k256"]
ed25519 = ["dep:curve25519-dalek", "dep:ed25519-dalek"]
executor = ["dep:ic-cdk-executor"]
ic0 = ["dep:ic0"]
icrc-ledger-types = ["principal", "dep:icrc-ledger-types"]
management-canister-types = ["principal", "dep:ic-management-canister-types"]
signature-verification = [
    "canister-sig-creation",
    "dep:ic-verify-bls-signature",
    "dep:serde_bytes",
    "dep:serde_cbor",
]
pocket-ic = ["principal", "dep:pocket-ic"]
secp256k1 = ["principal", "dep:ic-secp256k1"]
stable-structures = ["dep:ic-stable-structures"]
wire-schema = ["principal", "dep:ic-wire-metadata", "dep:serde_json"]

[dependencies]
candid = { workspace = true, optional = true }
crc32fast = { workspace = true, optional = true }
curve25519-dalek = { workspace = true, optional = true }
data-encoding = { workspace = true, optional = true }
ed25519-dalek = { workspace = true, optional = true }
ic-cdk-executor = { workspace = true, optional = true }
ic-certification = { workspace = true, optional = true }
ic-management-canister-types = { workspace = true, optional = true }
ic-platform-macros = { workspace = true, optional = true }
ic-stable-structures = { workspace = true, optional = true }
ic-verify-bls-signature = { workspace = true, optional = true }
ic0 = { workspace = true, optional = true }
ic_principal = { workspace = true, optional = true }
icrc-ledger-types = { workspace = true, optional = true }
k256 = { workspace = true, optional = true }
pin-project-lite = { workspace = true, optional = true }
serde = { workspace = true, optional = true, features = ["alloc"] }
serde_bytes = { workspace = true, optional = true }
serde_cbor = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
candid_parser = { workspace = true, optional = true }
ic-agent = { workspace = true, optional = true }
ic-secp256k1 = { workspace = true, optional = true }
ic-wire-metadata = { workspace = true, optional = true }
pocket-ic = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }

[dev-dependencies]
assert_matches.workspace = true
ic-representation-independent-hash.workspace = true
serde_bytes.workspace = true
serde_cbor.workspace = true
serde_test.workspace = true

[[test]]
name = "executor_consumer"
path = "tests/executor_consumer.rs"
required-features = ["executor", "ic0"]

[[test]]
name = "ecdsa_consumer"
path = "tests/ecdsa_consumer.rs"
required-features = ["ecdsa"]

[[test]]
name = "ed25519_consumer"
path = "tests/ed25519_consumer.rs"
required-features = ["ed25519"]

[[test]]
name = "cdk_consumer"
path = "tests/cdk_consumer.rs"
required-features = ["cdk"]

[[test]]
name = "runtime_consumer"
path = "tests/runtime_consumer.rs"
required-features = ["runtime"]

[[test]]
name = "secp256k1_consumer"
path = "tests/secp256k1_consumer.rs"
required-features = ["secp256k1"]

[[test]]
name = "secp256k1_identity"
path = "tests/secp256k1_identity.rs"
required-features = ["secp256k1"]

[[test]]
name = "bls_consumer"
path = "tests/bls_consumer.rs"
required-features = ["bls"]

[[test]]
name = "canister_sig_consumer"
path = "tests/canister_sig_consumer.rs"
required-features = ["canister-sig-creation"]

[[test]]
name = "signature_consumer"
path = "tests/signature_consumer.rs"
required-features = ["signature-verification"]

[[test]]
name = "agent_consumer"
path = "tests/agent_consumer.rs"
required-features = ["agent", "certification"]

[[test]]
name = "candid_consumer"
path = "tests/candid_consumer.rs"
required-features = ["candid"]

[[test]]
name = "service_consumer"
path = "tests/service_consumer.rs"
required-features = ["candid-service"]

[[test]]
name = "dynamic_consumer"
path = "tests/dynamic_consumer.rs"
required-features = ["candid", "candid-parser"]

[[test]]
name = "ic0_consumer"
path = "tests/ic0_consumer.rs"
required-features = ["ic0"]

[[test]]
name = "icrc_consumer"
path = "tests/icrc_consumer.rs"
required-features = ["icrc-ledger-types", "candid"]

[[test]]
name = "external_candid_consumer"
path = "tests/external_candid_consumer.rs"
required-features = ["cdk", "candid-service"]

[[test]]
name = "management_consumer"
path = "tests/management_consumer.rs"
required-features = ["management-canister-types", "candid"]

[[test]]
name = "parser_consumer"
path = "tests/parser_consumer.rs"
required-features = ["candid-parser"]

[[test]]
name = "certification_consumer"
path = "tests/certification_consumer.rs"
required-features = ["certification"]

[[test]]
name = "pocket_ic_consumer"
path = "tests/pocket_ic_consumer.rs"
required-features = ["pocket-ic"]

[[test]]
name = "principal"
path = "tests/principal.rs"
required-features = ["principal"]

[[test]]
name = "parser_properties"
path = "tests/parser_properties.rs"
required-features = ["principal"]

[[test]]
name = "stable_structures_consumer"
path = "tests/stable_structures_consumer.rs"
required-features = ["stable-structures"]

[[test]]
name = "wire_schema_consumer"
path = "tests/wire_schema_consumer.rs"
required-features = ["wire-schema"]

[lints]
workspace = true