Skip to main content

Verify

Trait Verify 

Source
pub trait Verify: Sized {
    type Verified;
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn verify(self) -> Result<Self::Verified, Self::Error>;
}
Expand description

Checks domain invariants and constructs the verified type using ordinary Rust.

Verification errors belong to the domain. Cross-field checks need not correspond to a single wire field. Types that require external context can implement VerifyWith instead. Boxes delegate to the contained verifier, preserving its error type and boxing the output. Generated decoded records retain collections in crate::OptionalField, crate::RepeatedField, or crate::MapField. Calling verify() on these fields verifies their elements with the generated field name and index or key context. These helpers return ConversionError, preserving the original source, and stop at the first error. For element verifiers whose error is core::convert::Infallible, the wrappers also provide verify_infallible(), returning the verified collection directly. Collection-wide invariants remain the responsibility of the containing verifier. Use the wrappers’ map() or try_map() methods for explicit element conversions; try_map() retains field, index, and key context. Use into_inner() for custom collection-wide processing.

Required Associated Types§

Source

type Verified

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn verify(self) -> Result<Self::Verified, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Verify for DecodedAccountFile

Source§

impl Verify for DecodedAccountFileV1

Source§

impl Verify for DecodedAuthSecretKey

Returns the canonical secret key; it is not checked against any account.

Source§

impl Verify for DecodedCommittedNote

Source§

impl Verify for DecodedExpectedNote

Source§

impl Verify for DecodedNoteFile

Source§

impl Verify for DecodedNoteFileV1

Source§

impl Verify for DecodedNoteSyncHint

Source§

impl<S> Verify for Box<S>
where S: Verify,

Source§

type Verified = Box<<S as Verify>::Verified>

Source§

type Error = <S as Verify>::Error

Source§

fn verify( self, ) -> Result<<Box<S> as Verify>::Verified, <Box<S> as Verify>::Error>

Implementors§

Source§

impl Verify for DecodedAccount

Source§

impl Verify for DecodedAccountCode

Source§

impl Verify for DecodedAccountCodePatch

Source§

impl Verify for DecodedAccountCodeUpgrade

Source§

impl Verify for DecodedAccountDetailRequest

Source§

impl Verify for DecodedAccountDetails

Source§

impl Verify for DecodedAccountHeader

Source§

impl Verify for DecodedAccountId

Source§

impl Verify for DecodedAccountIdV1

Source§

impl Verify for DecodedAccountPatch

Source§

impl Verify for DecodedAccountStorage

Source§

impl Verify for DecodedAccountStorageDetails

Source§

impl Verify for DecodedAccountStorageHeader

Source§

impl Verify for DecodedAccountStorageMapDetails

Source§

impl Verify for DecodedAccountStoragePatch

Source§

impl Verify for DecodedAccountUpdateDetails

Source§

impl Verify for DecodedAccountVaultDetails

Source§

impl Verify for DecodedAccountVaultPatch

Source§

impl Verify for DecodedAccountVaultPatchEntry

Source§

impl Verify for DecodedAccountWitness

Source§

impl Verify for DecodedAdviceInputs

Source§

impl Verify for DecodedAdviceMap

Source§

impl Verify for DecodedAdviceMapEntry

Source§

impl Verify for DecodedAdviceStack

Source§

impl Verify for DecodedAsset

Source§

impl Verify for DecodedAssetClass

Source§

impl Verify for DecodedAssetId

Source§

impl Verify for DecodedAssetVault

Source§

impl Verify for DecodedAuthInputs

Source§

impl Verify for DecodedAuthenticatedInputNote

Checks proof/note identity, not inclusion against a trusted block root.

Source§

impl Verify for DecodedBatchAccountUpdate

Source§

impl Verify for DecodedBlockAccountUpdate

Source§

impl Verify for DecodedBlockNumber

Source§

impl Verify for DecodedBlockRange

Source§

impl Verify for DecodedFeeParameters

Source§

impl Verify for DecodedForeignAccountSlotName

Source§

impl Verify for DecodedGetAccountRequest

Source§

impl Verify for DecodedGetAccountResponse

Source§

impl Verify for DecodedGetNoteScriptByRootResponse

Source§

impl Verify for DecodedIndexedDigest

Source§

impl Verify for DecodedIndexedOutputNote

Source§

impl Verify for DecodedIndexedSmtLeaf

Source§

impl Verify for DecodedInputNote

Source§

impl Verify for DecodedInputNotes

Source§

impl Verify for DecodedIsAccountAllowedRequest

Source§

impl Verify for DecodedIsInvitationCodeValidRequest

Returns the raw invitation code. The handler validates the code because an empty code is accepted when allowlist enforcement is disabled.

Source§

impl Verify for DecodedKernelConfig

Source§

