pub fn native_ed25519_threshold_signature_verification<T: StackAccessor>(
    mut accessor: T,
) -> Result<CostedReturnType> {
    let message = accessor.get_byte_array()?;
    let public_keys = accessor.get_byte_array()?;
    let signatures = accessor.get_byte_array()?;
    let bitmap = accessor.get_byte_array()?;

    let num_of_sigs =
        ed25519_threshold_signature_verification(&bitmap, &signatures, &public_keys, &message);

    match num_of_sigs {
        Ok(num_of_sigs) => {
            let native_cost = BATCH_ED25519_COST * num_of_sigs * message.len() as u64;
            Ok(CostedReturnType::new(
                native_cost,
                NativeReturnType::U64(num_of_sigs),
            ))
        }
        Err(err) => Err(err),
    }
}
/// Batch verify a collection of signatures using a bitmap for matching signatures to keys.
Batch verify a collection of signatures using a bitmap for matching signatures to keys.
Batch verify a collection of signatures using a bitmap for matching signatures to keys .
pub fn native_ed25519_threshold_signature_verification<T: StackAccessor>(
    mut accessor: T,
) -> Result<CostedReturnType> {
    let message = accessor.get_byte_array()?;
    let public_keys = accessor.get_byte_array()?;
    let signatures = accessor.get_byte_array()?;
    let bitmap = accessor.get_byte_array()?;
    let num_of_sigs =
        ed25519_threshold_signature_verification(&bitmap, &signatures, &public_keys, &message);
    match num_of_sigs {
        Ok(num_of_sigs) => {
            let native_cost = BATCH_ED25519_COST * num_of_sigs * message.len() as u64;
            Ok(CostedReturnType::new(
                native_cost,
                NativeReturnType::U64(num_of_sigs),
            ))
        }
        Err(err) => Err(err),
    }
}
pub fn native_ed25519_threshold_signature_verification < T : StackAccessor > ( mut accessor : T , ) -> Result < CostedReturnType > { let message = accessor . get_byte_array ( ) ? ; let public_keys = accessor . get_byte_array ( ) ? ; let signatures = accessor . get_byte_array ( ) ? ; let bitmap = accessor . get_byte_array ( ) ? ; let num_of_sigs = ed25519_threshold_signature_verification ( & bitmap , & signatures , & public_keys , & message ) ; match num_of_sigs { Ok ( num_of_sigs ) => { let native_cost = BATCH_ED25519_COST * num_of_sigs * message . len ( ) as u64 ; Ok ( CostedReturnType :: new ( native_cost , NativeReturnType :: U64 ( num_of_sigs ) , ) ) } Err ( err ) => Err ( err ) , } }
Batch verify a collection of signatures using a bitmap for matching signatures to keys.
Batch verify a collection of signatures using a bitmap for matching signatures to keys .
accessor
T
accessor
T