X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FSpendableOutputDescriptor.ts;h=f0758a28c91ac6a928f63a44817883620b3c42bd;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=caf6286f85360060f8fd5a397a0f01605dade792;hpb=c45b91b3165ba0ff774d12d357188cae979574d3;p=ldk-java diff --git a/ts/structs/SpendableOutputDescriptor.ts b/ts/structs/SpendableOutputDescriptor.ts index caf6286f..f0758a28 100644 --- a/ts/structs/SpendableOutputDescriptor.ts +++ b/ts/structs/SpendableOutputDescriptor.ts @@ -57,6 +57,11 @@ export class StaticPaymentOutput extends SpendableOutputDescriptor { this.static_payment_output = static_payment_output_hu_conv; } } + public number clone_ptr() { + number ret = bindings.SpendableOutputDescriptor_clone_ptr(this.ptr); + return ret; + } + public SpendableOutputDescriptor clone() { number ret = bindings.SpendableOutputDescriptor_clone(this.ptr); SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); @@ -64,6 +69,27 @@ export class StaticPaymentOutput extends SpendableOutputDescriptor { return ret_hu_conv; } + public static SpendableOutputDescriptor constructor_static_output(OutPoint outpoint, TxOut output) { + number ret = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0 : outpoint.ptr & ~1, output.ptr); + SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static SpendableOutputDescriptor constructor_delayed_payment_output(DelayedPaymentOutputDescriptor a) { + number ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0 : a.ptr & ~1); + SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static SpendableOutputDescriptor constructor_static_payment_output(StaticPaymentOutputDescriptor a) { + number ret = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0 : a.ptr & ~1); + SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.SpendableOutputDescriptor_write(this.ptr); return ret;