@lightninglabs/wavelength-core 0.1.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.
Files changed (93) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +31 -0
  3. package/dist/activity-options.d.ts +15 -0
  4. package/dist/activity-options.d.ts.map +1 -0
  5. package/dist/activity-options.js +7 -0
  6. package/dist/base-client.d.ts +59 -0
  7. package/dist/base-client.d.ts.map +1 -0
  8. package/dist/base-client.js +144 -0
  9. package/dist/casing.d.ts +4 -0
  10. package/dist/casing.d.ts.map +1 -0
  11. package/dist/casing.js +42 -0
  12. package/dist/client.d.ts +90 -0
  13. package/dist/client.d.ts.map +1 -0
  14. package/dist/client.js +1 -0
  15. package/dist/config.d.ts +128 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/config.js +142 -0
  18. package/dist/destination.d.ts +56 -0
  19. package/dist/destination.d.ts.map +1 -0
  20. package/dist/destination.js +90 -0
  21. package/dist/engine/activity.d.ts +25 -0
  22. package/dist/engine/activity.d.ts.map +1 -0
  23. package/dist/engine/activity.js +119 -0
  24. package/dist/engine/constants.d.ts +29 -0
  25. package/dist/engine/constants.d.ts.map +1 -0
  26. package/dist/engine/constants.js +29 -0
  27. package/dist/engine/engine.d.ts +115 -0
  28. package/dist/engine/engine.d.ts.map +1 -0
  29. package/dist/engine/engine.js +548 -0
  30. package/dist/engine/machine.d.ts +50 -0
  31. package/dist/engine/machine.d.ts.map +1 -0
  32. package/dist/engine/machine.js +55 -0
  33. package/dist/engine/optionsAssertions.d.ts +2 -0
  34. package/dist/engine/optionsAssertions.d.ts.map +1 -0
  35. package/dist/engine/optionsAssertions.js +20 -0
  36. package/dist/engine/poller.d.ts +20 -0
  37. package/dist/engine/poller.d.ts.map +1 -0
  38. package/dist/engine/poller.js +51 -0
  39. package/dist/engine/reconcile.d.ts +36 -0
  40. package/dist/engine/reconcile.d.ts.map +1 -0
  41. package/dist/engine/reconcile.js +81 -0
  42. package/dist/engine/snapshot.d.ts +58 -0
  43. package/dist/engine/snapshot.d.ts.map +1 -0
  44. package/dist/engine/snapshot.js +10 -0
  45. package/dist/engine/stabilize.d.ts +8 -0
  46. package/dist/engine/stabilize.d.ts.map +1 -0
  47. package/dist/engine/stabilize.js +17 -0
  48. package/dist/engine/store.d.ts +21 -0
  49. package/dist/engine/store.d.ts.map +1 -0
  50. package/dist/engine/store.js +46 -0
  51. package/dist/errors.d.ts +55 -0
  52. package/dist/errors.d.ts.map +1 -0
  53. package/dist/errors.js +80 -0
  54. package/dist/events.d.ts +62 -0
  55. package/dist/events.d.ts.map +1 -0
  56. package/dist/events.js +1 -0
  57. package/dist/exit.d.ts +93 -0
  58. package/dist/exit.d.ts.map +1 -0
  59. package/dist/exit.js +86 -0
  60. package/dist/facade.d.ts +88 -0
  61. package/dist/facade.d.ts.map +1 -0
  62. package/dist/facade.js +150 -0
  63. package/dist/generated.d.ts +1197 -0
  64. package/dist/generated.d.ts.map +1 -0
  65. package/dist/generated.js +206 -0
  66. package/dist/index.d.ts +28 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.js +36 -0
  69. package/dist/passkey.d.ts +46 -0
  70. package/dist/passkey.d.ts.map +1 -0
  71. package/dist/passkey.js +16 -0
  72. package/dist/public-api-assertions.d.ts +2 -0
  73. package/dist/public-api-assertions.d.ts.map +1 -0
  74. package/dist/public-api-assertions.js +42 -0
  75. package/dist/request-assertions.d.ts +2 -0
  76. package/dist/request-assertions.d.ts.map +1 -0
  77. package/dist/request-assertions.js +12 -0
  78. package/dist/requests.d.ts +186 -0
  79. package/dist/requests.d.ts.map +1 -0
  80. package/dist/requests.js +5 -0
  81. package/dist/response-normalization.d.ts +5 -0
  82. package/dist/response-normalization.d.ts.map +1 -0
  83. package/dist/response-normalization.js +101 -0
  84. package/dist/results.d.ts +49 -0
  85. package/dist/results.d.ts.map +1 -0
  86. package/dist/results.js +4 -0
  87. package/dist/state.d.ts +87 -0
  88. package/dist/state.d.ts.map +1 -0
  89. package/dist/state.js +87 -0
  90. package/dist/version.d.ts +18 -0
  91. package/dist/version.d.ts.map +1 -0
  92. package/dist/version.js +17 -0
  93. package/package.json +42 -0
