X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FBestBlock.ts;h=08597ee1d22bc594842176bb4c8d2a8d5ee2b700;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=a0372035f311542530484f036ea65d341ecf0231;hpb=8b3981918227cf2c033b4b568b4040e8af05d3be;p=ldk-java diff --git a/ts/structs/BestBlock.ts b/ts/structs/BestBlock.ts index a0372035..08597ee1 100644 --- a/ts/structs/BestBlock.ts +++ b/ts/structs/BestBlock.ts @@ -18,6 +18,11 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.BestBlock_free(this.ptr); } } + public number clone_ptr() { + number ret = bindings.BestBlock_clone_ptr(this.ptr); + return ret; + } + public BestBlock clone() { number ret = bindings.BestBlock_clone(this.ptr); const ret_hu_conv: BestBlock = new BestBlock(null, ret); @@ -25,7 +30,7 @@ import * as bindings from '../bindings' // TODO: figure out location return ret_hu_conv; } - public static BestBlock constructor_from_genesis(LDKNetwork network) { + public static BestBlock constructor_from_genesis(Network network) { number ret = bindings.BestBlock_from_genesis(network); const ret_hu_conv: BestBlock = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); @@ -33,7 +38,7 @@ import * as bindings from '../bindings' // TODO: figure out location } public static BestBlock constructor_new(Uint8Array block_hash, number height) { - number ret = bindings.BestBlock_new(block_hash, height); + number ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash, 32), height); const ret_hu_conv: BestBlock = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv;