#![warn(missing_docs)]
#![no_std]
#![deny(clippy::all)]
#![feature(const_fn_floating_point_arithmetic)]
pub use dusk_abi::ContractId;
use dusk_bls12_381::BlsScalar;
use dusk_bytes::DeserializableSlice;
pub const POSEIDON_TREE_DEPTH: usize = 17;
pub const TRANSCRIPT_LABEL: &[u8] = b"dusk-network";
pub const fn transfer_contract() -> ContractId {
ContractId::reserved(0x1)
}
pub const fn stake_contract() -> ContractId {
ContractId::reserved(0x2)
}
pub fn contract_to_scalar(contract_id: &ContractId) -> BlsScalar {
BlsScalar::from_slice(contract_id.as_bytes()).expect(
"Something went REALLY wrong if a contract id cannot be a scalar",
)
}
pub mod dusk;
#[doc(hidden)]
pub mod hash;
cfg_if::cfg_if! {
if #[cfg(feature = "module")] {
#[doc(hidden)]
pub mod module;
pub use module::*;
}
}