From 4e3608de99d5653f31678bd6304117f3027daca2 Mon Sep 17 00:00:00 2001 From: ntfreem Date: Wed, 29 Jan 2020 18:54:41 +0000 Subject: [PATCH] output signed tx in binary format --- cardano-wallet/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cardano-wallet/src/lib.rs b/cardano-wallet/src/lib.rs index 1863002..3c298f6 100755 --- a/cardano-wallet/src/lib.rs +++ b/cardano-wallet/src/lib.rs @@ -921,6 +921,10 @@ impl SignedTransaction { let bytes = cbor!(&self.0).map_err(|e| JsValue::from_str(&format! {"{:?}", e}))?; Ok(util::hex::encode(&bytes)) } + pub fn to_bytes(&self) -> Result { + let bytes = cbor!(&self.0).map_err(|e| JsValue::from_str(&format! {"{:?}", e}))?; + Ok(bytes) + } } /// This is the linear fee algorithm used buy the current cardano blockchain.