upend/tools/upend_js/wasm/node.ts
Tomáš Mládek 6e78fa250c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
fix(jslib): 🚨 fix lint fail due to missing type-only imports
2023-10-07 13:13:00 +02:00

25 lines
771 B
TypeScript

import type { AddressComponents, AddressTypeConstants } from ".";
import { UpEndWasmExtensions } from ".";
import {
addr_to_components,
components_to_addr,
AddressComponents as WasmAddresComponents,
AddressTypeConstants as WasmAddresTypeConstants,
} from "@upnd/wasm-node";
export class UpEndWasmExtensionsNode extends UpEndWasmExtensions {
protected async _init(): Promise<void> {}
addr_to_components(address: string): AddressComponents {
return addr_to_components(address);
}
components_to_addr(components: AddressComponents): string {
const wc = new WasmAddresComponents(components.t, components.c);
return components_to_addr(wc);
}
get AddressTypeConstants(): AddressTypeConstants {
return new WasmAddresTypeConstants();
}
}