lightningdevkit
Version:
Lightning Development Kit
21 lines • 724 B
JavaScript
import { CommonBase } from './CommonBase.mjs';
import * as bindings from '../bindings.mjs';
/**
* This type represents a lock and MUST BE MANUALLY FREE'd!
* A read-only reference to a current ChannelMonitor.
*
* Note that this holds a mutex in [`ChainMonitor`] and may block other events until it is
* released.
*/
export class LockedChannelMonitor extends CommonBase {
/* @internal */
constructor(_dummy, ptr) {
super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
}
/** Releases this lock */
free() {
bindings.LockedChannelMonitor_free(this.ptr);
CommonBase.set_null_skip_free(this);
}
}
//# sourceMappingURL=LockedChannelMonitor.mjs.map