Skip to content

Commit c629a01

Browse files
committed
[TS] Update auto-generated TypeScript Bindings
1 parent d1d0121 commit c629a01

File tree

277 files changed

+22964
-10724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+22964
-10724
lines changed

ts/bindings.c

Lines changed: 5160 additions & 5147 deletions
Large diffs are not rendered by default.

ts/bindings.c.body

Lines changed: 5160 additions & 5147 deletions
Large diffs are not rendered by default.

ts/bindings.mts

Lines changed: 3044 additions & 407 deletions
Large diffs are not rendered by default.

ts/index.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import { initializeWasm as bindingsInit } from './bindings.mjs';
2+
export function initializeWasm(path: string) {
3+
bindingsInit(path);
4+
}
15
export * from './structs/TxOut.mjs';
26
export * from './enums/AccessError.mjs';
37
export * from './enums/COption_NoneZ.mjs';

ts/structs/APIError.mts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor
280280
import CommonBase from './CommonBase.mjs';
281281
import * as bindings from '../bindings.mjs'
282282

283+
/**
284+
* Indicates an error on the client's part (usually some variant of attempting to use too-low or
285+
* too-high values)
286+
*/
283287
export class APIError extends CommonBase {
284288
protected constructor(_dummy: object, ptr: number) { super(ptr, bindings.APIError_free); }
285289
/* @internal */
@@ -302,48 +306,69 @@ export class APIError extends CommonBase {
302306
return ret;
303307
}
304308

309+
/**
310+
* Creates a copy of the APIError
311+
*/
305312
public clone(): APIError {
306313
const ret: number = bindings.APIError_clone(this.ptr);
307314
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
308315
CommonBase.add_ref_from(ret_hu_conv, this);
309316
return ret_hu_conv;
310317
}
311318

319+
/**
320+
* Utility method to constructs a new APIMisuseError-variant APIError
321+
*/
312322
public static constructor_apimisuse_error(err: string): APIError {
313323
const ret: number = bindings.APIError_apimisuse_error(bindings.encodeString(err));
314324
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
315325
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
316326
return ret_hu_conv;
317327
}
318328

329+
/**
330+
* Utility method to constructs a new FeeRateTooHigh-variant APIError
331+
*/
319332
public static constructor_fee_rate_too_high(err: string, feerate: number): APIError {
320333
const ret: number = bindings.APIError_fee_rate_too_high(bindings.encodeString(err), feerate);
321334
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
322335
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
323336
return ret_hu_conv;
324337
}
325338

339+
/**
340+
* Utility method to constructs a new RouteError-variant APIError
341+
*/
326342
public static constructor_route_error(err: string): APIError {
327343
const ret: number = bindings.APIError_route_error(bindings.encodeString(err));
328344
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
329345
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
330346
return ret_hu_conv;
331347
}
332348

349+
/**
350+
* Utility method to constructs a new ChannelUnavailable-variant APIError
351+
*/
333352
public static constructor_channel_unavailable(err: string): APIError {
334353
const ret: number = bindings.APIError_channel_unavailable(bindings.encodeString(err));
335354
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
336355
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
337356
return ret_hu_conv;
338357
}
339358

359+
/**
360+
* Utility method to constructs a new MonitorUpdateFailed-variant APIError
361+
*/
340362
public static constructor_monitor_update_failed(): APIError {
341363
const ret: number = bindings.APIError_monitor_update_failed();
342364
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
343365
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
344366
return ret_hu_conv;
345367
}
346368

369+
/**
370+
* Utility method to constructs a new IncompatibleShutdownScript-variant APIError
371+
*/
347372
public static constructor_incompatible_shutdown_script(script: ShutdownScript): APIError {
348373
const ret: number = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : CommonBase.get_ptr_of(script) & ~1);
349374
const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
@@ -352,7 +377,11 @@ export class APIError extends CommonBase {
352377
}
353378

354379
}
380+
/** A APIError of type APIMisuseError */
355381
export class APIError_APIMisuseError extends APIError {
382+
/**
383+
* A human-readable error message
384+
*/
356385
public err: string;
357386
/* @internal */
358387
public constructor(ptr: number) {
@@ -362,8 +391,15 @@ export class APIError_APIMisuseError extends APIError {
362391
this.err = err_conv;
363392
}
364393
}
394+
/** A APIError of type FeeRateTooHigh */
365395
export class APIError_FeeRateTooHigh extends APIError {
396+
/**
397+
* A human-readable error message
398+
*/
366399
public err: string;
400+
/**
401+
* The feerate which was too high.
402+
*/
367403
public feerate: number;
368404
/* @internal */
369405
public constructor(ptr: number) {
@@ -374,7 +410,11 @@ export class APIError_FeeRateTooHigh extends APIError {
374410
this.feerate = bindings.LDKAPIError_FeeRateTooHigh_get_feerate(ptr);
375411
}
376412
}
413+
/** A APIError of type RouteError */
377414
export class APIError_RouteError extends APIError {
415+
/**
416+
* A human-readable error message
417+
*/
378418
public err: string;
379419
/* @internal */
380420
public constructor(ptr: number) {
@@ -384,7 +424,11 @@ export class APIError_RouteError extends APIError {
384424
this.err = err_conv;
385425
}
386426
}
427+
/** A APIError of type ChannelUnavailable */
387428
export class APIError_ChannelUnavailable extends APIError {
429+
/**
430+
* A human-readable error message
431+
*/
388432
public err: string;
389433
/* @internal */
390434
public constructor(ptr: number) {
@@ -394,13 +438,18 @@ export class APIError_ChannelUnavailable extends APIError {
394438
this.err = err_conv;
395439
}
396440
}
441+
/** A APIError of type MonitorUpdateFailed */
397442
export class APIError_MonitorUpdateFailed extends APIError {
398443
/* @internal */
399444
public constructor(ptr: number) {
400445
super(null, ptr);
401446
}
402447
}
448+
/** A APIError of type IncompatibleShutdownScript */
403449
export class APIError_IncompatibleShutdownScript extends APIError {
450+
/**
451+
* The incompatible shutdown script.
452+
*/
404453
public script: ShutdownScript;
405454
/* @internal */
406455
public constructor(ptr: number) {

0 commit comments

Comments
 (0)