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

Function generate_id

bridge/src/graphs/peg_out.rs:2511–2517  ·  view source on GitHub ↗
(peg_in_graph: &PegInGraph, operator_public_key: &PublicKey)

Source from the content-addressed store, hash-verified

2509}
2510
2511pub fn generate_id(peg_in_graph: &PegInGraph, operator_public_key: &PublicKey) -> String {
2512 let mut hasher = Sha256::new();
2513
2514 hasher.update(peg_in_graph.id().to_string() + &operator_public_key.to_string());
2515
2516 hasher.finalize().to_hex_string(Upper)
2517}

Callers 1

newMethod · 0.70

Calls 2

idMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected