pub fn verify_storage_value_proof_with_decoder<StorageKey, MerkleHasher, TransformResult>(
    storage_key: &StorageKey,
    state_root: OutputOf<MerkleHasher>,
    state_proof: impl IntoIterator<Item = Vec<u8>>,
    transform: impl FnMut(&mut &[u8]) -> Option<TransformResult>
) -> Result<TransformResult, MerkleProofError>where
    StorageKey: AsRef<[u8]>,
    MerkleHasher: Hash,
    OutputOf<MerkleHasher>: Ord,
Expand description

Verify a Merkle-based storage proof for a given storage key according to the provided state root. The generic types indicate the following:

  • StorageKey: defines the type of the storage key included in the proof.
  • MerkleHasher: defines the hashing algorithm used to calculate the Merkle root.
  • TransformResult: the type returned by the provided decoding function, if successful. The None result is interpreted as an error, so it is not possible to return a type for which None would be a correct decoding, for now. See https://github.com/rust-lang/rust/issues/103765 for more details.