impl Verify for DecodedMastForest

Source§

impl Verify for DecodedMerklePath

Source§

impl Verify for DecodedMerkleStore

Source§

impl Verify for DecodedMerkleStoreNode

Source§

impl Verify for DecodedMmrDelta

Source§

impl Verify for DecodedNextProtocolConfig

Source§

impl Verify for DecodedNote

Source§

impl Verify for DecodedNoteArgument

Source§

impl Verify for DecodedNoteAttachment

Source§

impl Verify for DecodedNoteAttachments

Source§

impl Verify for DecodedNoteDetails

Source§

impl Verify for DecodedNoteHeader

Source§

impl Verify for DecodedNoteId

Source§

impl Verify for DecodedNoteInclusionProof

Source§

impl Verify for DecodedNoteMetadata

Source§

impl Verify for DecodedNoteRecipient

Source§

impl Verify for DecodedNoteScript

Source§

impl Verify for DecodedNoteStorage

Source§

impl Verify for DecodedOutputNote

Source§

impl Verify for DecodedOutputNoteBatch

Source§

impl Verify for DecodedPaginationInfo

Source§

impl Verify for DecodedPartialAccount

Source§

impl Verify for DecodedPartialMmr

Checks reconstruction against the supplied peaks without authenticating those peaks.

Source§

impl Verify for DecodedPartialNote

Source§

impl Verify for DecodedPartialNoteMetadata

Source§

impl Verify for DecodedPartialSmt

Source§

impl Verify for DecodedPartialSmtNode

Source§

impl Verify for DecodedPartialSmtNodeLevel

Source§

impl Verify for DecodedPartialStorage

Source§

impl Verify for DecodedPartialStorageMap

Source§

impl Verify for DecodedPartialVault

Source§

impl Verify for DecodedPrivateAccountUpdate

Source§

impl Verify for DecodedPrivateOutputNote

Source§

impl Verify for DecodedProofSecurityPolicy

Source§

impl Verify for DecodedProofVerificationConfig

Source§

impl Verify for DecodedProtocolConfig

Source§

impl Verify for DecodedPublicKey

Returns the canonical public key; ownership and authorization are not established here.

Source§

impl Verify for DecodedPublicOutputNote

Source§

impl Verify for DecodedRawOutputNote

Source§

impl Verify for DecodedRawOutputNotes

Source§

impl Verify for DecodedRegisterAccountRequest

Source§

impl Verify for DecodedSignature

Returns the canonical signature; authenticity requires a public key and signed message.

Source§

impl Verify for DecodedSlotData

Source§

impl Verify for DecodedSmtLeaf

Source§

impl Verify for DecodedSmtLeafEntry

Source§

impl Verify for DecodedSmtLeafEntryList

Source§

impl Verify for DecodedSmtOpening

Source§

impl Verify for DecodedSparseMerklePath

Source§

impl Verify for DecodedStorageMap

Source§

impl Verify for DecodedStorageMapDetailRequest

Source§

impl Verify for DecodedStorageMapEntry

Source§

impl Verify for DecodedStorageMapPatch

Source§

impl Verify for DecodedStorageMapPatchEntries

Source§

impl Verify for miden_node_proto::generated::account::account_storage_header::DecodedStorageSlot

Source§

impl Verify for miden_node_proto::generated::account::DecodedStorageSlot

Source§

impl Verify for DecodedStorageSlotId

Source§

impl Verify for DecodedStorageSlotPatch

Source§

impl Verify for DecodedStorageValuePatch

Source§

impl Verify for DecodedSyncNullifiersResponse

Source§

impl Verify for DecodedTrackedMmrLeaf

Source§

impl Verify for DecodedTransactionArgs

Source§

impl Verify for DecodedTransactionBatch

Source§

impl Verify for DecodedTransactionEffects

Dispatches the decoded version.

Source§

impl Verify for DecodedTransactionEffectsV1

Verifies the effects. The account patch, the input notes and the output notes are each verified, and both note collections are checked for duplicates and length limits.

The reference block commitment is not checked against the reference block number, the account patch is not checked to belong to the account the transaction ran against, and input notes are not authenticated.

Source§

impl Verify for DecodedTransactionId

Source§

impl Verify for DecodedTransactionScript

Source§

impl Verify for DecodedTxAccountUpdate

Source§

impl Verify for DecodedValidatorConfig

Source§

impl<K, S> Verify for MapField<BTreeMap<K, S>>
where K: Ord + Debug, S: Verify,

Source§

impl<K, S> Verify for MapField<HashMap<K, S>>
where K: Eq + Hash + Debug, S: Verify,

Available on crate feature std only.
Source§

impl<S> Verify for OptionalField<S>
where S: Verify,

Source§

impl<S> Verify for RepeatedField<S>
where S: Verify,