Would be great to have a method similar to to_hex() or to_json() for the transaction, as it can be used to send the raw bytes right to the submit-api. Something like this:
pub fn to_bytes(&self) -> Result<String, JsValue> { let bytes = cbor!(&self.0).map_err(|e| JsValue::from_str(&format! {"{:?}", e}))?; Ok(bytes) }
Would be great to have a method similar to to_hex() or to_json() for the transaction, as it can be used to send the raw bytes right to the submit-api. Something like this:
pub fn to_bytes(&self) -> Result<String, JsValue> { let bytes = cbor!(&self.0).map_err(|e| JsValue::from_str(&format! {"{:?}", e}))?; Ok(bytes) }