pub fn transaction_sign_raw(
    message: &Message,
    private_key: &PrivateKey,
) -> Result<Signature, SignerError> {
    // the `from` address protocol let us know which signing scheme to use
    let signature = match message.from.protocol() {
        fvm_shared::address::Protocol::Secp256k1 => {
            transaction_sign_secp56k1_raw(message, private_key)?
        }
        fvm_shared::address::Protocol::BLS => transaction_sign_bls_raw(message, private_key)?,
        _ => {
            return Err(SignerError::GenericString(
                "Unknown signing protocol".to_string(),
            ));
        }
    };

    Ok(signature)
}
/// Sign a transaction and return a raw signature (RSV format).
///
/// # Arguments
///
/// * `message` - an unsigned filecoin message
/// * `private_key` - a `PrivateKey`
///
Sign a transaction and return a raw signature (RSV format).
Sign a transaction and return a raw signature ( RSV format ) .
pub fn transaction_sign_raw(
    message: &Message,
    private_key: &PrivateKey,
) -> Result<Signature, SignerError> {
    // the `from` address protocol let us know which signing scheme to use
    let signature = match message.from.protocol() {
        fvm_shared::address::Protocol::Secp256k1 => {
            transaction_sign_secp56k1_raw(message, private_key)?
        }
        fvm_shared::address::Protocol::BLS => transaction_sign_bls_raw(message, private_key)?,
        _ => {
            return Err(SignerError::GenericString(
                "Unknown signing protocol".to_string(),
            ));
        }
    };
    Ok(signature)
}
pub fn transaction_sign_raw ( message : & Message , private_key : & PrivateKey , ) -> Result < Signature , SignerError > { // the `from` address protocol let us know which signing scheme to use let signature = match message . from . protocol ( ) { fvm_shared :: address :: Protocol :: Secp256k1 => { transaction_sign_secp56k1_raw ( message , private_key ) ? } fvm_shared :: address :: Protocol :: BLS => transaction_sign_bls_raw ( message , private_key ) ? , _ => { return Err ( SignerError :: GenericString ( " " . to_string ( ) , ) ) ; } } ; Ok ( signature ) }
Sign a transaction and return a raw signature (RSV format).
Sign a transaction and return a raw signature ( RSV format ) .
message
&Message
private_key
&PrivateKey
message
&Message
private_key
&PrivateKey