X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fbindings.ts;h=d5c6475b1f73e9cdb3183f695c251da792e26af7;hb=b52dde859c138f9257499496749d1eb89f9f6f43;hp=942649ebb7d55d07065425ca05b1d975366347f0;hpb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;p=ldk-java diff --git a/ts/bindings.ts b/ts/bindings.ts index 942649eb..d5c6475b 100644 --- a/ts/bindings.ts +++ b/ts/bindings.ts @@ -8200,6 +8200,14 @@ public static native long new_empty_slice_vec(); const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor); // debug statements here } + // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible); + export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void { + if(!isWasmInitialized) { + throw new Error("initializeWasm() must be awaited first!"); + } + const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible); + // debug statements here + } // void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg); export function PeerManager_timer_tick_occured(this_arg: number): void { if(!isWasmInitialized) {