MCPcopy Create free account
hub / github.com/BitVM/BitVM / bitcoin_representation

Function bitcoin_representation

bitvm/src/signatures/utils.rs:100–104  ·  view source on GitHub ↗
(x: i32)

Source from the content-addressed store, hash-verified

98}
99
100pub fn bitcoin_representation(x: i32) -> Vec<u8> {
101 let mut buf = [0u8; 8];
102 let len = bitcoin::script::write_scriptint(&mut buf, x as i64);
103 return buf[0..len].to_vec();
104}
105
106#[cfg(test)]
107mod test {

Callers 3

sign_digitsMethod · 0.85
sign_signed_digitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected