X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=ts%2Fstructs%2FChannelMonitor.ts;h=19dced0664de59f57cdfb9e3d9f17facf6e07f05;hb=b3302d48f4dec85e9d23d9b6324d33b7c8619770;hp=2d3cac7cbcaf45afc45baee5b4ffae2e81591b57;hpb=ba1af51214a8ea2de62b84cd23b6145173c71752;p=ldk-java diff --git a/ts/structs/ChannelMonitor.ts b/ts/structs/ChannelMonitor.ts index 2d3cac7c..19dced06 100644 --- a/ts/structs/ChannelMonitor.ts +++ b/ts/structs/ChannelMonitor.ts @@ -140,7 +140,6 @@ import * as bindings from '../bindings' // TODO: figure out location // Warning: We may not free the C tuple object! ret_conv_49_arr[x] = ret_conv_49_conv; } - /* TODO 2 TwoTuple */; this.ptrs_to.add(broadcaster); this.ptrs_to.add(fee_estimator); this.ptrs_to.add(logger); @@ -177,7 +176,6 @@ import * as bindings from '../bindings' // TODO: figure out location // Warning: We may not free the C tuple object! ret_conv_49_arr[x] = ret_conv_49_conv; } - /* TODO 2 TwoTuple */; this.ptrs_to.add(broadcaster); this.ptrs_to.add(fee_estimator); this.ptrs_to.add(logger); @@ -232,4 +230,16 @@ import * as bindings from '../bindings' // TODO: figure out location return ret_hu_conv; } + public Balance[] get_claimable_balances() { + number[] ret = bindings.ChannelMonitor_get_claimable_balances(this.ptr); + Balance[] ret_conv_9_arr = new Balance[ret.length]; + for (int j = 0; j < ret.length; j++) { + number ret_conv_9 = ret[j]; + Balance ret_conv_9_hu_conv = Balance.constr_from_ptr(ret_conv_9); + ret_conv_9_hu_conv.ptrs_to.add(this); + ret_conv_9_arr[j] = ret_conv_9_hu_conv; + } + return ret_conv_9_arr; + } + }