@secondts/bark-react-native 0.2.0-beta.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/cpp/generated/bark.cpp +1885 -1182
- package/cpp/generated/bark.hpp +63 -0
- package/lib/commonjs/WalletNotifications.js +82 -0
- package/lib/commonjs/WalletNotifications.js.map +1 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +1540 -442
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/commonjs/index.js +13 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/WalletNotifications.js +77 -0
- package/lib/module/WalletNotifications.js.map +1 -0
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +1539 -442
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/WalletNotifications.d.ts +41 -0
- package/lib/typescript/commonjs/src/WalletNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +147 -84
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +822 -185
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/WalletNotifications.d.ts +41 -0
- package/lib/typescript/module/src/WalletNotifications.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +147 -84
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +822 -185
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/WalletNotifications.ts +86 -0
- package/src/generated/bark-ffi.ts +305 -253
- package/src/generated/bark.ts +3946 -1581
- package/src/index.tsx +3 -0
|
@@ -340,6 +340,14 @@ export type Config = {
|
|
|
340
340
|
* Confirmations required before considering a round tx fully confirmed
|
|
341
341
|
*/
|
|
342
342
|
roundTxRequiredConfirmations: /*u32*/ number | undefined;
|
|
343
|
+
/**
|
|
344
|
+
* Fast sync interval for daemon tasks (lightning sync) in seconds
|
|
345
|
+
*/
|
|
346
|
+
daemonFastSyncIntervalSecs: /*u64*/ bigint | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Slow sync interval for daemon tasks (onchain, exits, boards, etc.) in seconds
|
|
349
|
+
*/
|
|
350
|
+
daemonSlowSyncIntervalSecs: /*u64*/ bigint | undefined;
|
|
343
351
|
};
|
|
344
352
|
/**
|
|
345
353
|
* Generated factory for {@link Config} record objects.
|
|
@@ -574,6 +582,48 @@ export declare const ExitVtxo: Readonly<{
|
|
|
574
582
|
*/
|
|
575
583
|
defaults: () => Partial<ExitVtxo>;
|
|
576
584
|
}>;
|
|
585
|
+
/**
|
|
586
|
+
* Result of a fee estimation
|
|
587
|
+
*/
|
|
588
|
+
export type FeeEstimate = {
|
|
589
|
+
/**
|
|
590
|
+
* The total amount including fees in sats
|
|
591
|
+
*/
|
|
592
|
+
grossAmountSats: bigint;
|
|
593
|
+
/**
|
|
594
|
+
* The fee amount charged by the server in sats
|
|
595
|
+
*/
|
|
596
|
+
feeSats: bigint;
|
|
597
|
+
/**
|
|
598
|
+
* The amount excluding fees in sats.
|
|
599
|
+
* For sends, this is the amount the recipient receives.
|
|
600
|
+
* For receives, this is the amount the user gets.
|
|
601
|
+
*/
|
|
602
|
+
netAmountSats: bigint;
|
|
603
|
+
/**
|
|
604
|
+
* The VTXO IDs that would be spent for this operation
|
|
605
|
+
*/
|
|
606
|
+
vtxosSpent: Array<string>;
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Generated factory for {@link FeeEstimate} record objects.
|
|
610
|
+
*/
|
|
611
|
+
export declare const FeeEstimate: Readonly<{
|
|
612
|
+
/**
|
|
613
|
+
* Create a frozen instance of {@link FeeEstimate}, with defaults specified
|
|
614
|
+
* in Rust, in the {@link bark} crate.
|
|
615
|
+
*/
|
|
616
|
+
create: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
|
|
617
|
+
/**
|
|
618
|
+
* Create a frozen instance of {@link FeeEstimate}, with defaults specified
|
|
619
|
+
* in Rust, in the {@link bark} crate.
|
|
620
|
+
*/
|
|
621
|
+
new: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
|
|
622
|
+
/**
|
|
623
|
+
* Defaults specified in the {@link bark} crate.
|
|
624
|
+
*/
|
|
625
|
+
defaults: () => Partial<FeeEstimate>;
|
|
626
|
+
}>;
|
|
577
627
|
/**
|
|
578
628
|
* Result of creating a BOLT11 invoice
|
|
579
629
|
*/
|
|
@@ -2245,6 +2295,206 @@ export declare enum Network {
|
|
|
2245
2295
|
Signet = 2,
|
|
2246
2296
|
Regtest = 3
|
|
2247
2297
|
}
|
|
2298
|
+
export declare enum WalletNotification_Tags {
|
|
2299
|
+
MovementCreated = "MovementCreated",
|
|
2300
|
+
MovementUpdated = "MovementUpdated",
|
|
2301
|
+
ChannelLagging = "ChannelLagging"
|
|
2302
|
+
}
|
|
2303
|
+
/**
|
|
2304
|
+
* A notification event from the wallet
|
|
2305
|
+
*/
|
|
2306
|
+
export declare const WalletNotification: Readonly<{
|
|
2307
|
+
instanceOf: (obj: any) => obj is WalletNotification;
|
|
2308
|
+
MovementCreated: {
|
|
2309
|
+
new (inner: {
|
|
2310
|
+
movement: Movement;
|
|
2311
|
+
}): {
|
|
2312
|
+
readonly tag: WalletNotification_Tags.MovementCreated;
|
|
2313
|
+
readonly inner: Readonly<{
|
|
2314
|
+
movement: Movement;
|
|
2315
|
+
}>;
|
|
2316
|
+
/**
|
|
2317
|
+
* @private
|
|
2318
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2319
|
+
*/
|
|
2320
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2321
|
+
};
|
|
2322
|
+
new(inner: {
|
|
2323
|
+
movement: Movement;
|
|
2324
|
+
}): {
|
|
2325
|
+
readonly tag: WalletNotification_Tags.MovementCreated;
|
|
2326
|
+
readonly inner: Readonly<{
|
|
2327
|
+
movement: Movement;
|
|
2328
|
+
}>;
|
|
2329
|
+
/**
|
|
2330
|
+
* @private
|
|
2331
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2332
|
+
*/
|
|
2333
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2334
|
+
};
|
|
2335
|
+
instanceOf(obj: any): obj is {
|
|
2336
|
+
readonly tag: WalletNotification_Tags.MovementCreated;
|
|
2337
|
+
readonly inner: Readonly<{
|
|
2338
|
+
movement: Movement;
|
|
2339
|
+
}>;
|
|
2340
|
+
/**
|
|
2341
|
+
* @private
|
|
2342
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2343
|
+
*/
|
|
2344
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2345
|
+
};
|
|
2346
|
+
};
|
|
2347
|
+
MovementUpdated: {
|
|
2348
|
+
new (inner: {
|
|
2349
|
+
movement: Movement;
|
|
2350
|
+
}): {
|
|
2351
|
+
readonly tag: WalletNotification_Tags.MovementUpdated;
|
|
2352
|
+
readonly inner: Readonly<{
|
|
2353
|
+
movement: Movement;
|
|
2354
|
+
}>;
|
|
2355
|
+
/**
|
|
2356
|
+
* @private
|
|
2357
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2358
|
+
*/
|
|
2359
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2360
|
+
};
|
|
2361
|
+
new(inner: {
|
|
2362
|
+
movement: Movement;
|
|
2363
|
+
}): {
|
|
2364
|
+
readonly tag: WalletNotification_Tags.MovementUpdated;
|
|
2365
|
+
readonly inner: Readonly<{
|
|
2366
|
+
movement: Movement;
|
|
2367
|
+
}>;
|
|
2368
|
+
/**
|
|
2369
|
+
* @private
|
|
2370
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2371
|
+
*/
|
|
2372
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2373
|
+
};
|
|
2374
|
+
instanceOf(obj: any): obj is {
|
|
2375
|
+
readonly tag: WalletNotification_Tags.MovementUpdated;
|
|
2376
|
+
readonly inner: Readonly<{
|
|
2377
|
+
movement: Movement;
|
|
2378
|
+
}>;
|
|
2379
|
+
/**
|
|
2380
|
+
* @private
|
|
2381
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2382
|
+
*/
|
|
2383
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2384
|
+
};
|
|
2385
|
+
};
|
|
2386
|
+
ChannelLagging: {
|
|
2387
|
+
new (): {
|
|
2388
|
+
readonly tag: WalletNotification_Tags.ChannelLagging;
|
|
2389
|
+
/**
|
|
2390
|
+
* @private
|
|
2391
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2392
|
+
*/
|
|
2393
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2394
|
+
};
|
|
2395
|
+
new(): {
|
|
2396
|
+
readonly tag: WalletNotification_Tags.ChannelLagging;
|
|
2397
|
+
/**
|
|
2398
|
+
* @private
|
|
2399
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2400
|
+
*/
|
|
2401
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2402
|
+
};
|
|
2403
|
+
instanceOf(obj: any): obj is {
|
|
2404
|
+
readonly tag: WalletNotification_Tags.ChannelLagging;
|
|
2405
|
+
/**
|
|
2406
|
+
* @private
|
|
2407
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2408
|
+
*/
|
|
2409
|
+
readonly [uniffiTypeNameSymbol]: "WalletNotification";
|
|
2410
|
+
};
|
|
2411
|
+
};
|
|
2412
|
+
}>;
|
|
2413
|
+
/**
|
|
2414
|
+
* A notification event from the wallet
|
|
2415
|
+
*/
|
|
2416
|
+
export type WalletNotification = InstanceType<(typeof WalletNotification)[keyof Omit<typeof WalletNotification, "instanceOf">]>;
|
|
2417
|
+
/**
|
|
2418
|
+
* Pull-based handle for consuming wallet notifications.
|
|
2419
|
+
*
|
|
2420
|
+
* Obtain via `Wallet.notifications()`. Call `next_notification()` in a loop
|
|
2421
|
+
* to receive events. Call `cancel_next_notification_wait()` to unblock a
|
|
2422
|
+
* pending wait without destroying the underlying stream.
|
|
2423
|
+
*
|
|
2424
|
+
* Each call to `Wallet.notifications()` creates an independent stream backed
|
|
2425
|
+
* by a new broadcast receiver. Only one consumer loop per holder is assumed.
|
|
2426
|
+
*/
|
|
2427
|
+
export interface NotificationHolderInterface {
|
|
2428
|
+
/**
|
|
2429
|
+
* Cancel the currently pending `next_notification()` wait.
|
|
2430
|
+
*
|
|
2431
|
+
* Causes a blocked `next_notification()` to return null.
|
|
2432
|
+
* Has no effect when no wait is active.
|
|
2433
|
+
* Does NOT destroy the underlying stream; subsequent calls to
|
|
2434
|
+
* `next_notification()` will still work.
|
|
2435
|
+
*/
|
|
2436
|
+
cancelNextNotificationWait(): void;
|
|
2437
|
+
/**
|
|
2438
|
+
* Wait for the next notification.
|
|
2439
|
+
*
|
|
2440
|
+
* Returns null if the wait was cancelled via `cancel_next_notification_wait()`
|
|
2441
|
+
* or if the wallet's notification source was shut down permanently.
|
|
2442
|
+
*
|
|
2443
|
+
* After a cancellation this method can be called again normally — the
|
|
2444
|
+
* underlying stream is preserved and a fresh cancel channel is set up on
|
|
2445
|
+
* every entry.
|
|
2446
|
+
*
|
|
2447
|
+
* Throws `BarkError.Internal` if called concurrently on the same holder.
|
|
2448
|
+
*/
|
|
2449
|
+
nextNotification(asyncOpts_?: {
|
|
2450
|
+
signal: AbortSignal;
|
|
2451
|
+
}): Promise<WalletNotification | undefined>;
|
|
2452
|
+
}
|
|
2453
|
+
/**
|
|
2454
|
+
* Pull-based handle for consuming wallet notifications.
|
|
2455
|
+
*
|
|
2456
|
+
* Obtain via `Wallet.notifications()`. Call `next_notification()` in a loop
|
|
2457
|
+
* to receive events. Call `cancel_next_notification_wait()` to unblock a
|
|
2458
|
+
* pending wait without destroying the underlying stream.
|
|
2459
|
+
*
|
|
2460
|
+
* Each call to `Wallet.notifications()` creates an independent stream backed
|
|
2461
|
+
* by a new broadcast receiver. Only one consumer loop per holder is assumed.
|
|
2462
|
+
*/
|
|
2463
|
+
export declare class NotificationHolder extends UniffiAbstractObject implements NotificationHolderInterface {
|
|
2464
|
+
readonly [uniffiTypeNameSymbol] = "NotificationHolder";
|
|
2465
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
2466
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
2467
|
+
private constructor();
|
|
2468
|
+
/**
|
|
2469
|
+
* Cancel the currently pending `next_notification()` wait.
|
|
2470
|
+
*
|
|
2471
|
+
* Causes a blocked `next_notification()` to return null.
|
|
2472
|
+
* Has no effect when no wait is active.
|
|
2473
|
+
* Does NOT destroy the underlying stream; subsequent calls to
|
|
2474
|
+
* `next_notification()` will still work.
|
|
2475
|
+
*/
|
|
2476
|
+
cancelNextNotificationWait(): void;
|
|
2477
|
+
/**
|
|
2478
|
+
* Wait for the next notification.
|
|
2479
|
+
*
|
|
2480
|
+
* Returns null if the wait was cancelled via `cancel_next_notification_wait()`
|
|
2481
|
+
* or if the wallet's notification source was shut down permanently.
|
|
2482
|
+
*
|
|
2483
|
+
* After a cancellation this method can be called again normally — the
|
|
2484
|
+
* underlying stream is preserved and a fresh cancel channel is set up on
|
|
2485
|
+
* every entry.
|
|
2486
|
+
*
|
|
2487
|
+
* Throws `BarkError.Internal` if called concurrently on the same holder.
|
|
2488
|
+
*/
|
|
2489
|
+
nextNotification(asyncOpts_?: {
|
|
2490
|
+
signal: AbortSignal;
|
|
2491
|
+
}): Promise<WalletNotification | undefined>;
|
|
2492
|
+
/**
|
|
2493
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2494
|
+
*/
|
|
2495
|
+
uniffiDestroy(): void;
|
|
2496
|
+
static instanceOf(obj: any): obj is NotificationHolder;
|
|
2497
|
+
}
|
|
2248
2498
|
/**
|
|
2249
2499
|
* Onchain Bitcoin wallet for boarding and exits
|
|
2250
2500
|
*
|
|
@@ -2256,21 +2506,29 @@ export interface OnchainWalletInterface {
|
|
|
2256
2506
|
/**
|
|
2257
2507
|
* Get the onchain wallet balance
|
|
2258
2508
|
*/
|
|
2259
|
-
balance(
|
|
2509
|
+
balance(asyncOpts_?: {
|
|
2510
|
+
signal: AbortSignal;
|
|
2511
|
+
}): Promise<OnchainBalance>;
|
|
2260
2512
|
/**
|
|
2261
2513
|
* Generate a new Bitcoin address
|
|
2262
2514
|
*/
|
|
2263
|
-
newAddress(
|
|
2515
|
+
newAddress(asyncOpts_?: {
|
|
2516
|
+
signal: AbortSignal;
|
|
2517
|
+
}): Promise<string>;
|
|
2264
2518
|
/**
|
|
2265
2519
|
* Send Bitcoin to an address
|
|
2266
2520
|
* Returns the transaction ID
|
|
2267
2521
|
*/
|
|
2268
|
-
send(address: string, amountSats: bigint, feeRateSatPerVb: bigint
|
|
2522
|
+
send(address: string, amountSats: bigint, feeRateSatPerVb: bigint, asyncOpts_?: {
|
|
2523
|
+
signal: AbortSignal;
|
|
2524
|
+
}): Promise<string>;
|
|
2269
2525
|
/**
|
|
2270
2526
|
* Sync the onchain wallet with the blockchain
|
|
2271
2527
|
* Returns the amount synced in satoshis
|
|
2272
2528
|
*/
|
|
2273
|
-
sync(
|
|
2529
|
+
sync(asyncOpts_?: {
|
|
2530
|
+
signal: AbortSignal;
|
|
2531
|
+
}): Promise</*u64*/ bigint>;
|
|
2274
2532
|
}
|
|
2275
2533
|
/**
|
|
2276
2534
|
* Onchain Bitcoin wallet for boarding and exits
|
|
@@ -2298,25 +2556,35 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
|
|
|
2298
2556
|
* The wallet uses BDK for onchain operations
|
|
2299
2557
|
* and the same chain source configuration as the Bark wallet (esplora_address or bitcoind_*).
|
|
2300
2558
|
*/
|
|
2301
|
-
static default_(mnemonic: string, config: Config, datadir: string
|
|
2559
|
+
static default_(mnemonic: string, config: Config, datadir: string, asyncOpts_?: {
|
|
2560
|
+
signal: AbortSignal;
|
|
2561
|
+
}): Promise<OnchainWalletInterface>;
|
|
2302
2562
|
/**
|
|
2303
2563
|
* Get the onchain wallet balance
|
|
2304
2564
|
*/
|
|
2305
|
-
balance(
|
|
2565
|
+
balance(asyncOpts_?: {
|
|
2566
|
+
signal: AbortSignal;
|
|
2567
|
+
}): Promise<OnchainBalance>;
|
|
2306
2568
|
/**
|
|
2307
2569
|
* Generate a new Bitcoin address
|
|
2308
2570
|
*/
|
|
2309
|
-
newAddress(
|
|
2571
|
+
newAddress(asyncOpts_?: {
|
|
2572
|
+
signal: AbortSignal;
|
|
2573
|
+
}): Promise<string>;
|
|
2310
2574
|
/**
|
|
2311
2575
|
* Send Bitcoin to an address
|
|
2312
2576
|
* Returns the transaction ID
|
|
2313
2577
|
*/
|
|
2314
|
-
send(address: string, amountSats: bigint, feeRateSatPerVb: bigint
|
|
2578
|
+
send(address: string, amountSats: bigint, feeRateSatPerVb: bigint, asyncOpts_?: {
|
|
2579
|
+
signal: AbortSignal;
|
|
2580
|
+
}): Promise<string>;
|
|
2315
2581
|
/**
|
|
2316
2582
|
* Sync the onchain wallet with the blockchain
|
|
2317
2583
|
* Returns the amount synced in satoshis
|
|
2318
2584
|
*/
|
|
2319
|
-
sync(
|
|
2585
|
+
sync(asyncOpts_?: {
|
|
2586
|
+
signal: AbortSignal;
|
|
2587
|
+
}): Promise</*u64*/ bigint>;
|
|
2320
2588
|
/**
|
|
2321
2589
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2322
2590
|
*/
|
|
@@ -2332,25 +2600,39 @@ export interface WalletInterface {
|
|
|
2332
2600
|
*
|
|
2333
2601
|
* Returns null if no exits or any exit has undetermined claimability.
|
|
2334
2602
|
*/
|
|
2335
|
-
allExitsClaimableAtHeight(
|
|
2603
|
+
allExitsClaimableAtHeight(asyncOpts_?: {
|
|
2604
|
+
signal: AbortSignal;
|
|
2605
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2336
2606
|
/**
|
|
2337
2607
|
* Get all VTXOs (including spent)
|
|
2338
2608
|
*/
|
|
2339
|
-
allVtxos(
|
|
2609
|
+
allVtxos(asyncOpts_?: {
|
|
2610
|
+
signal: AbortSignal;
|
|
2611
|
+
}): Promise<Array<Vtxo>>;
|
|
2340
2612
|
/**
|
|
2341
2613
|
* Get Ark server info (null if not connected)
|
|
2342
2614
|
*/
|
|
2343
|
-
arkInfo(
|
|
2344
|
-
|
|
2615
|
+
arkInfo(asyncOpts_?: {
|
|
2616
|
+
signal: AbortSignal;
|
|
2617
|
+
}): Promise<ArkInfo | undefined>;
|
|
2618
|
+
balance(asyncOpts_?: {
|
|
2619
|
+
signal: AbortSignal;
|
|
2620
|
+
}): Promise<Balance>;
|
|
2345
2621
|
/**
|
|
2346
2622
|
* Board all funds from onchain wallet into Ark
|
|
2347
2623
|
*/
|
|
2348
|
-
boardAll(onchainWallet: OnchainWalletInterface
|
|
2624
|
+
boardAll(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
2625
|
+
signal: AbortSignal;
|
|
2626
|
+
}): Promise<PendingBoard>;
|
|
2349
2627
|
/**
|
|
2350
2628
|
* Board a specific amount from onchain wallet into Ark
|
|
2351
2629
|
*/
|
|
2352
|
-
boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint
|
|
2353
|
-
|
|
2630
|
+
boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint, asyncOpts_?: {
|
|
2631
|
+
signal: AbortSignal;
|
|
2632
|
+
}): Promise<PendingBoard>;
|
|
2633
|
+
bolt11Invoice(amountSats: bigint, asyncOpts_?: {
|
|
2634
|
+
signal: AbortSignal;
|
|
2635
|
+
}): Promise<LightningInvoice>;
|
|
2354
2636
|
/**
|
|
2355
2637
|
* Broadcast a signed transaction to the Bitcoin network
|
|
2356
2638
|
*
|
|
@@ -2363,15 +2645,21 @@ export interface WalletInterface {
|
|
|
2363
2645
|
*
|
|
2364
2646
|
* Returns the transaction ID (txid) of the broadcasted transaction
|
|
2365
2647
|
*/
|
|
2366
|
-
broadcastTx(txHex: string
|
|
2648
|
+
broadcastTx(txHex: string, asyncOpts_?: {
|
|
2649
|
+
signal: AbortSignal;
|
|
2650
|
+
}): Promise<string>;
|
|
2367
2651
|
/**
|
|
2368
2652
|
* Cancel all pending rounds
|
|
2369
2653
|
*/
|
|
2370
|
-
cancelAllPendingRounds(
|
|
2654
|
+
cancelAllPendingRounds(asyncOpts_?: {
|
|
2655
|
+
signal: AbortSignal;
|
|
2656
|
+
}): Promise<void>;
|
|
2371
2657
|
/**
|
|
2372
2658
|
* Cancel a specific pending round
|
|
2373
2659
|
*/
|
|
2374
|
-
cancelPendingRound(roundId: number
|
|
2660
|
+
cancelPendingRound(roundId: number, asyncOpts_?: {
|
|
2661
|
+
signal: AbortSignal;
|
|
2662
|
+
}): Promise<void>;
|
|
2375
2663
|
/**
|
|
2376
2664
|
* Check lightning payment status by payment hash
|
|
2377
2665
|
*
|
|
@@ -2382,15 +2670,21 @@ export interface WalletInterface {
|
|
|
2382
2670
|
*
|
|
2383
2671
|
* Returns the preimage if payment is successful, null if still pending
|
|
2384
2672
|
*/
|
|
2385
|
-
checkLightningPayment(paymentHash: string, wait: boolean
|
|
2673
|
+
checkLightningPayment(paymentHash: string, wait: boolean, asyncOpts_?: {
|
|
2674
|
+
signal: AbortSignal;
|
|
2675
|
+
}): Promise<string | undefined>;
|
|
2386
2676
|
/**
|
|
2387
2677
|
* Get claimable lightning receive balance
|
|
2388
2678
|
*/
|
|
2389
|
-
claimableLightningReceiveBalanceSats(
|
|
2679
|
+
claimableLightningReceiveBalanceSats(asyncOpts_?: {
|
|
2680
|
+
signal: AbortSignal;
|
|
2681
|
+
}): Promise</*u64*/ bigint>;
|
|
2390
2682
|
/**
|
|
2391
2683
|
* Get wallet config
|
|
2392
2684
|
*/
|
|
2393
|
-
config(
|
|
2685
|
+
config(asyncOpts_?: {
|
|
2686
|
+
signal: AbortSignal;
|
|
2687
|
+
}): Promise<Config>;
|
|
2394
2688
|
/**
|
|
2395
2689
|
* Drain claimable exits to an address
|
|
2396
2690
|
*
|
|
@@ -2403,37 +2697,49 @@ export interface WalletInterface {
|
|
|
2403
2697
|
* * `address` - Bitcoin address to send claimed funds to
|
|
2404
2698
|
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2405
2699
|
*/
|
|
2406
|
-
drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined
|
|
2700
|
+
drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
2701
|
+
signal: AbortSignal;
|
|
2702
|
+
}): Promise<ExitClaimTransaction>;
|
|
2407
2703
|
/**
|
|
2408
2704
|
* Estimate the fee for a board operation
|
|
2409
2705
|
*
|
|
2410
2706
|
* # Arguments
|
|
2411
2707
|
*
|
|
2412
2708
|
* * `amount_sats` - Amount to board in sats
|
|
2413
|
-
*
|
|
2414
|
-
* Returns the estimated fee in sats
|
|
2415
2709
|
*/
|
|
2416
|
-
estimateBoardFee(amountSats: bigint
|
|
2710
|
+
estimateBoardFee(amountSats: bigint, asyncOpts_?: {
|
|
2711
|
+
signal: AbortSignal;
|
|
2712
|
+
}): Promise<FeeEstimate>;
|
|
2417
2713
|
/**
|
|
2418
2714
|
* Estimate the fee for a lightning receive
|
|
2419
2715
|
*
|
|
2420
2716
|
* # Arguments
|
|
2421
2717
|
*
|
|
2422
2718
|
* * `amount_sats` - Amount to receive in sats
|
|
2423
|
-
*
|
|
2424
|
-
* Returns the estimated fee in sats
|
|
2425
2719
|
*/
|
|
2426
|
-
estimateLightningReceiveFee(amountSats: bigint
|
|
2720
|
+
estimateLightningReceiveFee(amountSats: bigint, asyncOpts_?: {
|
|
2721
|
+
signal: AbortSignal;
|
|
2722
|
+
}): Promise<FeeEstimate>;
|
|
2427
2723
|
/**
|
|
2428
2724
|
* Estimate the fee for a lightning send
|
|
2429
2725
|
*
|
|
2430
2726
|
* # Arguments
|
|
2431
2727
|
*
|
|
2432
2728
|
* * `amount_sats` - Amount to send in sats
|
|
2729
|
+
*/
|
|
2730
|
+
estimateLightningSendFee(amountSats: bigint, asyncOpts_?: {
|
|
2731
|
+
signal: AbortSignal;
|
|
2732
|
+
}): Promise<FeeEstimate>;
|
|
2733
|
+
/**
|
|
2734
|
+
* Estimate the fee for offboarding all spendable VTXOs
|
|
2735
|
+
*
|
|
2736
|
+
* # Arguments
|
|
2433
2737
|
*
|
|
2434
|
-
*
|
|
2738
|
+
* * `address` - Destination address for the offboard
|
|
2435
2739
|
*/
|
|
2436
|
-
|
|
2740
|
+
estimateOffboardAllFee(address: string, asyncOpts_?: {
|
|
2741
|
+
signal: AbortSignal;
|
|
2742
|
+
}): Promise<FeeEstimate>;
|
|
2437
2743
|
/**
|
|
2438
2744
|
* Estimate the fee for an offboard operation
|
|
2439
2745
|
*
|
|
@@ -2441,20 +2747,20 @@ export interface WalletInterface {
|
|
|
2441
2747
|
*
|
|
2442
2748
|
* * `address` - Destination address for the offboard
|
|
2443
2749
|
* * `vtxo_ids` - VTXOs to offboard
|
|
2444
|
-
*
|
|
2445
|
-
* Returns the estimated fee in sats
|
|
2446
2750
|
*/
|
|
2447
|
-
estimateOffboardFee(address: string, vtxoIds: Array<string
|
|
2751
|
+
estimateOffboardFee(address: string, vtxoIds: Array<string>, asyncOpts_?: {
|
|
2752
|
+
signal: AbortSignal;
|
|
2753
|
+
}): Promise<FeeEstimate>;
|
|
2448
2754
|
/**
|
|
2449
2755
|
* Estimate the fee for a refresh operation
|
|
2450
2756
|
*
|
|
2451
2757
|
* # Arguments
|
|
2452
2758
|
*
|
|
2453
2759
|
* * `vtxo_ids` - VTXOs to refresh
|
|
2454
|
-
*
|
|
2455
|
-
* Returns the estimated fee in sats
|
|
2456
2760
|
*/
|
|
2457
|
-
estimateRefreshFee(vtxoIds: Array<string
|
|
2761
|
+
estimateRefreshFee(vtxoIds: Array<string>, asyncOpts_?: {
|
|
2762
|
+
signal: AbortSignal;
|
|
2763
|
+
}): Promise<FeeEstimate>;
|
|
2458
2764
|
/**
|
|
2459
2765
|
* Estimate the fee for a send onchain operation
|
|
2460
2766
|
*
|
|
@@ -2462,10 +2768,10 @@ export interface WalletInterface {
|
|
|
2462
2768
|
*
|
|
2463
2769
|
* * `address` - Destination address
|
|
2464
2770
|
* * `amount_sats` - Amount to send in sats
|
|
2465
|
-
*
|
|
2466
|
-
* Returns the estimated fee in sats
|
|
2467
2771
|
*/
|
|
2468
|
-
estimateSendOnchainFee(address: string, amountSats: bigint
|
|
2772
|
+
estimateSendOnchainFee(address: string, amountSats: bigint, asyncOpts_?: {
|
|
2773
|
+
signal: AbortSignal;
|
|
2774
|
+
}): Promise<FeeEstimate>;
|
|
2469
2775
|
/**
|
|
2470
2776
|
* Get the wallet's BIP32 fingerprint
|
|
2471
2777
|
*/
|
|
@@ -2481,44 +2787,73 @@ export interface WalletInterface {
|
|
|
2481
2787
|
* * `include_history` - Whether to include full state machine history
|
|
2482
2788
|
* * `include_transactions` - Whether to include transaction details
|
|
2483
2789
|
*/
|
|
2484
|
-
getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean
|
|
2790
|
+
getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean, asyncOpts_?: {
|
|
2791
|
+
signal: AbortSignal;
|
|
2792
|
+
}): Promise<ExitTransactionStatus | undefined>;
|
|
2485
2793
|
/**
|
|
2486
2794
|
* Get all VTXOs currently in exit process
|
|
2487
2795
|
*/
|
|
2488
|
-
getExitVtxos(
|
|
2796
|
+
getExitVtxos(asyncOpts_?: {
|
|
2797
|
+
signal: AbortSignal;
|
|
2798
|
+
}): Promise<Array<ExitVtxo>>;
|
|
2489
2799
|
/**
|
|
2490
2800
|
* Get VTXOs expiring within threshold blocks
|
|
2491
2801
|
*/
|
|
2492
|
-
getExpiringVtxos(thresholdBlocks: number
|
|
2802
|
+
getExpiringVtxos(thresholdBlocks: number, asyncOpts_?: {
|
|
2803
|
+
signal: AbortSignal;
|
|
2804
|
+
}): Promise<Array<Vtxo>>;
|
|
2493
2805
|
/**
|
|
2494
2806
|
* Get the block height of the first expiring VTXO
|
|
2495
2807
|
*
|
|
2496
2808
|
* Returns null if there are no spendable VTXOs.
|
|
2497
2809
|
*/
|
|
2498
|
-
getFirstExpiringVtxoBlockheight(
|
|
2810
|
+
getFirstExpiringVtxoBlockheight(asyncOpts_?: {
|
|
2811
|
+
signal: AbortSignal;
|
|
2812
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2499
2813
|
/**
|
|
2500
2814
|
* Get the next block height when a refresh should be performed
|
|
2501
2815
|
*
|
|
2502
2816
|
* This is calculated as the first expiring VTXO height minus the refresh threshold.
|
|
2503
2817
|
* Returns null if there are no VTXOs to refresh.
|
|
2504
2818
|
*/
|
|
2505
|
-
getNextRequiredRefreshBlockheight(
|
|
2819
|
+
getNextRequiredRefreshBlockheight(asyncOpts_?: {
|
|
2820
|
+
signal: AbortSignal;
|
|
2821
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2506
2822
|
/**
|
|
2507
2823
|
* Get a specific VTXO by ID
|
|
2508
2824
|
*/
|
|
2509
|
-
getVtxoById(vtxoId: string
|
|
2825
|
+
getVtxoById(vtxoId: string, asyncOpts_?: {
|
|
2826
|
+
signal: AbortSignal;
|
|
2827
|
+
}): Promise<Vtxo>;
|
|
2510
2828
|
/**
|
|
2511
2829
|
* Get VTXOs that should be refreshed
|
|
2512
2830
|
*/
|
|
2513
|
-
getVtxosToRefresh(
|
|
2831
|
+
getVtxosToRefresh(asyncOpts_?: {
|
|
2832
|
+
signal: AbortSignal;
|
|
2833
|
+
}): Promise<Array<Vtxo>>;
|
|
2514
2834
|
/**
|
|
2515
2835
|
* Check if any exits are pending
|
|
2516
2836
|
*/
|
|
2517
|
-
hasPendingExits(
|
|
2837
|
+
hasPendingExits(asyncOpts_?: {
|
|
2838
|
+
signal: AbortSignal;
|
|
2839
|
+
}): Promise<boolean>;
|
|
2518
2840
|
/**
|
|
2519
2841
|
* Get all wallet movements (transaction history)
|
|
2520
2842
|
*/
|
|
2521
|
-
history(
|
|
2843
|
+
history(asyncOpts_?: {
|
|
2844
|
+
signal: AbortSignal;
|
|
2845
|
+
}): Promise<Array<Movement>>;
|
|
2846
|
+
/**
|
|
2847
|
+
* Get wallet movements filtered by payment method
|
|
2848
|
+
*
|
|
2849
|
+
* # Arguments
|
|
2850
|
+
*
|
|
2851
|
+
* * `payment_method_type` - Type (e.g. "ark", "bitcoin", "invoice", "offer", "lightning_address", "custom")
|
|
2852
|
+
* * `payment_method_value` - Value (e.g. an address or invoice string)
|
|
2853
|
+
*/
|
|
2854
|
+
historyByPaymentMethod(paymentMethodType: string, paymentMethodValue: string, asyncOpts_?: {
|
|
2855
|
+
signal: AbortSignal;
|
|
2856
|
+
}): Promise<Array<Movement>>;
|
|
2522
2857
|
/**
|
|
2523
2858
|
* Import a serialized VTXO into the wallet
|
|
2524
2859
|
*
|
|
@@ -2529,7 +2864,9 @@ export interface WalletInterface {
|
|
|
2529
2864
|
*
|
|
2530
2865
|
* * `vtxo_base64` - Base64-encoded serialized VTXO
|
|
2531
2866
|
*/
|
|
2532
|
-
importVtxo(vtxoBase64: string
|
|
2867
|
+
importVtxo(vtxoBase64: string, asyncOpts_?: {
|
|
2868
|
+
signal: AbortSignal;
|
|
2869
|
+
}): Promise<void>;
|
|
2533
2870
|
/**
|
|
2534
2871
|
* Get lightning receive status by payment hash
|
|
2535
2872
|
*
|
|
@@ -2537,13 +2874,17 @@ export interface WalletInterface {
|
|
|
2537
2874
|
*
|
|
2538
2875
|
* * `payment_hash` - Payment hash as hex string
|
|
2539
2876
|
*/
|
|
2540
|
-
lightningReceiveStatus(paymentHash: string
|
|
2877
|
+
lightningReceiveStatus(paymentHash: string, asyncOpts_?: {
|
|
2878
|
+
signal: AbortSignal;
|
|
2879
|
+
}): Promise<LightningReceive | undefined>;
|
|
2541
2880
|
/**
|
|
2542
2881
|
* List all exits that are claimable
|
|
2543
2882
|
*
|
|
2544
2883
|
* Returns exits ready to be drained to onchain wallet.
|
|
2545
2884
|
*/
|
|
2546
|
-
listClaimableExits(
|
|
2885
|
+
listClaimableExits(asyncOpts_?: {
|
|
2886
|
+
signal: AbortSignal;
|
|
2887
|
+
}): Promise<Array<ExitVtxo>>;
|
|
2547
2888
|
/**
|
|
2548
2889
|
* Create a new authorization for your server mailbox
|
|
2549
2890
|
*
|
|
@@ -2564,55 +2905,91 @@ export interface WalletInterface {
|
|
|
2564
2905
|
* Returns the mailbox identifier as a hex-encoded public key.
|
|
2565
2906
|
*/
|
|
2566
2907
|
mailboxIdentifier(): string;
|
|
2567
|
-
maintenance(
|
|
2908
|
+
maintenance(asyncOpts_?: {
|
|
2909
|
+
signal: AbortSignal;
|
|
2910
|
+
}): Promise<void>;
|
|
2568
2911
|
/**
|
|
2569
2912
|
* Perform maintenance in delegated (non-interactive) mode
|
|
2570
2913
|
*
|
|
2571
2914
|
* This schedules refresh operations but doesn't wait for completion.
|
|
2572
2915
|
* Use this when you want to queue operations without blocking.
|
|
2573
2916
|
*/
|
|
2574
|
-
maintenanceDelegated(
|
|
2917
|
+
maintenanceDelegated(asyncOpts_?: {
|
|
2918
|
+
signal: AbortSignal;
|
|
2919
|
+
}): Promise<void>;
|
|
2575
2920
|
/**
|
|
2576
2921
|
* Perform maintenance refresh
|
|
2577
2922
|
*/
|
|
2578
|
-
maintenanceRefresh(
|
|
2923
|
+
maintenanceRefresh(asyncOpts_?: {
|
|
2924
|
+
signal: AbortSignal;
|
|
2925
|
+
}): Promise<string | undefined>;
|
|
2579
2926
|
/**
|
|
2580
2927
|
* Full maintenance including onchain wallet sync
|
|
2581
2928
|
*
|
|
2582
2929
|
* More thorough than maintenance() - also syncs onchain wallet and exits.
|
|
2583
2930
|
*/
|
|
2584
|
-
maintenanceWithOnchain(onchainWallet: OnchainWalletInterface
|
|
2931
|
+
maintenanceWithOnchain(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
2932
|
+
signal: AbortSignal;
|
|
2933
|
+
}): Promise<void>;
|
|
2585
2934
|
/**
|
|
2586
2935
|
* Perform maintenance with onchain wallet in delegated mode
|
|
2587
2936
|
*/
|
|
2588
|
-
maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface
|
|
2937
|
+
maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
2938
|
+
signal: AbortSignal;
|
|
2939
|
+
}): Promise<void>;
|
|
2589
2940
|
/**
|
|
2590
2941
|
* Schedule a maintenance refresh if VTXOs need refreshing
|
|
2591
2942
|
*
|
|
2592
2943
|
* Returns the round ID if a refresh was scheduled, null otherwise.
|
|
2593
2944
|
*/
|
|
2594
|
-
maybeScheduleMaintenanceRefresh(
|
|
2945
|
+
maybeScheduleMaintenanceRefresh(asyncOpts_?: {
|
|
2946
|
+
signal: AbortSignal;
|
|
2947
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2595
2948
|
/**
|
|
2596
2949
|
* Get the Bitcoin network this wallet is using
|
|
2597
2950
|
*/
|
|
2598
|
-
network(
|
|
2599
|
-
|
|
2951
|
+
network(asyncOpts_?: {
|
|
2952
|
+
signal: AbortSignal;
|
|
2953
|
+
}): Promise<Network>;
|
|
2954
|
+
newAddress(asyncOpts_?: {
|
|
2955
|
+
signal: AbortSignal;
|
|
2956
|
+
}): Promise<string>;
|
|
2600
2957
|
/**
|
|
2601
2958
|
* Generate a new address and return it with its index
|
|
2602
2959
|
*/
|
|
2603
|
-
newAddressWithIndex(
|
|
2960
|
+
newAddressWithIndex(asyncOpts_?: {
|
|
2961
|
+
signal: AbortSignal;
|
|
2962
|
+
}): Promise<AddressWithIndex>;
|
|
2604
2963
|
/**
|
|
2605
2964
|
* Get the timestamp when the next round will start (Unix timestamp in seconds)
|
|
2606
2965
|
* Returns an error if the server hasn't provided round timing info
|
|
2607
2966
|
*/
|
|
2608
|
-
nextRoundStartTime(
|
|
2609
|
-
|
|
2967
|
+
nextRoundStartTime(asyncOpts_?: {
|
|
2968
|
+
signal: AbortSignal;
|
|
2969
|
+
}): Promise</*u64*/ bigint>;
|
|
2970
|
+
/**
|
|
2971
|
+
* Get a pull-based notification holder for this wallet.
|
|
2972
|
+
*
|
|
2973
|
+
* Call `next_notification()` in a loop to receive events.
|
|
2974
|
+
* Call `cancel_next_notification_wait()` to unblock a pending wait without
|
|
2975
|
+
* destroying the stream.
|
|
2976
|
+
*/
|
|
2977
|
+
notifications(): NotificationHolderInterface;
|
|
2978
|
+
offboardAll(bitcoinAddress: string, asyncOpts_?: {
|
|
2979
|
+
signal: AbortSignal;
|
|
2980
|
+
}): Promise<OffboardResult>;
|
|
2610
2981
|
/**
|
|
2611
2982
|
* Offboard specific VTXOs to a Bitcoin address
|
|
2612
2983
|
*/
|
|
2613
|
-
offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string
|
|
2614
|
-
|
|
2615
|
-
|
|
2984
|
+
offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string, asyncOpts_?: {
|
|
2985
|
+
signal: AbortSignal;
|
|
2986
|
+
}): Promise<string>;
|
|
2987
|
+
payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined, asyncOpts_?: {
|
|
2988
|
+
signal: AbortSignal;
|
|
2989
|
+
}): Promise<LightningSend>;
|
|
2990
|
+
payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
2991
|
+
signal: AbortSignal;
|
|
2992
|
+
}): Promise<LightningSend>;
|
|
2616
2993
|
/**
|
|
2617
2994
|
* Pay a BOLT12 lightning offer
|
|
2618
2995
|
*
|
|
@@ -2621,43 +2998,69 @@ export interface WalletInterface {
|
|
|
2621
2998
|
* * `offer` - BOLT12 offer string
|
|
2622
2999
|
* * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
|
|
2623
3000
|
*/
|
|
2624
|
-
payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined
|
|
3001
|
+
payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
3002
|
+
signal: AbortSignal;
|
|
3003
|
+
}): Promise<LightningSend>;
|
|
3004
|
+
/**
|
|
3005
|
+
* DEPRECATED: use `peek_address` instead
|
|
3006
|
+
*/
|
|
3007
|
+
peakAddress(index: number, asyncOpts_?: {
|
|
3008
|
+
signal: AbortSignal;
|
|
3009
|
+
}): Promise<string>;
|
|
2625
3010
|
/**
|
|
2626
3011
|
* Peek at an address at a specific index
|
|
2627
3012
|
*/
|
|
2628
|
-
|
|
3013
|
+
peekAddress(index: number, asyncOpts_?: {
|
|
3014
|
+
signal: AbortSignal;
|
|
3015
|
+
}): Promise<string>;
|
|
2629
3016
|
/**
|
|
2630
3017
|
* Get all VTXOs that are part of pending boards
|
|
2631
3018
|
*/
|
|
2632
|
-
pendingBoardVtxos(
|
|
3019
|
+
pendingBoardVtxos(asyncOpts_?: {
|
|
3020
|
+
signal: AbortSignal;
|
|
3021
|
+
}): Promise<Array<Vtxo>>;
|
|
2633
3022
|
/**
|
|
2634
3023
|
* Get all pending board operations
|
|
2635
3024
|
*/
|
|
2636
|
-
pendingBoards(
|
|
3025
|
+
pendingBoards(asyncOpts_?: {
|
|
3026
|
+
signal: AbortSignal;
|
|
3027
|
+
}): Promise<Array<PendingBoard>>;
|
|
2637
3028
|
/**
|
|
2638
3029
|
* Get total amount in pending exits (sats)
|
|
2639
3030
|
*/
|
|
2640
|
-
pendingExitsTotalSats(
|
|
3031
|
+
pendingExitsTotalSats(asyncOpts_?: {
|
|
3032
|
+
signal: AbortSignal;
|
|
3033
|
+
}): Promise</*u64*/ bigint>;
|
|
2641
3034
|
/**
|
|
2642
3035
|
* Get all pending lightning receives
|
|
2643
3036
|
*/
|
|
2644
|
-
pendingLightningReceives(
|
|
3037
|
+
pendingLightningReceives(asyncOpts_?: {
|
|
3038
|
+
signal: AbortSignal;
|
|
3039
|
+
}): Promise<Array<LightningReceive>>;
|
|
2645
3040
|
/**
|
|
2646
3041
|
* Get VTXOs locked in pending Lightning sends
|
|
2647
3042
|
*/
|
|
2648
|
-
pendingLightningSendVtxos(
|
|
3043
|
+
pendingLightningSendVtxos(asyncOpts_?: {
|
|
3044
|
+
signal: AbortSignal;
|
|
3045
|
+
}): Promise<Array<Vtxo>>;
|
|
2649
3046
|
/**
|
|
2650
3047
|
* Get all pending lightning sends
|
|
2651
3048
|
*/
|
|
2652
|
-
pendingLightningSends(
|
|
3049
|
+
pendingLightningSends(asyncOpts_?: {
|
|
3050
|
+
signal: AbortSignal;
|
|
3051
|
+
}): Promise<Array<LightningSend>>;
|
|
2653
3052
|
/**
|
|
2654
3053
|
* Get VTXOs being used as inputs in pending rounds
|
|
2655
3054
|
*/
|
|
2656
|
-
pendingRoundInputVtxos(
|
|
3055
|
+
pendingRoundInputVtxos(asyncOpts_?: {
|
|
3056
|
+
signal: AbortSignal;
|
|
3057
|
+
}): Promise<Array<Vtxo>>;
|
|
2657
3058
|
/**
|
|
2658
3059
|
* Get all pending round states
|
|
2659
3060
|
*/
|
|
2660
|
-
pendingRoundStates(
|
|
3061
|
+
pendingRoundStates(asyncOpts_?: {
|
|
3062
|
+
signal: AbortSignal;
|
|
3063
|
+
}): Promise<Array<RoundState>>;
|
|
2661
3064
|
/**
|
|
2662
3065
|
* Progress unilateral exits (broadcast, fee bump, advance state machine)
|
|
2663
3066
|
*
|
|
@@ -2669,35 +3072,51 @@ export interface WalletInterface {
|
|
|
2669
3072
|
* * `onchain_wallet` - Onchain wallet for building exit transactions
|
|
2670
3073
|
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2671
3074
|
*/
|
|
2672
|
-
progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined
|
|
3075
|
+
progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
3076
|
+
signal: AbortSignal;
|
|
3077
|
+
}): Promise<Array<ExitProgressStatus>>;
|
|
2673
3078
|
/**
|
|
2674
3079
|
* Progress pending rounds
|
|
2675
3080
|
*
|
|
2676
3081
|
* Advances the state of all pending rounds. Call periodically.
|
|
2677
3082
|
*/
|
|
2678
|
-
progressPendingRounds(
|
|
3083
|
+
progressPendingRounds(asyncOpts_?: {
|
|
3084
|
+
signal: AbortSignal;
|
|
3085
|
+
}): Promise<void>;
|
|
2679
3086
|
/**
|
|
2680
3087
|
* Get wallet properties
|
|
2681
3088
|
*/
|
|
2682
|
-
properties(
|
|
3089
|
+
properties(asyncOpts_?: {
|
|
3090
|
+
signal: AbortSignal;
|
|
3091
|
+
}): Promise<WalletProperties>;
|
|
2683
3092
|
/**
|
|
2684
3093
|
* Refresh the Ark server connection
|
|
2685
3094
|
*
|
|
2686
3095
|
* Re-establishes connection if it was lost.
|
|
2687
3096
|
*/
|
|
2688
|
-
refreshServer(
|
|
3097
|
+
refreshServer(asyncOpts_?: {
|
|
3098
|
+
signal: AbortSignal;
|
|
3099
|
+
}): Promise<void>;
|
|
2689
3100
|
/**
|
|
2690
3101
|
* Refresh specific VTXOs
|
|
2691
3102
|
*/
|
|
2692
|
-
refreshVtxos(vtxoIds: Array<string
|
|
3103
|
+
refreshVtxos(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3104
|
+
signal: AbortSignal;
|
|
3105
|
+
}): Promise<string | undefined>;
|
|
2693
3106
|
/**
|
|
2694
3107
|
* Refresh VTXOs in delegated (non-interactive) mode
|
|
2695
3108
|
*
|
|
2696
3109
|
* Returns the round state if a refresh was scheduled, null otherwise.
|
|
2697
3110
|
*/
|
|
2698
|
-
refreshVtxosDelegated(vtxoIds: Array<string
|
|
2699
|
-
|
|
2700
|
-
|
|
3111
|
+
refreshVtxosDelegated(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3112
|
+
signal: AbortSignal;
|
|
3113
|
+
}): Promise<RoundState | undefined>;
|
|
3114
|
+
sendArkoorPayment(arkAddress: string, amountSats: bigint, asyncOpts_?: {
|
|
3115
|
+
signal: AbortSignal;
|
|
3116
|
+
}): Promise<string>;
|
|
3117
|
+
sendOnchain(address: string, amountSats: bigint, asyncOpts_?: {
|
|
3118
|
+
signal: AbortSignal;
|
|
3119
|
+
}): Promise<string>;
|
|
2701
3120
|
/**
|
|
2702
3121
|
* Sign exit claim inputs in an external PSBT
|
|
2703
3122
|
*
|
|
@@ -2710,36 +3129,52 @@ export interface WalletInterface {
|
|
|
2710
3129
|
*
|
|
2711
3130
|
* Returns the signed PSBT
|
|
2712
3131
|
*/
|
|
2713
|
-
signExitClaimInputs(psbtBase64: string
|
|
3132
|
+
signExitClaimInputs(psbtBase64: string, asyncOpts_?: {
|
|
3133
|
+
signal: AbortSignal;
|
|
3134
|
+
}): Promise<string>;
|
|
2714
3135
|
/**
|
|
2715
3136
|
* Get all spendable VTXOs
|
|
2716
3137
|
*/
|
|
2717
|
-
spendableVtxos(
|
|
3138
|
+
spendableVtxos(asyncOpts_?: {
|
|
3139
|
+
signal: AbortSignal;
|
|
3140
|
+
}): Promise<Array<Vtxo>>;
|
|
2718
3141
|
/**
|
|
2719
3142
|
* Start unilateral exit for the entire wallet
|
|
2720
3143
|
*/
|
|
2721
|
-
startExitForEntireWallet(
|
|
3144
|
+
startExitForEntireWallet(asyncOpts_?: {
|
|
3145
|
+
signal: AbortSignal;
|
|
3146
|
+
}): Promise<void>;
|
|
2722
3147
|
/**
|
|
2723
3148
|
* Start unilateral exit for specific VTXOs
|
|
2724
3149
|
*
|
|
2725
3150
|
* Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
|
|
2726
3151
|
*/
|
|
2727
|
-
startExitForVtxos(vtxoIds: Array<string
|
|
3152
|
+
startExitForVtxos(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3153
|
+
signal: AbortSignal;
|
|
3154
|
+
}): Promise<void>;
|
|
2728
3155
|
/**
|
|
2729
3156
|
* Lightweight sync with Ark server and blockchain
|
|
2730
3157
|
* Note: Bark's sync() handles errors internally with logging.
|
|
2731
3158
|
* The Throws annotation is for forward compatibility only.
|
|
2732
3159
|
*/
|
|
2733
|
-
sync(
|
|
3160
|
+
sync(asyncOpts_?: {
|
|
3161
|
+
signal: AbortSignal;
|
|
3162
|
+
}): Promise<void>;
|
|
2734
3163
|
/**
|
|
2735
3164
|
* Sync exit state (checks status but doesn't progress)
|
|
2736
3165
|
*/
|
|
2737
|
-
syncExits(onchainWallet: OnchainWalletInterface
|
|
3166
|
+
syncExits(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
3167
|
+
signal: AbortSignal;
|
|
3168
|
+
}): Promise<void>;
|
|
2738
3169
|
/**
|
|
2739
3170
|
* Sync pending board transactions
|
|
2740
3171
|
*/
|
|
2741
|
-
syncPendingBoards(
|
|
2742
|
-
|
|
3172
|
+
syncPendingBoards(asyncOpts_?: {
|
|
3173
|
+
signal: AbortSignal;
|
|
3174
|
+
}): Promise<void>;
|
|
3175
|
+
tryClaimAllLightningReceives(wait: boolean, asyncOpts_?: {
|
|
3176
|
+
signal: AbortSignal;
|
|
3177
|
+
}): Promise<Array<LightningReceive>>;
|
|
2743
3178
|
/**
|
|
2744
3179
|
* Try to claim a specific lightning receive by payment hash
|
|
2745
3180
|
*
|
|
@@ -2748,7 +3183,9 @@ export interface WalletInterface {
|
|
|
2748
3183
|
* * `payment_hash` - Payment hash as hex string
|
|
2749
3184
|
* * `wait` - Whether to wait for claim to complete
|
|
2750
3185
|
*/
|
|
2751
|
-
tryClaimLightningReceive(paymentHash: string, wait: boolean
|
|
3186
|
+
tryClaimLightningReceive(paymentHash: string, wait: boolean, asyncOpts_?: {
|
|
3187
|
+
signal: AbortSignal;
|
|
3188
|
+
}): Promise<void>;
|
|
2752
3189
|
/**
|
|
2753
3190
|
* Validate an Ark address against the connected server
|
|
2754
3191
|
*
|
|
@@ -2756,8 +3193,12 @@ export interface WalletInterface {
|
|
|
2756
3193
|
* belongs to the currently connected Ark server.
|
|
2757
3194
|
* For basic format validation only, use validate_ark_address() instead.
|
|
2758
3195
|
*/
|
|
2759
|
-
validateArkoorAddress(address: string
|
|
2760
|
-
|
|
3196
|
+
validateArkoorAddress(address: string, asyncOpts_?: {
|
|
3197
|
+
signal: AbortSignal;
|
|
3198
|
+
}): Promise<boolean>;
|
|
3199
|
+
vtxos(asyncOpts_?: {
|
|
3200
|
+
signal: AbortSignal;
|
|
3201
|
+
}): Promise<Array<Vtxo>>;
|
|
2761
3202
|
}
|
|
2762
3203
|
/**
|
|
2763
3204
|
* The main Bark wallet interface for Ark operations
|
|
@@ -2770,43 +3211,65 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2770
3211
|
/**
|
|
2771
3212
|
* Create a new Bark wallet
|
|
2772
3213
|
*/
|
|
2773
|
-
static create(mnemonic: string, config: Config, datadir: string, forceRescan: boolean
|
|
3214
|
+
static create(mnemonic: string, config: Config, datadir: string, forceRescan: boolean, asyncOpts_?: {
|
|
3215
|
+
signal: AbortSignal;
|
|
3216
|
+
}): Promise<WalletInterface>;
|
|
2774
3217
|
/**
|
|
2775
3218
|
* Create a new Bark wallet WITH onchain capabilities
|
|
2776
3219
|
*/
|
|
2777
|
-
static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, forceRescan: boolean
|
|
3220
|
+
static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, forceRescan: boolean, asyncOpts_?: {
|
|
3221
|
+
signal: AbortSignal;
|
|
3222
|
+
}): Promise<WalletInterface>;
|
|
2778
3223
|
/**
|
|
2779
3224
|
* Open an existing Bark wallet
|
|
2780
3225
|
*/
|
|
2781
|
-
static open(mnemonic: string, config: Config, datadir: string
|
|
3226
|
+
static open(mnemonic: string, config: Config, datadir: string, asyncOpts_?: {
|
|
3227
|
+
signal: AbortSignal;
|
|
3228
|
+
}): Promise<WalletInterface>;
|
|
2782
3229
|
/**
|
|
2783
3230
|
* Open an existing Bark wallet WITH onchain capabilities
|
|
2784
3231
|
*/
|
|
2785
|
-
static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface
|
|
3232
|
+
static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
3233
|
+
signal: AbortSignal;
|
|
3234
|
+
}): Promise<WalletInterface>;
|
|
2786
3235
|
/**
|
|
2787
3236
|
* Get earliest block height when all exits will be claimable
|
|
2788
3237
|
*
|
|
2789
3238
|
* Returns null if no exits or any exit has undetermined claimability.
|
|
2790
3239
|
*/
|
|
2791
|
-
allExitsClaimableAtHeight(
|
|
3240
|
+
allExitsClaimableAtHeight(asyncOpts_?: {
|
|
3241
|
+
signal: AbortSignal;
|
|
3242
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2792
3243
|
/**
|
|
2793
3244
|
* Get all VTXOs (including spent)
|
|
2794
3245
|
*/
|
|
2795
|
-
allVtxos(
|
|
3246
|
+
allVtxos(asyncOpts_?: {
|
|
3247
|
+
signal: AbortSignal;
|
|
3248
|
+
}): Promise<Array<Vtxo>>;
|
|
2796
3249
|
/**
|
|
2797
3250
|
* Get Ark server info (null if not connected)
|
|
2798
3251
|
*/
|
|
2799
|
-
arkInfo(
|
|
2800
|
-
|
|
3252
|
+
arkInfo(asyncOpts_?: {
|
|
3253
|
+
signal: AbortSignal;
|
|
3254
|
+
}): Promise<ArkInfo | undefined>;
|
|
3255
|
+
balance(asyncOpts_?: {
|
|
3256
|
+
signal: AbortSignal;
|
|
3257
|
+
}): Promise<Balance>;
|
|
2801
3258
|
/**
|
|
2802
3259
|
* Board all funds from onchain wallet into Ark
|
|
2803
3260
|
*/
|
|
2804
|
-
boardAll(onchainWallet: OnchainWalletInterface
|
|
3261
|
+
boardAll(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
3262
|
+
signal: AbortSignal;
|
|
3263
|
+
}): Promise<PendingBoard>;
|
|
2805
3264
|
/**
|
|
2806
3265
|
* Board a specific amount from onchain wallet into Ark
|
|
2807
3266
|
*/
|
|
2808
|
-
boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint
|
|
2809
|
-
|
|
3267
|
+
boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint, asyncOpts_?: {
|
|
3268
|
+
signal: AbortSignal;
|
|
3269
|
+
}): Promise<PendingBoard>;
|
|
3270
|
+
bolt11Invoice(amountSats: bigint, asyncOpts_?: {
|
|
3271
|
+
signal: AbortSignal;
|
|
3272
|
+
}): Promise<LightningInvoice>;
|
|
2810
3273
|
/**
|
|
2811
3274
|
* Broadcast a signed transaction to the Bitcoin network
|
|
2812
3275
|
*
|
|
@@ -2819,15 +3282,21 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2819
3282
|
*
|
|
2820
3283
|
* Returns the transaction ID (txid) of the broadcasted transaction
|
|
2821
3284
|
*/
|
|
2822
|
-
broadcastTx(txHex: string
|
|
3285
|
+
broadcastTx(txHex: string, asyncOpts_?: {
|
|
3286
|
+
signal: AbortSignal;
|
|
3287
|
+
}): Promise<string>;
|
|
2823
3288
|
/**
|
|
2824
3289
|
* Cancel all pending rounds
|
|
2825
3290
|
*/
|
|
2826
|
-
cancelAllPendingRounds(
|
|
3291
|
+
cancelAllPendingRounds(asyncOpts_?: {
|
|
3292
|
+
signal: AbortSignal;
|
|
3293
|
+
}): Promise<void>;
|
|
2827
3294
|
/**
|
|
2828
3295
|
* Cancel a specific pending round
|
|
2829
3296
|
*/
|
|
2830
|
-
cancelPendingRound(roundId: number
|
|
3297
|
+
cancelPendingRound(roundId: number, asyncOpts_?: {
|
|
3298
|
+
signal: AbortSignal;
|
|
3299
|
+
}): Promise<void>;
|
|
2831
3300
|
/**
|
|
2832
3301
|
* Check lightning payment status by payment hash
|
|
2833
3302
|
*
|
|
@@ -2838,15 +3307,21 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2838
3307
|
*
|
|
2839
3308
|
* Returns the preimage if payment is successful, null if still pending
|
|
2840
3309
|
*/
|
|
2841
|
-
checkLightningPayment(paymentHash: string, wait: boolean
|
|
3310
|
+
checkLightningPayment(paymentHash: string, wait: boolean, asyncOpts_?: {
|
|
3311
|
+
signal: AbortSignal;
|
|
3312
|
+
}): Promise<string | undefined>;
|
|
2842
3313
|
/**
|
|
2843
3314
|
* Get claimable lightning receive balance
|
|
2844
3315
|
*/
|
|
2845
|
-
claimableLightningReceiveBalanceSats(
|
|
3316
|
+
claimableLightningReceiveBalanceSats(asyncOpts_?: {
|
|
3317
|
+
signal: AbortSignal;
|
|
3318
|
+
}): Promise</*u64*/ bigint>;
|
|
2846
3319
|
/**
|
|
2847
3320
|
* Get wallet config
|
|
2848
3321
|
*/
|
|
2849
|
-
config(
|
|
3322
|
+
config(asyncOpts_?: {
|
|
3323
|
+
signal: AbortSignal;
|
|
3324
|
+
}): Promise<Config>;
|
|
2850
3325
|
/**
|
|
2851
3326
|
* Drain claimable exits to an address
|
|
2852
3327
|
*
|
|
@@ -2859,37 +3334,49 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2859
3334
|
* * `address` - Bitcoin address to send claimed funds to
|
|
2860
3335
|
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
2861
3336
|
*/
|
|
2862
|
-
drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined
|
|
3337
|
+
drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
3338
|
+
signal: AbortSignal;
|
|
3339
|
+
}): Promise<ExitClaimTransaction>;
|
|
2863
3340
|
/**
|
|
2864
3341
|
* Estimate the fee for a board operation
|
|
2865
3342
|
*
|
|
2866
3343
|
* # Arguments
|
|
2867
3344
|
*
|
|
2868
3345
|
* * `amount_sats` - Amount to board in sats
|
|
2869
|
-
*
|
|
2870
|
-
* Returns the estimated fee in sats
|
|
2871
3346
|
*/
|
|
2872
|
-
estimateBoardFee(amountSats: bigint
|
|
3347
|
+
estimateBoardFee(amountSats: bigint, asyncOpts_?: {
|
|
3348
|
+
signal: AbortSignal;
|
|
3349
|
+
}): Promise<FeeEstimate>;
|
|
2873
3350
|
/**
|
|
2874
3351
|
* Estimate the fee for a lightning receive
|
|
2875
3352
|
*
|
|
2876
3353
|
* # Arguments
|
|
2877
3354
|
*
|
|
2878
3355
|
* * `amount_sats` - Amount to receive in sats
|
|
2879
|
-
*
|
|
2880
|
-
* Returns the estimated fee in sats
|
|
2881
3356
|
*/
|
|
2882
|
-
estimateLightningReceiveFee(amountSats: bigint
|
|
3357
|
+
estimateLightningReceiveFee(amountSats: bigint, asyncOpts_?: {
|
|
3358
|
+
signal: AbortSignal;
|
|
3359
|
+
}): Promise<FeeEstimate>;
|
|
2883
3360
|
/**
|
|
2884
3361
|
* Estimate the fee for a lightning send
|
|
2885
3362
|
*
|
|
2886
3363
|
* # Arguments
|
|
2887
3364
|
*
|
|
2888
3365
|
* * `amount_sats` - Amount to send in sats
|
|
3366
|
+
*/
|
|
3367
|
+
estimateLightningSendFee(amountSats: bigint, asyncOpts_?: {
|
|
3368
|
+
signal: AbortSignal;
|
|
3369
|
+
}): Promise<FeeEstimate>;
|
|
3370
|
+
/**
|
|
3371
|
+
* Estimate the fee for offboarding all spendable VTXOs
|
|
3372
|
+
*
|
|
3373
|
+
* # Arguments
|
|
2889
3374
|
*
|
|
2890
|
-
*
|
|
3375
|
+
* * `address` - Destination address for the offboard
|
|
2891
3376
|
*/
|
|
2892
|
-
|
|
3377
|
+
estimateOffboardAllFee(address: string, asyncOpts_?: {
|
|
3378
|
+
signal: AbortSignal;
|
|
3379
|
+
}): Promise<FeeEstimate>;
|
|
2893
3380
|
/**
|
|
2894
3381
|
* Estimate the fee for an offboard operation
|
|
2895
3382
|
*
|
|
@@ -2897,20 +3384,20 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2897
3384
|
*
|
|
2898
3385
|
* * `address` - Destination address for the offboard
|
|
2899
3386
|
* * `vtxo_ids` - VTXOs to offboard
|
|
2900
|
-
*
|
|
2901
|
-
* Returns the estimated fee in sats
|
|
2902
3387
|
*/
|
|
2903
|
-
estimateOffboardFee(address: string, vtxoIds: Array<string
|
|
3388
|
+
estimateOffboardFee(address: string, vtxoIds: Array<string>, asyncOpts_?: {
|
|
3389
|
+
signal: AbortSignal;
|
|
3390
|
+
}): Promise<FeeEstimate>;
|
|
2904
3391
|
/**
|
|
2905
3392
|
* Estimate the fee for a refresh operation
|
|
2906
3393
|
*
|
|
2907
3394
|
* # Arguments
|
|
2908
3395
|
*
|
|
2909
3396
|
* * `vtxo_ids` - VTXOs to refresh
|
|
2910
|
-
*
|
|
2911
|
-
* Returns the estimated fee in sats
|
|
2912
3397
|
*/
|
|
2913
|
-
estimateRefreshFee(vtxoIds: Array<string
|
|
3398
|
+
estimateRefreshFee(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3399
|
+
signal: AbortSignal;
|
|
3400
|
+
}): Promise<FeeEstimate>;
|
|
2914
3401
|
/**
|
|
2915
3402
|
* Estimate the fee for a send onchain operation
|
|
2916
3403
|
*
|
|
@@ -2918,10 +3405,10 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2918
3405
|
*
|
|
2919
3406
|
* * `address` - Destination address
|
|
2920
3407
|
* * `amount_sats` - Amount to send in sats
|
|
2921
|
-
*
|
|
2922
|
-
* Returns the estimated fee in sats
|
|
2923
3408
|
*/
|
|
2924
|
-
estimateSendOnchainFee(address: string, amountSats: bigint
|
|
3409
|
+
estimateSendOnchainFee(address: string, amountSats: bigint, asyncOpts_?: {
|
|
3410
|
+
signal: AbortSignal;
|
|
3411
|
+
}): Promise<FeeEstimate>;
|
|
2925
3412
|
/**
|
|
2926
3413
|
* Get the wallet's BIP32 fingerprint
|
|
2927
3414
|
*/
|
|
@@ -2937,44 +3424,73 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2937
3424
|
* * `include_history` - Whether to include full state machine history
|
|
2938
3425
|
* * `include_transactions` - Whether to include transaction details
|
|
2939
3426
|
*/
|
|
2940
|
-
getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean
|
|
3427
|
+
getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean, asyncOpts_?: {
|
|
3428
|
+
signal: AbortSignal;
|
|
3429
|
+
}): Promise<ExitTransactionStatus | undefined>;
|
|
2941
3430
|
/**
|
|
2942
3431
|
* Get all VTXOs currently in exit process
|
|
2943
3432
|
*/
|
|
2944
|
-
getExitVtxos(
|
|
3433
|
+
getExitVtxos(asyncOpts_?: {
|
|
3434
|
+
signal: AbortSignal;
|
|
3435
|
+
}): Promise<Array<ExitVtxo>>;
|
|
2945
3436
|
/**
|
|
2946
3437
|
* Get VTXOs expiring within threshold blocks
|
|
2947
3438
|
*/
|
|
2948
|
-
getExpiringVtxos(thresholdBlocks: number
|
|
3439
|
+
getExpiringVtxos(thresholdBlocks: number, asyncOpts_?: {
|
|
3440
|
+
signal: AbortSignal;
|
|
3441
|
+
}): Promise<Array<Vtxo>>;
|
|
2949
3442
|
/**
|
|
2950
3443
|
* Get the block height of the first expiring VTXO
|
|
2951
3444
|
*
|
|
2952
3445
|
* Returns null if there are no spendable VTXOs.
|
|
2953
3446
|
*/
|
|
2954
|
-
getFirstExpiringVtxoBlockheight(
|
|
3447
|
+
getFirstExpiringVtxoBlockheight(asyncOpts_?: {
|
|
3448
|
+
signal: AbortSignal;
|
|
3449
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2955
3450
|
/**
|
|
2956
3451
|
* Get the next block height when a refresh should be performed
|
|
2957
3452
|
*
|
|
2958
3453
|
* This is calculated as the first expiring VTXO height minus the refresh threshold.
|
|
2959
3454
|
* Returns null if there are no VTXOs to refresh.
|
|
2960
3455
|
*/
|
|
2961
|
-
getNextRequiredRefreshBlockheight(
|
|
3456
|
+
getNextRequiredRefreshBlockheight(asyncOpts_?: {
|
|
3457
|
+
signal: AbortSignal;
|
|
3458
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
2962
3459
|
/**
|
|
2963
3460
|
* Get a specific VTXO by ID
|
|
2964
3461
|
*/
|
|
2965
|
-
getVtxoById(vtxoId: string
|
|
3462
|
+
getVtxoById(vtxoId: string, asyncOpts_?: {
|
|
3463
|
+
signal: AbortSignal;
|
|
3464
|
+
}): Promise<Vtxo>;
|
|
2966
3465
|
/**
|
|
2967
3466
|
* Get VTXOs that should be refreshed
|
|
2968
3467
|
*/
|
|
2969
|
-
getVtxosToRefresh(
|
|
3468
|
+
getVtxosToRefresh(asyncOpts_?: {
|
|
3469
|
+
signal: AbortSignal;
|
|
3470
|
+
}): Promise<Array<Vtxo>>;
|
|
2970
3471
|
/**
|
|
2971
3472
|
* Check if any exits are pending
|
|
2972
3473
|
*/
|
|
2973
|
-
hasPendingExits(
|
|
3474
|
+
hasPendingExits(asyncOpts_?: {
|
|
3475
|
+
signal: AbortSignal;
|
|
3476
|
+
}): Promise<boolean>;
|
|
2974
3477
|
/**
|
|
2975
3478
|
* Get all wallet movements (transaction history)
|
|
2976
3479
|
*/
|
|
2977
|
-
history(
|
|
3480
|
+
history(asyncOpts_?: {
|
|
3481
|
+
signal: AbortSignal;
|
|
3482
|
+
}): Promise<Array<Movement>>;
|
|
3483
|
+
/**
|
|
3484
|
+
* Get wallet movements filtered by payment method
|
|
3485
|
+
*
|
|
3486
|
+
* # Arguments
|
|
3487
|
+
*
|
|
3488
|
+
* * `payment_method_type` - Type (e.g. "ark", "bitcoin", "invoice", "offer", "lightning_address", "custom")
|
|
3489
|
+
* * `payment_method_value` - Value (e.g. an address or invoice string)
|
|
3490
|
+
*/
|
|
3491
|
+
historyByPaymentMethod(paymentMethodType: string, paymentMethodValue: string, asyncOpts_?: {
|
|
3492
|
+
signal: AbortSignal;
|
|
3493
|
+
}): Promise<Array<Movement>>;
|
|
2978
3494
|
/**
|
|
2979
3495
|
* Import a serialized VTXO into the wallet
|
|
2980
3496
|
*
|
|
@@ -2985,7 +3501,9 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2985
3501
|
*
|
|
2986
3502
|
* * `vtxo_base64` - Base64-encoded serialized VTXO
|
|
2987
3503
|
*/
|
|
2988
|
-
importVtxo(vtxoBase64: string
|
|
3504
|
+
importVtxo(vtxoBase64: string, asyncOpts_?: {
|
|
3505
|
+
signal: AbortSignal;
|
|
3506
|
+
}): Promise<void>;
|
|
2989
3507
|
/**
|
|
2990
3508
|
* Get lightning receive status by payment hash
|
|
2991
3509
|
*
|
|
@@ -2993,13 +3511,17 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
2993
3511
|
*
|
|
2994
3512
|
* * `payment_hash` - Payment hash as hex string
|
|
2995
3513
|
*/
|
|
2996
|
-
lightningReceiveStatus(paymentHash: string
|
|
3514
|
+
lightningReceiveStatus(paymentHash: string, asyncOpts_?: {
|
|
3515
|
+
signal: AbortSignal;
|
|
3516
|
+
}): Promise<LightningReceive | undefined>;
|
|
2997
3517
|
/**
|
|
2998
3518
|
* List all exits that are claimable
|
|
2999
3519
|
*
|
|
3000
3520
|
* Returns exits ready to be drained to onchain wallet.
|
|
3001
3521
|
*/
|
|
3002
|
-
listClaimableExits(
|
|
3522
|
+
listClaimableExits(asyncOpts_?: {
|
|
3523
|
+
signal: AbortSignal;
|
|
3524
|
+
}): Promise<Array<ExitVtxo>>;
|
|
3003
3525
|
/**
|
|
3004
3526
|
* Create a new authorization for your server mailbox
|
|
3005
3527
|
*
|
|
@@ -3020,55 +3542,91 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
3020
3542
|
* Returns the mailbox identifier as a hex-encoded public key.
|
|
3021
3543
|
*/
|
|
3022
3544
|
mailboxIdentifier(): string;
|
|
3023
|
-
maintenance(
|
|
3545
|
+
maintenance(asyncOpts_?: {
|
|
3546
|
+
signal: AbortSignal;
|
|
3547
|
+
}): Promise<void>;
|
|
3024
3548
|
/**
|
|
3025
3549
|
* Perform maintenance in delegated (non-interactive) mode
|
|
3026
3550
|
*
|
|
3027
3551
|
* This schedules refresh operations but doesn't wait for completion.
|
|
3028
3552
|
* Use this when you want to queue operations without blocking.
|
|
3029
3553
|
*/
|
|
3030
|
-
maintenanceDelegated(
|
|
3554
|
+
maintenanceDelegated(asyncOpts_?: {
|
|
3555
|
+
signal: AbortSignal;
|
|
3556
|
+
}): Promise<void>;
|
|
3031
3557
|
/**
|
|
3032
3558
|
* Perform maintenance refresh
|
|
3033
3559
|
*/
|
|
3034
|
-
maintenanceRefresh(
|
|
3560
|
+
maintenanceRefresh(asyncOpts_?: {
|
|
3561
|
+
signal: AbortSignal;
|
|
3562
|
+
}): Promise<string | undefined>;
|
|
3035
3563
|
/**
|
|
3036
3564
|
* Full maintenance including onchain wallet sync
|
|
3037
3565
|
*
|
|
3038
3566
|
* More thorough than maintenance() - also syncs onchain wallet and exits.
|
|
3039
3567
|
*/
|
|
3040
|
-
maintenanceWithOnchain(onchainWallet: OnchainWalletInterface
|
|
3568
|
+
maintenanceWithOnchain(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
3569
|
+
signal: AbortSignal;
|
|
3570
|
+
}): Promise<void>;
|
|
3041
3571
|
/**
|
|
3042
3572
|
* Perform maintenance with onchain wallet in delegated mode
|
|
3043
3573
|
*/
|
|
3044
|
-
maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface
|
|
3574
|
+
maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
3575
|
+
signal: AbortSignal;
|
|
3576
|
+
}): Promise<void>;
|
|
3045
3577
|
/**
|
|
3046
3578
|
* Schedule a maintenance refresh if VTXOs need refreshing
|
|
3047
3579
|
*
|
|
3048
3580
|
* Returns the round ID if a refresh was scheduled, null otherwise.
|
|
3049
3581
|
*/
|
|
3050
|
-
maybeScheduleMaintenanceRefresh(
|
|
3582
|
+
maybeScheduleMaintenanceRefresh(asyncOpts_?: {
|
|
3583
|
+
signal: AbortSignal;
|
|
3584
|
+
}): Promise</*u32*/ /*u32*/ number | undefined>;
|
|
3051
3585
|
/**
|
|
3052
3586
|
* Get the Bitcoin network this wallet is using
|
|
3053
3587
|
*/
|
|
3054
|
-
network(
|
|
3055
|
-
|
|
3588
|
+
network(asyncOpts_?: {
|
|
3589
|
+
signal: AbortSignal;
|
|
3590
|
+
}): Promise<Network>;
|
|
3591
|
+
newAddress(asyncOpts_?: {
|
|
3592
|
+
signal: AbortSignal;
|
|
3593
|
+
}): Promise<string>;
|
|
3056
3594
|
/**
|
|
3057
3595
|
* Generate a new address and return it with its index
|
|
3058
3596
|
*/
|
|
3059
|
-
newAddressWithIndex(
|
|
3597
|
+
newAddressWithIndex(asyncOpts_?: {
|
|
3598
|
+
signal: AbortSignal;
|
|
3599
|
+
}): Promise<AddressWithIndex>;
|
|
3060
3600
|
/**
|
|
3061
3601
|
* Get the timestamp when the next round will start (Unix timestamp in seconds)
|
|
3062
3602
|
* Returns an error if the server hasn't provided round timing info
|
|
3063
3603
|
*/
|
|
3064
|
-
nextRoundStartTime(
|
|
3065
|
-
|
|
3604
|
+
nextRoundStartTime(asyncOpts_?: {
|
|
3605
|
+
signal: AbortSignal;
|
|
3606
|
+
}): Promise</*u64*/ bigint>;
|
|
3607
|
+
/**
|
|
3608
|
+
* Get a pull-based notification holder for this wallet.
|
|
3609
|
+
*
|
|
3610
|
+
* Call `next_notification()` in a loop to receive events.
|
|
3611
|
+
* Call `cancel_next_notification_wait()` to unblock a pending wait without
|
|
3612
|
+
* destroying the stream.
|
|
3613
|
+
*/
|
|
3614
|
+
notifications(): NotificationHolderInterface;
|
|
3615
|
+
offboardAll(bitcoinAddress: string, asyncOpts_?: {
|
|
3616
|
+
signal: AbortSignal;
|
|
3617
|
+
}): Promise<OffboardResult>;
|
|
3066
3618
|
/**
|
|
3067
3619
|
* Offboard specific VTXOs to a Bitcoin address
|
|
3068
3620
|
*/
|
|
3069
|
-
offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string
|
|
3070
|
-
|
|
3071
|
-
|
|
3621
|
+
offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string, asyncOpts_?: {
|
|
3622
|
+
signal: AbortSignal;
|
|
3623
|
+
}): Promise<string>;
|
|
3624
|
+
payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined, asyncOpts_?: {
|
|
3625
|
+
signal: AbortSignal;
|
|
3626
|
+
}): Promise<LightningSend>;
|
|
3627
|
+
payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
3628
|
+
signal: AbortSignal;
|
|
3629
|
+
}): Promise<LightningSend>;
|
|
3072
3630
|
/**
|
|
3073
3631
|
* Pay a BOLT12 lightning offer
|
|
3074
3632
|
*
|
|
@@ -3077,43 +3635,69 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
3077
3635
|
* * `offer` - BOLT12 offer string
|
|
3078
3636
|
* * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
|
|
3079
3637
|
*/
|
|
3080
|
-
payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined
|
|
3638
|
+
payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
3639
|
+
signal: AbortSignal;
|
|
3640
|
+
}): Promise<LightningSend>;
|
|
3641
|
+
/**
|
|
3642
|
+
* DEPRECATED: use `peek_address` instead
|
|
3643
|
+
*/
|
|
3644
|
+
peakAddress(index: number, asyncOpts_?: {
|
|
3645
|
+
signal: AbortSignal;
|
|
3646
|
+
}): Promise<string>;
|
|
3081
3647
|
/**
|
|
3082
3648
|
* Peek at an address at a specific index
|
|
3083
3649
|
*/
|
|
3084
|
-
|
|
3650
|
+
peekAddress(index: number, asyncOpts_?: {
|
|
3651
|
+
signal: AbortSignal;
|
|
3652
|
+
}): Promise<string>;
|
|
3085
3653
|
/**
|
|
3086
3654
|
* Get all VTXOs that are part of pending boards
|
|
3087
3655
|
*/
|
|
3088
|
-
pendingBoardVtxos(
|
|
3656
|
+
pendingBoardVtxos(asyncOpts_?: {
|
|
3657
|
+
signal: AbortSignal;
|
|
3658
|
+
}): Promise<Array<Vtxo>>;
|
|
3089
3659
|
/**
|
|
3090
3660
|
* Get all pending board operations
|
|
3091
3661
|
*/
|
|
3092
|
-
pendingBoards(
|
|
3662
|
+
pendingBoards(asyncOpts_?: {
|
|
3663
|
+
signal: AbortSignal;
|
|
3664
|
+
}): Promise<Array<PendingBoard>>;
|
|
3093
3665
|
/**
|
|
3094
3666
|
* Get total amount in pending exits (sats)
|
|
3095
3667
|
*/
|
|
3096
|
-
pendingExitsTotalSats(
|
|
3668
|
+
pendingExitsTotalSats(asyncOpts_?: {
|
|
3669
|
+
signal: AbortSignal;
|
|
3670
|
+
}): Promise</*u64*/ bigint>;
|
|
3097
3671
|
/**
|
|
3098
3672
|
* Get all pending lightning receives
|
|
3099
3673
|
*/
|
|
3100
|
-
pendingLightningReceives(
|
|
3674
|
+
pendingLightningReceives(asyncOpts_?: {
|
|
3675
|
+
signal: AbortSignal;
|
|
3676
|
+
}): Promise<Array<LightningReceive>>;
|
|
3101
3677
|
/**
|
|
3102
3678
|
* Get VTXOs locked in pending Lightning sends
|
|
3103
3679
|
*/
|
|
3104
|
-
pendingLightningSendVtxos(
|
|
3680
|
+
pendingLightningSendVtxos(asyncOpts_?: {
|
|
3681
|
+
signal: AbortSignal;
|
|
3682
|
+
}): Promise<Array<Vtxo>>;
|
|
3105
3683
|
/**
|
|
3106
3684
|
* Get all pending lightning sends
|
|
3107
3685
|
*/
|
|
3108
|
-
pendingLightningSends(
|
|
3686
|
+
pendingLightningSends(asyncOpts_?: {
|
|
3687
|
+
signal: AbortSignal;
|
|
3688
|
+
}): Promise<Array<LightningSend>>;
|
|
3109
3689
|
/**
|
|
3110
3690
|
* Get VTXOs being used as inputs in pending rounds
|
|
3111
3691
|
*/
|
|
3112
|
-
pendingRoundInputVtxos(
|
|
3692
|
+
pendingRoundInputVtxos(asyncOpts_?: {
|
|
3693
|
+
signal: AbortSignal;
|
|
3694
|
+
}): Promise<Array<Vtxo>>;
|
|
3113
3695
|
/**
|
|
3114
3696
|
* Get all pending round states
|
|
3115
3697
|
*/
|
|
3116
|
-
pendingRoundStates(
|
|
3698
|
+
pendingRoundStates(asyncOpts_?: {
|
|
3699
|
+
signal: AbortSignal;
|
|
3700
|
+
}): Promise<Array<RoundState>>;
|
|
3117
3701
|
/**
|
|
3118
3702
|
* Progress unilateral exits (broadcast, fee bump, advance state machine)
|
|
3119
3703
|
*
|
|
@@ -3125,35 +3709,51 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
3125
3709
|
* * `onchain_wallet` - Onchain wallet for building exit transactions
|
|
3126
3710
|
* * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
|
|
3127
3711
|
*/
|
|
3128
|
-
progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined
|
|
3712
|
+
progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
|
|
3713
|
+
signal: AbortSignal;
|
|
3714
|
+
}): Promise<Array<ExitProgressStatus>>;
|
|
3129
3715
|
/**
|
|
3130
3716
|
* Progress pending rounds
|
|
3131
3717
|
*
|
|
3132
3718
|
* Advances the state of all pending rounds. Call periodically.
|
|
3133
3719
|
*/
|
|
3134
|
-
progressPendingRounds(
|
|
3720
|
+
progressPendingRounds(asyncOpts_?: {
|
|
3721
|
+
signal: AbortSignal;
|
|
3722
|
+
}): Promise<void>;
|
|
3135
3723
|
/**
|
|
3136
3724
|
* Get wallet properties
|
|
3137
3725
|
*/
|
|
3138
|
-
properties(
|
|
3726
|
+
properties(asyncOpts_?: {
|
|
3727
|
+
signal: AbortSignal;
|
|
3728
|
+
}): Promise<WalletProperties>;
|
|
3139
3729
|
/**
|
|
3140
3730
|
* Refresh the Ark server connection
|
|
3141
3731
|
*
|
|
3142
3732
|
* Re-establishes connection if it was lost.
|
|
3143
3733
|
*/
|
|
3144
|
-
refreshServer(
|
|
3734
|
+
refreshServer(asyncOpts_?: {
|
|
3735
|
+
signal: AbortSignal;
|
|
3736
|
+
}): Promise<void>;
|
|
3145
3737
|
/**
|
|
3146
3738
|
* Refresh specific VTXOs
|
|
3147
3739
|
*/
|
|
3148
|
-
refreshVtxos(vtxoIds: Array<string
|
|
3740
|
+
refreshVtxos(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3741
|
+
signal: AbortSignal;
|
|
3742
|
+
}): Promise<string | undefined>;
|
|
3149
3743
|
/**
|
|
3150
3744
|
* Refresh VTXOs in delegated (non-interactive) mode
|
|
3151
3745
|
*
|
|
3152
3746
|
* Returns the round state if a refresh was scheduled, null otherwise.
|
|
3153
3747
|
*/
|
|
3154
|
-
refreshVtxosDelegated(vtxoIds: Array<string
|
|
3155
|
-
|
|
3156
|
-
|
|
3748
|
+
refreshVtxosDelegated(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3749
|
+
signal: AbortSignal;
|
|
3750
|
+
}): Promise<RoundState | undefined>;
|
|
3751
|
+
sendArkoorPayment(arkAddress: string, amountSats: bigint, asyncOpts_?: {
|
|
3752
|
+
signal: AbortSignal;
|
|
3753
|
+
}): Promise<string>;
|
|
3754
|
+
sendOnchain(address: string, amountSats: bigint, asyncOpts_?: {
|
|
3755
|
+
signal: AbortSignal;
|
|
3756
|
+
}): Promise<string>;
|
|
3157
3757
|
/**
|
|
3158
3758
|
* Sign exit claim inputs in an external PSBT
|
|
3159
3759
|
*
|
|
@@ -3166,36 +3766,52 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
3166
3766
|
*
|
|
3167
3767
|
* Returns the signed PSBT
|
|
3168
3768
|
*/
|
|
3169
|
-
signExitClaimInputs(psbtBase64: string
|
|
3769
|
+
signExitClaimInputs(psbtBase64: string, asyncOpts_?: {
|
|
3770
|
+
signal: AbortSignal;
|
|
3771
|
+
}): Promise<string>;
|
|
3170
3772
|
/**
|
|
3171
3773
|
* Get all spendable VTXOs
|
|
3172
3774
|
*/
|
|
3173
|
-
spendableVtxos(
|
|
3775
|
+
spendableVtxos(asyncOpts_?: {
|
|
3776
|
+
signal: AbortSignal;
|
|
3777
|
+
}): Promise<Array<Vtxo>>;
|
|
3174
3778
|
/**
|
|
3175
3779
|
* Start unilateral exit for the entire wallet
|
|
3176
3780
|
*/
|
|
3177
|
-
startExitForEntireWallet(
|
|
3781
|
+
startExitForEntireWallet(asyncOpts_?: {
|
|
3782
|
+
signal: AbortSignal;
|
|
3783
|
+
}): Promise<void>;
|
|
3178
3784
|
/**
|
|
3179
3785
|
* Start unilateral exit for specific VTXOs
|
|
3180
3786
|
*
|
|
3181
3787
|
* Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
|
|
3182
3788
|
*/
|
|
3183
|
-
startExitForVtxos(vtxoIds: Array<string
|
|
3789
|
+
startExitForVtxos(vtxoIds: Array<string>, asyncOpts_?: {
|
|
3790
|
+
signal: AbortSignal;
|
|
3791
|
+
}): Promise<void>;
|
|
3184
3792
|
/**
|
|
3185
3793
|
* Lightweight sync with Ark server and blockchain
|
|
3186
3794
|
* Note: Bark's sync() handles errors internally with logging.
|
|
3187
3795
|
* The Throws annotation is for forward compatibility only.
|
|
3188
3796
|
*/
|
|
3189
|
-
sync(
|
|
3797
|
+
sync(asyncOpts_?: {
|
|
3798
|
+
signal: AbortSignal;
|
|
3799
|
+
}): Promise<void>;
|
|
3190
3800
|
/**
|
|
3191
3801
|
* Sync exit state (checks status but doesn't progress)
|
|
3192
3802
|
*/
|
|
3193
|
-
syncExits(onchainWallet: OnchainWalletInterface
|
|
3803
|
+
syncExits(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
|
|
3804
|
+
signal: AbortSignal;
|
|
3805
|
+
}): Promise<void>;
|
|
3194
3806
|
/**
|
|
3195
3807
|
* Sync pending board transactions
|
|
3196
3808
|
*/
|
|
3197
|
-
syncPendingBoards(
|
|
3198
|
-
|
|
3809
|
+
syncPendingBoards(asyncOpts_?: {
|
|
3810
|
+
signal: AbortSignal;
|
|
3811
|
+
}): Promise<void>;
|
|
3812
|
+
tryClaimAllLightningReceives(wait: boolean, asyncOpts_?: {
|
|
3813
|
+
signal: AbortSignal;
|
|
3814
|
+
}): Promise<Array<LightningReceive>>;
|
|
3199
3815
|
/**
|
|
3200
3816
|
* Try to claim a specific lightning receive by payment hash
|
|
3201
3817
|
*
|
|
@@ -3204,7 +3820,9 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
3204
3820
|
* * `payment_hash` - Payment hash as hex string
|
|
3205
3821
|
* * `wait` - Whether to wait for claim to complete
|
|
3206
3822
|
*/
|
|
3207
|
-
tryClaimLightningReceive(paymentHash: string, wait: boolean
|
|
3823
|
+
tryClaimLightningReceive(paymentHash: string, wait: boolean, asyncOpts_?: {
|
|
3824
|
+
signal: AbortSignal;
|
|
3825
|
+
}): Promise<void>;
|
|
3208
3826
|
/**
|
|
3209
3827
|
* Validate an Ark address against the connected server
|
|
3210
3828
|
*
|
|
@@ -3212,8 +3830,12 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
|
|
|
3212
3830
|
* belongs to the currently connected Ark server.
|
|
3213
3831
|
* For basic format validation only, use validate_ark_address() instead.
|
|
3214
3832
|
*/
|
|
3215
|
-
validateArkoorAddress(address: string
|
|
3216
|
-
|
|
3833
|
+
validateArkoorAddress(address: string, asyncOpts_?: {
|
|
3834
|
+
signal: AbortSignal;
|
|
3835
|
+
}): Promise<boolean>;
|
|
3836
|
+
vtxos(asyncOpts_?: {
|
|
3837
|
+
signal: AbortSignal;
|
|
3838
|
+
}): Promise<Array<Vtxo>>;
|
|
3217
3839
|
/**
|
|
3218
3840
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
3219
3841
|
*/
|
|
@@ -3318,6 +3940,13 @@ declare const _default: Readonly<{
|
|
|
3318
3940
|
lift(value: Uint8Array): ExitVtxo;
|
|
3319
3941
|
lower(value: ExitVtxo): Uint8Array;
|
|
3320
3942
|
};
|
|
3943
|
+
FfiConverterTypeFeeEstimate: {
|
|
3944
|
+
read(from: RustBuffer): FeeEstimate;
|
|
3945
|
+
write(value: FeeEstimate, into: RustBuffer): void;
|
|
3946
|
+
allocationSize(value: FeeEstimate): number;
|
|
3947
|
+
lift(value: Uint8Array): FeeEstimate;
|
|
3948
|
+
lower(value: FeeEstimate): Uint8Array;
|
|
3949
|
+
};
|
|
3321
3950
|
FfiConverterTypeLightningInvoice: {
|
|
3322
3951
|
read(from: RustBuffer): LightningInvoice;
|
|
3323
3952
|
write(value: LightningInvoice, into: RustBuffer): void;
|
|
@@ -3353,6 +3982,7 @@ declare const _default: Readonly<{
|
|
|
3353
3982
|
lift(value: Uint8Array): Network;
|
|
3354
3983
|
lower(value: Network): Uint8Array;
|
|
3355
3984
|
};
|
|
3985
|
+
FfiConverterTypeNotificationHolder: FfiConverterObject<NotificationHolderInterface>;
|
|
3356
3986
|
FfiConverterTypeOffboardResult: {
|
|
3357
3987
|
read(from: RustBuffer): OffboardResult;
|
|
3358
3988
|
write(value: OffboardResult, into: RustBuffer): void;
|
|
@@ -3397,6 +4027,13 @@ declare const _default: Readonly<{
|
|
|
3397
4027
|
lower(value: Vtxo): Uint8Array;
|
|
3398
4028
|
};
|
|
3399
4029
|
FfiConverterTypeWallet: FfiConverterObject<WalletInterface>;
|
|
4030
|
+
FfiConverterTypeWalletNotification: {
|
|
4031
|
+
read(from: RustBuffer): WalletNotification;
|
|
4032
|
+
write(value: WalletNotification, into: RustBuffer): void;
|
|
4033
|
+
allocationSize(value: WalletNotification): number;
|
|
4034
|
+
lift(value: Uint8Array): WalletNotification;
|
|
4035
|
+
lower(value: WalletNotification): Uint8Array;
|
|
4036
|
+
};
|
|
3400
4037
|
FfiConverterTypeWalletProperties: {
|
|
3401
4038
|
read(from: RustBuffer): WalletProperties;
|
|
3402
4039
|
write(value: WalletProperties, into: RustBuffer): void;
|