UNPKG

lightningdevkit

Version:
52 lines 1.86 kB
import { CommonBase } from './CommonBase.mjs'; import * as bindings from '../bindings.mjs'; /** * Server-side configuration options for JIT channels. */ export class LSPS2ServiceConfig extends CommonBase { /* @internal */ constructor(_dummy, ptr) { super(ptr, bindings.LSPS2ServiceConfig_free); } /** * Used to calculate the promise for channel parameters supplied to clients. * * Note: If this changes then old promises given out will be considered invalid. */ get_promise_secret() { const ret = bindings.LSPS2ServiceConfig_get_promise_secret(this.ptr); const ret_conv = bindings.decodeUint8Array(ret); return ret_conv; } /** * Used to calculate the promise for channel parameters supplied to clients. * * Note: If this changes then old promises given out will be considered invalid. */ set_promise_secret(val) { bindings.LSPS2ServiceConfig_set_promise_secret(this.ptr, bindings.encodeUint8Array(val)); } /** * Constructs a new LSPS2ServiceConfig given each field */ static constructor_new(promise_secret_arg) { const ret = bindings.LSPS2ServiceConfig_new(bindings.encodeUint8Array(promise_secret_arg)); const ret_hu_conv = new LSPS2ServiceConfig(null, ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; } clone_ptr() { const ret = bindings.LSPS2ServiceConfig_clone_ptr(this.ptr); return ret; } /** * Creates a copy of the LSPS2ServiceConfig */ clone() { const ret = bindings.LSPS2ServiceConfig_clone(this.ptr); const ret_hu_conv = new LSPS2ServiceConfig(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; } } //# sourceMappingURL=LSPS2ServiceConfig.mjs.map