use crate::;
use ;
use ;
/// A high-level map based on the low-level key-value store, which is the
/// interface provided by the chain.
///
/// In most situations, this collection should be preferred over
/// [`BTreeMap`][btm] and [`HashMap`][hm] since it will be more efficient to
/// lookup and update since costs to lookup and update will grow very slowly
/// with the size of the collection. In contrast, using [`BTreeMap`][btm] and
/// [`HashMap`][hm] almost always entails their serialization, which is linear
/// in the size of the collection.
///
/// The cost of updates to the map are dependent on the length of `K` (in bytes)
/// and the size of the data stored (`V`). Short keys are therefore ideal.
///
/// New maps can be constructed using the
/// [`new_map`][StateBuilder::new_map] method on the [`StateBuilder`].
///
///
/// ```
/// # use concordium_std::*;
/// # use concordium_std::test_infrastructure::*;
/// # let mut state_builder = TestStateBuilder::new();
/// /// In an init method:
/// let mut map1 = state_builder.new_map();
/// # map1.insert(0u8, 1u8); // Specifies type of map.
///
/// # let mut host = TestHost::new((), state_builder);
/// /// In a receive method:
/// let mut map2 = host.state_builder().new_map();
/// # map2.insert(0u16, 1u16);
/// ```
///
/// ## Type parameters
///
/// The map `StateMap<K, V, S>` is parametrized by the type of _keys_ `K`, the
/// type of _values_ `V` and the type of the low-level state `S`. In line with
/// other Rust collections, e.g., [`BTreeMap`][btm] and [`HashMap`][hm]
/// constructing the statemap via [`new_map`](StateBuilder::new_map) does not
/// require anything specific from `K` and `V`. However most operations do
/// require that `K` is serializable and `V` can be stored and loaded in the
/// context of the low-level state `S`.
///
/// This concretely means that `K` must implement
/// [`Serialize`](crate::Serialize) and `V` has to implement
/// [`Serial`](crate::Serial) and
/// [`DeserialWithState<S>`](crate::DeserialWithState). In practice, this means
/// that keys must be _flat_, meaning that it cannot have any references to the
/// low-level state. This is almost all types, except [`StateBox`], [`StateMap`]
/// and [`StateSet`] and types containing these.
///
/// However values may contain references to the low-level state, in particular
/// maps may be nested.
///
/// ### Low-level state `S`
///
/// The type parameter `S` is extra compared to usual Rust collections. As
/// mentioned above it specifies the [low-level state
/// implementation](crate::HasStateApi). This library provides two such
/// implementations. The "external" one ([`StateApi`]), which is the
/// implementation supported by external host functions provided by the chain,
/// and a [test](crate::test_infrastructure::TestStateApi) one. The latter one
/// is only useful for testing with the deprecated
/// [`test_infrastructure`](crate::test_infrastructure) module.
///
/// In user code this type parameter should generally be treated as boilerplate,
/// and contract entrypoints should always be stated in terms of a generic type
/// `S` that implements [HasStateApi](crate::HasStateApi) and defaults to
/// `StateApi`, unless you intend to use the deprecated testing library.
///
/// #### Example
/// ```rust
/// # use concordium_std::*;
/// #[derive(Serial, DeserialWithState)]
/// #[concordium(state_parameter = "S")]
/// struct MyState<S: HasStateApi = StateApi> {
/// inner: StateMap<u64, u64, S>,
/// }
/// #[init(contract = "mycontract")]
/// fn contract_init(_ctx: &InitContext, state_builder: &mut StateBuilder) -> InitResult<MyState> {
/// Ok(MyState {
/// inner: state_builder.new_map(),
/// })
/// }
///
/// #[receive(contract = "mycontract", name = "receive", return_value = "Option<u64>")]
/// fn contract_receive(
/// _ctx: &ReceiveContext,
/// host: &Host<MyState>, // the same low-level state must be propagated throughout
/// ) -> ReceiveResult<Option<u64>> {
/// let state = host.state();
/// Ok(state.inner.get(&0).map(|v| *v))
/// }
/// ```
///
/// ## **Caution**
///
/// `StateMap`s must be explicitly deleted when they are no longer needed,
/// otherwise they will remain in the contract's state, albeit unreachable.
///
/// ```no_run
/// # use concordium_std::*;
/// struct MyState<S: HasStateApi = StateApi> {
/// inner: StateMap<u64, u64, S>,
/// }
/// fn incorrect_replace(state_builder: &mut StateBuilder, state: &mut MyState) {
/// // The following is incorrect. The old value of `inner` is not properly deleted.
/// // from the state.
/// state.inner = state_builder.new_map(); // ⚠️
/// }
/// ```
/// Instead, either the map should be [cleared](StateMap::clear) or
/// explicitly deleted.
///
/// ```no_run
/// # use concordium_std::*;
/// # struct MyState<S: HasStateApi = StateApi> {
/// # inner: StateMap<u64, u64, S>
/// # }
/// fn correct_replace(state_builder: &mut StateBuilder, state: &mut MyState) {
/// state.inner.clear_flat();
/// }
/// ```
/// Or alternatively
/// ```no_run
/// # use concordium_std::*;
/// # struct MyState<S: HasStateApi = StateApi> {
/// # inner: StateMap<u64, u64, S>
/// # }
/// fn correct_replace(state_builder: &mut StateBuilder, state: &mut MyState) {
/// let old_map = mem::replace(&mut state.inner, state_builder.new_map());
/// old_map.delete()
/// }
/// ```
///
/// [hm]: crate::collections::HashMap
/// [btm]: crate::collections::BTreeMap
/// An iterator over the entries of a [`StateMap`].
///
/// Ordered by `K` serialized to bytes.
///
/// This `struct` is created by the [`iter`][StateMap::iter] method on
/// [`StateMap`]. See its documentation for more.
/// A mutable iterator over the entries of a [`StateMap`].
///
/// Ordered lexicographically by `K` via its serialization.
///
/// This `struct` is created by the [`iter_mut`][StateMap::iter_mut] method on
/// [`StateMap`]. See its documentation for more.
/// A high-level set of _flat_ values based on the low-level key-value store,
/// which is the interface provided by the chain.
///
/// In most situations, this collection should be preferred over
/// [`BTreeSet`][bts] and [`HashSet`][hs] since it will be more efficient to
/// lookup and update since costs to lookup and update will grow very slowly
/// with the size of the collection. In contrast, using [`BTreeSet`][bts] and
/// [`HashSet`][hs] almost always entails their serialization, which is linear
/// in the size of the collection.
///
/// The cost of updates to the set are dependent on the serialized size of the
/// value `T`.
///
/// New sets can be constructed using the
/// [`new_set`][StateBuilder::new_set] method on the [`StateBuilder`].
///
/// ```
/// # use concordium_std::*;
/// # use concordium_std::test_infrastructure::*;
/// # let mut state_builder = TestStateBuilder::new();
/// /// In an init method:
/// let mut set1 = state_builder.new_set();
/// # set1.insert(0u8); // Specifies type of set.
///
/// # let mut host = TestHost::new((), state_builder);
/// /// In a receive method:
/// let mut set2 = host.state_builder().new_set();
/// # set2.insert(0u16);
/// ```
///
/// ## Type parameters
///
/// The set `StateSet<T, S>` is parametrized by the type of _values_ `T`, and
/// the type of the low-level state `S`. In line with other Rust collections,
/// e.g., [`BTreeSet`][bts] and [`HashSet`][hs] constructing the stateset via
/// [`new_set`](StateBuilder::new_set) does not require anything specific from
/// `T`. However most operations do require that `T` implements
/// [`Serialize`](crate::Serialize).
///
/// Since `StateSet<T, S>` itself **does not** implement
/// [`Serialize`](crate::Serialize) **sets cannot be nested**. If this is really
/// required then a custom solution should be devised using the operations on
/// `S` (see [HasStateApi](crate::HasStateApi)).
///
/// ### Low-level state `S`
///
/// The type parameter `S` is extra compared to usual Rust collections. As
/// mentioned above it specifies the [low-level state
/// implementation](crate::HasStateApi). This library provides two such
/// implementations. The "external" one ([`StateApi`]), which is the
/// implementation supported by external host functions provided by the chain,
/// and a [test](crate::test_infrastructure::TestStateApi) one. The latter one
/// is only useful for testing with the deprecated
/// [`test_infrastructure`](crate::test_infrastructure) module.
///
/// In user code this type parameter should generally be treated as boilerplate,
/// and contract entrypoints should always be stated in terms of a generic type
/// `S` that implements [HasStateApi](crate::HasStateApi) and defaults to
/// `StateApi`, unless you intend to use the deprecated testing library.
///
/// #### Example
/// ```rust
/// # use concordium_std::*;
/// #[derive(Serial, DeserialWithState)]
/// #[concordium(state_parameter = "S")]
/// struct MyState<S: HasStateApi = StateApi> {
/// inner: StateSet<u64, S>,
/// }
/// #[init(contract = "mycontract")]
/// fn contract_init(_ctx: &InitContext, state_builder: &mut StateBuilder) -> InitResult<MyState> {
/// Ok(MyState {
/// inner: state_builder.new_set(),
/// })
/// }
///
/// #[receive(contract = "mycontract", name = "receive", return_value = "bool")]
/// fn contract_receive(_ctx: &ReceiveContext, host: &Host<MyState>) -> ReceiveResult<bool> {
/// let state = host.state();
/// Ok(state.inner.contains(&0))
/// }
/// ```
///
/// ## **Caution**
///
/// `StateSet`s must be explicitly deleted when they are no longer needed,
/// otherwise they will remain in the contract's state, albeit unreachable.
///
/// ```no_run
/// # use concordium_std::*;
/// struct MyState<S: HasStateApi = StateApi> {
/// inner: StateSet<u64, S>,
/// }
/// fn incorrect_replace(state_builder: &mut StateBuilder, state: &mut MyState) {
/// // The following is incorrect. The old value of `inner` is not properly deleted.
/// // from the state.
/// state.inner = state_builder.new_set(); // ⚠️
/// }
/// ```
/// Instead, either the set should be [cleared](StateSet::clear) or
/// explicitly deleted.
///
/// ```no_run
/// # use concordium_std::*;
/// # struct MyState<S: HasStateApi = StateApi> {
/// # inner: StateSet<u64, S>
/// # }
/// fn correct_replace(state_builder: &mut StateBuilder, state: &mut MyState) {
/// state.inner.clear();
/// }
/// ```
/// Or alternatively
/// ```no_run
/// # use concordium_std::*;
/// # struct MyState<S: HasStateApi = StateApi> {
/// # inner: StateSet<u64, S>
/// # }
/// fn correct_replace(state_builder: &mut StateBuilder, state: &mut MyState) {
/// let old_set = mem::replace(&mut state.inner, state_builder.new_set());
/// old_set.delete()
/// }
/// ```
///
/// [hs]: crate::collections::HashSet
/// [bts]: crate::collections::BTreeSet
/// An iterator over the entries of a [`StateMap`].
///
/// Ordered by `T` serialized to bytes.
///
/// This `struct` is created by the [`iter`][StateSet::iter] method on
/// [`StateSet`]. See its documentation for more.
/// A pointer type for data in the state.
///
/// The actual data is lazily loaded and thereafter cached in memory.
///
/// Due to its laziness, a [`StateBox`] can be used to defer loading of data in
/// your state. This is useful when part of your state isn't used in every
/// receive method.
///
/// The type parameter `T` is the type stored in the box. The type parameter `S`
/// is the state.
pub
/// The [`StateRef`] behaves akin the type `&'a V`, except that it is not
/// copyable. It should be used as [MutexGuard](std::sync::MutexGuard) or
/// similar types which guard access to a resource.
///
/// The type implements [`Deref`][crate::ops::Deref] to `V`, and that is the
/// intended, and only, way to use it.
/// The [`StateRefMut<_, V, _>`] behaves like `&mut V`, by analogy with other
/// standard library RAII guards like [`RefMut`](std::cell::RefMut).
/// The type implements [`DerefMut`](crate::ops::DerefMut) which allows the
/// value to be mutated. Additionally, the [`Drop`](Drop) implementation ensures
/// that the value is properly stored in the contract state maintained by the
/// node.
/// An iterator over a part of the state. Its implementation is supported by
/// host calls.
///
/// **Typically referred to via the alias [`StateIter`].**
pub type StateEntryId = u64;
pub type StateIteratorId = u64;
pub type StateItemPrefix = ;
/// Type of keys that index into the contract state.
pub type Key = ;
/// Represents the data in a node in the state trie.
/// A view into a vacant entry in a [`HasStateApi`][`crate::HasStateApi`] type.
/// It is part of the [`EntryRaw`] enum.
///
/// Differs from [`VacantEntry`] in that this has access to the raw bytes stored
/// in the state via a [`HasStateEntry`][crate::HasStateEntry] type.
/// A view into an occupied entry in a [`HasStateApi`][`crate::HasStateApi`]
/// type. It is part of the [`EntryRaw`] enum.
///
/// Differs from [`OccupiedEntry`] in that this has access to the raw bytes
/// stored in the state via a [`HasStateEntry`][crate::HasStateEntry] type.
/// A view into a single entry in a [`HasStateApi`][`crate::HasStateApi`] type,
/// which may either be vacant or occupied.
///
/// This `enum` is constructed from the [`entry`][crate::HasStateApi::entry]
/// method on a [`HasStateApi`][crate::HasStateApi] type.
/// A view into a vacant entry in a [`StateMap`]. It is
/// part of the [`Entry`] enum.
///
/// Differs from [`VacantEntryRaw`] in that this automatically handles
/// serialization.
/// A view into an occupied entry in a [`StateMap`]. It can be obtained via the
/// [`StateMap::entry`] method. This allows looking up or modifying the value at
/// a give key in-place.
///
/// The type implements [`DerefMut`](crate::ops::DerefMut) which allows the
/// value to be mutated. The [`Drop`](Drop) implementation ensures
/// that the value is properly stored in the contract state maintained by the
/// node.
///
/// This differs from [`OccupiedEntryRaw`] in that this automatically handles
/// serialization and provides convenience methods for modifying the value via
/// the [`DerefMut`](crate::ops::DerefMut) implementation.
/// A view into a single entry in a [`StateMap`], which
/// may either be vacant or occupied.
///
/// This `enum` is constructed from the [`entry`][StateMap::entry] method
/// on a [`StateMap`] type.
/// Zero-sized placeholder for the parameter data, only used internally by
/// [ExternParameter].
pub
/// A type representing the parameter to init and receive methods.
/// Its trait implementations are backed by host functions.
/// A type representing the return value of contract invocation.
/// A contract invocation **may** return a value. It is returned in the
/// following cases
/// - an entrypoint of a V1 contract was invoked and the invocation succeeded
/// - an entrypoint of a V1 contract was invoked and the invocation failed due
/// to a [CallContractError::LogicReject]
///
/// In all other cases there is no response.
///
/// This type is designed to be used via its [Read](crate::Read) and
/// [HasCallResponse](crate::HasCallResponse) traits.
///
/// **Typically referred to via the alias [`CallResponse`].**
/// A type representing the return value of contract init or receive method.
/// The intention is that this type is manipulated using methods of the
/// [Write](crate::Write) trait. In particular it can be used as a sink to
/// serialize values into.
///
/// **Typically referred to via the alias [`ReturnValue`].**
/// Errors that may occur when invoking a contract entrypoint.
/// Errors that may occur when transferring CCD to an account.
/// Errors that may occur when upgrading the smart contract module.
/// Error for querying the balance of an account.
/// No account found for the provided account address.
;
/// Error for querying the balance of a smart contract instance.
/// No instance found for the provided contract address.
;
/// Error for querying account's public keys.
/// No account found for the provided account address.
;
/// Error for checking an account signature.
/// A wrapper around [`Result`] that fixes the error variant to
/// [`CallContractError`], and the result to `(bool, Option<A>)`.
/// If the result is `Ok` then the boolean indicates whether the state was
/// modified or not, and the second item is the actual return value, which is
/// present (i.e., [`Some`]) if and only if a `V1` contract was invoked.
pub type CallContractResult<A> = ;
/// A wrapper around [`Result`] that fixes the error variant to
/// [`CallContractError`], and the result to [`Option<A>`](Option)
/// If the result is `Ok` then the value is [`None`] if a `V0` contract was
/// invoked, and a return value returned by a `V1` contract otherwise.
pub type ReadOnlyCallContractResult<A> = ;
/// A wrapper around [`Result`] that fixes the error variant to
/// [`TransferError`] and result to [()](https://doc.rust-lang.org/std/primitive.unit.html).
pub type TransferResult = ;
/// A wrapper around [`Result`] that fixes the error variant to [`UpgradeError`]
/// and result to [()](https://doc.rust-lang.org/std/primitive.unit.html).
pub type UpgradeResult = ;
/// A wrapper around [`Result`] that fixes the error variant to
/// [`QueryAccountBalanceError`] and result to [`AccountBalance`].
pub type QueryAccountBalanceResult = ;
/// A wrapper around [`Result`] that fixes the error variant to
/// [`QueryContractBalanceError`] and result to [`Amount`].
pub type QueryContractBalanceResult = ;
/// A wrapper around [`Result`] that fixes the error variant to
/// [`QueryAccountPublicKeysError`] and result to
/// [`AccountPublicKeys`](crate::AccountPublicKeys).
pub type QueryAccountPublicKeysResult =
;
/// A wrapper around [`Result`] that fixes the error variant to
/// [`CheckAccountSignatureError`] and result to [`bool`].
pub type CheckAccountSignatureResult = ;
/// A type representing the attributes, lazily acquired from the host.
/// An iterator over the attributes of a policy.
/// The iterator returns pairs of
/// [`AttributeTag`](concordium_contracts_common::AttributeTag) and
/// [`AttributeValue`](concordium_contracts_common::AttributeValue).
/// A type representing the logger.
/// Errors that can occur during logging.
/// Error triggered when a non-zero amount of CCD is sent to a contract
/// init or receive function that is not marked as `payable`.
;
/// An error message, signalling rejection of a smart contract invocation.
/// The client will see the error code as a reject reason; if a schema is
/// provided, the error message corresponding to the error code will be
/// displayed. The valid range for an error code is from i32::MIN to -1.
/// A return value can also be provided.
/// Default error is i32::MIN.
// Macros for failing a contract function
/// The `bail` macro can be used for cleaner error handling. If the function has
/// result type `Result` invoking `bail` will terminate execution early with an
/// error.
/// If an argument is supplied, this will be used as the error, otherwise it
/// requires the type `E` in `Result<_, E>` to implement the `Default` trait.
/// The `ensure` macro can be used for cleaner error handling. It is analogous
/// to `assert`, but instead of panicking it uses `bail` to terminate execution
/// of the function early.
/// ## Variants of `ensure` for ease of use in certain contexts.
/// Ensure the first two arguments are equal, using `bail` otherwise.
/// Ensure the first two arguments are __not__ equal, using `bail` otherwise.
// Macros for failing a test (in `concordium_std::test_infrastructure`).
/// The `fail` macro is used for testing as a substitute for the panic macro.
/// It reports back error information to the host.
/// Used only in testing with
/// [`test_infrastructure`](crate::test_infrastructure).
/// The `fail` macro is used for testing as a substitute for the panic macro.
/// It reports back error information to the host.
/// Used only in testing with
/// [`test_infrastructure`](crate::test_infrastructure).
/// The `claim` macro is used for testing as a substitute for the assert macro.
/// It checks the condition and if false it reports back an error.
/// Used only in testing with
/// [`test_infrastructure`](crate::test_infrastructure).
/// Ensure the first two arguments are equal, just like `assert_eq!`, otherwise
/// reports an error.
/// Used only in testing with
/// [`test_infrastructure`](crate::test_infrastructure).
/// Ensure the first two arguments are *not* equal, just like `assert_ne!`,
/// otherwise reports an error.
/// Used only in testing with
/// [`test_infrastructure`](crate::test_infrastructure).
/// The expected return type of the receive method of a smart contract.
///
/// Optionally, to define a custom type for error instead of using
/// Reject, allowing to track the reason for rejection.
///
/// See also the documentation for [bail!](macro.bail.html) for how to use
/// custom error types.
///
/// # Example
/// Defining a custom error type that implements [`Reject`] and [`Serial`].
/// ```no_run
/// # use concordium_std::*;
/// #[derive(Serial, Reject)]
/// enum MyCustomError {
/// SomeError,
/// }
///
/// #[receive(contract = "mycontract", name = "receive")]
/// fn contract_receive(_ctx: &ReceiveContext, _host: &Host<()>) -> Result<(), MyCustomError> {
/// Err(MyCustomError::SomeError)
/// }
/// ```
pub type ReceiveResult<A> = ;
/// The expected return type of the init method of the smart contract,
/// parametrized by the state type of the smart contract.
///
/// Optionally, to define a custom type for error instead of using Reject,
/// allowing the track the reason for rejection.
///
/// See also the documentation for [bail!](macro.bail.html) for how to use
/// custom error types.
///
/// # Example
/// Defining a custom error type that implements [`Reject`] and [`Serial`].
/// ```no_run
/// # use concordium_std::*;
/// #[derive(Serial, Reject)]
/// enum MyCustomError {
/// SomeError,
/// }
///
/// #[init(contract = "mycontract")]
/// fn contract_init(
/// _ctx: &InitContext,
/// _state_builder: &mut StateBuilder,
/// ) -> Result<(), MyCustomError> {
/// Err(MyCustomError::SomeError)
/// }
/// ```
pub type InitResult<S> = ;
/// Type alias for the context of init methods.
///
/// See [`ExternContext`] for more details.
pub type InitContext = ;
/// Type alias for the context of receive methods.
///
/// See [`ExternContext`] for more details.
pub type ReceiveContext = ;
/// The host, which supports interactions with the chain, such as querying
/// the balance of the contract, accessing its state, and invoking operations on
/// other contracts and accounts.
///
/// The type is parameterized by the `State` type. This is the type of the
/// contract state that the particular contract operates on.
///
/// See [`ExternHost`] for more details.
pub type Host<State> = ;
/// The contract state, which uses Wasm host functions to interact with the node
/// and use the state.
///
/// See [`ExternStateApi`] for more details.
pub type StateApi = ExternStateApi;
/// Host-backed cryptographic primitives.
///
/// See [`ExternCryptoPrimitives`] for the methods implemented via
/// [`HasCryptoPrimitives`](crate::traits::HasCryptoPrimitives).
pub type CryptoPrimitives = ExternCryptoPrimitives;
/// A low-level host, used by receive methods with the attribute `low_level`.
///
/// See [`ExternLowLevelHost`] for the methods implemented via `HasHost`.
pub type LowLevelHost = ExternLowLevelHost;
/// Host-backed access to chain metadata.
///
/// See [`ExternChainMeta`] for the methods implemented via the
/// `HasChainMetadata` trait.
pub type ChainMeta = ExternChainMeta;
/// A host-backed iterator over part of the state.
///
/// See [`ExternStateIter`] for the methods implemented via primarily
/// [`Iterator`].
pub type StateIter = ExternStateIter;
/// A type representing the return value of contract init or receive method.
///
/// The intention is that this type is manipulated using methods of the
/// [Write](crate::Write) trait. In particular it can be used as a sink to
/// serialize values into.
///
/// See [`ExternReturnValue`] for more details.
pub type ReturnValue = ExternReturnValue;
/// A type representing the return value of contract invocation.
///
/// A contract invocation **may** return a value. It is returned in the
/// following cases
/// - an entrypoint of a V1 contract was invoked and the invocation succeeded
/// - an entrypoint of a V1 contract was invoked and the invocation failed due
/// to a [`CallContractError::LogicReject`]
///
/// In all other cases there is no response.
///
/// This type is designed to be used via its [Read](crate::Read) and
/// [`HasCallResponse`](crate::HasCallResponse) traits.
///
/// See [`ExternCallResponse`] for more details.
pub type CallResponse = ExternCallResponse;
/// Operations backed by host functions for the high-level interface.
///
/// **Typically referred to via the alias [`Host`].**
/// A state builder that allows the creation of [`StateMap`], [`StateSet`], and
/// [`StateBox`].
///
/// It is parametrized by a parameter `S` that is assumed to
/// implement [`HasStateApi`] to support testing with the deprecated
/// [`test_infrastructure`](crate::test_infrastructure). The `S` defaults to
/// `StateApi`, which is sufficient to test with the [concordium-smart-contract-testing](https://docs.rs/concordium-smart-contract-testing)
/// library.
///
/// The StateBuilder is designed to provide an abstraction over the contract
/// state, abstracting over the exact **keys** (keys in the sense of key-value
/// store, which is the low-level semantics of contract state) that are used
/// when storing specific values.
/// A struct for which HasCryptoPrimitives is implemented via the crypto host
/// functions.
///
/// **Typically referred to via the alias [`CryptoPrimitives`].**
;
/// Sha2 digest with 256 bits (32 bytes).
;
/// Sha3 digest with 256 bits (32 bytes).
;
/// Keccak digest with 256 bits (32 bytes).
;
/// Typicall referred to via the alias [`StateApi`].
;
/// Operations backed by host functions for the low-level interface.
///
/// **Typically referred to via the alias [`LowLevelHost`].**
/// Context backed by host functions.
///
/// Usuaully referred to via aliases [`InitContext`] or [`ReceiveContext`].
/// **Typically referred to via the alias [`ChainMeta`].**
;
;
pub
/// The error type which is returned by methods on
/// [`HasStateApi`][`crate::HasStateApi`].
/// The location of the metadata and an optional hash of the content.