X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Findex.mts;h=9e6b7b101a96177c1c13957bb29b0fbd6df570d1;hb=e31bfe206b70addcb59e25a8fb47144370b2e4e8;hp=83569e01ae88626cb059d48b6485b3a012dae56c;hpb=bf08029c1ad5244b59902eada723b634dcade62d;p=ldk-java diff --git a/ts/index.mts b/ts/index.mts index 83569e01..9e6b7b10 100644 --- a/ts/index.mts +++ b/ts/index.mts @@ -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';