Overview
TrustedAdvice<T> is a wrapper type that marks guest program inputs as trusted advice. Trusted advice values are assumed to be correct and do not require verification within the zkVM. This is useful for inputs that are inherently verifiable or when the correctness of the input is guaranteed by external means.
Type Definition
The wrapped value provided as trusted advice
Methods
new
Creates a newTrustedAdvice wrapper around a value.
The value to wrap as trusted advice
TrustedAdvice<T> instance
Example:
Trait Implementations
From<T>
Allows automatic conversion from any value T into TrustedAdvice<T>.
Deref
Provides automatic dereferencing to access the wrapped value.Usage Example
When to Use
UseTrustedAdvice<T> when:
- The input is guaranteed to be correct by external verification
- The correctness of the input can be verified through other computations in your program
- You want to reduce proof generation overhead by not verifying certain inputs
See Also
- UntrustedAdvice<T> - For advice that requires verification
- AdviceWriter - Writing advice data to the advice tape
- AdviceReader - Reading advice data from the advice tape