[package]
name = "near-cli-rs"
version = "0.26.0"
authors = ["FroVolod <frol_off@meta.ua>", "Near Inc <hello@nearprotocol.com>"]
license = "MIT OR Apache-2.0"
edition = "2024"
rust-version = "1.88"
homepage = "https://near.cli.rs"
repository = "https://github.com/near/near-cli-rs"
description = "human-friendly console utility that helps to interact with NEAR Protocol from command line."

exclude = ["docs/media"]

[package.metadata.wix]
upgrade-guid = "A6432354-8256-45E3-9E10-53C117EE22B4"
path-guid = "3A5A99B6-61EC-4DFB-AA36-763EE316AF18"
license = false
eula = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "near"
path = "src/main.rs"

[dependencies]
fast_clap = { version = "4.5.57", features = ["derive", "unstable-v5"] }
inquire = "0.9.3"
strum = { version = "0.24", features = ["derive"] }
strum_macros = "0.24"
smart-default = "0.7.1"
derive_more = "2"
easy-ext = "1"

reqwest = { version = "0.12", features = ["blocking", "json"] }
tokio = { version = "1.0", default-features = false, features = [
    "rt-multi-thread",
    "macros",
] }
futures = "0.3"
# Ad-hoc fix for compilation errors (rustls is used instead of openssl to ease the deployment avoiding the system dependency on openssl)
openssl = { version = "0.10", features = ["vendored"] }

bip39 = { version = "2.0.0", features = ["rand"] }
bs58 = "0.5"
borsh = "1.5.7"
ed25519-dalek = { version = "2", default-features = false }
hex = { version = "0.4.2", features = ["serde"] }
linked-hash-map = { version = "0.5", features = ["serde_impl"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.57"
serde_with = "3.12.0"
toml = "0.8"
dirs = "6"
shellexpand = "3"
near-slip10 = { version = "0.4.7" }
url = { version = "2", features = ["serde"] }
open = "5"
shell-words = "1"
cargo-util = "0.2"
indenter = "0.3"
tracing = "0.1.40"
tracing-indicatif = "0.3.6"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

wasmparser = "0.243"

semver = { version = "1.0.4", optional = true }
self_update = { version = "0.42", features = [
    "archive-tar",
    "compression-flate2",
], optional = true }

color-eyre = "0.6"
thiserror = "2"

bytesize = "1.1.0"
prettytable = "0.10.0"
textwrap = "0.16.1"

near-crypto = "0.35"
near-primitives = "0.35"
near-jsonrpc-client = { version = "0.21", features = ["any"] }
near-jsonrpc-primitives = "0.35"
near-parameters = "0.35"
near-socialdb-client = "0.15"

near-ledger = { version = "0.9.3", optional = true }

near-gas = { version = "0.3", features = [
    "serde",
    "borsh",
    "interactive-clap",
] }
near-token = { version = "0.3", features = [
    "serde",
    "borsh",
    "interactive-clap",
] }

near-abi = "0.4.2"

zstd = "0.13"

keyring = { version = "3.0.5", features = [
    "apple-native",
    "windows-native",
    "sync-secret-service",
    "vendored",
] }

interactive-clap = "0.3"
interactive-clap-derive = "0.3"

rust_decimal = "1.35.0"

# verify_contract dependencies
near-verify-rs = { version = "0.3.0", optional = true }
camino = { version = "1.1.1", optional = true }
git2 = { version = "0.19", optional = true }
tempfile = { version = "3.10.1", optional = true }

[dev-dependencies]
near-sandbox = "0.3"
tokio-test = "0.4"
tempfile = "3.10.1"
insta = "1.40"
regex = "1.10"

[features]
default = [
    "ledger",
    "ledger-ble",
    "self-update",
    "inspect_contract",
    "verify_contract",
]
ledger = ["near-ledger"]
ledger-ble = ["near-ledger/ble", "ledger"]
self-update = ["self_update", "semver"]
inspect_contract = ["dep:near-verify-rs"]
verify_contract = [
    "dep:near-verify-rs",
    "dep:camino",
    "dep:git2",
    "dep:tempfile",
]

# The profile that 'cargo dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"

# Config for 'dist'
[workspace.metadata.dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.30.2"
allow-dirty = ["ci"]
# CI backends to support
ci = "github"
# The installers to generate for each app
installers = ["shell", "powershell", "npm", "msi"]
# Publish jobs to run in CI
publish-jobs = ["npm"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = [
    "aarch64-apple-darwin",
    "aarch64-unknown-linux-gnu",
    "aarch64-pc-windows-msvc",
    "x86_64-apple-darwin",
    "x86_64-unknown-linux-gnu",
    "x86_64-pc-windows-msvc",
]
# The archive format to use for windows builds (defaults .zip)
windows-archive = ".tar.gz"
# The archive format to use for non-windows builds (defaults .tar.xz)
unix-archive = ".tar.gz"
# Which actions to run on pull requests
pr-run-mode = "upload"
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# Whether to install an updater program
install-updater = false

[workspace.metadata.dist.github-custom-runners]
aarch64-unknown-linux-gnu = "ubuntu-24.04-arm"
x86_64-unknown-linux-gnu = "ubuntu-22.04"
x86_64-pc-windows-msvc = "windows-2022"
aarch64-pc-windows-msvc = "windows-2025"
x86_64-apple-darwin = "macos-15-intel"
aarch64-apple-darwin = "macos-14"

[workspace.metadata.dist.dependencies.apt]
libudev-dev = { version = "*", targets = [
    "x86_64-unknown-linux-gnu",
    "aarch64-unknown-linux-gnu",
] }
