@breeztech/breez-sdk-spark-react-native 0.23.1 → 0.24.1

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.
@@ -160,7 +160,7 @@ export declare function defaultStorage(storageDir: string): StorageBackend;
160
160
  * This function queries the Spark status API and returns the worst status
161
161
  * across the Spark Operators and SSP services.
162
162
  */
163
- export declare function getSparkStatus(asyncOpts_?: {
163
+ export declare function getSparkStatus(request: GetSparkStatusRequest, asyncOpts_?: {
164
164
  signal: AbortSignal;
165
165
  }): Promise<SparkStatus>;
166
166
  export declare function initLogging(logDir: string | undefined, appLogger: Logger | undefined, logFilter: string | undefined): void;
@@ -173,9 +173,10 @@ export declare function initLogging(logDir: string | undefined, appLogger: Logge
173
173
  * SDK instances. All SDKs sharing the service must use the same `network`.
174
174
  *
175
175
  * For one-off, non-shared use, prefer
176
- * [`SdkBuilder::with_rest_chain_service`](crate::SdkBuilder::with_rest_chain_service).
176
+ * [`SdkBuilder::with_rest_chain_service`](crate::SdkBuilder::with_rest_chain_service),
177
+ * which builds on the SDK's own client and inherits its proxy automatically.
177
178
  */
178
- export declare function newRestChainService(url: string, network: Network, apiType: ChainApiType, credentials: Credentials | undefined, asyncOpts_?: {
179
+ export declare function newRestChainService(url: string, network: Network, apiType: ChainApiType, credentials: Credentials | undefined, request: NewRestChainServiceRequest, asyncOpts_?: {
179
180
  signal: AbortSignal;
180
181
  }): Promise<BitcoinChainService>;
181
182
  /**
@@ -938,17 +939,63 @@ export declare const CheckMessageResponse: Readonly<{
938
939
  */
939
940
  defaults: () => Partial<CheckMessageResponse>;
940
941
  }>;
942
+ /**
943
+ * What one way of claiming a deposit costs.
944
+ */
945
+ export type ClaimDepositQuote = {
946
+ /**
947
+ * The depth this becomes claimable at, as a total confirmation count on the
948
+ * deposit tx and not a number still to wait. A deposit already at or past
949
+ * this depth can be claimed.
950
+ */
951
+ confirmationsRequired: number;
952
+ /**
953
+ * What reaches the balance.
954
+ */
955
+ creditAmountSats: bigint;
956
+ /**
957
+ * The deposit value less the credit.
958
+ */
959
+ feeSats: bigint;
960
+ /**
961
+ * `fee_sats` as a fee rate over the claim transaction, so it is comparable
962
+ * with a max fee expressed as a rate.
963
+ */
964
+ feeRateSatPerVbyte: bigint;
965
+ /**
966
+ * The provider would not quote this yet, so the fee is derived from current
967
+ * on-chain fees and the real one may differ.
968
+ */
969
+ isEstimate: boolean;
970
+ };
971
+ /**
972
+ * Generated factory for {@link ClaimDepositQuote} record objects.
973
+ */
974
+ export declare const ClaimDepositQuote: Readonly<{
975
+ /**
976
+ * Create a frozen instance of {@link ClaimDepositQuote}, with defaults specified
977
+ * in Rust, in the {@link breez_sdk_spark} crate.
978
+ */
979
+ create: (partial: Partial<ClaimDepositQuote> & Required<Omit<ClaimDepositQuote, never>>) => ClaimDepositQuote;
980
+ /**
981
+ * Create a frozen instance of {@link ClaimDepositQuote}, with defaults specified
982
+ * in Rust, in the {@link breez_sdk_spark} crate.
983
+ */
984
+ new: (partial: Partial<ClaimDepositQuote> & Required<Omit<ClaimDepositQuote, never>>) => ClaimDepositQuote;
985
+ /**
986
+ * Defaults specified in the {@link breez_sdk_spark} crate.
987
+ */
988
+ defaults: () => Partial<ClaimDepositQuote>;
989
+ }>;
941
990
  export type ClaimDepositRequest = {
942
991
  txid: string;
943
992
  vout: number;
944
- maxFee: MaxFee | undefined;
945
993
  /**
946
- * Set to request an instant (0-conf) claim instead of waiting for the
947
- * deposit to mature, bounding the SSP spread at this many basis points of
948
- * the deposit value (100 bps = 1%). When set, the call takes the instant
949
- * path and `max_fee` is ignored.
994
+ * Caps what the claim may cost. A deposit that has not matured is claimed
995
+ * instantly when the provider's spread fits within this, so the same ceiling
996
+ * governs both. Falls back to the configured max deposit claim fee.
950
997
  */
951
- maxInstantFeeBps: /*u32*/ number | undefined;
998
+ maxFee: MaxFee | undefined;
952
999
  };
953
1000
  /**
954
1001
  * Generated factory for {@link ClaimDepositRequest} record objects.
@@ -958,12 +1005,12 @@ export declare const ClaimDepositRequest: Readonly<{
958
1005
  * Create a frozen instance of {@link ClaimDepositRequest}, with defaults specified
959
1006
  * in Rust, in the {@link breez_sdk_spark} crate.
960
1007
  */
961
- create: (partial: Partial<ClaimDepositRequest> & Required<Omit<ClaimDepositRequest, "maxFee" | "maxInstantFeeBps">>) => ClaimDepositRequest;
1008
+ create: (partial: Partial<ClaimDepositRequest> & Required<Omit<ClaimDepositRequest, "maxFee">>) => ClaimDepositRequest;
962
1009
  /**
963
1010
  * Create a frozen instance of {@link ClaimDepositRequest}, with defaults specified
964
1011
  * in Rust, in the {@link breez_sdk_spark} crate.
965
1012
  */
966
- new: (partial: Partial<ClaimDepositRequest> & Required<Omit<ClaimDepositRequest, "maxFee" | "maxInstantFeeBps">>) => ClaimDepositRequest;
1013
+ new: (partial: Partial<ClaimDepositRequest> & Required<Omit<ClaimDepositRequest, "maxFee">>) => ClaimDepositRequest;
967
1014
  /**
968
1015
  * Defaults specified in the {@link breez_sdk_spark} crate.
969
1016
  */
@@ -971,9 +1018,12 @@ export declare const ClaimDepositRequest: Readonly<{
971
1018
  }>;
972
1019
  export type ClaimDepositResponse = {
973
1020
  /**
974
- * The settled claim payment. Present for a standard claim, which completes
975
- * synchronously. Absent for an instant claim, whose transfer settles
976
- * asynchronously: watch for the payment via events or `list_payments`.
1021
+ * The settled claim payment, present when the deposit was claimed at maturity,
1022
+ * which completes synchronously. Absent when it was claimed before maturity,
1023
+ * whose transfer settles asynchronously: watch for the payment via events or
1024
+ * `list_payments`. Which of the two happens follows from the deposit's maturity
1025
+ * and the fee ceiling, not from anything the caller asks for, so treat the
1026
+ * payment as optional on every claim.
977
1027
  */
978
1028
  payment: Payment | undefined;
979
1029
  };
@@ -1079,14 +1129,13 @@ export type Config = {
1079
1129
  apiKey: string | undefined;
1080
1130
  network: Network;
1081
1131
  syncIntervalSecs: number;
1082
- maxDepositClaimFee: MaxFee | undefined;
1083
1132
  /**
1084
- * Maximum instant (0-conf) static deposit claim fee, as basis points of the
1085
- * deposit value (100 bps = 1%), capping the SSP spread for the instant
1086
- * credit. Opt-in: while unset, no 0-conf claim is attempted. Small deposits,
1087
- * whose spread is proportionally larger, fall through to the normal claim.
1133
+ * The maximum fee that can be paid to claim an on-chain deposit. It also caps
1134
+ * the provider's spread for crediting a deposit before it matures, so raising
1135
+ * it is what allows deposits to be claimed early. Unset disables claiming
1136
+ * rather than allowing any fee.
1088
1137
  */
1089
- maxInstantDepositClaimFeeBps: /*u32*/ number | undefined;
1138
+ maxDepositClaimFee: MaxFee | undefined;
1090
1139
  /**
1091
1140
  * The domain used for receiving through lnurl-pay and lightning address.
1092
1141
  */
@@ -1207,6 +1256,17 @@ export type Config = {
1207
1256
  * `default_server_config` already sets these compatible values.
1208
1257
  */
1209
1258
  backgroundTasksEnabled: boolean;
1259
+ /**
1260
+ * Routes the connections the SDK opens through a SOCKS5 proxy.
1261
+ *
1262
+ * Covers HTTP and gRPC alike, and resolves hostnames at the proxy so no
1263
+ * DNS query leaks the destination. `None` (default) connects directly.
1264
+ *
1265
+ * When an [`SdkContext`](crate::SdkContext) is supplied to the builder,
1266
+ * its proxy must match this one: the context owns the shared clients, so
1267
+ * a disagreement would mean part of the traffic bypassed the proxy.
1268
+ */
1269
+ proxy: ProxyConfig | undefined;
1210
1270
  /**
1211
1271
  * Configuration for cross-chain sends via Orchestra and Boltz.
1212
1272
  *
@@ -1990,6 +2050,11 @@ export type DepositInfo = {
1990
2050
  * Transaction id of the refund, once one has been created.
1991
2051
  */
1992
2052
  refundTxId: string | undefined;
2053
+ /**
2054
+ * How far the refund has got towards the network. Unset when no refund has
2055
+ * been created, and on refunds created before this field existed.
2056
+ */
2057
+ refundState: RefundState | undefined;
1993
2058
  /**
1994
2059
  * Why the last claim attempt failed. Unset while none has failed.
1995
2060
  */
@@ -3102,6 +3167,75 @@ export declare const ExternalTreeNodeId: Readonly<{
3102
3167
  */
3103
3168
  defaults: () => Partial<ExternalTreeNodeId>;
3104
3169
  }>;
3170
+ export type FetchClaimDepositQuoteRequest = {
3171
+ txid: string;
3172
+ vout: number;
3173
+ };
3174
+ /**
3175
+ * Generated factory for {@link FetchClaimDepositQuoteRequest} record objects.
3176
+ */
3177
+ export declare const FetchClaimDepositQuoteRequest: Readonly<{
3178
+ /**
3179
+ * Create a frozen instance of {@link FetchClaimDepositQuoteRequest}, with defaults specified
3180
+ * in Rust, in the {@link breez_sdk_spark} crate.
3181
+ */
3182
+ create: (partial: Partial<FetchClaimDepositQuoteRequest> & Required<Omit<FetchClaimDepositQuoteRequest, never>>) => FetchClaimDepositQuoteRequest;
3183
+ /**
3184
+ * Create a frozen instance of {@link FetchClaimDepositQuoteRequest}, with defaults specified
3185
+ * in Rust, in the {@link breez_sdk_spark} crate.
3186
+ */
3187
+ new: (partial: Partial<FetchClaimDepositQuoteRequest> & Required<Omit<FetchClaimDepositQuoteRequest, never>>) => FetchClaimDepositQuoteRequest;
3188
+ /**
3189
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3190
+ */
3191
+ defaults: () => Partial<FetchClaimDepositQuoteRequest>;
3192
+ }>;
3193
+ export type FetchClaimDepositQuoteResponse = {
3194
+ amountSats: bigint;
3195
+ /**
3196
+ * Confirmations the deposit has now, 0 while unconfirmed.
3197
+ */
3198
+ confirmations: number;
3199
+ /**
3200
+ * Claiming ahead of maturity, for a spread. Absent when the provider offers
3201
+ * no such option for this deposit, and when claiming early would not actually
3202
+ * be earlier: a deposit that has already matured, or a plan crediting no
3203
+ * sooner than maturity would, is only ever the more expensive way to wait.
3204
+ *
3205
+ * Also absent when the provider could not be reached for a quote, which is not
3206
+ * distinguished here from having nothing to offer: both mean there is no early
3207
+ * claim to show right now, and the one worth retrying is the transient one.
3208
+ *
3209
+ * Priced regardless of the configured maximum claim fee, which is usually far
3210
+ * below a spread. It is quoted so it can be offered, so claiming it needs a max
3211
+ * fee of at least its `fee_sats`. Below that the claim fails with
3212
+ * `MaxDepositClaimFeeExceeded` and the deposit waits for maturity.
3213
+ */
3214
+ instant: ClaimDepositQuote | undefined;
3215
+ /**
3216
+ * Claiming once the deposit matures.
3217
+ */
3218
+ mature: ClaimDepositQuote;
3219
+ };
3220
+ /**
3221
+ * Generated factory for {@link FetchClaimDepositQuoteResponse} record objects.
3222
+ */
3223
+ export declare const FetchClaimDepositQuoteResponse: Readonly<{
3224
+ /**
3225
+ * Create a frozen instance of {@link FetchClaimDepositQuoteResponse}, with defaults specified
3226
+ * in Rust, in the {@link breez_sdk_spark} crate.
3227
+ */
3228
+ create: (partial: Partial<FetchClaimDepositQuoteResponse> & Required<Omit<FetchClaimDepositQuoteResponse, never>>) => FetchClaimDepositQuoteResponse;
3229
+ /**
3230
+ * Create a frozen instance of {@link FetchClaimDepositQuoteResponse}, with defaults specified
3231
+ * in Rust, in the {@link breez_sdk_spark} crate.
3232
+ */
3233
+ new: (partial: Partial<FetchClaimDepositQuoteResponse> & Required<Omit<FetchClaimDepositQuoteResponse, never>>) => FetchClaimDepositQuoteResponse;
3234
+ /**
3235
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3236
+ */
3237
+ defaults: () => Partial<FetchClaimDepositQuoteResponse>;
3238
+ }>;
3105
3239
  export type FetchConversionLimitsRequest = {
3106
3240
  /**
3107
3241
  * The type of conversion, either from or to Bitcoin.
@@ -3346,6 +3480,36 @@ export declare const GetPaymentResponse: Readonly<{
3346
3480
  */
3347
3481
  defaults: () => Partial<GetPaymentResponse>;
3348
3482
  }>;
3483
+ /**
3484
+ * Options for [`get_spark_status`].
3485
+ */
3486
+ export type GetSparkStatusRequest = {
3487
+ /**
3488
+ * Routes the status request through a SOCKS5 proxy. Pass the same value as
3489
+ * [`Config::proxy`]: this call runs without an SDK instance, so it cannot
3490
+ * pick the setting up on its own.
3491
+ */
3492
+ proxy: ProxyConfig | undefined;
3493
+ };
3494
+ /**
3495
+ * Generated factory for {@link GetSparkStatusRequest} record objects.
3496
+ */
3497
+ export declare const GetSparkStatusRequest: Readonly<{
3498
+ /**
3499
+ * Create a frozen instance of {@link GetSparkStatusRequest}, with defaults specified
3500
+ * in Rust, in the {@link breez_sdk_spark} crate.
3501
+ */
3502
+ create: (partial: Partial<GetSparkStatusRequest> & Required<Omit<GetSparkStatusRequest, "proxy">>) => GetSparkStatusRequest;
3503
+ /**
3504
+ * Create a frozen instance of {@link GetSparkStatusRequest}, with defaults specified
3505
+ * in Rust, in the {@link breez_sdk_spark} crate.
3506
+ */
3507
+ new: (partial: Partial<GetSparkStatusRequest> & Required<Omit<GetSparkStatusRequest, "proxy">>) => GetSparkStatusRequest;
3508
+ /**
3509
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3510
+ */
3511
+ defaults: () => Partial<GetSparkStatusRequest>;
3512
+ }>;
3349
3513
  export type GetTokensMetadataRequest = {
3350
3514
  tokenIdentifiers: Array<string>;
3351
3515
  };
@@ -3883,7 +4047,7 @@ export declare const ListUnclaimedDepositsResponse: Readonly<{
3883
4047
  defaults: () => Partial<ListUnclaimedDepositsResponse>;
3884
4048
  }>;
3885
4049
  /**
3886
- * Wrapped in a [`InputType::LnurlAuth`], this is the result of [`parse`](breez_sdk_common::input::parse) when given a LNURL-auth endpoint.
4050
+ * Wrapped in a [`InputType::LnurlAuth`], this is the result of parsing a LNURL-auth endpoint.
3887
4051
  *
3888
4052
  * It represents the endpoint's parameters for the LNURL workflow.
3889
4053
  *
@@ -4242,6 +4406,13 @@ export type LnurlWithdrawRequestDetails = {
4242
4406
  * The maximum amount, in millisats, that this LNURL-withdraw endpoint accepts
4243
4407
  */
4244
4408
  maxWithdrawable: bigint;
4409
+ /**
4410
+ * The URL of the LNURL-withdraw endpoint these details were fetched from.
4411
+ * Set when the details come from parsing an input; determines how far the
4412
+ * withdraw flow trusts the endpoint-chosen `callback`. Absent or empty
4413
+ * means no exemption: the callback is held to the public-host rules.
4414
+ */
4415
+ url: string;
4245
4416
  };
4246
4417
  /**
4247
4418
  * Generated factory for {@link LnurlWithdrawRequestDetails} record objects.
@@ -4251,12 +4422,12 @@ export declare const LnurlWithdrawRequestDetails: Readonly<{
4251
4422
  * Create a frozen instance of {@link LnurlWithdrawRequestDetails}, with defaults specified
4252
4423
  * in Rust, in the {@link breez_sdk_spark} crate.
4253
4424
  */
4254
- create: (partial: Partial<LnurlWithdrawRequestDetails> & Required<Omit<LnurlWithdrawRequestDetails, never>>) => LnurlWithdrawRequestDetails;
4425
+ create: (partial: Partial<LnurlWithdrawRequestDetails> & Required<Omit<LnurlWithdrawRequestDetails, "url">>) => LnurlWithdrawRequestDetails;
4255
4426
  /**
4256
4427
  * Create a frozen instance of {@link LnurlWithdrawRequestDetails}, with defaults specified
4257
4428
  * in Rust, in the {@link breez_sdk_spark} crate.
4258
4429
  */
4259
- new: (partial: Partial<LnurlWithdrawRequestDetails> & Required<Omit<LnurlWithdrawRequestDetails, never>>) => LnurlWithdrawRequestDetails;
4430
+ new: (partial: Partial<LnurlWithdrawRequestDetails> & Required<Omit<LnurlWithdrawRequestDetails, "url">>) => LnurlWithdrawRequestDetails;
4260
4431
  /**
4261
4432
  * Defaults specified in the {@link breez_sdk_spark} crate.
4262
4433
  */
@@ -4433,6 +4604,36 @@ export declare const MintIssuerTokenRequest: Readonly<{
4433
4604
  */
4434
4605
  defaults: () => Partial<MintIssuerTokenRequest>;
4435
4606
  }>;
4607
+ /**
4608
+ * Options for [`new_rest_chain_service`].
4609
+ */
4610
+ export type NewRestChainServiceRequest = {
4611
+ /**
4612
+ * Routes the chain service through a SOCKS5 proxy. Pass the same value as
4613
+ * [`Config::proxy`](crate::Config::proxy): this service is built outside
4614
+ * the SDK, so it cannot pick the setting up on its own.
4615
+ */
4616
+ proxy: ProxyConfig | undefined;
4617
+ };
4618
+ /**
4619
+ * Generated factory for {@link NewRestChainServiceRequest} record objects.
4620
+ */
4621
+ export declare const NewRestChainServiceRequest: Readonly<{
4622
+ /**
4623
+ * Create a frozen instance of {@link NewRestChainServiceRequest}, with defaults specified
4624
+ * in Rust, in the {@link breez_sdk_spark} crate.
4625
+ */
4626
+ create: (partial: Partial<NewRestChainServiceRequest> & Required<Omit<NewRestChainServiceRequest, "proxy">>) => NewRestChainServiceRequest;
4627
+ /**
4628
+ * Create a frozen instance of {@link NewRestChainServiceRequest}, with defaults specified
4629
+ * in Rust, in the {@link breez_sdk_spark} crate.
4630
+ */
4631
+ new: (partial: Partial<NewRestChainServiceRequest> & Required<Omit<NewRestChainServiceRequest, "proxy">>) => NewRestChainServiceRequest;
4632
+ /**
4633
+ * Defaults specified in the {@link breez_sdk_spark} crate.
4634
+ */
4635
+ defaults: () => Partial<NewRestChainServiceRequest>;
4636
+ }>;
4436
4637
  /**
4437
4638
  * Request for [`BreezSdk::optimize_leaves`]. Defaults to
4438
4639
  * [`OptimizationMode::Full`].
@@ -4528,6 +4729,17 @@ export type PasskeyConfig = {
4528
4729
  * provider.
4529
4730
  */
4530
4731
  providerOptions: PasskeyProviderOptions | undefined;
4732
+ /**
4733
+ * Routes the Nostr relay connections that store wallet labels through a
4734
+ * SOCKS5 proxy. Pass the same value as [`Config::proxy`](crate::Config::proxy):
4735
+ * the passkey client is built before the SDK, so it cannot pick the setting
4736
+ * up on its own.
4737
+ *
4738
+ * Relay connections do not support proxy authentication, so a proxy
4739
+ * carrying a username and password is rejected when the client is
4740
+ * built.
4741
+ */
4742
+ proxy: ProxyConfig | undefined;
4531
4743
  };
4532
4744
  /**
4533
4745
  * Generated factory for {@link PasskeyConfig} record objects.
@@ -4537,12 +4749,12 @@ export declare const PasskeyConfig: Readonly<{
4537
4749
  * Create a frozen instance of {@link PasskeyConfig}, with defaults specified
4538
4750
  * in Rust, in the {@link breez_sdk_spark} crate.
4539
4751
  */
4540
- create: (partial: Partial<PasskeyConfig> & Required<Omit<PasskeyConfig, "defaultLabel" | "providerOptions">>) => PasskeyConfig;
4752
+ create: (partial: Partial<PasskeyConfig> & Required<Omit<PasskeyConfig, "proxy" | "defaultLabel" | "providerOptions">>) => PasskeyConfig;
4541
4753
  /**
4542
4754
  * Create a frozen instance of {@link PasskeyConfig}, with defaults specified
4543
4755
  * in Rust, in the {@link breez_sdk_spark} crate.
4544
4756
  */
4545
- new: (partial: Partial<PasskeyConfig> & Required<Omit<PasskeyConfig, "defaultLabel" | "providerOptions">>) => PasskeyConfig;
4757
+ new: (partial: Partial<PasskeyConfig> & Required<Omit<PasskeyConfig, "proxy" | "defaultLabel" | "providerOptions">>) => PasskeyConfig;
4546
4758
  /**
4547
4759
  * Defaults specified in the {@link breez_sdk_spark} crate.
4548
4760
  */
@@ -5299,6 +5511,51 @@ export declare const ProvisionalPayment: Readonly<{
5299
5511
  */
5300
5512
  defaults: () => Partial<ProvisionalPayment>;
5301
5513
  }>;
5514
+ /**
5515
+ * A SOCKS5 proxy carrying the connections the SDK opens.
5516
+ *
5517
+ * Hostnames are resolved by the proxy rather than locally, so a DNS query
5518
+ * never discloses which host is being reached. A connection that cannot be
5519
+ * established through the proxy fails: the SDK never falls back to a direct
5520
+ * one.
5521
+ *
5522
+ * Not supported on WASM, where the browser owns connection setup and exposes
5523
+ * no proxy control. In Node, route the SDK by installing a proxy dispatcher
5524
+ * on the global `fetch` instead.
5525
+ */
5526
+ export type ProxyConfig = {
5527
+ /**
5528
+ * Proxy host. An IP address, or a name resolvable locally: reaching the
5529
+ * proxy is the one lookup that cannot itself go through the proxy.
5530
+ */
5531
+ host: string;
5532
+ port: number;
5533
+ /**
5534
+ * Username for SOCKS5 username/password authentication. Authentication is
5535
+ * only offered when both this and `password` are set.
5536
+ */
5537
+ username: string | undefined;
5538
+ password: string | undefined;
5539
+ };
5540
+ /**
5541
+ * Generated factory for {@link ProxyConfig} record objects.
5542
+ */
5543
+ export declare const ProxyConfig: Readonly<{
5544
+ /**
5545
+ * Create a frozen instance of {@link ProxyConfig}, with defaults specified
5546
+ * in Rust, in the {@link breez_sdk_spark} crate.
5547
+ */
5548
+ create: (partial: Partial<ProxyConfig> & Required<Omit<ProxyConfig, "username" | "password">>) => ProxyConfig;
5549
+ /**
5550
+ * Create a frozen instance of {@link ProxyConfig}, with defaults specified
5551
+ * in Rust, in the {@link breez_sdk_spark} crate.
5552
+ */
5553
+ new: (partial: Partial<ProxyConfig> & Required<Omit<ProxyConfig, "username" | "password">>) => ProxyConfig;
5554
+ /**
5555
+ * Defaults specified in the {@link breez_sdk_spark} crate.
5556
+ */
5557
+ defaults: () => Partial<ProxyConfig>;
5558
+ }>;
5302
5559
  /**
5303
5560
  * FFI-safe representation of a secp256k1 public key (33 bytes compressed)
5304
5561
  */
@@ -5920,6 +6177,12 @@ export type SdkContextConfig = {
5920
6177
  * requests across them.
5921
6178
  */
5922
6179
  connectionsPerOperator: /*u32*/ number | undefined;
6180
+ /**
6181
+ * Routes the connections opened by this context's shared clients through
6182
+ * a SOCKS5 proxy. Must match the `proxy` on the `Config` of every SDK
6183
+ * built from this context.
6184
+ */
6185
+ proxy: ProxyConfig | undefined;
5923
6186
  /**
5924
6187
  * Shared storage backend for SDKs built from this context. When set,
5925
6188
  * every SDK built from the context reuses it (and its database
@@ -5939,12 +6202,12 @@ export declare const SdkContextConfig: Readonly<{
5939
6202
  * Create a frozen instance of {@link SdkContextConfig}, with defaults specified
5940
6203
  * in Rust, in the {@link breez_sdk_spark} crate.
5941
6204
  */
5942
- create: (partial: Partial<SdkContextConfig> & Required<Omit<SdkContextConfig, "apiKey" | "connectionsPerOperator" | "storage">>) => SdkContextConfig;
6205
+ create: (partial: Partial<SdkContextConfig> & Required<Omit<SdkContextConfig, "apiKey" | "proxy" | "connectionsPerOperator" | "storage">>) => SdkContextConfig;
5943
6206
  /**
5944
6207
  * Create a frozen instance of {@link SdkContextConfig}, with defaults specified
5945
6208
  * in Rust, in the {@link breez_sdk_spark} crate.
5946
6209
  */
5947
- new: (partial: Partial<SdkContextConfig> & Required<Omit<SdkContextConfig, "apiKey" | "connectionsPerOperator" | "storage">>) => SdkContextConfig;
6210
+ new: (partial: Partial<SdkContextConfig> & Required<Omit<SdkContextConfig, "apiKey" | "proxy" | "connectionsPerOperator" | "storage">>) => SdkContextConfig;
5948
6211
  /**
5949
6212
  * Defaults specified in the {@link breez_sdk_spark} crate.
5950
6213
  */
@@ -7277,6 +7540,12 @@ export type TurnkeyConfig = {
7277
7540
  * greater than 0 when set: 0 is rejected at connect.
7278
7541
  */
7279
7542
  maxRps: /*u32*/ number | undefined;
7543
+ /**
7544
+ * Routes Turnkey requests through a SOCKS5 proxy. Pass the same value as
7545
+ * [`Config::proxy`](crate::Config::proxy): the signer is built before the
7546
+ * SDK, so it cannot pick the setting up on its own.
7547
+ */
7548
+ proxy: ProxyConfig | undefined;
7280
7549
  };
7281
7550
  /**
7282
7551
  * Generated factory for {@link TurnkeyConfig} record objects.
@@ -7286,12 +7555,12 @@ export declare const TurnkeyConfig: Readonly<{
7286
7555
  * Create a frozen instance of {@link TurnkeyConfig}, with defaults specified
7287
7556
  * in Rust, in the {@link breez_sdk_spark} crate.
7288
7557
  */
7289
- create: (partial: Partial<TurnkeyConfig> & Required<Omit<TurnkeyConfig, "maxRps">>) => TurnkeyConfig;
7558
+ create: (partial: Partial<TurnkeyConfig> & Required<Omit<TurnkeyConfig, "proxy" | "maxRps">>) => TurnkeyConfig;
7290
7559
  /**
7291
7560
  * Create a frozen instance of {@link TurnkeyConfig}, with defaults specified
7292
7561
  * in Rust, in the {@link breez_sdk_spark} crate.
7293
7562
  */
7294
- new: (partial: Partial<TurnkeyConfig> & Required<Omit<TurnkeyConfig, "maxRps">>) => TurnkeyConfig;
7563
+ new: (partial: Partial<TurnkeyConfig> & Required<Omit<TurnkeyConfig, "proxy" | "maxRps">>) => TurnkeyConfig;
7295
7564
  /**
7296
7565
  * Defaults specified in the {@link breez_sdk_spark} crate.
7297
7566
  */
@@ -11571,138 +11840,24 @@ export declare const InputType: Readonly<{
11571
11840
  };
11572
11841
  }>;
11573
11842
  export type InputType = InstanceType<(typeof InputType)[keyof Omit<typeof InputType, 'instanceOf'>]>;
11574
- export declare enum InstantClaimDeclineReason_Tags {
11575
- NoPlan = "NoPlan",
11576
- FeeExceeded = "FeeExceeded",
11577
- SubmissionFailed = "SubmissionFailed"
11578
- }
11579
- /**
11580
- * Why an instant (0-conf) claim was declined.
11581
- */
11582
- export declare const InstantClaimDeclineReason: Readonly<{
11583
- instanceOf: (obj: any) => obj is InstantClaimDeclineReason;
11584
- NoPlan: {
11585
- new (): {
11586
- readonly tag: InstantClaimDeclineReason_Tags.NoPlan;
11587
- /**
11588
- * @private
11589
- * This field is private and should not be used, use `tag` instead.
11590
- */
11591
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11592
- };
11593
- "new"(): {
11594
- readonly tag: InstantClaimDeclineReason_Tags.NoPlan;
11595
- /**
11596
- * @private
11597
- * This field is private and should not be used, use `tag` instead.
11598
- */
11599
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11600
- };
11601
- instanceOf(obj: any): obj is {
11602
- readonly tag: InstantClaimDeclineReason_Tags.NoPlan;
11603
- /**
11604
- * @private
11605
- * This field is private and should not be used, use `tag` instead.
11606
- */
11607
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11608
- };
11609
- };
11610
- FeeExceeded: {
11611
- new (inner: {
11612
- maxBps: number;
11613
- quotedBps: number;
11614
- quotedSats: bigint;
11615
- }): {
11616
- readonly tag: InstantClaimDeclineReason_Tags.FeeExceeded;
11617
- readonly inner: Readonly<{
11618
- maxBps: number;
11619
- quotedBps: number;
11620
- quotedSats: bigint;
11621
- }>;
11622
- /**
11623
- * @private
11624
- * This field is private and should not be used, use `tag` instead.
11625
- */
11626
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11627
- };
11628
- "new"(inner: {
11629
- maxBps: number;
11630
- quotedBps: number;
11631
- quotedSats: bigint;
11632
- }): {
11633
- readonly tag: InstantClaimDeclineReason_Tags.FeeExceeded;
11634
- readonly inner: Readonly<{
11635
- maxBps: number;
11636
- quotedBps: number;
11637
- quotedSats: bigint;
11638
- }>;
11639
- /**
11640
- * @private
11641
- * This field is private and should not be used, use `tag` instead.
11642
- */
11643
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11644
- };
11645
- instanceOf(obj: any): obj is {
11646
- readonly tag: InstantClaimDeclineReason_Tags.FeeExceeded;
11647
- readonly inner: Readonly<{
11648
- maxBps: number;
11649
- quotedBps: number;
11650
- quotedSats: bigint;
11651
- }>;
11652
- /**
11653
- * @private
11654
- * This field is private and should not be used, use `tag` instead.
11655
- */
11656
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11657
- };
11658
- };
11659
- SubmissionFailed: {
11660
- new (): {
11661
- readonly tag: InstantClaimDeclineReason_Tags.SubmissionFailed;
11662
- /**
11663
- * @private
11664
- * This field is private and should not be used, use `tag` instead.
11665
- */
11666
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11667
- };
11668
- "new"(): {
11669
- readonly tag: InstantClaimDeclineReason_Tags.SubmissionFailed;
11670
- /**
11671
- * @private
11672
- * This field is private and should not be used, use `tag` instead.
11673
- */
11674
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11675
- };
11676
- instanceOf(obj: any): obj is {
11677
- readonly tag: InstantClaimDeclineReason_Tags.SubmissionFailed;
11678
- /**
11679
- * @private
11680
- * This field is private and should not be used, use `tag` instead.
11681
- */
11682
- readonly [uniffiTypeNameSymbol]: "InstantClaimDeclineReason";
11683
- };
11684
- };
11685
- }>;
11686
- /**
11687
- * Why an instant (0-conf) claim was declined.
11688
- */
11689
- export type InstantClaimDeclineReason = InstanceType<(typeof InstantClaimDeclineReason)[keyof Omit<typeof InstantClaimDeclineReason, 'instanceOf'>]>;
11690
11843
  export declare enum InstantClaimStatus_Tags {
11691
11844
  Declined = "Declined",
11692
11845
  Submitted = "Submitted"
11693
11846
  }
11694
11847
  /**
11695
- * State of an instant (0-conf) claim attempt on a deposit.
11848
+ * State of an instant claim attempt on a deposit.
11696
11849
  */
11697
11850
  export declare const InstantClaimStatus: Readonly<{
11698
11851
  instanceOf: (obj: any) => obj is InstantClaimStatus;
11699
11852
  Declined: {
11700
11853
  new (inner: {
11701
- reason: InstantClaimDeclineReason;
11854
+ maxFeeSats: /*u64*/ bigint | undefined;
11855
+ confirmations: number;
11702
11856
  }): {
11703
11857
  readonly tag: InstantClaimStatus_Tags.Declined;
11704
11858
  readonly inner: Readonly<{
11705
- reason: InstantClaimDeclineReason;
11859
+ maxFeeSats: /*u64*/ bigint | undefined;
11860
+ confirmations: number;
11706
11861
  }>;
11707
11862
  /**
11708
11863
  * @private
@@ -11711,11 +11866,13 @@ export declare const InstantClaimStatus: Readonly<{
11711
11866
  readonly [uniffiTypeNameSymbol]: "InstantClaimStatus";
11712
11867
  };
11713
11868
  "new"(inner: {
11714
- reason: InstantClaimDeclineReason;
11869
+ maxFeeSats: /*u64*/ bigint | undefined;
11870
+ confirmations: number;
11715
11871
  }): {
11716
11872
  readonly tag: InstantClaimStatus_Tags.Declined;
11717
11873
  readonly inner: Readonly<{
11718
- reason: InstantClaimDeclineReason;
11874
+ maxFeeSats: /*u64*/ bigint | undefined;
11875
+ confirmations: number;
11719
11876
  }>;
11720
11877
  /**
11721
11878
  * @private
@@ -11726,7 +11883,8 @@ export declare const InstantClaimStatus: Readonly<{
11726
11883
  instanceOf(obj: any): obj is {
11727
11884
  readonly tag: InstantClaimStatus_Tags.Declined;
11728
11885
  readonly inner: Readonly<{
11729
- reason: InstantClaimDeclineReason;
11886
+ maxFeeSats: /*u64*/ bigint | undefined;
11887
+ confirmations: number;
11730
11888
  }>;
11731
11889
  /**
11732
11890
  * @private
@@ -11776,7 +11934,7 @@ export declare const InstantClaimStatus: Readonly<{
11776
11934
  };
11777
11935
  }>;
11778
11936
  /**
11779
- * State of an instant (0-conf) claim attempt on a deposit.
11937
+ * State of an instant claim attempt on a deposit.
11780
11938
  */
11781
11939
  export type InstantClaimStatus = InstanceType<(typeof InstantClaimStatus)[keyof Omit<typeof InstantClaimStatus, 'instanceOf'>]>;
11782
11940
  export declare enum LnurlCallbackStatus_Tags {
@@ -12385,6 +12543,7 @@ export declare enum PasskeyError_Tags {
12385
12543
  MnemonicError = "MnemonicError",
12386
12544
  InvalidSalt = "InvalidSalt",
12387
12545
  CreatedButNotDerived = "CreatedButNotDerived",
12546
+ InvalidConfig = "InvalidConfig",
12388
12547
  Generic = "Generic"
12389
12548
  }
12390
12549
  /**
@@ -13055,9 +13214,9 @@ export declare const PasskeyError: Readonly<{
13055
13214
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
13056
13215
  stackTraceLimit: number;
13057
13216
  };
13058
- Generic: {
13217
+ InvalidConfig: {
13059
13218
  new (v0: string): {
13060
- readonly tag: PasskeyError_Tags.Generic;
13219
+ readonly tag: PasskeyError_Tags.InvalidConfig;
13061
13220
  readonly inner: Readonly<[string]>;
13062
13221
  /**
13063
13222
  * @private
@@ -13070,7 +13229,7 @@ export declare const PasskeyError: Readonly<{
13070
13229
  cause?: unknown;
13071
13230
  };
13072
13231
  "new"(v0: string): {
13073
- readonly tag: PasskeyError_Tags.Generic;
13232
+ readonly tag: PasskeyError_Tags.InvalidConfig;
13074
13233
  readonly inner: Readonly<[string]>;
13075
13234
  /**
13076
13235
  * @private
@@ -13083,7 +13242,7 @@ export declare const PasskeyError: Readonly<{
13083
13242
  cause?: unknown;
13084
13243
  };
13085
13244
  instanceOf(obj: any): obj is {
13086
- readonly tag: PasskeyError_Tags.Generic;
13245
+ readonly tag: PasskeyError_Tags.InvalidConfig;
13087
13246
  readonly inner: Readonly<[string]>;
13088
13247
  /**
13089
13248
  * @private
@@ -13096,7 +13255,7 @@ export declare const PasskeyError: Readonly<{
13096
13255
  cause?: unknown;
13097
13256
  };
13098
13257
  hasInner(obj: any): obj is {
13099
- readonly tag: PasskeyError_Tags.Generic;
13258
+ readonly tag: PasskeyError_Tags.InvalidConfig;
13100
13259
  readonly inner: Readonly<[string]>;
13101
13260
  /**
13102
13261
  * @private
@@ -13109,7 +13268,7 @@ export declare const PasskeyError: Readonly<{
13109
13268
  cause?: unknown;
13110
13269
  };
13111
13270
  getInner(obj: {
13112
- readonly tag: PasskeyError_Tags.Generic;
13271
+ readonly tag: PasskeyError_Tags.InvalidConfig;
13113
13272
  readonly inner: Readonly<[string]>;
13114
13273
  /**
13115
13274
  * @private
@@ -13126,46 +13285,117 @@ export declare const PasskeyError: Readonly<{
13126
13285
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
13127
13286
  stackTraceLimit: number;
13128
13287
  };
13129
- }>;
13130
- /**
13131
- * Error type for passkey operations.
13132
- */
13133
- export type PasskeyError = InstanceType<(typeof PasskeyError)[keyof Omit<typeof PasskeyError, 'instanceOf'>]>;
13134
- export declare enum PaymentDetails_Tags {
13135
- Spark = "Spark",
13136
- Token = "Token",
13137
- Lightning = "Lightning",
13138
- Withdraw = "Withdraw",
13139
- Deposit = "Deposit"
13140
- }
13141
- export declare const PaymentDetails: Readonly<{
13142
- instanceOf: (obj: any) => obj is PaymentDetails;
13143
- Spark: {
13144
- new (inner: {
13145
- /**
13146
- * The invoice details if the payment fulfilled a spark invoice
13147
- */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
13148
- /**
13149
- * The HTLC transfer details if the payment fulfilled an HTLC transfer
13150
- */ htlcDetails: SparkHtlcDetails | undefined;
13151
- /**
13152
- * The information for a conversion
13153
- */ conversionInfo: ConversionInfo | undefined;
13154
- }): {
13155
- readonly tag: PaymentDetails_Tags.Spark;
13156
- readonly inner: Readonly<{
13157
- invoiceDetails: SparkInvoicePaymentDetails | undefined;
13158
- htlcDetails: SparkHtlcDetails | undefined;
13159
- conversionInfo: ConversionInfo | undefined;
13160
- }>;
13288
+ Generic: {
13289
+ new (v0: string): {
13290
+ readonly tag: PasskeyError_Tags.Generic;
13291
+ readonly inner: Readonly<[string]>;
13161
13292
  /**
13162
13293
  * @private
13163
13294
  * This field is private and should not be used, use `tag` instead.
13164
13295
  */
13165
- readonly [uniffiTypeNameSymbol]: "PaymentDetails";
13166
- };
13167
- "new"(inner: {
13168
- /**
13296
+ readonly [uniffiTypeNameSymbol]: "PasskeyError";
13297
+ name: string;
13298
+ message: string;
13299
+ stack?: string;
13300
+ cause?: unknown;
13301
+ };
13302
+ "new"(v0: string): {
13303
+ readonly tag: PasskeyError_Tags.Generic;
13304
+ readonly inner: Readonly<[string]>;
13305
+ /**
13306
+ * @private
13307
+ * This field is private and should not be used, use `tag` instead.
13308
+ */
13309
+ readonly [uniffiTypeNameSymbol]: "PasskeyError";
13310
+ name: string;
13311
+ message: string;
13312
+ stack?: string;
13313
+ cause?: unknown;
13314
+ };
13315
+ instanceOf(obj: any): obj is {
13316
+ readonly tag: PasskeyError_Tags.Generic;
13317
+ readonly inner: Readonly<[string]>;
13318
+ /**
13319
+ * @private
13320
+ * This field is private and should not be used, use `tag` instead.
13321
+ */
13322
+ readonly [uniffiTypeNameSymbol]: "PasskeyError";
13323
+ name: string;
13324
+ message: string;
13325
+ stack?: string;
13326
+ cause?: unknown;
13327
+ };
13328
+ hasInner(obj: any): obj is {
13329
+ readonly tag: PasskeyError_Tags.Generic;
13330
+ readonly inner: Readonly<[string]>;
13331
+ /**
13332
+ * @private
13333
+ * This field is private and should not be used, use `tag` instead.
13334
+ */
13335
+ readonly [uniffiTypeNameSymbol]: "PasskeyError";
13336
+ name: string;
13337
+ message: string;
13338
+ stack?: string;
13339
+ cause?: unknown;
13340
+ };
13341
+ getInner(obj: {
13342
+ readonly tag: PasskeyError_Tags.Generic;
13343
+ readonly inner: Readonly<[string]>;
13344
+ /**
13345
+ * @private
13346
+ * This field is private and should not be used, use `tag` instead.
13347
+ */
13348
+ readonly [uniffiTypeNameSymbol]: "PasskeyError";
13349
+ name: string;
13350
+ message: string;
13351
+ stack?: string;
13352
+ cause?: unknown;
13353
+ }): Readonly<[string]>;
13354
+ isError(error: unknown): error is Error;
13355
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
13356
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
13357
+ stackTraceLimit: number;
13358
+ };
13359
+ }>;
13360
+ /**
13361
+ * Error type for passkey operations.
13362
+ */
13363
+ export type PasskeyError = InstanceType<(typeof PasskeyError)[keyof Omit<typeof PasskeyError, 'instanceOf'>]>;
13364
+ export declare enum PaymentDetails_Tags {
13365
+ Spark = "Spark",
13366
+ Token = "Token",
13367
+ Lightning = "Lightning",
13368
+ Withdraw = "Withdraw",
13369
+ Deposit = "Deposit"
13370
+ }
13371
+ export declare const PaymentDetails: Readonly<{
13372
+ instanceOf: (obj: any) => obj is PaymentDetails;
13373
+ Spark: {
13374
+ new (inner: {
13375
+ /**
13376
+ * The invoice details if the payment fulfilled a spark invoice
13377
+ */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
13378
+ /**
13379
+ * The HTLC transfer details if the payment fulfilled an HTLC transfer
13380
+ */ htlcDetails: SparkHtlcDetails | undefined;
13381
+ /**
13382
+ * The information for a conversion
13383
+ */ conversionInfo: ConversionInfo | undefined;
13384
+ }): {
13385
+ readonly tag: PaymentDetails_Tags.Spark;
13386
+ readonly inner: Readonly<{
13387
+ invoiceDetails: SparkInvoicePaymentDetails | undefined;
13388
+ htlcDetails: SparkHtlcDetails | undefined;
13389
+ conversionInfo: ConversionInfo | undefined;
13390
+ }>;
13391
+ /**
13392
+ * @private
13393
+ * This field is private and should not be used, use `tag` instead.
13394
+ */
13395
+ readonly [uniffiTypeNameSymbol]: "PaymentDetails";
13396
+ };
13397
+ "new"(inner: {
13398
+ /**
13169
13399
  * The invoice details if the payment fulfilled a spark invoice
13170
13400
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
13171
13401
  /**
@@ -15186,6 +15416,85 @@ export declare const ReceivePaymentMethod: Readonly<{
15186
15416
  };
15187
15417
  }>;
15188
15418
  export type ReceivePaymentMethod = InstanceType<(typeof ReceivePaymentMethod)[keyof Omit<typeof ReceivePaymentMethod, 'instanceOf'>]>;
15419
+ export declare enum RefundState_Tags {
15420
+ BroadcastPending = "BroadcastPending",
15421
+ Broadcast = "Broadcast"
15422
+ }
15423
+ /**
15424
+ * State of the deposit refund broadcast.
15425
+ */
15426
+ export declare const RefundState: Readonly<{
15427
+ instanceOf: (obj: any) => obj is RefundState;
15428
+ BroadcastPending: {
15429
+ new (inner: {
15430
+ lastError: string | undefined;
15431
+ }): {
15432
+ readonly tag: RefundState_Tags.BroadcastPending;
15433
+ readonly inner: Readonly<{
15434
+ lastError: string | undefined;
15435
+ }>;
15436
+ /**
15437
+ * @private
15438
+ * This field is private and should not be used, use `tag` instead.
15439
+ */
15440
+ readonly [uniffiTypeNameSymbol]: "RefundState";
15441
+ };
15442
+ "new"(inner: {
15443
+ lastError: string | undefined;
15444
+ }): {
15445
+ readonly tag: RefundState_Tags.BroadcastPending;
15446
+ readonly inner: Readonly<{
15447
+ lastError: string | undefined;
15448
+ }>;
15449
+ /**
15450
+ * @private
15451
+ * This field is private and should not be used, use `tag` instead.
15452
+ */
15453
+ readonly [uniffiTypeNameSymbol]: "RefundState";
15454
+ };
15455
+ instanceOf(obj: any): obj is {
15456
+ readonly tag: RefundState_Tags.BroadcastPending;
15457
+ readonly inner: Readonly<{
15458
+ lastError: string | undefined;
15459
+ }>;
15460
+ /**
15461
+ * @private
15462
+ * This field is private and should not be used, use `tag` instead.
15463
+ */
15464
+ readonly [uniffiTypeNameSymbol]: "RefundState";
15465
+ };
15466
+ };
15467
+ Broadcast: {
15468
+ new (): {
15469
+ readonly tag: RefundState_Tags.Broadcast;
15470
+ /**
15471
+ * @private
15472
+ * This field is private and should not be used, use `tag` instead.
15473
+ */
15474
+ readonly [uniffiTypeNameSymbol]: "RefundState";
15475
+ };
15476
+ "new"(): {
15477
+ readonly tag: RefundState_Tags.Broadcast;
15478
+ /**
15479
+ * @private
15480
+ * This field is private and should not be used, use `tag` instead.
15481
+ */
15482
+ readonly [uniffiTypeNameSymbol]: "RefundState";
15483
+ };
15484
+ instanceOf(obj: any): obj is {
15485
+ readonly tag: RefundState_Tags.Broadcast;
15486
+ /**
15487
+ * @private
15488
+ * This field is private and should not be used, use `tag` instead.
15489
+ */
15490
+ readonly [uniffiTypeNameSymbol]: "RefundState";
15491
+ };
15492
+ };
15493
+ }>;
15494
+ /**
15495
+ * State of the deposit refund broadcast.
15496
+ */
15497
+ export type RefundState = InstanceType<(typeof RefundState)[keyof Omit<typeof RefundState, 'instanceOf'>]>;
15189
15498
  export declare enum SdkError_Tags {
15190
15499
  SparkError = "SparkError",
15191
15500
  InsufficientFunds = "InsufficientFunds",
@@ -15196,6 +15505,8 @@ export declare enum SdkError_Tags {
15196
15505
  ChainServiceError = "ChainServiceError",
15197
15506
  MaxDepositClaimFeeExceeded = "MaxDepositClaimFeeExceeded",
15198
15507
  MissingUtxo = "MissingUtxo",
15508
+ DepositClaimInProgress = "DepositClaimInProgress",
15509
+ RefundReplacementFeeTooLow = "RefundReplacementFeeTooLow",
15199
15510
  LnurlError = "LnurlError",
15200
15511
  Signer = "Signer",
15201
15512
  OptimizationAlreadyRunning = "OptimizationAlreadyRunning",
@@ -15942,6 +16253,196 @@ export declare const SdkError: Readonly<{
15942
16253
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
15943
16254
  stackTraceLimit: number;
15944
16255
  };
16256
+ DepositClaimInProgress: {
16257
+ new (inner: {
16258
+ tx: string;
16259
+ vout: number;
16260
+ }): {
16261
+ readonly tag: SdkError_Tags.DepositClaimInProgress;
16262
+ readonly inner: Readonly<{
16263
+ tx: string;
16264
+ vout: number;
16265
+ }>;
16266
+ /**
16267
+ * @private
16268
+ * This field is private and should not be used, use `tag` instead.
16269
+ */
16270
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16271
+ name: string;
16272
+ message: string;
16273
+ stack?: string;
16274
+ cause?: unknown;
16275
+ };
16276
+ "new"(inner: {
16277
+ tx: string;
16278
+ vout: number;
16279
+ }): {
16280
+ readonly tag: SdkError_Tags.DepositClaimInProgress;
16281
+ readonly inner: Readonly<{
16282
+ tx: string;
16283
+ vout: number;
16284
+ }>;
16285
+ /**
16286
+ * @private
16287
+ * This field is private and should not be used, use `tag` instead.
16288
+ */
16289
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16290
+ name: string;
16291
+ message: string;
16292
+ stack?: string;
16293
+ cause?: unknown;
16294
+ };
16295
+ instanceOf(obj: any): obj is {
16296
+ readonly tag: SdkError_Tags.DepositClaimInProgress;
16297
+ readonly inner: Readonly<{
16298
+ tx: string;
16299
+ vout: number;
16300
+ }>;
16301
+ /**
16302
+ * @private
16303
+ * This field is private and should not be used, use `tag` instead.
16304
+ */
16305
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16306
+ name: string;
16307
+ message: string;
16308
+ stack?: string;
16309
+ cause?: unknown;
16310
+ };
16311
+ hasInner(obj: any): obj is {
16312
+ readonly tag: SdkError_Tags.DepositClaimInProgress;
16313
+ readonly inner: Readonly<{
16314
+ tx: string;
16315
+ vout: number;
16316
+ }>;
16317
+ /**
16318
+ * @private
16319
+ * This field is private and should not be used, use `tag` instead.
16320
+ */
16321
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16322
+ name: string;
16323
+ message: string;
16324
+ stack?: string;
16325
+ cause?: unknown;
16326
+ };
16327
+ getInner(obj: {
16328
+ readonly tag: SdkError_Tags.DepositClaimInProgress;
16329
+ readonly inner: Readonly<{
16330
+ tx: string;
16331
+ vout: number;
16332
+ }>;
16333
+ /**
16334
+ * @private
16335
+ * This field is private and should not be used, use `tag` instead.
16336
+ */
16337
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16338
+ name: string;
16339
+ message: string;
16340
+ stack?: string;
16341
+ cause?: unknown;
16342
+ }): Readonly<{
16343
+ tx: string;
16344
+ vout: number;
16345
+ }>;
16346
+ isError(error: unknown): error is Error;
16347
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
16348
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
16349
+ stackTraceLimit: number;
16350
+ };
16351
+ RefundReplacementFeeTooLow: {
16352
+ new (inner: {
16353
+ pendingFeeSats: bigint;
16354
+ requiredFeeSats: bigint;
16355
+ }): {
16356
+ readonly tag: SdkError_Tags.RefundReplacementFeeTooLow;
16357
+ readonly inner: Readonly<{
16358
+ pendingFeeSats: bigint;
16359
+ requiredFeeSats: bigint;
16360
+ }>;
16361
+ /**
16362
+ * @private
16363
+ * This field is private and should not be used, use `tag` instead.
16364
+ */
16365
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16366
+ name: string;
16367
+ message: string;
16368
+ stack?: string;
16369
+ cause?: unknown;
16370
+ };
16371
+ "new"(inner: {
16372
+ pendingFeeSats: bigint;
16373
+ requiredFeeSats: bigint;
16374
+ }): {
16375
+ readonly tag: SdkError_Tags.RefundReplacementFeeTooLow;
16376
+ readonly inner: Readonly<{
16377
+ pendingFeeSats: bigint;
16378
+ requiredFeeSats: bigint;
16379
+ }>;
16380
+ /**
16381
+ * @private
16382
+ * This field is private and should not be used, use `tag` instead.
16383
+ */
16384
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16385
+ name: string;
16386
+ message: string;
16387
+ stack?: string;
16388
+ cause?: unknown;
16389
+ };
16390
+ instanceOf(obj: any): obj is {
16391
+ readonly tag: SdkError_Tags.RefundReplacementFeeTooLow;
16392
+ readonly inner: Readonly<{
16393
+ pendingFeeSats: bigint;
16394
+ requiredFeeSats: bigint;
16395
+ }>;
16396
+ /**
16397
+ * @private
16398
+ * This field is private and should not be used, use `tag` instead.
16399
+ */
16400
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16401
+ name: string;
16402
+ message: string;
16403
+ stack?: string;
16404
+ cause?: unknown;
16405
+ };
16406
+ hasInner(obj: any): obj is {
16407
+ readonly tag: SdkError_Tags.RefundReplacementFeeTooLow;
16408
+ readonly inner: Readonly<{
16409
+ pendingFeeSats: bigint;
16410
+ requiredFeeSats: bigint;
16411
+ }>;
16412
+ /**
16413
+ * @private
16414
+ * This field is private and should not be used, use `tag` instead.
16415
+ */
16416
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16417
+ name: string;
16418
+ message: string;
16419
+ stack?: string;
16420
+ cause?: unknown;
16421
+ };
16422
+ getInner(obj: {
16423
+ readonly tag: SdkError_Tags.RefundReplacementFeeTooLow;
16424
+ readonly inner: Readonly<{
16425
+ pendingFeeSats: bigint;
16426
+ requiredFeeSats: bigint;
16427
+ }>;
16428
+ /**
16429
+ * @private
16430
+ * This field is private and should not be used, use `tag` instead.
16431
+ */
16432
+ readonly [uniffiTypeNameSymbol]: "SdkError";
16433
+ name: string;
16434
+ message: string;
16435
+ stack?: string;
16436
+ cause?: unknown;
16437
+ }): Readonly<{
16438
+ pendingFeeSats: bigint;
16439
+ requiredFeeSats: bigint;
16440
+ }>;
16441
+ isError(error: unknown): error is Error;
16442
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
16443
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
16444
+ stackTraceLimit: number;
16445
+ };
15945
16446
  LnurlError: {
15946
16447
  new (v0: string): {
15947
16448
  readonly tag: SdkError_Tags.LnurlError;
@@ -20565,7 +21066,8 @@ export type UnsignedTransferPackage = InstanceType<(typeof UnsignedTransferPacka
20565
21066
  export declare enum UpdateDepositPayload_Tags {
20566
21067
  ClaimError = "ClaimError",
20567
21068
  Refund = "Refund",
20568
- InstantClaim = "InstantClaim"
21069
+ InstantClaim = "InstantClaim",
21070
+ RefundBroadcastState = "RefundBroadcastState"
20569
21071
  }
20570
21072
  export declare const UpdateDepositPayload: Readonly<{
20571
21073
  instanceOf: (obj: any) => obj is UpdateDepositPayload;
@@ -20612,11 +21114,13 @@ export declare const UpdateDepositPayload: Readonly<{
20612
21114
  new (inner: {
20613
21115
  refundTxid: string;
20614
21116
  refundTx: string;
21117
+ state: RefundState;
20615
21118
  }): {
20616
21119
  readonly tag: UpdateDepositPayload_Tags.Refund;
20617
21120
  readonly inner: Readonly<{
20618
21121
  refundTxid: string;
20619
21122
  refundTx: string;
21123
+ state: RefundState;
20620
21124
  }>;
20621
21125
  /**
20622
21126
  * @private
@@ -20627,11 +21131,13 @@ export declare const UpdateDepositPayload: Readonly<{
20627
21131
  "new"(inner: {
20628
21132
  refundTxid: string;
20629
21133
  refundTx: string;
21134
+ state: RefundState;
20630
21135
  }): {
20631
21136
  readonly tag: UpdateDepositPayload_Tags.Refund;
20632
21137
  readonly inner: Readonly<{
20633
21138
  refundTxid: string;
20634
21139
  refundTx: string;
21140
+ state: RefundState;
20635
21141
  }>;
20636
21142
  /**
20637
21143
  * @private
@@ -20644,6 +21150,7 @@ export declare const UpdateDepositPayload: Readonly<{
20644
21150
  readonly inner: Readonly<{
20645
21151
  refundTxid: string;
20646
21152
  refundTx: string;
21153
+ state: RefundState;
20647
21154
  }>;
20648
21155
  /**
20649
21156
  * @private
@@ -20691,6 +21198,50 @@ export declare const UpdateDepositPayload: Readonly<{
20691
21198
  readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
20692
21199
  };
20693
21200
  };
21201
+ RefundBroadcastState: {
21202
+ new (inner: {
21203
+ refundTxid: string;
21204
+ state: RefundState;
21205
+ }): {
21206
+ readonly tag: UpdateDepositPayload_Tags.RefundBroadcastState;
21207
+ readonly inner: Readonly<{
21208
+ refundTxid: string;
21209
+ state: RefundState;
21210
+ }>;
21211
+ /**
21212
+ * @private
21213
+ * This field is private and should not be used, use `tag` instead.
21214
+ */
21215
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
21216
+ };
21217
+ "new"(inner: {
21218
+ refundTxid: string;
21219
+ state: RefundState;
21220
+ }): {
21221
+ readonly tag: UpdateDepositPayload_Tags.RefundBroadcastState;
21222
+ readonly inner: Readonly<{
21223
+ refundTxid: string;
21224
+ state: RefundState;
21225
+ }>;
21226
+ /**
21227
+ * @private
21228
+ * This field is private and should not be used, use `tag` instead.
21229
+ */
21230
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
21231
+ };
21232
+ instanceOf(obj: any): obj is {
21233
+ readonly tag: UpdateDepositPayload_Tags.RefundBroadcastState;
21234
+ readonly inner: Readonly<{
21235
+ refundTxid: string;
21236
+ state: RefundState;
21237
+ }>;
21238
+ /**
21239
+ * @private
21240
+ * This field is private and should not be used, use `tag` instead.
21241
+ */
21242
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
21243
+ };
21244
+ };
20694
21245
  }>;
20695
21246
  export type UpdateDepositPayload = InstanceType<(typeof UpdateDepositPayload)[keyof Omit<typeof UpdateDepositPayload, 'instanceOf'>]>;
20696
21247
  export declare enum WebhookEventType_Tags {
@@ -20859,6 +21410,14 @@ export interface BitcoinChainService {
20859
21410
  getTransactionStatus(txid: string, asyncOpts_?: {
20860
21411
  signal: AbortSignal;
20861
21412
  }): Promise<TxStatus>;
21413
+ /**
21414
+ * Height of the chain tip. Paired with a transaction's
21415
+ * [`TxStatus::block_height`] it gives that transaction's confirmation count,
21416
+ * which no single call reports.
21417
+ */
21418
+ tipHeight(asyncOpts_?: {
21419
+ signal: AbortSignal;
21420
+ }): Promise</*u32*/ number>;
20862
21421
  getTransactionHex(txid: string, asyncOpts_?: {
20863
21422
  signal: AbortSignal;
20864
21423
  }): Promise<string>;
@@ -20892,6 +21451,14 @@ export declare class BitcoinChainServiceImpl extends UniffiAbstractObject implem
20892
21451
  getTransactionStatus(txid: string, asyncOpts_?: {
20893
21452
  signal: AbortSignal;
20894
21453
  }): Promise<TxStatus>;
21454
+ /**
21455
+ * Height of the chain tip. Paired with a transaction's
21456
+ * [`TxStatus::block_height`] it gives that transaction's confirmation count,
21457
+ * which no single call reports.
21458
+ */
21459
+ tipHeight(asyncOpts_?: {
21460
+ signal: AbortSignal;
21461
+ }): Promise</*u32*/ number>;
20895
21462
  getTransactionHex(txid: string, asyncOpts_?: {
20896
21463
  signal: AbortSignal;
20897
21464
  }): Promise<string>;
@@ -21071,6 +21638,17 @@ export interface BreezSdkInterface {
21071
21638
  exportUnilateralExitState(asyncOpts_?: {
21072
21639
  signal: AbortSignal;
21073
21640
  }): Promise<ExportUnilateralExitStateResponse>;
21641
+ /**
21642
+ * Quotes both ways of claiming a deposit, so the caller can offer a choice
21643
+ * between claiming ahead of maturity for a spread and waiting for the cheaper
21644
+ * claim at maturity.
21645
+ *
21646
+ * The early quote is requested from the provider on each call rather than read
21647
+ * from cache, so call this when a user is deciding, not on a timer.
21648
+ */
21649
+ fetchClaimDepositQuote(request: FetchClaimDepositQuoteRequest, asyncOpts_?: {
21650
+ signal: AbortSignal;
21651
+ }): Promise<FetchClaimDepositQuoteResponse>;
21074
21652
  fetchConversionLimits(request: FetchConversionLimitsRequest, asyncOpts_?: {
21075
21653
  signal: AbortSignal;
21076
21654
  }): Promise<FetchConversionLimitsResponse>;
@@ -21627,6 +22205,17 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
21627
22205
  exportUnilateralExitState(asyncOpts_?: {
21628
22206
  signal: AbortSignal;
21629
22207
  }): Promise<ExportUnilateralExitStateResponse>;
22208
+ /**
22209
+ * Quotes both ways of claiming a deposit, so the caller can offer a choice
22210
+ * between claiming ahead of maturity for a spread and waiting for the cheaper
22211
+ * claim at maturity.
22212
+ *
22213
+ * The early quote is requested from the provider on each call rather than read
22214
+ * from cache, so call this when a user is deciding, not on a timer.
22215
+ */
22216
+ fetchClaimDepositQuote(request: FetchClaimDepositQuoteRequest, asyncOpts_?: {
22217
+ signal: AbortSignal;
22218
+ }): Promise<FetchClaimDepositQuoteResponse>;
21630
22219
  fetchConversionLimits(request: FetchConversionLimitsRequest, asyncOpts_?: {
21631
22220
  signal: AbortSignal;
21632
22221
  }): Promise<FetchConversionLimitsResponse>;
@@ -22805,6 +23394,10 @@ export declare class PasskeyClient extends UniffiAbstractObject implements Passk
22805
23394
  readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
22806
23395
  /**
22807
23396
  * Construct with the default Nostr-backed label store.
23397
+ *
23398
+ * Fails when `config` carries a proxy the relay transport cannot
23399
+ * honour, rather than letting a wallet be created whose label can
23400
+ * never be published.
22808
23401
  */
22809
23402
  constructor(prfProvider: PrfProvider, breezApiKey: string | undefined, config: PasskeyConfig | undefined);
22810
23403
  /**
@@ -24644,6 +25237,13 @@ declare const _default: Readonly<{
24644
25237
  lift(value: UniffiByteArray): CheckMessageResponse;
24645
25238
  lower(value: CheckMessageResponse): UniffiByteArray;
24646
25239
  };
25240
+ FfiConverterTypeClaimDepositQuote: {
25241
+ read(from: RustBuffer): ClaimDepositQuote;
25242
+ write(value: ClaimDepositQuote, into: RustBuffer): void;
25243
+ allocationSize(value: ClaimDepositQuote): number;
25244
+ lift(value: UniffiByteArray): ClaimDepositQuote;
25245
+ lower(value: ClaimDepositQuote): UniffiByteArray;
25246
+ };
24647
25247
  FfiConverterTypeClaimDepositRequest: {
24648
25248
  read(from: RustBuffer): ClaimDepositRequest;
24649
25249
  write(value: ClaimDepositRequest, into: RustBuffer): void;
@@ -25250,6 +25850,20 @@ declare const _default: Readonly<{
25250
25850
  lift(value: UniffiByteArray): FeePolicy;
25251
25851
  lower(value: FeePolicy): UniffiByteArray;
25252
25852
  };
25853
+ FfiConverterTypeFetchClaimDepositQuoteRequest: {
25854
+ read(from: RustBuffer): FetchClaimDepositQuoteRequest;
25855
+ write(value: FetchClaimDepositQuoteRequest, into: RustBuffer): void;
25856
+ allocationSize(value: FetchClaimDepositQuoteRequest): number;
25857
+ lift(value: UniffiByteArray): FetchClaimDepositQuoteRequest;
25858
+ lower(value: FetchClaimDepositQuoteRequest): UniffiByteArray;
25859
+ };
25860
+ FfiConverterTypeFetchClaimDepositQuoteResponse: {
25861
+ read(from: RustBuffer): FetchClaimDepositQuoteResponse;
25862
+ write(value: FetchClaimDepositQuoteResponse, into: RustBuffer): void;
25863
+ allocationSize(value: FetchClaimDepositQuoteResponse): number;
25864
+ lift(value: UniffiByteArray): FetchClaimDepositQuoteResponse;
25865
+ lower(value: FetchClaimDepositQuoteResponse): UniffiByteArray;
25866
+ };
25253
25867
  FfiConverterTypeFetchConversionLimitsRequest: {
25254
25868
  read(from: RustBuffer): FetchConversionLimitsRequest;
25255
25869
  write(value: FetchConversionLimitsRequest, into: RustBuffer): void;
@@ -25314,6 +25928,13 @@ declare const _default: Readonly<{
25314
25928
  lift(value: UniffiByteArray): GetPaymentResponse;
25315
25929
  lower(value: GetPaymentResponse): UniffiByteArray;
25316
25930
  };
25931
+ FfiConverterTypeGetSparkStatusRequest: {
25932
+ read(from: RustBuffer): GetSparkStatusRequest;
25933
+ write(value: GetSparkStatusRequest, into: RustBuffer): void;
25934
+ allocationSize(value: GetSparkStatusRequest): number;
25935
+ lift(value: UniffiByteArray): GetSparkStatusRequest;
25936
+ lower(value: GetSparkStatusRequest): UniffiByteArray;
25937
+ };
25317
25938
  FfiConverterTypeGetTokensMetadataRequest: {
25318
25939
  read(from: RustBuffer): GetTokensMetadataRequest;
25319
25940
  write(value: GetTokensMetadataRequest, into: RustBuffer): void;
@@ -25384,13 +26005,6 @@ declare const _default: Readonly<{
25384
26005
  lift(value: UniffiByteArray): InputType;
25385
26006
  lower(value: InputType): UniffiByteArray;
25386
26007
  };
25387
- FfiConverterTypeInstantClaimDeclineReason: {
25388
- read(from: RustBuffer): InstantClaimDeclineReason;
25389
- write(value: InstantClaimDeclineReason, into: RustBuffer): void;
25390
- allocationSize(value: InstantClaimDeclineReason): number;
25391
- lift(value: UniffiByteArray): InstantClaimDeclineReason;
25392
- lower(value: InstantClaimDeclineReason): UniffiByteArray;
25393
- };
25394
26008
  FfiConverterTypeInstantClaimStatus: {
25395
26009
  read(from: RustBuffer): InstantClaimStatus;
25396
26010
  write(value: InstantClaimStatus, into: RustBuffer): void;
@@ -25622,6 +26236,13 @@ declare const _default: Readonly<{
25622
26236
  lift(value: UniffiByteArray): Network;
25623
26237
  lower(value: Network): UniffiByteArray;
25624
26238
  };
26239
+ FfiConverterTypeNewRestChainServiceRequest: {
26240
+ read(from: RustBuffer): NewRestChainServiceRequest;
26241
+ write(value: NewRestChainServiceRequest, into: RustBuffer): void;
26242
+ allocationSize(value: NewRestChainServiceRequest): number;
26243
+ lift(value: UniffiByteArray): NewRestChainServiceRequest;
26244
+ lower(value: NewRestChainServiceRequest): UniffiByteArray;
26245
+ };
25625
26246
  FfiConverterTypeOnchainConfirmationSpeed: {
25626
26247
  read(from: RustBuffer): OnchainConfirmationSpeed;
25627
26248
  write(value: OnchainConfirmationSpeed, into: RustBuffer): void;
@@ -25885,6 +26506,13 @@ declare const _default: Readonly<{
25885
26506
  lift(value: UniffiByteArray): ProvisionalPaymentDetails;
25886
26507
  lower(value: ProvisionalPaymentDetails): UniffiByteArray;
25887
26508
  };
26509
+ FfiConverterTypeProxyConfig: {
26510
+ read(from: RustBuffer): ProxyConfig;
26511
+ write(value: ProxyConfig, into: RustBuffer): void;
26512
+ allocationSize(value: ProxyConfig): number;
26513
+ lift(value: UniffiByteArray): ProxyConfig;
26514
+ lower(value: ProxyConfig): UniffiByteArray;
26515
+ };
25888
26516
  FfiConverterTypePublicKey: FfiConverter<UniffiByteArray, string>;
25889
26517
  FfiConverterTypePublicKeyBytes: {
25890
26518
  read(from: RustBuffer): PublicKeyBytes;
@@ -26005,6 +26633,13 @@ declare const _default: Readonly<{
26005
26633
  lift(value: UniffiByteArray): RefundPendingConversionsResponse;
26006
26634
  lower(value: RefundPendingConversionsResponse): UniffiByteArray;
26007
26635
  };
26636
+ FfiConverterTypeRefundState: {
26637
+ read(from: RustBuffer): RefundState;
26638
+ write(value: RefundState, into: RustBuffer): void;
26639
+ allocationSize(value: RefundState): number;
26640
+ lift(value: UniffiByteArray): RefundState;
26641
+ lower(value: RefundState): UniffiByteArray;
26642
+ };
26008
26643
  FfiConverterTypeRegisterLightningAddressRequest: {
26009
26644
  read(from: RustBuffer): RegisterLightningAddressRequest;
26010
26645
  write(value: RegisterLightningAddressRequest, into: RustBuffer): void;