We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d826e8 commit b5d25f8Copy full SHA for b5d25f8
src/issuance.rs
@@ -14,6 +14,8 @@
14
15
//! Asset Issuance
16
17
+use std::str::FromStr;
18
+
19
use bitcoin::util::hash::BitcoinHash;
20
use bitcoin::hashes::{hex, sha256, Hash};
21
use fast_merkle_root::fast_merkle_root;
@@ -110,6 +112,13 @@ impl ::std::fmt::LowerHex for AssetId {
110
112
}
111
113
114
115
+impl FromStr for AssetId {
116
+ type Err = hex::Error;
117
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
118
+ hex::FromHex::from_hex(s)
119
+ }
120
+}
121
122
#[cfg(feature = "serde")]
123
impl ::serde::Serialize for AssetId {
124
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
0 commit comments