@@ -0,0 +1,1197 @@
1
+ /**
2
+ * Client is the wallet-facing SDK handle. It is safe for concurrent use.
3
+ */
4
+ export interface Client {
5
+ }
6
+ /**
7
+ * Option mutates the embedded daemon configuration during Start. Functional
8
+ * options express knobs that cannot be modeled by Config's plain-bool
9
+ * enable-only fields, where "leave at zero" cannot be distinguished from
10
+ * "explicit false".
11
+ */
12
+ export type Option = any;
13
+ /**
14
+ * Config controls the embedded daemon and wallet facade.
15
+ */
16
+ export interface Config {
17
+ /**
18
+ * DaemonConfig supplies the full daemon config. When nil, wavewalletdk
19
+ * starts from waved.DefaultConfig and applies the convenience fields
20
+ * below.
21
+ */
22
+ daemonConfig?: any;
23
+ /**
24
+ * DataDir is the root directory for daemon and wallet state.
25
+ */
26
+ dataDir: string;
27
+ /**
28
+ * Network selects the bitcoin network.
29
+ */
30
+ network: string;
31
+ /**
32
+ * DebugLevel controls daemon logging verbosity.
33
+ */
34
+ debugLevel: string;
35
+ /**
36
+ * LogWriter receives daemon logs. Nil uses waved's default stdout.
37
+ */
38
+ logWriter: any;
39
+ /**
40
+ * AllowMainnet must be true when Network is mainnet. This is an
41
+ * enable-only convenience override; set DaemonConfig directly when
42
+ * a caller-owned config needs an explicit false value.
43
+ */
44
+ allowMainnet: boolean;
45
+ /**
46
+ * ServerAddress is the Ark operator mailbox edge server address. Empty
47
+ * selects the daemon network+transport default.
48
+ */
49
+ serverAddress: string;
50
+ /**
51
+ * ServerTransport selects how the embedded daemon talks to the Ark
52
+ * operator and mailbox edge. Empty defaults to gRPC.
53
+ */
54
+ serverTransport: Transport;
55
+ /**
56
+ * ServerTLSCertPath pins the Ark operator TLS certificate.
57
+ */
58
+ serverTLSCertPath: string;
59
+ /**
60
+ * ServerInsecure disables TLS for the Ark operator connection. This
61
+ * is an enable-only convenience override; set DaemonConfig directly
62
+ * when a caller-owned config needs an explicit false value.
63
+ */
64
+ serverInsecure: boolean;
65
+ /**
66
+ * WalletType selects the backing wallet implementation.
67
+ */
68
+ walletType: string;
69
+ /**
70
+ * WalletEsploraURL is used by the lwwallet backend.
71
+ */
72
+ walletEsploraURL: string;
73
+ /**
74
+ * WalletPasswordFile enables daemon auto-unlock for lwwallet.
75
+ */
76
+ walletPasswordFile: string;
77
+ /**
78
+ * WalletPollInterval overrides the lwwallet chain poll interval.
79
+ */
80
+ walletPollInterval: any;
81
+ /**
82
+ * WalletRecoveryWindow overrides the wallet address look-ahead window.
83
+ */
84
+ walletRecoveryWindow: number;
85
+ /**
86
+ * WalletFeeURL is the fee estimator endpoint used by btcwallet.
87
+ */
88
+ walletFeeURL: string;
89
+ /**
90
+ * WalletBtcwalletBlockHeadersSource is a local file path or HTTP(S)
91
+ * URL that btcwallet/neutrino imports block headers from on startup.
92
+ */
93
+ walletBtcwalletBlockHeadersSource: string;
94
+ /**
95
+ * WalletBtcwalletFilterHeadersSource is a local file path or HTTP(S)
96
+ * URL that btcwallet/neutrino imports compact filter headers from on
97
+ * startup.
98
+ */
99
+ walletBtcwalletFilterHeadersSource: string;
100
+ /**
101
+ * SwapServerAddress is the swap server address for the selected
102
+ * transport. Empty selects the daemon network+transport default.
103
+ */
104
+ swapServerAddress: string;
105
+ /**
106
+ * SwapServerTransport selects how the embedded daemon talks to the
107
+ * swap server. Empty defaults to gRPC.
108
+ */
109
+ swapServerTransport: Transport;
110
+ /**
111
+ * SwapServerTLSCertPath pins the swap server TLS certificate.
112
+ */
113
+ swapServerTLSCertPath: string;
114
+ /**
115
+ * SwapServerInsecure disables TLS for the swap server connection.
116
+ * This is an enable-only convenience override; set DaemonConfig
117
+ * directly when a caller-owned config needs an explicit false value.
118
+ */
119
+ swapServerInsecure: boolean;
120
+ /**
121
+ * SwapDatabaseFileName is the daemon-owned swap SQLite database path.
122
+ */
123
+ swapDatabaseFileName: string;
124
+ /**
125
+ * MaxOperatorFeeSat caps the per-round operator fee the daemon accepts.
126
+ */
127
+ maxOperatorFeeSat: number;
128
+ /**
129
+ * SigningWorkers bounds concurrent VTXO MuSig2 signer sessions. Zero
130
+ * selects the wallet-backend default and one forces serial signing.
131
+ */
132
+ signingWorkers: number;
133
+ /**
134
+ * EagerRoundJoin makes the embedded daemon's wallet drive
135
+ * round-joining without waiting for a follow-up Board /
136
+ * LeaveVTXOs RPC. With the flag on, freshly confirmed boarding
137
+ * deposits join the next round automatically, and the wallet's
138
+ * Exit / cooperative-leave path fires registration immediately
139
+ * rather than batching. The wavewalletrpc-tagged embedded build
140
+ * that wavewalletdk targets already defaults this to true via
141
+ * waved.DefaultConfig, so leaving this field at the zero
142
+ * value is the right choice for nearly every host. Set true
143
+ * only to force the override when supplying a caller-owned
144
+ * DaemonConfig that currently carries false. To force eager
145
+ * round-join OFF, pass WithEagerRoundJoinDisabled() to Start
146
+ * rather than mutating this field.
147
+ */
148
+ eagerRoundJoin: boolean;
149
+ /**
150
+ * BufferSize overrides the bufconn listener buffer size.
151
+ */
152
+ bufferSize: number;
153
+ }
154
+ /**
155
+ * SubscribeGapError signals that a live SubscribeWallet stream fell behind (the
156
+ * server-side send buffer overflowed). No activity is lost: the consumer should
157
+ * open a new subscription with SubscribeRequest.Cursor set to Cursor, and the
158
+ * replay from it is gap-free because the event log retains everything after it.
159
+ */
160
+ export interface SubscribeGapError {
161
+ /**
162
+ * Cursor is the resume point: the last event-log position the stream
163
+ * is known to have covered before falling behind.
164
+ */
165
+ cursor: number;
166
+ /**
167
+ * Reason is the daemon's human-readable description of the gap.
168
+ */
169
+ reason: string;
170
+ }
171
+ /**
172
+ * ConnectConfig controls a wavewalletdk client connected to an external daemon.
173
+ */
174
+ export interface ConnectConfig {
175
+ /**
176
+ * Address is the target of a daemon exposing wavewalletrpc. For gRPC
177
+ * transport this is the gRPC address; for REST transport this is the
178
+ * HTTP gateway base address.
179
+ */
180
+ address: string;
181
+ /**
182
+ * Transport selects how Connect talks to the daemon. Empty defaults to
183
+ * TransportGRPC.
184
+ */
185
+ transport: Transport;
186
+ /**
187
+ * TLSCertPath is an optional daemon TLS certificate path. When empty,
188
+ * wavewalletdk uses system roots unless Insecure is set.
189
+ */
190
+ tLSCertPath: string;
191
+ /**
192
+ * MacaroonPath is an optional daemon RPC macaroon path.
193
+ */
194
+ macaroonPath: string;
195
+ /**
196
+ * Insecure disables TLS for local development or injected listeners.
197
+ */
198
+ insecure: boolean;
199
+ /**
200
+ * DialOptions are appended to the transport and auth dial options.
201
+ * Only used with TransportGRPC.
202
+ */
203
+ dialOptions: any[];
204
+ /**
205
+ * HTTPClient is the HTTP client used with TransportREST. Nil uses
206
+ * http.DefaultClient, or a TLS-cert-specific client when TLSCertPath
207
+ * is set.
208
+ */
209
+ hTTPClient?: any;
210
+ }
211
+ /**
212
+ * Transport selects the RPC transport used by Connect.
213
+ */
214
+ export type Transport = "grpc" | "rest";
215
+ /**
216
+ * TransportGRPC connects to the daemon with native gRPC.
217
+ */
218
+ export declare const TransportGRPC: Transport;
219
+ /**
220
+ * TransportREST connects to the daemon through grpc-gateway HTTP/JSON.
221
+ */
222
+ export declare const TransportREST: Transport;
223
+ /**
224
+ * WalletState mirrors the daemon's wallet lifecycle enum so SDK
225
+ * consumers can render wallet setup progress without collapsing
226
+ * LOCKED and SYNCING into one "not ready" state. WalletStateSyncing
227
+ * and WalletStateReady mean seed material is loaded; only
228
+ * WalletStateReady means the wallet is fully usable.
229
+ */
230
+ export type WalletState = 0 | 1 | 2 | 3 | 4;
231
+ /**
232
+ * WalletStateUnspecified is the proto3 zero value. The daemon
233
+ * never emits this; reserved so a missing field deserializes to
234
+ * a safe non-ready state.
235
+ */
236
+ export declare const WalletStateUnspecified: WalletState;
237
+ /**
238
+ * WalletStateNone indicates no wallet has been created yet.
239
+ */
240
+ export declare const WalletStateNone: WalletState;
241
+ /**
242
+ * WalletStateLocked indicates a wallet database exists but its
243
+ * password has not been provided; signing is unavailable.
244
+ */
245
+ export declare const WalletStateLocked: WalletState;
246
+ /**
247
+ * WalletStateReady indicates the wallet is initialized, unlocked,
248
+ * and signing is available.
249
+ */
250
+ export declare const WalletStateReady: WalletState;
251
+ /**
252
+ * WalletStateSyncing indicates the wallet is unlocked and the
253
+ * backing chain source is catching up before wallet RPCs are safe.
254
+ */
255
+ export declare const WalletStateSyncing: WalletState;
256
+ /**
257
+ * Info summarizes daemon readiness for wallet applications.
258
+ */
259
+ export interface Info {
260
+ version: string;
261
+ commit: string;
262
+ network: string;
263
+ blockHeight: number;
264
+ serverConnected: boolean;
265
+ walletType: string;
266
+ walletState: WalletState;
267
+ identityPubKey: string;
268
+ serverInfo?: ServerInfo;
269
+ }
270
+ /**
271
+ * ServerInfo contains the operator policy hints needed by wallet hosts.
272
+ */
273
+ export interface ServerInfo {
274
+ /**
275
+ * FreeRefreshWindowBlocks is the late-lifetime window in which a
276
+ * pure refresh receives a fee waiver.
277
+ */
278
+ freeRefreshWindowBlocks: number;
279
+ }
280
+ /**
281
+ * CreateWalletRequest creates or imports a daemon wallet.
282
+ */
283
+ export interface CreateWalletRequest {
284
+ mnemonic: string[];
285
+ seedPassphrase: string;
286
+ walletPassword: string;
287
+ recoverState: boolean;
288
+ recoveryWindow: number;
289
+ }
290
+ /**
291
+ * CreateWalletResult returns the seed words, daemon identity, and optional
292
+ * recovery counters.
293
+ */
294
+ export interface CreateWalletResult {
295
+ mnemonic: string[];
296
+ encipheredSeed: string;
297
+ identityPubKey: string;
298
+ recoveryRan: boolean;
299
+ recoveredBoardingAddresses: number;
300
+ recoveredBoardingUTXOs: number;
301
+ recoveredVTXOs: number;
302
+ recoveredOORReceiveScripts: number;
303
+ recoveredOORRecipientEvents: number;
304
+ }
305
+ /**
306
+ * UnlockWalletRequest unlocks an existing embedded daemon wallet.
307
+ */
308
+ export interface UnlockWalletRequest {
309
+ walletPassword: string;
310
+ }
311
+ /**
312
+ * UnlockWalletResult returns the daemon identity after unlock.
313
+ */
314
+ export interface UnlockWalletResult {
315
+ identityPubKey: string;
316
+ }
317
+ /**
318
+ * OpenWalletResult reports the outcome of OpenWalletFromPasskey. Imported is
319
+ * true when a new local wallet was created from the derived seed (fresh
320
+ * device); false when an existing local wallet was unlocked. Mnemonic is set
321
+ * only on import, for backup display.
322
+ */
323
+ export interface OpenWalletResult {
324
+ imported: boolean;
325
+ mnemonic: string[];
326
+ identityPubKey: string;
327
+ }
328
+ /**
329
+ * Balance is the wallet-level balance view.
330
+ */
331
+ export interface Balance {
332
+ confirmedSat: number;
333
+ pendingInSat: number;
334
+ pendingOutSat: number;
335
+ creditAvailableSat: number;
336
+ creditReservedSat: number;
337
+ }
338
+ /**
339
+ * DepositRequest creates a tracked boarding address.
340
+ */
341
+ export interface DepositRequest {
342
+ amountSatHint: number;
343
+ }
344
+ /**
345
+ * DepositResult returns a boarding address and its initial activity entry.
346
+ */
347
+ export interface DepositResult {
348
+ address: string;
349
+ entry: Entry;
350
+ }
351
+ /**
352
+ * ReceiveRequest creates a Lightning invoice payable into the wallet.
353
+ */
354
+ export interface ReceiveRequest {
355
+ amountSat: number;
356
+ memo: string;
357
+ }
358
+ /**
359
+ * ReceiveResult contains the invoice and initial wallet entry.
360
+ */
361
+ export interface ReceiveResult {
362
+ invoice: string;
363
+ entry: Entry;
364
+ }
365
+ /**
366
+ * PrepareSendRequest validates and previews an outbound payment without
367
+ * moving funds.
368
+ */
369
+ export interface PrepareSendRequest {
370
+ invoice: string;
371
+ onchainAddress: string;
372
+ amountSat: number;
373
+ note: string;
374
+ maxFeeSat: number;
375
+ /**
376
+ * SweepAll drains every live VTXO to OnchainAddress. PrepareSend
377
+ * snapshots the live VTXO set and SendPrepared later spends that
378
+ * exact set. Ignored on the invoice path.
379
+ */
380
+ sweepAll: boolean;
381
+ }
382
+ /**
383
+ * SendRail identifies the expected settlement rail for a prepared send.
384
+ */
385
+ export type SendRail = "unspecified" | "offchain_unknown" | "in_ark" | "lightning" | "onchain" | "credit" | "mixed";
386
+ export declare const SendRailUnspecified: SendRail;
387
+ export declare const SendRailOffchainUnknown: SendRail;
388
+ export declare const SendRailInArk: SendRail;
389
+ export declare const SendRailLightning: SendRail;
390
+ export declare const SendRailOnchain: SendRail;
391
+ export declare const SendRailCredit: SendRail;
392
+ export declare const SendRailMixed: SendRail;
393
+ /**
394
+ * SendQuoteStatus describes how complete the prepare-time quote is.
395
+ */
396
+ export type SendQuoteStatus = "unspecified" | "complete" | "local_only";
397
+ export declare const SendQuoteStatusUnspecified: SendQuoteStatus;
398
+ export declare const SendQuoteStatusComplete: SendQuoteStatus;
399
+ export declare const SendQuoteStatusLocalOnly: SendQuoteStatus;
400
+ /**
401
+ * PrepareSendResult contains the preview and intent id for a send.
402
+ */
403
+ export interface PrepareSendResult {
404
+ sendIntentId: string;
405
+ amountSat: number;
406
+ expectedFeeSat: number;
407
+ feeKnown: boolean;
408
+ expectedTotalOutflowSat: number;
409
+ totalOutflowKnown: boolean;
410
+ rail: SendRail;
411
+ quoteStatus: SendQuoteStatus;
412
+ destinationSummary: string;
413
+ invoiceDescription: string;
414
+ paymentHash: string;
415
+ expiresAtUnix: number;
416
+ selectedOutpoints: string[];
417
+ warning: string;
418
+ creditPreview?: CreditPreview;
419
+ }
420
+ /**
421
+ * CreditPreview describes how a prepared invoice send will use sat-native
422
+ * server credits.
423
+ */
424
+ export interface CreditPreview {
425
+ mustUseCredit: boolean;
426
+ creditAppliedSat: number;
427
+ creditShortfallSat: number;
428
+ creditTopupSat: number;
429
+ arkFundingSat: number;
430
+ }
431
+ /**
432
+ * SendPreparedRequest dispatches a prepared outbound payment.
433
+ */
434
+ export interface SendPreparedRequest {
435
+ /**
436
+ * SendIntentID is consumed before dispatch. If dispatch returns an
437
+ * error, callers should prepare a fresh send before retrying.
438
+ */
439
+ sendIntentId: string;
440
+ }
441
+ /**
442
+ * SendResult contains the initial wallet entry for an outbound payment.
443
+ */
444
+ export interface SendResult {
445
+ entry: Entry;
446
+ /**
447
+ * ActualAmountSat is the real amount that will leave the wallet for
448
+ * this operation. For invoice sends it matches the invoice principal.
449
+ * For a bounded onchain send it matches the requested amount (the
450
+ * seal-time fee handshake returns change). For a sweep-all onchain
451
+ * send it reflects the swept VTXO total, so host UIs SHOULD echo it
452
+ * back to the user before treating the send as confirmed.
453
+ */
454
+ actualAmountSat: number;
455
+ }
456
+ /**
457
+ * ListView selects which slice of wallet state List returns. The empty
458
+ * value is treated as ListViewActivity for backwards-feel.
459
+ */
460
+ export type ListView = "activity" | "vtxos" | "onchain";
461
+ /**
462
+ * ListViewActivity returns the merged WalletEntry stream
463
+ * (send / recv / deposit / exit). Default.
464
+ */
465
+ export declare const ListViewActivity: ListView;
466
+ /**
467
+ * ListViewVTXOs returns the live VTXO inventory.
468
+ */
469
+ export declare const ListViewVTXOs: ListView;
470
+ /**
471
+ * ListViewOnchain returns the on-chain transaction history
472
+ * (boarding, sweeps, leave outputs).
473
+ */
474
+ export declare const ListViewOnchain: ListView;
475
+ /**
476
+ * ListRequest controls wallet activity listing. View selects the slice
477
+ * of wallet state to return; PendingOnly and Kinds apply only when
478
+ * View is ListViewActivity (or empty).
479
+ */
480
+ export interface ListRequest {
481
+ /**
482
+ * View selects the response shape. Empty is treated as
483
+ * ListViewActivity.
484
+ */
485
+ view: ListView;
486
+ /**
487
+ * PendingOnly applies to ListViewActivity only.
488
+ */
489
+ pendingOnly: boolean;
490
+ /**
491
+ * Kinds applies to ListViewActivity only.
492
+ */
493
+ kinds: EntryKind[];
494
+ /**
495
+ * Limit caps the page size; zero uses the daemon default.
496
+ */
497
+ limit: number;
498
+ /**
499
+ * Offset is the pagination offset. It applies to the VTXOs and
500
+ * Onchain views; the Activity view paginates by Cursor and ignores
501
+ * Offset.
502
+ */
503
+ offset: number;
504
+ /**
505
+ * Cursor is the opaque pagination token for the Activity view. Empty
506
+ * starts from the newest entry; otherwise pass the NextCursor returned
507
+ * by the previous ActivityList page.
508
+ */
509
+ cursor: string;
510
+ }
511
+ /**
512
+ * ListResult is a tagged union: exactly one of Activity, VTXOs, or
513
+ * Onchain is populated according to the view requested. Callers should
514
+ * switch on View to pick the right field.
515
+ */
516
+ export interface ListResult {
517
+ /**
518
+ * View is the populated variant. Mirrors ListRequest.View; an
519
+ * empty request view is reported as ListViewActivity.
520
+ */
521
+ view: ListView;
522
+ /**
523
+ * Activity is populated when View == ListViewActivity.
524
+ */
525
+ activity?: ActivityList;
526
+ /**
527
+ * VTXOs is populated when View == ListViewVTXOs.
528
+ */
529
+ vtxos?: VTXOInventory;
530
+ /**
531
+ * Onchain is populated when View == ListViewOnchain.
532
+ */
533
+ onchain?: OnchainHistory;
534
+ }
535
+ /**
536
+ * ActivityList is the merged WalletEntry stream returned by the
537
+ * activity view.
538
+ */
539
+ export interface ActivityList {
540
+ entries: Entry[];
541
+ /**
542
+ * Total is the number of entries on this page, not a full-feed count:
543
+ * the feed is cursor-paged, so use HasMore to decide whether to fetch
544
+ * again.
545
+ */
546
+ total: number;
547
+ /**
548
+ * HasMore reports whether more entries exist after this page.
549
+ */
550
+ hasMore: boolean;
551
+ /**
552
+ * NextCursor is the token to pass as ListRequest.Cursor to fetch the
553
+ * next page. Empty when HasMore is false.
554
+ */
555
+ nextCursor: string;
556
+ }
557
+ /**
558
+ * VTXOInventory is the live VTXO inventory returned by the vtxos view.
559
+ */
560
+ export interface VTXOInventory {
561
+ vtxos: WalletVTXO[];
562
+ total: number;
563
+ }
564
+ /**
565
+ * WalletVTXO is the wallet-facing view of one VTXO. Internal lifecycle
566
+ * detail (forfeiting flow, chain depth) is hidden; power-users reach
567
+ * the full shape via `ark vtxos list`.
568
+ */
569
+ export interface WalletVTXO {
570
+ outpoint: string;
571
+ amountSat: number;
572
+ status: string;
573
+ batchExpiry: number;
574
+ relativeExpiry: number;
575
+ commitmentTxid: string;
576
+ }
577
+ /**
578
+ * OnchainHistory is the on-chain transaction history returned by the
579
+ * onchain view.
580
+ */
581
+ export interface OnchainHistory {
582
+ txs: OnchainTx[];
583
+ total: number;
584
+ hasMore: boolean;
585
+ }
586
+ /**
587
+ * OnchainTx is the wallet-facing view of one on-chain transaction.
588
+ */
589
+ export interface OnchainTx {
590
+ txid: string;
591
+ kind: string;
592
+ amountSat: number;
593
+ feeSat: number;
594
+ status: string;
595
+ confirmationHeight: number;
596
+ createdAt: string;
597
+ description: string;
598
+ }
599
+ /**
600
+ * ExitRequest triggers an exit for a VTXO outpoint. When Destination is
601
+ * set, the SDK first attempts a cooperative leave (LeaveVTXOs RPC) with
602
+ * the leave output bound for the supplied on-chain address; if that path
603
+ * succeeds, the SDK returns a cooperative result. Unilateral unroll is
604
+ * reachable only when ForceUnrollAck carries the daemon's exact
605
+ * acknowledgement string.
606
+ */
607
+ export interface ExitRequest {
608
+ /**
609
+ * Outpoint identifies the VTXO to exit in "txid:index" format.
610
+ */
611
+ outpoint: string;
612
+ /**
613
+ * Destination is the on-chain address that receives the leave
614
+ * output when the cooperative path succeeds. The address must be
615
+ * valid for the daemon's configured network. Empty asks the daemon
616
+ * to generate a fresh backing-wallet destination internally.
617
+ */
618
+ destination: string;
619
+ /**
620
+ * ForceUnrollAck must be exactly "I_KNOW_WHAT_I_AM_DOING" to bypass
621
+ * cooperative leave and start unilateral unroll. Cannot be combined
622
+ * with Destination; the server rejects the pair with InvalidArgument.
623
+ */
624
+ forceUnrollAck: string;
625
+ }
626
+ /**
627
+ * ExitPath identifies which branch of the Exit decision tree the
628
+ * daemon ended up taking. Callers should switch on Path rather than
629
+ * chaining nil-checks across the result's variant fields.
630
+ */
631
+ export type ExitPath = "cooperative" | "unilateral" | "unilateral_fallback";
632
+ /**
633
+ * ExitPathCooperative means the cooperative leave was admitted by
634
+ * the operator; QueuedOutpoints carries the round's selection
635
+ * echo. Cooperative round completion is asynchronous; subscribe
636
+ * via wavewalletrpc.SubscribeWallet to confirm terminal state.
637
+ */
638
+ export declare const ExitPathCooperative: ExitPath;
639
+ /**
640
+ * ExitPathUnilateral means the caller supplied the exact force
641
+ * acknowledgement and the daemon started unilateral unroll. Created
642
+ * and ActorID describe the unilateral unroll job.
643
+ */
644
+ export declare const ExitPathUnilateral: ExitPath;
645
+ /**
646
+ * ExitPathUnilateralFallback is retained for source compatibility
647
+ * with the prior SDK result shape. New forced unrolls return
648
+ * ExitPathUnilateral; current wallet RPC behavior never returns this
649
+ * path because cooperative failures are surfaced directly.
650
+ */
651
+ export declare const ExitPathUnilateralFallback: ExitPath;
652
+ /**
653
+ * ExitResult is a tagged union over the three exit paths. Callers
654
+ * should read Path first and only inspect the variant fields
655
+ * associated with that path; the remaining fields are zero-valued.
656
+ */
657
+ export interface ExitResult {
658
+ /**
659
+ * Path discriminates between the three legal outcomes; callers
660
+ * MUST switch on Path before reading the variant fields below.
661
+ */
662
+ path: ExitPath;
663
+ /**
664
+ * Cooperative is true iff Path == ExitPathCooperative. Retained
665
+ * for backwards compatibility with the v1 result shape; new
666
+ * callers should prefer Path.
667
+ */
668
+ cooperative: boolean;
669
+ /**
670
+ * QueuedOutpoints lists the outpoints the cooperative leave
671
+ * admitted into a round. Populated only when
672
+ * Path == ExitPathCooperative.
673
+ */
674
+ queuedOutpoints: string[];
675
+ /**
676
+ * Created reports whether the unilateral-unroll path spawned a
677
+ * fresh job. Populated when Path is ExitPathUnilateral or
678
+ * ExitPathUnilateralFallback.
679
+ */
680
+ created: boolean;
681
+ /**
682
+ * ActorID identifies the durable unroll job that owns the
683
+ * unilateral path. Populated when Path is ExitPathUnilateral or
684
+ * ExitPathUnilateralFallback.
685
+ */
686
+ actorID: string;
687
+ /**
688
+ * CooperativeError is retained for source compatibility with the
689
+ * prior SDK fallback result shape. Current wallet RPC behavior never
690
+ * populates it because cooperative failures are returned directly
691
+ * instead of falling back to unilateral unroll.
692
+ */
693
+ cooperativeError: string;
694
+ }
695
+ /**
696
+ * ExitStatusRequest queries the current phase of an exit job.
697
+ */
698
+ export interface ExitStatusRequest {
699
+ outpoint: string;
700
+ /**
701
+ * Detailed requests recovery-tree progress, a CSV maturity countdown,
702
+ * a fee breakdown, and a best-case block countdown. It costs one live
703
+ * actor round-trip plus a fee estimate, so leave it false for a coarse,
704
+ * cheaper phase-only status.
705
+ */
706
+ detailed: boolean;
707
+ }
708
+ /**
709
+ * ExitJobStatus collapses the underlying unroll job phases to a short
710
+ * wallet-facing string set.
711
+ */
712
+ export type ExitJobStatus = "unspecified" | "pending" | "materializing" | "csv_pending" | "sweeping" | "completed" | "failed";
713
+ export declare const ExitJobStatusUnspecified: ExitJobStatus;
714
+ export declare const ExitJobStatusPending: ExitJobStatus;
715
+ export declare const ExitJobStatusMaterializing: ExitJobStatus;
716
+ export declare const ExitJobStatusCSVPending: ExitJobStatus;
717
+ export declare const ExitJobStatusSweeping: ExitJobStatus;
718
+ export declare const ExitJobStatusCompleted: ExitJobStatus;
719
+ export declare const ExitJobStatusFailed: ExitJobStatus;
720
+ /**
721
+ * ExitStatusResult reports the status of one exit job. Found is false
722
+ * when no job exists for the requested outpoint (not an error).
723
+ */
724
+ export interface ExitStatusResult {
725
+ found: boolean;
726
+ status: ExitJobStatus;
727
+ sweepTxid: string;
728
+ lastError: string;
729
+ /**
730
+ * PhaseDetail is a one-line human description of the current phase.
731
+ * Empty on a coarse (non-detailed) query.
732
+ */
733
+ phaseDetail: string;
734
+ /**
735
+ * Progress is the recovery-tree materialization progress. Nil on a
736
+ * coarse query, or when no live actor backs the job.
737
+ */
738
+ progress?: ExitProgress;
739
+ /**
740
+ * CSV is the target's CSV maturity countdown. Nil until the target
741
+ * confirms.
742
+ */
743
+ cSV?: ExitCSV;
744
+ /**
745
+ * Fees is the on-chain cost breakdown for the exit. Nil on a coarse
746
+ * query.
747
+ */
748
+ fees?: ExitFees;
749
+ /**
750
+ * BestCaseBlocksRemaining is the optimistic block count until a
751
+ * confirmed sweep. Zero on a coarse query.
752
+ */
753
+ bestCaseBlocksRemaining: number;
754
+ /**
755
+ * CurrentHeight is the best block height the exit job has observed.
756
+ * Zero on a coarse query, or when no live actor backs the job.
757
+ */
758
+ currentHeight: number;
759
+ }
760
+ /**
761
+ * ExitProgress describes materialization progress through the recovery tree.
762
+ */
763
+ export interface ExitProgress {
764
+ confirmedTxs: number;
765
+ inFlightTxs: number;
766
+ readyTxs: number;
767
+ blockedTxs: number;
768
+ totalTxs: number;
769
+ currentLayer: number;
770
+ totalLayers: number;
771
+ targetConfirmed: boolean;
772
+ allProofConfirmed: boolean;
773
+ }
774
+ /**
775
+ * ExitCSV describes the target's CSV maturity countdown, populated once the
776
+ * target transaction confirms.
777
+ */
778
+ export interface ExitCSV {
779
+ targetConfirmHeight: number;
780
+ maturityHeight: number;
781
+ blocksRemaining: number;
782
+ mature: boolean;
783
+ }
784
+ /**
785
+ * ExitFees breaks down the on-chain cost of the exit. The CPFP total is
786
+ * estimated; SweepFeeActual reports whether SweepFeeSat is the real built-sweep
787
+ * fee rather than an estimate. SpentSoFarSat is the estimated fee committed so
788
+ * far, while TotalCostSat is the projected cost of the whole exit.
789
+ */
790
+ export interface ExitFees {
791
+ cPFPFeeSat: number;
792
+ sweepFeeSat: number;
793
+ totalCostSat: number;
794
+ spentSoFarSat: number;
795
+ vTXOAmountSat: number;
796
+ netRecoveredSat: number;
797
+ feeRateSatVByte: number;
798
+ sweepFeeActual: boolean;
799
+ }
800
+ /**
801
+ * ExitSummaryRequest asks for the wallet-wide portfolio of in-progress exits.
802
+ */
803
+ export interface ExitSummaryRequest {
804
+ }
805
+ /**
806
+ * ExitSummaryResult is the wallet-wide portfolio of in-progress exits plus
807
+ * aggregate totals. Only non-terminal exits are included.
808
+ */
809
+ export interface ExitSummaryResult {
810
+ exits: ExitSummaryEntry[];
811
+ totalExits: number;
812
+ totalVTXOAmountSat: number;
813
+ totalEstFeeSat: number;
814
+ totalEstNetRecoveredSat: number;
815
+ }
816
+ /**
817
+ * ExitSummaryEntry is one in-progress exit's coarse contribution to the
818
+ * portfolio.
819
+ */
820
+ export interface ExitSummaryEntry {
821
+ outpoint: string;
822
+ status: ExitJobStatus;
823
+ vTXOAmountSat: number;
824
+ estTotalFeeSat: number;
825
+ estNetRecoveredSat: number;
826
+ }
827
+ /**
828
+ * GetExitPlanRequest previews unilateral-exit readiness for a slice of VTXOs.
829
+ */
830
+ export interface GetExitPlanRequest {
831
+ outpoints: string[];
832
+ confTarget: number;
833
+ }
834
+ /**
835
+ * ExitPlanEntry describes how to fund the backing wallet before Exit for a
836
+ * single previewed VTXO outpoint.
837
+ */
838
+ export interface ExitPlanEntry {
839
+ outpoint: string;
840
+ fundingAddress: string;
841
+ requiredConfirmations: number;
842
+ requiredFeeUTXOCount: number;
843
+ usableFeeUTXOCount: number;
844
+ recommendedUTXOAmountSat: number;
845
+ recommendedTotalFundingSat: number;
846
+ fundingShortfallSat: number;
847
+ canStart: boolean;
848
+ /**
849
+ * InfeasibilityReason explains why CanStart is false. It may be a
850
+ * structural block - a dust or uneconomical VTXO the wallet can never
851
+ * make exitable (FundingShortfallSat is zero) - or a funding shortfall
852
+ * the wallet could cover (wallet underfunded or too few fee inputs,
853
+ * also reflected in FundingShortfallSat). It is
854
+ * ExitInfeasibilityReasonUnspecified when CanStart is true.
855
+ */
856
+ infeasibilityReason: ExitInfeasibilityReason;
857
+ exitJobFound: boolean;
858
+ exitStatus: ExitJobStatus;
859
+ sweepTxid: string;
860
+ lastError: string;
861
+ /**
862
+ * Err is a per-outpoint failure (empty on success).
863
+ */
864
+ err: string;
865
+ }
866
+ /**
867
+ * ExitInfeasibilityReason explains why a previewed exit cannot start. The
868
+ * block may be structural (a dust or uneconomical VTXO) or a funding
869
+ * shortfall the wallet could cover (wallet underfunded or too few fee
870
+ * inputs). It is a wrapper-owned lowercase string set, decoupled from the
871
+ * proto enum numbering.
872
+ */
873
+ export type ExitInfeasibilityReason = "unspecified" | "sweep_below_dust" | "uneconomical" | "wallet_underfunded" | "wallet_too_few_inputs";
874
+ export declare const ExitInfeasibilityReasonUnspecified: ExitInfeasibilityReason;
875
+ export declare const ExitInfeasibilityReasonSweepBelowDust: ExitInfeasibilityReason;
876
+ export declare const ExitInfeasibilityReasonUneconomical: ExitInfeasibilityReason;
877
+ export declare const ExitInfeasibilityReasonWalletUnderfunded: ExitInfeasibilityReason;
878
+ export declare const ExitInfeasibilityReasonWalletTooFewInputs: ExitInfeasibilityReason;
879
+ /**
880
+ * GetExitPlanResult describes the combined backing-wallet funding plan for
881
+ * every previewed outpoint plus aggregate totals.
882
+ */
883
+ export interface GetExitPlanResult {
884
+ plans: ExitPlanEntry[];
885
+ feeRateSatPerVByte: number;
886
+ canStart: boolean;
887
+ totalFundingShortfallSat: number;
888
+ totalRecommendedFundingSat: number;
889
+ }
890
+ /**
891
+ * SweepWalletRequest previews or broadcasts a backing-wallet sweep.
892
+ */
893
+ export interface SweepWalletRequest {
894
+ destinationAddress: string;
895
+ broadcast: boolean;
896
+ feeRateSatPerVByte: number;
897
+ confTarget: number;
898
+ }
899
+ /**
900
+ * WalletSweepInput describes one backing-wallet UTXO selected by SweepWallet.
901
+ */
902
+ export interface WalletSweepInput {
903
+ outpoint: string;
904
+ amountSat: number;
905
+ }
906
+ /**
907
+ * SweepWalletResult contains the selected inputs and optional broadcast txid.
908
+ */
909
+ export interface SweepWalletResult {
910
+ inputs: WalletSweepInput[];
911
+ totalInputSat: number;
912
+ estimatedFeeSat: number;
913
+ netAmountSat: number;
914
+ feeRateSatPerVByte: number;
915
+ canBroadcast: boolean;
916
+ txid: string;
917
+ failureReason: string;
918
+ }
919
+ /**
920
+ * Status summarizes wallet readiness and pending activity.
921
+ */
922
+ export interface Status {
923
+ ready: boolean;
924
+ unlocked: boolean;
925
+ network: string;
926
+ balance: Balance;
927
+ pendingCount: number;
928
+ }
929
+ /**
930
+ * SubscribeRequest controls wallet activity subscriptions.
931
+ */
932
+ export interface SubscribeRequest {
933
+ includeExisting: boolean;
934
+ kinds: EntryKind[];
935
+ /**
936
+ * Cursor resumes the stream after a prior Entry.Cursor (or a
937
+ * *SubscribeGapError.Cursor): the daemon replays every activity event
938
+ * after it, then streams live. Zero replays the full history when
939
+ * IncludeExisting is set, or streams live-only otherwise.
940
+ */
941
+ cursor: number;
942
+ }
943
+ /**
944
+ * EntryKind is the user-visible wallet activity category.
945
+ */
946
+ export type EntryKind = "send" | "receive" | "deposit" | "exit";
947
+ /**
948
+ * EntryKindSend is an outbound wallet payment.
949
+ */
950
+ export declare const EntryKindSend: EntryKind;
951
+ /**
952
+ * EntryKindReceive is an inbound Lightning-to-wallet receive.
953
+ */
954
+ export declare const EntryKindReceive: EntryKind;
955
+ /**
956
+ * EntryKindDeposit is a boarding on-chain deposit.
957
+ */
958
+ export declare const EntryKindDeposit: EntryKind;
959
+ /**
960
+ * EntryKindExit is a cooperative wallet-to-on-chain exit.
961
+ */
962
+ export declare const EntryKindExit: EntryKind;
963
+ /**
964
+ * EntryStatus is the collapsed wallet activity state.
965
+ */
966
+ export type EntryStatus = "pending" | "complete" | "failed";
967
+ /**
968
+ * EntryStatusPending means the activity is still in flight.
969
+ */
970
+ export declare const EntryStatusPending: EntryStatus;
971
+ /**
972
+ * EntryStatusComplete means the activity finished successfully.
973
+ */
974
+ export declare const EntryStatusComplete: EntryStatus;
975
+ /**
976
+ * EntryStatusFailed means the activity reached a terminal failure.
977
+ */
978
+ export declare const EntryStatusFailed: EntryStatus;
979
+ /**
980
+ * Entry is the wallet-facing activity row used by UI and bridge layers.
981
+ */
982
+ export interface Entry {
983
+ id: string;
984
+ kind: EntryKind;
985
+ status: EntryStatus;
986
+ amountSat: number;
987
+ feeSat: number;
988
+ counterparty: string;
989
+ createdAt: string;
990
+ updatedAt: string;
991
+ note: string;
992
+ failureReason: string;
993
+ /**
994
+ * Cursor is the monotonic event-log position of this update on a
995
+ * SubscribeWallet stream. Persist it and pass it back as
996
+ * SubscribeRequest.Cursor to resume without gaps. It is zero outside
997
+ * the subscription path (List / Send / Recv / Deposit results).
998
+ */
999
+ cursor: number;
1000
+ /**
1001
+ * Progress carries the lifecycle metadata the daemon already
1002
+ * normalized for this entry (phase, payment hash, txid, confirmation
1003
+ * height, vHTLC outpoint). It is nil when the backing subsystem
1004
+ * supplied no progress hint.
1005
+ */
1006
+ progress?: EntryProgress;
1007
+ /**
1008
+ * Request echoes the user-recognizable request that created the entry
1009
+ * (a Lightning invoice, an on-chain address, or an Ark address). It is
1010
+ * nil when the backing subsystem did not persist one.
1011
+ */
1012
+ request?: EntryRequest;
1013
+ /**
1014
+ * FailureCode is a stable, machine-readable classification of why the
1015
+ * entry failed. It is empty unless Status is failed, mirroring
1016
+ * FailureReason, which remains the human-readable supplement.
1017
+ */
1018
+ failureCode: EntryFailureCode;
1019
+ }
1020
+ /**
1021
+ * EntryPhase is a coarse, wrapper-owned lifecycle phase for an Entry. It does
1022
+ * not replace Status: Status answers pending/complete/failed, while Phase
1023
+ * explains the current backing-system step. Like the other Entry enums it is
1024
+ * a lowercase string decoupled from the proto enum so renumbering cannot break
1025
+ * callers; switch on it rather than comparing proto values.
1026
+ */
1027
+ export type EntryPhase = "unspecified" | "request_created" | "waiting_for_payment" | "payment_detected" | "settling" | "confirmed" | "refunding" | "refunded" | "failed" | "waiting_for_confirmation";
1028
+ /**
1029
+ * EntryPhaseUnspecified means the backing subsystem provided no
1030
+ * lifecycle hint.
1031
+ */
1032
+ export declare const EntryPhaseUnspecified: EntryPhase;
1033
+ /**
1034
+ * EntryPhaseRequestCreated means the request was created but no payment
1035
+ * has been observed yet.
1036
+ */
1037
+ export declare const EntryPhaseRequestCreated: EntryPhase;
1038
+ /**
1039
+ * EntryPhaseWaitingForPayment means the wallet is waiting for an
1040
+ * inbound payment or swap funding.
1041
+ */
1042
+ export declare const EntryPhaseWaitingForPayment: EntryPhase;
1043
+ /**
1044
+ * EntryPhasePaymentDetected means a payment was detected but is not yet
1045
+ * settled.
1046
+ */
1047
+ export declare const EntryPhasePaymentDetected: EntryPhase;
1048
+ /**
1049
+ * EntryPhaseSettling means the operation is settling through Ark,
1050
+ * Lightning, or on-chain machinery.
1051
+ */
1052
+ export declare const EntryPhaseSettling: EntryPhase;
1053
+ /**
1054
+ * EntryPhaseConfirmed means the backing operation is confirmed or
1055
+ * otherwise durably complete.
1056
+ */
1057
+ export declare const EntryPhaseConfirmed: EntryPhase;
1058
+ /**
1059
+ * EntryPhaseRefunding means the operation is currently refunding.
1060
+ */
1061
+ export declare const EntryPhaseRefunding: EntryPhase;
1062
+ /**
1063
+ * EntryPhaseRefunded means the refund path completed.
1064
+ */
1065
+ export declare const EntryPhaseRefunded: EntryPhase;
1066
+ /**
1067
+ * EntryPhaseFailed means the backing operation reached a terminal
1068
+ * failed state.
1069
+ */
1070
+ export declare const EntryPhaseFailed: EntryPhase;
1071
+ /**
1072
+ * EntryPhaseWaitingForConfirmation means an on-chain payment was
1073
+ * detected and is waiting for block confirmation.
1074
+ */
1075
+ export declare const EntryPhaseWaitingForConfirmation: EntryPhase;
1076
+ /**
1077
+ * EntryProgress is the wrapper-owned view of the lifecycle metadata the daemon
1078
+ * computes for an Entry. Fields are populated on a best-effort basis by the
1079
+ * backing subsystem; an empty field means "not applicable / not yet known".
1080
+ */
1081
+ export interface EntryProgress {
1082
+ /**
1083
+ * Phase is the coarse lifecycle phase for the entry.
1084
+ */
1085
+ phase: EntryPhase;
1086
+ /**
1087
+ * PhaseLabel is the short lowercase label the daemon emitted; clients
1088
+ * may render it directly instead of switching on Phase.
1089
+ */
1090
+ phaseLabel: string;
1091
+ /**
1092
+ * PaymentHash is populated for Lightning-backed send/recv entries.
1093
+ */
1094
+ paymentHash: string;
1095
+ /**
1096
+ * Txid is populated when the backing ledger row has an on-chain txid.
1097
+ */
1098
+ txid: string;
1099
+ /**
1100
+ * ConfirmationHeight is populated once the source records it.
1101
+ */
1102
+ confirmationHeight: number;
1103
+ /**
1104
+ * VTXOOutpoint is populated when a swap observes the Ark vHTLC output.
1105
+ */
1106
+ vTXOOutpoint: string;
1107
+ /**
1108
+ * Preimage is the hex-encoded Lightning payment preimage once the swap
1109
+ * revealed it. For a completed Lightning-backed send this is the proof
1110
+ * of payment for the paid invoice (sha256(preimage) == PaymentHash); it
1111
+ * is empty until durably known and for non-Lightning entries.
1112
+ */
1113
+ preimage: string;
1114
+ }
1115
+ /**
1116
+ * EntryRequestType discriminates which request shape an EntryRequest carries.
1117
+ * Callers should switch on Type before reading the variant fields.
1118
+ */
1119
+ export type EntryRequestType = "lightning" | "onchain" | "ark";
1120
+ /**
1121
+ * EntryRequestTypeLightning marks a Lightning send/recv request; the
1122
+ * LightningInvoice and PaymentHash fields are populated.
1123
+ */
1124
+ export declare const EntryRequestTypeLightning: EntryRequestType;
1125
+ /**
1126
+ * EntryRequestTypeOnchain marks a deposit/exit request; the
1127
+ * OnchainAddress field is populated.
1128
+ */
1129
+ export declare const EntryRequestTypeOnchain: EntryRequestType;
1130
+ /**
1131
+ * EntryRequestTypeArk marks a direct Ark send/recv request; the
1132
+ * ArkAddress field is populated.
1133
+ */
1134
+ export declare const EntryRequestTypeArk: EntryRequestType;
1135
+ /**
1136
+ * EntryRequest is the wrapper-owned, flattened view of the proto request
1137
+ * oneof. Exactly one variant's fields are populated, named by Type; read Type
1138
+ * first and treat the other fields as zero.
1139
+ */
1140
+ export interface EntryRequest {
1141
+ /**
1142
+ * Type names the populated variant.
1143
+ */
1144
+ type: EntryRequestType;
1145
+ /**
1146
+ * LightningInvoice is the BOLT-11 payment request. Populated when Type
1147
+ * is EntryRequestTypeLightning.
1148
+ */
1149
+ lightningInvoice: string;
1150
+ /**
1151
+ * PaymentHash identifies the Lightning invoice and stays stable after
1152
+ * the invoice is no longer convenient to display. Populated when Type
1153
+ * is EntryRequestTypeLightning.
1154
+ */
1155
+ paymentHash: string;
1156
+ /**
1157
+ * OnchainAddress is the bech32 on-chain address originally issued or
1158
+ * targeted. Populated when Type is EntryRequestTypeOnchain.
1159
+ */
1160
+ onchainAddress: string;
1161
+ /**
1162
+ * ArkAddress is the Ark address originally issued or targeted.
1163
+ * Populated when Type is EntryRequestTypeArk.
1164
+ */
1165
+ arkAddress: string;
1166
+ }
1167
+ /**
1168
+ * EntryFailureCode is a wrapper-owned, stable classification of why a failed
1169
+ * Entry failed. Like the other Entry enums it is a lowercase string decoupled
1170
+ * from the proto enum; switch on it rather than comparing proto values.
1171
+ */
1172
+ export type EntryFailureCode = "timed_out" | "expired" | "refunded" | "needs_intervention" | "failed";
1173
+ /**
1174
+ * EntryFailureCodeTimedOut means the operation exceeded the wallet
1175
+ * deadline before reaching a terminal state.
1176
+ */
1177
+ export declare const EntryFailureCodeTimedOut: EntryFailureCode;
1178
+ /**
1179
+ * EntryFailureCodeExpired means the swap expired before it was funded.
1180
+ */
1181
+ export declare const EntryFailureCodeExpired: EntryFailureCode;
1182
+ /**
1183
+ * EntryFailureCodeRefunded means an outbound payment was refunded back
1184
+ * to the wallet.
1185
+ */
1186
+ export declare const EntryFailureCodeRefunded: EntryFailureCode;
1187
+ /**
1188
+ * EntryFailureCodeNeedsIntervention means the swap reached an anomalous
1189
+ * state requiring manual recovery.
1190
+ */
1191
+ export declare const EntryFailureCodeNeedsIntervention: EntryFailureCode;
1192
+ /**
1193
+ * EntryFailureCodeFailed is a generic terminal failure with no more
1194
+ * specific classification.
1195
+ */
1196
+ export declare const EntryFailureCodeFailed: EntryFailureCode;
1197
+ //# sourceMappingURL=generated.d.ts.map