fix: make `componentsToAddress` usable from JS
ci/woodpecker/push/woodpecker Pipeline was successful Details

feat/type-attributes
Tomáš Mládek 2023-08-28 18:12:26 +02:00
parent 38faae33bf
commit 36553c5f61
1 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,15 @@ pub struct AddressComponents {
pub c: Option<String>,
}
#[cfg(feature = "wasm")]
#[wasm_bindgen]
impl AddressComponents {
#[wasm_bindgen(constructor)]
pub fn new(t: String, c: Option<String>) -> Self {
AddressComponents { t, c }
}
}
/// multicodec RAW code
const RAW: u64 = 0x55;