X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FDescription.ts;fp=ts%2Fstructs%2FDescription.ts;h=f13aa51978d57bee96cdbb060ff47470b7d81794;hb=0f5027835d5a668a9b296f6d9e0fe894d3a6956d;hp=0000000000000000000000000000000000000000;hpb=a77a2856c7cd010a7b478cce793f7c9f999284d8;p=ldk-java diff --git a/ts/structs/Description.ts b/ts/structs/Description.ts new file mode 100644 index 00000000..f13aa519 --- /dev/null +++ b/ts/structs/Description.ts @@ -0,0 +1,45 @@ + + +import CommonBase from './CommonBase'; +import * as bindings from '../bindings' // TODO: figure out location + + + + export default class Description extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.Description_free(this.ptr); + } + } + public boolean eq(Description b) { + boolean ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + this.ptrs_to.add(b); + return ret; + } + + public Description clone() { + number ret = bindings.Description_clone(this.ptr); + const ret_hu_conv: Description = new Description(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public static Result_DescriptionCreationErrorZ constructor_new(String description) { + number ret = bindings.Description_new(description); + Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + public String into_inner() { + String ret = bindings.Description_into_inner(this.ptr); + return ret; + } + +}