Program

Trait Program 

Source
pub trait Program {
    // Required methods
    fn evaluate(
        signature_request: SignatureRequest,
        config: Option<Vec<u8>>,
        oracle_data: Option<Vec<Vec<u8>>>,
    ) -> Result<(), Error>;
    fn custom_hash(data: Vec<u8>) -> Option<Vec<u8>>;
}

Required Methods§

Source

fn evaluate( signature_request: SignatureRequest, config: Option<Vec<u8>>, oracle_data: Option<Vec<Vec<u8>>>, ) -> Result<(), Error>

Evaluates the program given the user’s signature request and the program’s configuration.

Source

fn custom_hash(data: Vec<u8>) -> Option<Vec<u8>>

Programs that use custom hash functions can a custom 32-byte curve point to be signed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§