# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "near-primitives-core"
version = "0.34.4"
authors = ["Near Inc <hello@nearprotocol.com>"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "This crate provides the core set of primitives used by other nearcore crates including near-primitives"
readme = false
license = "MIT OR Apache-2.0"
repository = "https://github.com/near/nearcore"
resolver = "2"

[features]
default = []
nightly = []
protocol_schema = ["near-schema-checker-lib/protocol_schema"]
schemars = [
    "dep:schemars",
    "near-account-id/schemars-v1",
    "near-token/schemars-v1",
]

[lib]
name = "near_primitives_core"
path = "src/lib.rs"

[dependencies.arbitrary]
version = "1.2.3"
features = ["derive"]

[dependencies.base64]
version = "0.21"

[dependencies.borsh]
version = "1.0.0"
features = [
    "derive",
    "rc",
]

[dependencies.bs58]
version = "0.4"

[dependencies.derive_more]
version = "2.0"
features = [
    "as_ref",
    "display",
    "from_str",
]

[dependencies.enum-map]
version = "2.1.0"

[dependencies.near-account-id]
version = "2.0.0"
features = [
    "internal_unstable",
    "serde",
    "borsh",
]

[dependencies.near-gas]
version = "0.3.2"
features = [
    "serde",
    "borsh",
]

[dependencies.near-schema-checker-lib]
version = "0.34.4"

[dependencies.near-token]
version = "0.3.2"
features = [
    "serde",
    "borsh",
]

[dependencies.num-rational]
version = "0.3.1"
features = ["serde"]

[dependencies.schemars]
version = "1.0.3"
features = ["chrono04"]
optional = true

[dependencies.serde]
version = "1.0.136"
features = [
    "alloc",
    "derive",
    "rc",
]

[dependencies.serde_repr]
version = "0.1.8"

[dependencies.serde_with]
version = "3.0"
features = ["base64"]

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "2.0"

[dev-dependencies.expect-test]
version = "1.3.0"

[dev-dependencies.insta]
version = "1.41.0"
features = [
    "json",
    "yaml",
    "redactions",
]

[dev-dependencies.serde_json]
version = "1.0.68"

[lints.clippy]
assigning_clones = "deny"
clone_on_copy = "deny"
derivable_impls = "deny"
disallowed_types = "deny"
explicit_deref_methods = "deny"
explicit_into_iter_loop = "deny"
explicit_iter_loop = "deny"
flat_map_option = "deny"
inefficient_to_string = "deny"
large_futures = "deny"
large_stack_frames = "deny"
large_types_passed_by_value = "deny"
len_zero = "deny"
manual_is_variant_and = "deny"
needless_collect = "deny"
needless_pass_by_ref_mut = "deny"
or_fun_call = "deny"
redundant_clone = "deny"
same_functions_in_if_condition = "deny"
single_char_pattern = "allow"
unchecked_duration_subtraction = "deny"
unnecessary_box_returns = "deny"
unnecessary_join = "deny"
unnecessary_lazy_evaluations = "deny"
unused_async = "deny"

[lints.clippy.all]
level = "allow"
priority = -100

[lints.clippy.correctness]
level = "deny"
priority = -50

[lints.clippy.perf]
level = "deny"
priority = -50

[lints.clippy.suspicious]
level = "deny"
priority = -50

[lints.rust.unexpected_cfgs]
level = "allow"
priority = 0
check-cfg = ["cfg(enable_const_type_id)"]
