Cargo Features

near-primitives has no features set by default.

[dependencies]
near-primitives = { version = "0.28.0", features = ["sandbox", "test_features", "solomon", "rand", "clock", "protocol_feature_fix_staking_threshold", "protocol_feature_fix_contract_loading_cost", "protocol_feature_reject_blocks_with_outdated_protocol_version", "protocol_feature_nonrefundable_transfer_nep491", "nightly", "nightly_protocol", "calimero_zero_storage", "protocol_schema", "test_utils"] }
sandbox

Affects sandbox::state_patch

test_features
solomon = reed-solomon-erasure

Affects block::genesis_chunks, near-primitives::reed_solomon

rand test_utils? = rand_chacha

Enables rand, rand of near-crypto

Affects test_utils::create_test_signer, test_utils::create_user_test_signer, utils::generate_random_string

clock

Enables clock and serde of near-time

Affects test_utils::TestBlockBuilder, version::get_protocol_version

protocol_feature_fix_staking_threshold nightly?

Enables protocol_feature…staking_threshold of near-primitives-core

protocol_feature_fix_contract_loading_cost nightly?

Enables protocol_feature…loading_cost of near-primitives-core

protocol_feature_reject_blocks_with_outdated_protocol_version nightly?

Enables protocol_feature…protocol_version of near-primitives-core

protocol_feature_nonrefundable_transfer_nep491 nightly?

Enables protocol_feature…transfer_nep491 of near-primitives-core

Affects action::NonrefundableStorageTransferAction, views::AccountView.permanent_storage_bytes

nightly = nightly_protocol, protocol_feature…loading_cost, protocol_feature…staking_threshold, protocol_feature…transfer_nep491, protocol_feature…protocol_version

Enables nightly of near-fmt, near-parameters, and near-primitives-core

nightly_protocol nightly?

Enables nightly_protocol of near-fmt, near-parameters, and near-primitives-core

calimero_zero_storage
protocol_schema

Enables protocol_schema of near-schema-checker-lib

test_utils = rand

Affects near-primitives::test_utils

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

rand_chacha rand?
reed-solomon-erasure solomon?