X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FRoute.ts;h=f6d7e14af3caa24292b875d1b7a85ee74b5b7995;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=e8d32809419fc467438833f22a9cbf6da29d564a;hpb=2f243794d7f279cdc81628a94533b70404bbe888;p=ldk-java diff --git a/ts/structs/Route.ts b/ts/structs/Route.ts index e8d32809..f6d7e14a 100644 --- a/ts/structs/Route.ts +++ b/ts/structs/Route.ts @@ -18,26 +18,26 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.Route_free(this.ptr); } } - public Route clone() { - number ret = bindings.Route_clone(this.ptr); - const ret_hu_conv: Route = new Route(null, ret); - ret_hu_conv.ptrs_to.add(this); - return ret_hu_conv; - } - public void set_paths(RouteHop[][] val) { - bindings.Route_set_paths(this.ptr, (number[][])Arrays.stream(val).map(arr_conv_12 -> (number[])Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray()); + bindings.Route_set_paths(this.ptr, Arrays.stream(val).map(arr_conv_12 -> Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray(number[]::new)).toArray(number[][]::new)); /* TODO 2 RouteHop[] */; } public static Route constructor_new(RouteHop[][] paths_arg) { - number ret = bindings.Route_new((number[][])Arrays.stream(paths_arg).map(arr_conv_12 -> (number[])Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray()); + number ret = bindings.Route_new(Arrays.stream(paths_arg).map(arr_conv_12 -> Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray(number[]::new)).toArray(number[][]::new)); const ret_hu_conv: Route = new Route(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); /* TODO 2 RouteHop[] */; return ret_hu_conv; } + public Route clone() { + number ret = bindings.Route_clone(this.ptr); + const ret_hu_conv: Route = new Route(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.Route_write(this.ptr); return ret;