UNPKG

lightningdevkit

Version:
53 lines 1.79 kB
import { ChannelId } from '../structs/ChannelId.mjs'; import { CommonBase } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs'; /** * A Tuple */ export class TwoTuple_PublicKeyChannelIdZ extends CommonBase { /* @internal */ constructor(_dummy, ptr) { super(ptr, bindings.C2Tuple_PublicKeyChannelIdZ_free); } /** * */ get_a() { const ret = bindings.C2Tuple_PublicKeyChannelIdZ_get_a(this.ptr); const ret_conv = bindings.decodeUint8Array(ret); return ret_conv; } /** * */ get_b() { const ret = bindings.C2Tuple_PublicKeyChannelIdZ_get_b(this.ptr); const ret_hu_conv = new ChannelId(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } clone_ptr() { const ret = bindings.C2Tuple_PublicKeyChannelIdZ_clone_ptr(this.ptr); return ret; } /** * Creates a new tuple which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ clone() { const ret = bindings.C2Tuple_PublicKeyChannelIdZ_clone(this.ptr); const ret_hu_conv = new TwoTuple_PublicKeyChannelIdZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } /** * Creates a new C2Tuple_PublicKeyChannelIdZ from the contained elements. */ static constructor_new(a, b) { const ret = bindings.C2Tuple_PublicKeyChannelIdZ_new(bindings.encodeUint8Array(a), CommonBase.get_ptr_of(b)); const ret_hu_conv = new TwoTuple_PublicKeyChannelIdZ(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; } } //# sourceMappingURL=TwoTuple_PublicKeyChannelIdZ.mjs.map