Update auto-generated TypeScript files (now universal Node+Web!)
[ldk-java] / ts / index.mts
index 83569e01ae88626cb059d48b6485b3a012dae56c..9e6b7b101a96177c1c13957bb29b0fbd6df570d1 100644 (file)
@@ -1,3 +1,13 @@
+import { initializeWasmFetch, initializeWasmFromUint8Array } from './bindings.mjs';
+/** Initializes the WASM backend by calling `fetch()` on the given URI - Browser only */
+export async function initializeWasmWebFetch(uri: string) {
+       await initializeWasmFetch(uri);
+}
+/** Initializes the WASM backend given a Uint8Array of the .wasm binary file - Browser or Node.JS */
+export async function initializeWasmFromBinary(bin: Uint8Array) {
+       await initializeWasmFromUint8Array(bin);
+}
+
 export * from './structs/TxOut.mjs';
 export * from './enums/AccessError.mjs';
 export * from './enums/COption_NoneZ.mjs';