pub fn decode_from_base16(base16_bytes_str: String) -> Result<Constant, JsValue> {
        let bytes = Base16DecodedBytes::try_from(base16_bytes_str.clone()).map_err(|_| {
            JsValue::from_str(&format!(
                "failed to decode base16 from: {}",
                base16_bytes_str.clone()
            ))
        })?;
        ergo_lib::ergotree_ir::mir::constant::Constant::try_from(bytes)
            .map_err(to_js)
            .map(Constant)
    }
/// Decode from Base16-encoded ErgoTree serialized value
Decode from Base16-encoded ErgoTree serialized value
Decode from Base16 - encoded ErgoTree serialized value
pub fn decode_from_base16(base16_bytes_str: String) -> Result<Constant, JsValue> {
        let bytes = Base16DecodedBytes::try_from(base16_bytes_str.clone()).map_err(|_| {
            JsValue::from_str(&format!(
                "failed to decode base16 from: {}",
                base16_bytes_str.clone()
            ))
        })?;
        ergo_lib::ergotree_ir::mir::constant::Constant::try_from(bytes)
            .map_err(to_js)
            .map(Constant)
    }
pub fn decode_from_base16 ( base16_bytes_str : String ) -> Result < Constant , JsValue > { let bytes = Base16DecodedBytes :: try_from ( base16_bytes_str . clone ( ) ) . map_err ( | _ | { JsValue :: from_str ( & format ! ( " " base16_bytes_str clone ( ) ) ) } ) ? ; ergo_lib :: ergotree_ir :: mir :: constant :: Constant :: try_from ( bytes ) . map_err ( to_js ) . map ( Constant ) }
Decode from Base16-encoded ErgoTree serialized value
Decode from Base16 - encoded ErgoTree serialized value
base16_bytes_str
String
base16_bytes_str
String