f1r3fly-models 0.1.0

Common data model types for the F1r3fly blockchain, including protobuf definitions and Rust implementations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// See models/src/main/scala/coop/rchain/models/StringSyntax.scala
pub struct StringOps;

impl StringOps {
    pub fn decode_hex(s: String) -> Option<Vec<u8>> {
        hex::decode(&s).ok()
    }

    pub fn unsafe_decode_hex(s: String) -> Vec<u8> {
        hex::decode(&s).unwrap()
    }
}