+ // void BestBlock_free(struct LDKBestBlock this_obj);
+ export function BestBlock_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
+ export function BestBlock_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_clone(orig);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
+ export function BestBlock_from_genesis(network: Network): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_from_genesis(network);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
+ export function BestBlock_new(block_hash: Uint8Array, height: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
+ export function BestBlock_block_hash(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
+ export function BestBlock_height(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_height(this_arg);
+ return nativeResponseValue;
+ }