@secondts/bark-react-native 0.21.0 → 0.23.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 +1 -1
- package/cpp/generated/bark.cpp +357 -27
- package/cpp/generated/bark.hpp +10 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +468 -20
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +467 -19
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +18 -6
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +391 -20
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +18 -6
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +391 -20
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +35 -5
- package/src/generated/bark.ts +738 -30
|
@@ -231,6 +231,58 @@ export declare const Destination: Readonly<{
|
|
|
231
231
|
new: (partial: Partial<Destination> & Required<Omit<Destination, never>>) => Destination;
|
|
232
232
|
defaults: () => Partial<Destination>;
|
|
233
233
|
}>;
|
|
234
|
+
/**
|
|
235
|
+
* Estimated onchain cost of unilaterally (emergency) exiting a set of VTXOs.
|
|
236
|
+
*
|
|
237
|
+
* Mirrors bark-rest's `GET /exits/fee` response. The two legs are paid from
|
|
238
|
+
* different pockets: `exit_broadcast_fee_sats` is spent now out of confirmed
|
|
239
|
+
* onchain funds to CPFP-bump every not-yet-confirmed exit transaction, while
|
|
240
|
+
* `claim_fee_sats` is deducted later from the recovered value when the
|
|
241
|
+
* matured outputs are drained.
|
|
242
|
+
*/
|
|
243
|
+
export type EmergencyExitFeeEstimate = {
|
|
244
|
+
/**
|
|
245
|
+
* CPFP fees to broadcast every not-yet-confirmed exit transaction. Paid
|
|
246
|
+
* now from confirmed onchain funds; this is the minimum onchain balance
|
|
247
|
+
* an emergency exit needs.
|
|
248
|
+
*/
|
|
249
|
+
exitBroadcastFeeSats: bigint;
|
|
250
|
+
/**
|
|
251
|
+
* Fee of the single batched transaction that later drains the matured
|
|
252
|
+
* exit outputs. Subtracted from the exited amount.
|
|
253
|
+
*/
|
|
254
|
+
claimFeeSats: bigint;
|
|
255
|
+
/**
|
|
256
|
+
* `exit_broadcast_fee_sats + claim_fee_sats`.
|
|
257
|
+
*/
|
|
258
|
+
totalFeeSats: bigint;
|
|
259
|
+
/**
|
|
260
|
+
* Fee rate the exit-broadcast leg was priced at (sat/vB, rounded up).
|
|
261
|
+
* Unless an explicit rate was supplied, the claim leg is priced
|
|
262
|
+
* separately at the chain's `regular` rate.
|
|
263
|
+
*/
|
|
264
|
+
feeRateSatPerVb: bigint;
|
|
265
|
+
/**
|
|
266
|
+
* Number of exit transactions that still need to be broadcast and
|
|
267
|
+
* CPFP-bumped. Already-confirmed tree transactions are not counted.
|
|
268
|
+
*/
|
|
269
|
+
txsToBroadcast: bigint;
|
|
270
|
+
/**
|
|
271
|
+
* Whether the wallet's current confirmed onchain balance covers the full
|
|
272
|
+
* serial broadcast walk. Each CPFP child can only spend confirmed coins,
|
|
273
|
+
* so `false` means the exit would stall midway even if a single bump
|
|
274
|
+
* looks affordable.
|
|
275
|
+
*/
|
|
276
|
+
fundable: boolean;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Generated factory for {@link EmergencyExitFeeEstimate} record objects.
|
|
280
|
+
*/
|
|
281
|
+
export declare const EmergencyExitFeeEstimate: Readonly<{
|
|
282
|
+
create: (partial: Partial<EmergencyExitFeeEstimate> & Required<Omit<EmergencyExitFeeEstimate, never>>) => EmergencyExitFeeEstimate;
|
|
283
|
+
new: (partial: Partial<EmergencyExitFeeEstimate> & Required<Omit<EmergencyExitFeeEstimate, never>>) => EmergencyExitFeeEstimate;
|
|
284
|
+
defaults: () => Partial<EmergencyExitFeeEstimate>;
|
|
285
|
+
}>;
|
|
234
286
|
/**
|
|
235
287
|
* Outcome of a cancellation request.
|
|
236
288
|
*
|
|
@@ -704,16 +756,26 @@ export declare const RefreshFees: Readonly<{
|
|
|
704
756
|
export type RoundState = {
|
|
705
757
|
id: number;
|
|
706
758
|
/**
|
|
707
|
-
* Whether the round is ongoing
|
|
759
|
+
* Whether the interactive part of the round is ongoing. Equivalent to
|
|
760
|
+
* `state` being `Pending` or `Ongoing`; kept for compatibility.
|
|
708
761
|
*/
|
|
709
762
|
ongoing: boolean;
|
|
763
|
+
/**
|
|
764
|
+
* Lifecycle phase of the participation.
|
|
765
|
+
*/
|
|
766
|
+
state: RoundFlowKind;
|
|
767
|
+
/**
|
|
768
|
+
* Block height a delegated participation waits for, if it asked the
|
|
769
|
+
* server to schedule one. Only set while `state` is `DelegatedPending`.
|
|
770
|
+
*/
|
|
771
|
+
scheduledHeight?: number;
|
|
710
772
|
};
|
|
711
773
|
/**
|
|
712
774
|
* Generated factory for {@link RoundState} record objects.
|
|
713
775
|
*/
|
|
714
776
|
export declare const RoundState: Readonly<{
|
|
715
|
-
create: (partial: Partial<RoundState> & Required<Omit<RoundState,
|
|
716
|
-
new: (partial: Partial<RoundState> & Required<Omit<RoundState,
|
|
777
|
+
create: (partial: Partial<RoundState> & Required<Omit<RoundState, "scheduledHeight">>) => RoundState;
|
|
778
|
+
new: (partial: Partial<RoundState> & Required<Omit<RoundState, "scheduledHeight">>) => RoundState;
|
|
717
779
|
defaults: () => Partial<RoundState>;
|
|
718
780
|
}>;
|
|
719
781
|
export type Vtxo = {
|
|
@@ -788,7 +850,7 @@ export type WalletOpenArgs = {
|
|
|
788
850
|
* Whether to skip the seed-recovery mailbox scan
|
|
789
851
|
*
|
|
790
852
|
* The scan runs on the open that creates the wallet locally and makes
|
|
791
|
-
* network calls; its
|
|
853
|
+
* network calls; its outcome is available from `Wallet::recovery_status`.
|
|
792
854
|
* Set this to open without it.
|
|
793
855
|
*
|
|
794
856
|
* Default: false
|
|
@@ -2056,6 +2118,178 @@ export declare const OnchainUtxo: Readonly<{
|
|
|
2056
2118
|
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
2057
2119
|
*/
|
|
2058
2120
|
export type OnchainUtxo = InstanceType<(typeof OnchainUtxo)[keyof Omit<typeof OnchainUtxo, "instanceOf">]>;
|
|
2121
|
+
export declare enum RecoveryStatus_Tags {
|
|
2122
|
+
NotRun = "NotRun",
|
|
2123
|
+
Failed = "Failed",
|
|
2124
|
+
Completed = "Completed"
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
2128
|
+
* `bark::RecoveryStatus`.
|
|
2129
|
+
*
|
|
2130
|
+
* The three variants are distinguishable on purpose: `NotRun` means nothing
|
|
2131
|
+
* was attempted (wallet already existed locally, or `skip_recovery` was set),
|
|
2132
|
+
* `Failed` means the scan errored before producing a report so funds may be
|
|
2133
|
+
* missing until a retry succeeds, and `Completed` carries the report — whose
|
|
2134
|
+
* `is_complete` can still be `false` for individual VTXOs.
|
|
2135
|
+
*
|
|
2136
|
+
* Serde/TS tags: `"not-run"` | `"failed"` | `"completed"`.
|
|
2137
|
+
*/
|
|
2138
|
+
export declare const RecoveryStatus: Readonly<{
|
|
2139
|
+
instanceOf: (obj: any) => obj is RecoveryStatus;
|
|
2140
|
+
NotRun: {
|
|
2141
|
+
new (): {
|
|
2142
|
+
readonly tag: RecoveryStatus_Tags.NotRun;
|
|
2143
|
+
/**
|
|
2144
|
+
* @private
|
|
2145
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2146
|
+
*/
|
|
2147
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2148
|
+
};
|
|
2149
|
+
new(): {
|
|
2150
|
+
readonly tag: RecoveryStatus_Tags.NotRun;
|
|
2151
|
+
/**
|
|
2152
|
+
* @private
|
|
2153
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2154
|
+
*/
|
|
2155
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2156
|
+
};
|
|
2157
|
+
instanceOf(obj: any): obj is {
|
|
2158
|
+
readonly tag: RecoveryStatus_Tags.NotRun;
|
|
2159
|
+
/**
|
|
2160
|
+
* @private
|
|
2161
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2162
|
+
*/
|
|
2163
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2164
|
+
};
|
|
2165
|
+
};
|
|
2166
|
+
Failed: {
|
|
2167
|
+
new (inner: {
|
|
2168
|
+
message: string;
|
|
2169
|
+
}): {
|
|
2170
|
+
readonly tag: RecoveryStatus_Tags.Failed;
|
|
2171
|
+
readonly inner: Readonly<{
|
|
2172
|
+
message: string;
|
|
2173
|
+
}>;
|
|
2174
|
+
/**
|
|
2175
|
+
* @private
|
|
2176
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2177
|
+
*/
|
|
2178
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2179
|
+
};
|
|
2180
|
+
new(inner: {
|
|
2181
|
+
message: string;
|
|
2182
|
+
}): {
|
|
2183
|
+
readonly tag: RecoveryStatus_Tags.Failed;
|
|
2184
|
+
readonly inner: Readonly<{
|
|
2185
|
+
message: string;
|
|
2186
|
+
}>;
|
|
2187
|
+
/**
|
|
2188
|
+
* @private
|
|
2189
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2190
|
+
*/
|
|
2191
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2192
|
+
};
|
|
2193
|
+
instanceOf(obj: any): obj is {
|
|
2194
|
+
readonly tag: RecoveryStatus_Tags.Failed;
|
|
2195
|
+
readonly inner: Readonly<{
|
|
2196
|
+
message: string;
|
|
2197
|
+
}>;
|
|
2198
|
+
/**
|
|
2199
|
+
* @private
|
|
2200
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2201
|
+
*/
|
|
2202
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2203
|
+
};
|
|
2204
|
+
};
|
|
2205
|
+
Completed: {
|
|
2206
|
+
new (inner: {
|
|
2207
|
+
report: RecoveryReport;
|
|
2208
|
+
}): {
|
|
2209
|
+
readonly tag: RecoveryStatus_Tags.Completed;
|
|
2210
|
+
readonly inner: Readonly<{
|
|
2211
|
+
report: RecoveryReport;
|
|
2212
|
+
}>;
|
|
2213
|
+
/**
|
|
2214
|
+
* @private
|
|
2215
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2216
|
+
*/
|
|
2217
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2218
|
+
};
|
|
2219
|
+
new(inner: {
|
|
2220
|
+
report: RecoveryReport;
|
|
2221
|
+
}): {
|
|
2222
|
+
readonly tag: RecoveryStatus_Tags.Completed;
|
|
2223
|
+
readonly inner: Readonly<{
|
|
2224
|
+
report: RecoveryReport;
|
|
2225
|
+
}>;
|
|
2226
|
+
/**
|
|
2227
|
+
* @private
|
|
2228
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2229
|
+
*/
|
|
2230
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2231
|
+
};
|
|
2232
|
+
instanceOf(obj: any): obj is {
|
|
2233
|
+
readonly tag: RecoveryStatus_Tags.Completed;
|
|
2234
|
+
readonly inner: Readonly<{
|
|
2235
|
+
report: RecoveryReport;
|
|
2236
|
+
}>;
|
|
2237
|
+
/**
|
|
2238
|
+
* @private
|
|
2239
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2240
|
+
*/
|
|
2241
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryStatus";
|
|
2242
|
+
};
|
|
2243
|
+
};
|
|
2244
|
+
}>;
|
|
2245
|
+
/**
|
|
2246
|
+
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
2247
|
+
* `bark::RecoveryStatus`.
|
|
2248
|
+
*
|
|
2249
|
+
* The three variants are distinguishable on purpose: `NotRun` means nothing
|
|
2250
|
+
* was attempted (wallet already existed locally, or `skip_recovery` was set),
|
|
2251
|
+
* `Failed` means the scan errored before producing a report so funds may be
|
|
2252
|
+
* missing until a retry succeeds, and `Completed` carries the report — whose
|
|
2253
|
+
* `is_complete` can still be `false` for individual VTXOs.
|
|
2254
|
+
*
|
|
2255
|
+
* Serde/TS tags: `"not-run"` | `"failed"` | `"completed"`.
|
|
2256
|
+
*/
|
|
2257
|
+
export type RecoveryStatus = InstanceType<(typeof RecoveryStatus)[keyof Omit<typeof RecoveryStatus, "instanceOf">]>;
|
|
2258
|
+
/**
|
|
2259
|
+
* Lifecycle phase of a round participation, mirroring
|
|
2260
|
+
* `bark::round::RoundFlowKind`.
|
|
2261
|
+
*
|
|
2262
|
+
* Serde/TS tags match upstream's `Display` form: `"delegated-pending"` |
|
|
2263
|
+
* `"pending"` | `"ongoing"` | `"awaiting-confirmations"` | `"failed"` |
|
|
2264
|
+
* `"canceled"`.
|
|
2265
|
+
*/
|
|
2266
|
+
export declare enum RoundFlowKind {
|
|
2267
|
+
/**
|
|
2268
|
+
* Delegated participation waiting for its scheduled round. See
|
|
2269
|
+
* [`RoundState::scheduled_height`].
|
|
2270
|
+
*/
|
|
2271
|
+
DelegatedPending = 0,
|
|
2272
|
+
/**
|
|
2273
|
+
* Interactive participation waiting for its round.
|
|
2274
|
+
*/
|
|
2275
|
+
Pending = 1,
|
|
2276
|
+
/**
|
|
2277
|
+
* The interactive part is being played out with the server.
|
|
2278
|
+
*/
|
|
2279
|
+
Ongoing = 2,
|
|
2280
|
+
/**
|
|
2281
|
+
* The round finished; waiting for its funding tx to confirm.
|
|
2282
|
+
*/
|
|
2283
|
+
AwaitingConfirmations = 3,
|
|
2284
|
+
/**
|
|
2285
|
+
* The participation failed.
|
|
2286
|
+
*/
|
|
2287
|
+
Failed = 4,
|
|
2288
|
+
/**
|
|
2289
|
+
* The user canceled the participation.
|
|
2290
|
+
*/
|
|
2291
|
+
Canceled = 5
|
|
2292
|
+
}
|
|
2059
2293
|
export declare enum VtxoLockHolder_Tags {
|
|
2060
2294
|
Action = "Action",
|
|
2061
2295
|
Movement = "Movement"
|
|
@@ -2505,6 +2739,18 @@ export interface CustomOnchainWalletCallbacks {
|
|
|
2505
2739
|
* * `tx_hex` - Hex-encoded transaction
|
|
2506
2740
|
*/
|
|
2507
2741
|
registerTx(txHex: string): void;
|
|
2742
|
+
/**
|
|
2743
|
+
* Mark a wallet-known transaction as evicted from the mempool
|
|
2744
|
+
*
|
|
2745
|
+
* Bark calls this when a CPFP it broadcast was RBF-replaced by a competing
|
|
2746
|
+
* party, so the tx's inputs should return to coin selection immediately
|
|
2747
|
+
* instead of waiting for the sync eviction grace period. Only ever called
|
|
2748
|
+
* for a tx that has definitively been superseded on-chain.
|
|
2749
|
+
*
|
|
2750
|
+
* # Arguments
|
|
2751
|
+
* * `txid` - Hex-encoded transaction id
|
|
2752
|
+
*/
|
|
2753
|
+
evictTx(txid: string): void;
|
|
2508
2754
|
/**
|
|
2509
2755
|
* Create a signed P2A CPFP transaction
|
|
2510
2756
|
*
|
|
@@ -2592,6 +2838,18 @@ export declare class CustomOnchainWalletCallbacksImpl extends UniffiAbstractObje
|
|
|
2592
2838
|
* * `tx_hex` - Hex-encoded transaction
|
|
2593
2839
|
*/
|
|
2594
2840
|
registerTx(txHex: string): void;
|
|
2841
|
+
/**
|
|
2842
|
+
* Mark a wallet-known transaction as evicted from the mempool
|
|
2843
|
+
*
|
|
2844
|
+
* Bark calls this when a CPFP it broadcast was RBF-replaced by a competing
|
|
2845
|
+
* party, so the tx's inputs should return to coin selection immediately
|
|
2846
|
+
* instead of waiting for the sync eviction grace period. Only ever called
|
|
2847
|
+
* for a tx that has definitively been superseded on-chain.
|
|
2848
|
+
*
|
|
2849
|
+
* # Arguments
|
|
2850
|
+
* * `txid` - Hex-encoded transaction id
|
|
2851
|
+
*/
|
|
2852
|
+
evictTx(txid: string): void;
|
|
2595
2853
|
/**
|
|
2596
2854
|
* Create a signed P2A CPFP transaction
|
|
2597
2855
|
*
|
|
@@ -2732,6 +2990,15 @@ export interface OnchainWalletLike {
|
|
|
2732
2990
|
balance(asyncOpts_?: {
|
|
2733
2991
|
signal: AbortSignal;
|
|
2734
2992
|
}): Promise<OnchainBalance>;
|
|
2993
|
+
/**
|
|
2994
|
+
* Mark a wallet-known transaction as evicted from the mempool, so its
|
|
2995
|
+
* inputs return to coin selection immediately. Only for a tx that has
|
|
2996
|
+
* definitively been superseded on-chain (e.g. an RBF-replaced exit CPFP);
|
|
2997
|
+
* evicting a still-in-flight tx invites a self-inflicted double-spend.
|
|
2998
|
+
*/
|
|
2999
|
+
evictTx(txid: string, asyncOpts_?: {
|
|
3000
|
+
signal: AbortSignal;
|
|
3001
|
+
}): Promise<void>;
|
|
2735
3002
|
/**
|
|
2736
3003
|
* Cached network fee-rate estimates from the wallet's chain source.
|
|
2737
3004
|
*/
|
|
@@ -2805,6 +3072,15 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
|
|
|
2805
3072
|
balance(asyncOpts_?: {
|
|
2806
3073
|
signal: AbortSignal;
|
|
2807
3074
|
}): Promise<OnchainBalance>;
|
|
3075
|
+
/**
|
|
3076
|
+
* Mark a wallet-known transaction as evicted from the mempool, so its
|
|
3077
|
+
* inputs return to coin selection immediately. Only for a tx that has
|
|
3078
|
+
* definitively been superseded on-chain (e.g. an RBF-replaced exit CPFP);
|
|
3079
|
+
* evicting a still-in-flight tx invites a self-inflicted double-spend.
|
|
3080
|
+
*/
|
|
3081
|
+
evictTx(txid: string, asyncOpts_?: {
|
|
3082
|
+
signal: AbortSignal;
|
|
3083
|
+
}): Promise<void>;
|
|
2808
3084
|
/**
|
|
2809
3085
|
* Cached network fee-rate estimates from the wallet's chain source.
|
|
2810
3086
|
*/
|
|
@@ -2953,6 +3229,23 @@ export interface WalletLike {
|
|
|
2953
3229
|
estimateBoardFee(amountSats: bigint, asyncOpts_?: {
|
|
2954
3230
|
signal: AbortSignal;
|
|
2955
3231
|
}): Promise<FeeEstimate>;
|
|
3232
|
+
/**
|
|
3233
|
+
* Estimate the onchain cost of unilaterally (emergency) exiting VTXOs.
|
|
3234
|
+
* Mirrors bark-rest `GET /exits/fee`.
|
|
3235
|
+
*
|
|
3236
|
+
* Pass an empty `vtxo_ids` to price exiting the whole wallet (every
|
|
3237
|
+
* spendable VTXO). `fee_rate_sat_per_vb` applies to both legs; omit it to
|
|
3238
|
+
* use the chain's fast rate for the broadcast leg and regular rate for
|
|
3239
|
+
* the claim leg. `destination` only affects the claim transaction's weight.
|
|
3240
|
+
*
|
|
3241
|
+
* The onchain wallet is synced first so `fundable` reflects the current
|
|
3242
|
+
* confirmed balance. Requires a BDK onchain wallet: callback-backed
|
|
3243
|
+
* wallets (`CustomOnchainWalletCallbacks`) cannot simulate the CPFP walk
|
|
3244
|
+
* and return an error.
|
|
3245
|
+
*/
|
|
3246
|
+
estimateEmergencyExitFee(vtxoIds: Array<string>, feeRateSatPerVb: /*u64*/ bigint | undefined, destination: string | undefined, asyncOpts_?: {
|
|
3247
|
+
signal: AbortSignal;
|
|
3248
|
+
}): Promise<EmergencyExitFeeEstimate>;
|
|
2956
3249
|
estimateLightningReceiveFee(amountSats: bigint, asyncOpts_?: {
|
|
2957
3250
|
signal: AbortSignal;
|
|
2958
3251
|
}): Promise<FeeEstimate>;
|
|
@@ -3127,17 +3420,23 @@ export interface WalletLike {
|
|
|
3127
3420
|
signal: AbortSignal;
|
|
3128
3421
|
}): Promise<RecoveryReport>;
|
|
3129
3422
|
/**
|
|
3130
|
-
*
|
|
3131
|
-
* if
|
|
3423
|
+
* The report of the seed-recovery scan that ran during `Wallet::open`, or
|
|
3424
|
+
* none if the scan did not complete. Use `recovery_status` to tell a scan
|
|
3425
|
+
* that failed apart from one that never ran.
|
|
3426
|
+
*/
|
|
3427
|
+
recoveryReport(): RecoveryReport | undefined;
|
|
3428
|
+
/**
|
|
3429
|
+
* Outcome of the seed-recovery scan that ran during `Wallet::open`.
|
|
3132
3430
|
*
|
|
3133
3431
|
* Recovery only runs on the open that creates the wallet locally, and not
|
|
3134
|
-
* at all when `WalletOpenArgs.skip_recovery` is set, so this is
|
|
3135
|
-
* every subsequent open.
|
|
3136
|
-
*
|
|
3137
|
-
*
|
|
3138
|
-
*
|
|
3432
|
+
* at all when `WalletOpenArgs.skip_recovery` is set, so this is `NotRun`
|
|
3433
|
+
* on every subsequent open. `Failed` means the scan errored before
|
|
3434
|
+
* producing a report — bark logs that and lets open succeed — so funds
|
|
3435
|
+
* may be missing until a retry; `Completed` carries the report, and
|
|
3436
|
+
* `isComplete == false` there means funds may still be missing. Retry the
|
|
3437
|
+
* report's `failed` ids with `recoverVtxos`.
|
|
3139
3438
|
*/
|
|
3140
|
-
|
|
3439
|
+
recoveryStatus(): RecoveryStatus;
|
|
3141
3440
|
refreshServer(asyncOpts_?: {
|
|
3142
3441
|
signal: AbortSignal;
|
|
3143
3442
|
}): Promise<void>;
|
|
@@ -3187,6 +3486,14 @@ export interface WalletLike {
|
|
|
3187
3486
|
stopDaemon(asyncOpts_?: {
|
|
3188
3487
|
signal: AbortSignal;
|
|
3189
3488
|
}): Promise<void>;
|
|
3489
|
+
/**
|
|
3490
|
+
* Stop the background daemon and wait until its tasks have finished, so
|
|
3491
|
+
* nothing runs in the background afterwards (e.g. before deleting the
|
|
3492
|
+
* wallet's datadir). No-op when no daemon is running.
|
|
3493
|
+
*/
|
|
3494
|
+
stopDaemonWait(asyncOpts_?: {
|
|
3495
|
+
signal: AbortSignal;
|
|
3496
|
+
}): Promise<void>;
|
|
3190
3497
|
stuckFailedLightningSends(asyncOpts_?: {
|
|
3191
3498
|
signal: AbortSignal;
|
|
3192
3499
|
}): Promise<Array<LightningSend>>;
|
|
@@ -3218,6 +3525,12 @@ export interface WalletLike {
|
|
|
3218
3525
|
unlockVtxos(vtxoIds: Array<string>, expectedHolder: VtxoLockHolder | undefined, asyncOpts_?: {
|
|
3219
3526
|
signal: AbortSignal;
|
|
3220
3527
|
}): Promise<void>;
|
|
3528
|
+
/**
|
|
3529
|
+
* Whether this wallet can pay `address` out-of-round: same network and
|
|
3530
|
+
* server, a supported VTXO policy, and only delivery mechanisms this bark
|
|
3531
|
+
* supports. An address listing no delivery mechanism is valid. Errors only
|
|
3532
|
+
* when the address does not parse.
|
|
3533
|
+
*/
|
|
3221
3534
|
validateArkoorAddress(address: string, asyncOpts_?: {
|
|
3222
3535
|
signal: AbortSignal;
|
|
3223
3536
|
}): Promise<boolean>;
|
|
@@ -3350,6 +3663,23 @@ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
3350
3663
|
estimateBoardFee(amountSats: bigint, asyncOpts_?: {
|
|
3351
3664
|
signal: AbortSignal;
|
|
3352
3665
|
}): Promise<FeeEstimate>;
|
|
3666
|
+
/**
|
|
3667
|
+
* Estimate the onchain cost of unilaterally (emergency) exiting VTXOs.
|
|
3668
|
+
* Mirrors bark-rest `GET /exits/fee`.
|
|
3669
|
+
*
|
|
3670
|
+
* Pass an empty `vtxo_ids` to price exiting the whole wallet (every
|
|
3671
|
+
* spendable VTXO). `fee_rate_sat_per_vb` applies to both legs; omit it to
|
|
3672
|
+
* use the chain's fast rate for the broadcast leg and regular rate for
|
|
3673
|
+
* the claim leg. `destination` only affects the claim transaction's weight.
|
|
3674
|
+
*
|
|
3675
|
+
* The onchain wallet is synced first so `fundable` reflects the current
|
|
3676
|
+
* confirmed balance. Requires a BDK onchain wallet: callback-backed
|
|
3677
|
+
* wallets (`CustomOnchainWalletCallbacks`) cannot simulate the CPFP walk
|
|
3678
|
+
* and return an error.
|
|
3679
|
+
*/
|
|
3680
|
+
estimateEmergencyExitFee(vtxoIds: Array<string>, feeRateSatPerVb: /*u64*/ bigint | undefined, destination: string | undefined, asyncOpts_?: {
|
|
3681
|
+
signal: AbortSignal;
|
|
3682
|
+
}): Promise<EmergencyExitFeeEstimate>;
|
|
3353
3683
|
estimateLightningReceiveFee(amountSats: bigint, asyncOpts_?: {
|
|
3354
3684
|
signal: AbortSignal;
|
|
3355
3685
|
}): Promise<FeeEstimate>;
|
|
@@ -3524,17 +3854,23 @@ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
3524
3854
|
signal: AbortSignal;
|
|
3525
3855
|
}): Promise<RecoveryReport>;
|
|
3526
3856
|
/**
|
|
3527
|
-
*
|
|
3528
|
-
* if
|
|
3857
|
+
* The report of the seed-recovery scan that ran during `Wallet::open`, or
|
|
3858
|
+
* none if the scan did not complete. Use `recovery_status` to tell a scan
|
|
3859
|
+
* that failed apart from one that never ran.
|
|
3860
|
+
*/
|
|
3861
|
+
recoveryReport(): RecoveryReport | undefined;
|
|
3862
|
+
/**
|
|
3863
|
+
* Outcome of the seed-recovery scan that ran during `Wallet::open`.
|
|
3529
3864
|
*
|
|
3530
3865
|
* Recovery only runs on the open that creates the wallet locally, and not
|
|
3531
|
-
* at all when `WalletOpenArgs.skip_recovery` is set, so this is
|
|
3532
|
-
* every subsequent open.
|
|
3533
|
-
*
|
|
3534
|
-
*
|
|
3535
|
-
*
|
|
3866
|
+
* at all when `WalletOpenArgs.skip_recovery` is set, so this is `NotRun`
|
|
3867
|
+
* on every subsequent open. `Failed` means the scan errored before
|
|
3868
|
+
* producing a report — bark logs that and lets open succeed — so funds
|
|
3869
|
+
* may be missing until a retry; `Completed` carries the report, and
|
|
3870
|
+
* `isComplete == false` there means funds may still be missing. Retry the
|
|
3871
|
+
* report's `failed` ids with `recoverVtxos`.
|
|
3536
3872
|
*/
|
|
3537
|
-
|
|
3873
|
+
recoveryStatus(): RecoveryStatus;
|
|
3538
3874
|
refreshServer(asyncOpts_?: {
|
|
3539
3875
|
signal: AbortSignal;
|
|
3540
3876
|
}): Promise<void>;
|
|
@@ -3584,6 +3920,14 @@ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
3584
3920
|
stopDaemon(asyncOpts_?: {
|
|
3585
3921
|
signal: AbortSignal;
|
|
3586
3922
|
}): Promise<void>;
|
|
3923
|
+
/**
|
|
3924
|
+
* Stop the background daemon and wait until its tasks have finished, so
|
|
3925
|
+
* nothing runs in the background afterwards (e.g. before deleting the
|
|
3926
|
+
* wallet's datadir). No-op when no daemon is running.
|
|
3927
|
+
*/
|
|
3928
|
+
stopDaemonWait(asyncOpts_?: {
|
|
3929
|
+
signal: AbortSignal;
|
|
3930
|
+
}): Promise<void>;
|
|
3587
3931
|
stuckFailedLightningSends(asyncOpts_?: {
|
|
3588
3932
|
signal: AbortSignal;
|
|
3589
3933
|
}): Promise<Array<LightningSend>>;
|
|
@@ -3615,6 +3959,12 @@ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
3615
3959
|
unlockVtxos(vtxoIds: Array<string>, expectedHolder: VtxoLockHolder | undefined, asyncOpts_?: {
|
|
3616
3960
|
signal: AbortSignal;
|
|
3617
3961
|
}): Promise<void>;
|
|
3962
|
+
/**
|
|
3963
|
+
* Whether this wallet can pay `address` out-of-round: same network and
|
|
3964
|
+
* server, a supported VTXO policy, and only delivery mechanisms this bark
|
|
3965
|
+
* supports. An address listing no delivery mechanism is valid. Errors only
|
|
3966
|
+
* when the address does not parse.
|
|
3967
|
+
*/
|
|
3618
3968
|
validateArkoorAddress(address: string, asyncOpts_?: {
|
|
3619
3969
|
signal: AbortSignal;
|
|
3620
3970
|
}): Promise<boolean>;
|
|
@@ -3714,6 +4064,13 @@ declare const _default: Readonly<{
|
|
|
3714
4064
|
lift(value: Uint8Array): Destination;
|
|
3715
4065
|
lower(value: Destination): Uint8Array;
|
|
3716
4066
|
};
|
|
4067
|
+
FfiConverterTypeEmergencyExitFeeEstimate: {
|
|
4068
|
+
read(from: RustBuffer): EmergencyExitFeeEstimate;
|
|
4069
|
+
write(value: EmergencyExitFeeEstimate, into: RustBuffer): void;
|
|
4070
|
+
allocationSize(value: EmergencyExitFeeEstimate): number;
|
|
4071
|
+
lift(value: Uint8Array): EmergencyExitFeeEstimate;
|
|
4072
|
+
lower(value: EmergencyExitFeeEstimate): Uint8Array;
|
|
4073
|
+
};
|
|
3717
4074
|
FfiConverterTypeError: {
|
|
3718
4075
|
read(from: RustBuffer): {
|
|
3719
4076
|
readonly tag: Exception_Tags.Inner;
|
|
@@ -4027,6 +4384,13 @@ declare const _default: Readonly<{
|
|
|
4027
4384
|
lift(value: Uint8Array): RecoveryReport;
|
|
4028
4385
|
lower(value: RecoveryReport): Uint8Array;
|
|
4029
4386
|
};
|
|
4387
|
+
FfiConverterTypeRecoveryStatus: {
|
|
4388
|
+
read(from: RustBuffer): RecoveryStatus;
|
|
4389
|
+
write(value: RecoveryStatus, into: RustBuffer): void;
|
|
4390
|
+
allocationSize(value: RecoveryStatus): number;
|
|
4391
|
+
lift(value: Uint8Array): RecoveryStatus;
|
|
4392
|
+
lower(value: RecoveryStatus): Uint8Array;
|
|
4393
|
+
};
|
|
4030
4394
|
FfiConverterTypeRefreshFees: {
|
|
4031
4395
|
read(from: RustBuffer): RefreshFees;
|
|
4032
4396
|
write(value: RefreshFees, into: RustBuffer): void;
|
|
@@ -4034,6 +4398,13 @@ declare const _default: Readonly<{
|
|
|
4034
4398
|
lift(value: Uint8Array): RefreshFees;
|
|
4035
4399
|
lower(value: RefreshFees): Uint8Array;
|
|
4036
4400
|
};
|
|
4401
|
+
FfiConverterTypeRoundFlowKind: {
|
|
4402
|
+
read(from: RustBuffer): RoundFlowKind;
|
|
4403
|
+
write(value: RoundFlowKind, into: RustBuffer): void;
|
|
4404
|
+
allocationSize(value: RoundFlowKind): number;
|
|
4405
|
+
lift(value: Uint8Array): RoundFlowKind;
|
|
4406
|
+
lower(value: RoundFlowKind): Uint8Array;
|
|
4407
|
+
};
|
|
4037
4408
|
FfiConverterTypeRoundState: {
|
|
4038
4409
|
read(from: RustBuffer): RoundState;
|
|
4039
4410
|
write(value: RoundState, into: RustBuffer): void;
|