pub fn signature_make(
        &self,
        message: &[u8],
        account_id: &str,
        sub_account_index: usize,
        internal: bool,
        index: usize,
        snapshot_password: &str,
    ) -> String {
        let account = self.account_get_by_id(account_id, snapshot_password);
        let signature: Vec<u8> = account
            .sign_message(
                message,
                format!("m/44'/4218'/{}'/{}'/{}'", sub_account_index, !internal as u32, index),
            )
            .to_vec();
        base64::encode(signature)
    }
/// Signs a message
///
/// Given the certain details of the private key to be used for signing, returns the message signature
///
/// `message` message to sign
///
/// `account_id` id of the account which the private key that has to belong
///
/// `sub_account_index` number of subaccount to which the private key has to belong
///
/// `internal` chain to which the private key has to belong
///
/// `index` number of address that has to be
///
/// For additional check bip39 spec https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki (note: for practical purposes in this library we are calling "account" a master seed and "subaccount" a bip39 account)
///
/// # Example
/// ```no_run
/// use stronghold::Stronghold;
/// let stronghold = Stronghold::new("savings.snapshot");
/// let message = "With this signed message you can verify my address ownership".as_bytes();
/// let account_id = "7c1a5ce9cc8f57f8739634aefbafda9eba6a02f82e3a4ab825ed296274e3aca1";
/// let sub_account_index = 0;
/// let internal = false;
/// let index = 0;
/// let snapshot_password = "iKuwjMdnwI";
/// let signature = stronghold.signature_make(
///     &message,
///     &account_id,
///     sub_account_index,
///     internal,
///     index,
///     snapshot_password,
/// );
/// ```
Signs a message
Given the certain details of the private key to be used for signing, returns the message signature

`message` message to sign

`account_id` id of the account which the private key that has to belong

`sub_account_index` number of subaccount to which the private key has to belong

`internal` chain to which the private key has to belong

`index` number of address that has to be


Signs a message Given the certain details of the private key to be used for signing returns the message signature ` message ` message to sign ` account_id ` id of the account which the private key that has to belong ` sub_account_index ` number of subaccount to which the private key has to belong ` internal ` chain to which the private key has to belong ` index ` number of address that has to be
pub fn signature_make(
        &self,
        message: &[u8],
        account_id: &str,
        sub_account_index: usize,
        internal: bool,
        index: usize,
        snapshot_password: &str,
    ) -> String {
        let account = self.account_get_by_id(account_id, snapshot_password);
        let signature: Vec<u8> = account
            .sign_message(
                message,
                format!("m/44'/4218'/{}'/{}'/{}'", sub_account_index, !internal as u32, index),
            )
            .to_vec();
        base64::encode(signature)
    }
pub fn signature_make ( & self , message : & [ u8 ] , account_id : & str , sub_account_index : usize , internal : bool , index : usize , snapshot_password : & str , ) -> String { let account = self . account_get_by_id ( account_id , snapshot_password ) ; let signature : Vec < u8 > = account . sign_message ( message , format ! ( " " sub_account_index internal as u32 index ) , ) . to_vec ( ) ; base64 :: encode ( signature ) }
Signs a message
Given the certain details of the private key to be used for signing, returns the message signature
Signs a message Given the certain details of the private key to be used for signing returns the message signature
&self
message
&[u8]
account_id
&str
sub_account_index
usize
internal
bool
index
usize
snapshot_password
&str
example
None