pub fn sign_block(&self, body: Body) -> Block {
        let mut message = String::from("ithos.block.body.ni:///sha-256;");
        message.push_str(&BASE64URL.encode(objecthash::digest(&body).as_ref()));

        let signature = self.sign_raw_bytes(message.as_bytes());
        let mut witness = Witness::new();
        witness.set_signatures(RepeatedField::from_vec(vec![signature]));

        let mut block = Block::new();
        block.set_body(body);
        block.set_witness(witness);
        block
    }
/// Sign the body of a block, returning a complete block with signature/witness data
Sign the body of a block, returning a complete block with signature/witness data
Sign the body of a block returning a complete block with signature / witness data
pub fn sign_block(&self, body: Body) -> Block {
        let mut message = String::from("ithos.block.body.ni:///sha-256;");
        message.push_str(&BASE64URL.encode(objecthash::digest(&body).as_ref()));
        let signature = self.sign_raw_bytes(message.as_bytes());
        let mut witness = Witness::new();
        witness.set_signatures(RepeatedField::from_vec(vec![signature]));
        let mut block = Block::new();
        block.set_body(body);
        block.set_witness(witness);
        block
    }
pub fn sign_block ( & self , body : Body ) -> Block { let mut message = String :: from ( " " ) ; message . push_str ( & BASE64URL . encode ( objecthash :: digest ( & body ) . as_ref ( ) ) ) ; let signature = self . sign_raw_bytes ( message . as_bytes ( ) ) ; let mut witness = Witness :: new ( ) ; witness . set_signatures ( RepeatedField :: from_vec ( vec ! [ signature ] ) ) ; let mut block = Block :: new ( ) ; block . set_body ( body ) ; block . set_witness ( witness ) ; block }
Sign the body of a block, returning a complete block with signature/witness data
Sign the body of a block returning a complete block with signature / witness data
&self
body
Body
&self
body
Body