@@ -153,7 +153,7 @@ export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): nu
153153
154154/* @internal */
155155export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
156- if (arr.length != len) { throw new Error("Expected array of length " + len + "got " + arr.length); }
156+ if (arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
157157 return arr;
158158}
159159
@@ -229,7 +229,9 @@ export function decodeString(stringPointer: number, free = true): string {
229229/* @internal */ export function getRemainingAllocationCount(): number { return 0; }
230230/* @internal */ export function debugPrintRemainingAllocs() { }
231231
232- /* @internal */
232+ /**
233+ * An error when accessing the chain via [`Access`].
234+ */
233235export enum AccessError {
234236 /**
235237 * The requested chain is unknown.
@@ -242,7 +244,9 @@ export enum AccessError {
242244
243245}
244246
245- /* @internal */
247+ /**
248+ * An enum which can either contain a or not
249+ */
246250export enum COption_NoneZ {
247251 /**
248252 * When we're in this state, this COption_NoneZ contains a
@@ -255,7 +259,9 @@ export enum COption_NoneZ {
255259
256260}
257261
258- /* @internal */
262+ /**
263+ * An error enum representing a failure to persist a channel monitor update.
264+ */
259265export enum ChannelMonitorUpdateErr {
260266 /**
261267 * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
@@ -324,7 +330,10 @@ export enum ChannelMonitorUpdateErr {
324330
325331}
326332
327- /* @internal */
333+ /**
334+ * An enum that represents the speed at which we want a transaction to confirm used for feerate
335+ * estimation.
336+ */
328337export enum ConfirmationTarget {
329338 /**
330339 * We are happy with this transaction confirming slowly when feerate drops some.
@@ -341,7 +350,9 @@ export enum ConfirmationTarget {
341350
342351}
343352
344- /* @internal */
353+ /**
354+ * Errors that may occur when constructing a new `RawInvoice` or `Invoice`
355+ */
345356export enum CreationError {
346357 /**
347358 * The supplied description string was longer than 639 __bytes__ (see [`Description::new(...)`](./struct.Description.html#method.new))
@@ -369,7 +380,9 @@ export enum CreationError {
369380
370381}
371382
372- /* @internal */
383+ /**
384+ * Enum representing the crypto currencies (or networks) supported by this library
385+ */
373386export enum Currency {
374387 /**
375388 * Bitcoin mainnet
@@ -394,7 +407,9 @@ export enum Currency {
394407
395408}
396409
397- /* @internal */
410+ /**
411+ * Represents an IO Error. Note that some information is lost in the conversion from Rust.
412+ */
398413export enum IOError {
399414 LDKIOError_NotFound,
400415 LDKIOError_PermissionDenied,
@@ -417,7 +432,9 @@ export enum IOError {
417432
418433}
419434
420- /* @internal */
435+ /**
436+ * An enum representing the available verbosity levels of the logger.
437+ */
421438export enum Level {
422439 /**
423440 * Designates extremely verbose information, including gossip-induced messages
@@ -446,7 +463,9 @@ export enum Level {
446463
447464}
448465
449- /* @internal */
466+ /**
467+ * An enum representing the possible Bitcoin or test networks which we can run on
468+ */
450469export enum Network {
451470 /**
452471 * The main Bitcoin blockchain.
@@ -467,7 +486,10 @@ export enum Network {
467486
468487}
469488
470- /* @internal */
489+ /**
490+ * Specifies the recipient of an invoice, to indicate to [`KeysInterface::sign_invoice`] what node
491+ * secret key should be used to sign the invoice.
492+ */
471493export enum Recipient {
472494 /**
473495 * The invoice should be signed with the local node secret key.
@@ -483,7 +505,9 @@ export enum Recipient {
483505
484506}
485507
486- /* @internal */
508+ /**
509+ * Represents an error returned from libsecp256k1 during validation of some secp256k1 data
510+ */
487511export enum Secp256k1Error {
488512 /**
489513 * Signature failed verification
@@ -532,7 +556,10 @@ export enum Secp256k1Error {
532556
533557}
534558
535- /* @internal */
559+ /**
560+ * Errors that may occur when converting a `RawInvoice` to an `Invoice`. They relate to the
561+ * requirements sections in BOLT #11
562+ */
536563export enum SemanticError {
537564 /**
538565 * The invoice is missing the mandatory payment hash
@@ -578,7 +605,9 @@ export enum SemanticError {
578605
579606}
580607
581- /* @internal */
608+ /**
609+ * SI prefixes for the human readable part
610+ */
582611export enum SiPrefix {
583612 /**
584613 * 10^-3
0 commit comments