@breeztech/breez-sdk-spark-react-native 0.7.2 → 0.7.4

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.
@@ -781,6 +781,130 @@ export declare const ConnectWithSignerRequest: Readonly<{
781
781
  */
782
782
  defaults: () => Partial<ConnectWithSignerRequest>;
783
783
  }>;
784
+ /**
785
+ * Response from estimating a conversion, used when preparing a payment that requires conversion
786
+ */
787
+ export type ConversionEstimate = {
788
+ /**
789
+ * The conversion options used for the estimate
790
+ */
791
+ options: ConversionOptions;
792
+ /**
793
+ * The estimated amount to be received from the conversion
794
+ * Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
795
+ */
796
+ amount: U128;
797
+ /**
798
+ * The fee estimated for the conversion
799
+ * Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
800
+ */
801
+ fee: U128;
802
+ };
803
+ /**
804
+ * Generated factory for {@link ConversionEstimate} record objects.
805
+ */
806
+ export declare const ConversionEstimate: Readonly<{
807
+ /**
808
+ * Create a frozen instance of {@link ConversionEstimate}, with defaults specified
809
+ * in Rust, in the {@link breez_sdk_spark} crate.
810
+ */
811
+ create: (partial: Partial<ConversionEstimate> & Required<Omit<ConversionEstimate, never>>) => ConversionEstimate;
812
+ /**
813
+ * Create a frozen instance of {@link ConversionEstimate}, with defaults specified
814
+ * in Rust, in the {@link breez_sdk_spark} crate.
815
+ */
816
+ new: (partial: Partial<ConversionEstimate> & Required<Omit<ConversionEstimate, never>>) => ConversionEstimate;
817
+ /**
818
+ * Defaults specified in the {@link breez_sdk_spark} crate.
819
+ */
820
+ defaults: () => Partial<ConversionEstimate>;
821
+ }>;
822
+ export type ConversionInfo = {
823
+ /**
824
+ * The pool id associated with the conversion
825
+ */
826
+ poolId: string;
827
+ /**
828
+ * The conversion id shared by both sides of the conversion
829
+ */
830
+ conversionId: string;
831
+ /**
832
+ * The status of the conversion
833
+ */
834
+ status: ConversionStatus;
835
+ /**
836
+ * The fee paid for the conversion
837
+ * Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
838
+ */
839
+ fee: U128 | undefined;
840
+ /**
841
+ * The purpose of the conversion
842
+ */
843
+ purpose: ConversionPurpose | undefined;
844
+ };
845
+ /**
846
+ * Generated factory for {@link ConversionInfo} record objects.
847
+ */
848
+ export declare const ConversionInfo: Readonly<{
849
+ /**
850
+ * Create a frozen instance of {@link ConversionInfo}, with defaults specified
851
+ * in Rust, in the {@link breez_sdk_spark} crate.
852
+ */
853
+ create: (partial: Partial<ConversionInfo> & Required<Omit<ConversionInfo, never>>) => ConversionInfo;
854
+ /**
855
+ * Create a frozen instance of {@link ConversionInfo}, with defaults specified
856
+ * in Rust, in the {@link breez_sdk_spark} crate.
857
+ */
858
+ new: (partial: Partial<ConversionInfo> & Required<Omit<ConversionInfo, never>>) => ConversionInfo;
859
+ /**
860
+ * Defaults specified in the {@link breez_sdk_spark} crate.
861
+ */
862
+ defaults: () => Partial<ConversionInfo>;
863
+ }>;
864
+ /**
865
+ * Options for conversion when fulfilling a payment. When set, the SDK will
866
+ * perform a conversion before fulfilling the payment. If not set, the payment
867
+ * will only be fulfilled if the wallet has sufficient balance of the required asset.
868
+ */
869
+ export type ConversionOptions = {
870
+ /**
871
+ * The type of conversion to perform when fulfilling the payment
872
+ */
873
+ conversionType: ConversionType;
874
+ /**
875
+ * The optional maximum slippage in basis points (1/100 of a percent) allowed when
876
+ * a conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
877
+ * The conversion will fail if the actual amount received is less than
878
+ * `estimated_amount * (1 - max_slippage_bps / 10_000)`.
879
+ */
880
+ maxSlippageBps: /*u32*/ number | undefined;
881
+ /**
882
+ * The optional timeout in seconds to wait for the conversion to complete
883
+ * when fulfilling the payment. This timeout only concerns waiting for the received
884
+ * payment of the conversion. If the timeout is reached before the conversion
885
+ * is complete, the payment will fail. Defaults to 30 seconds if not set.
886
+ */
887
+ completionTimeoutSecs: /*u32*/ number | undefined;
888
+ };
889
+ /**
890
+ * Generated factory for {@link ConversionOptions} record objects.
891
+ */
892
+ export declare const ConversionOptions: Readonly<{
893
+ /**
894
+ * Create a frozen instance of {@link ConversionOptions}, with defaults specified
895
+ * in Rust, in the {@link breez_sdk_spark} crate.
896
+ */
897
+ create: (partial: Partial<ConversionOptions> & Required<Omit<ConversionOptions, "maxSlippageBps" | "completionTimeoutSecs">>) => ConversionOptions;
898
+ /**
899
+ * Create a frozen instance of {@link ConversionOptions}, with defaults specified
900
+ * in Rust, in the {@link breez_sdk_spark} crate.
901
+ */
902
+ new: (partial: Partial<ConversionOptions> & Required<Omit<ConversionOptions, "maxSlippageBps" | "completionTimeoutSecs">>) => ConversionOptions;
903
+ /**
904
+ * Defaults specified in the {@link breez_sdk_spark} crate.
905
+ */
906
+ defaults: () => Partial<ConversionOptions>;
907
+ }>;
784
908
  export type CreateIssuerTokenRequest = {
785
909
  name: string;
786
910
  ticker: string;
@@ -1366,36 +1490,36 @@ export declare const ExternalVerifiableSecretShare: Readonly<{
1366
1490
  */
1367
1491
  defaults: () => Partial<ExternalVerifiableSecretShare>;
1368
1492
  }>;
1369
- export type FetchTokenConversionLimitsRequest = {
1493
+ export type FetchConversionLimitsRequest = {
1370
1494
  /**
1371
1495
  * The type of conversion, either from or to Bitcoin.
1372
1496
  */
1373
- conversionType: TokenConversionType;
1497
+ conversionType: ConversionType;
1374
1498
  /**
1375
1499
  * The token identifier when converting to a token.
1376
1500
  */
1377
1501
  tokenIdentifier: string | undefined;
1378
1502
  };
1379
1503
  /**
1380
- * Generated factory for {@link FetchTokenConversionLimitsRequest} record objects.
1504
+ * Generated factory for {@link FetchConversionLimitsRequest} record objects.
1381
1505
  */
1382
- export declare const FetchTokenConversionLimitsRequest: Readonly<{
1506
+ export declare const FetchConversionLimitsRequest: Readonly<{
1383
1507
  /**
1384
- * Create a frozen instance of {@link FetchTokenConversionLimitsRequest}, with defaults specified
1508
+ * Create a frozen instance of {@link FetchConversionLimitsRequest}, with defaults specified
1385
1509
  * in Rust, in the {@link breez_sdk_spark} crate.
1386
1510
  */
1387
- create: (partial: Partial<FetchTokenConversionLimitsRequest> & Required<Omit<FetchTokenConversionLimitsRequest, "tokenIdentifier">>) => FetchTokenConversionLimitsRequest;
1511
+ create: (partial: Partial<FetchConversionLimitsRequest> & Required<Omit<FetchConversionLimitsRequest, "tokenIdentifier">>) => FetchConversionLimitsRequest;
1388
1512
  /**
1389
- * Create a frozen instance of {@link FetchTokenConversionLimitsRequest}, with defaults specified
1513
+ * Create a frozen instance of {@link FetchConversionLimitsRequest}, with defaults specified
1390
1514
  * in Rust, in the {@link breez_sdk_spark} crate.
1391
1515
  */
1392
- new: (partial: Partial<FetchTokenConversionLimitsRequest> & Required<Omit<FetchTokenConversionLimitsRequest, "tokenIdentifier">>) => FetchTokenConversionLimitsRequest;
1516
+ new: (partial: Partial<FetchConversionLimitsRequest> & Required<Omit<FetchConversionLimitsRequest, "tokenIdentifier">>) => FetchConversionLimitsRequest;
1393
1517
  /**
1394
1518
  * Defaults specified in the {@link breez_sdk_spark} crate.
1395
1519
  */
1396
- defaults: () => Partial<FetchTokenConversionLimitsRequest>;
1520
+ defaults: () => Partial<FetchConversionLimitsRequest>;
1397
1521
  }>;
1398
- export type FetchTokenConversionLimitsResponse = {
1522
+ export type FetchConversionLimitsResponse = {
1399
1523
  /**
1400
1524
  * The minimum amount to be converted.
1401
1525
  * Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
@@ -1408,23 +1532,23 @@ export type FetchTokenConversionLimitsResponse = {
1408
1532
  minToAmount: U128 | undefined;
1409
1533
  };
1410
1534
  /**
1411
- * Generated factory for {@link FetchTokenConversionLimitsResponse} record objects.
1535
+ * Generated factory for {@link FetchConversionLimitsResponse} record objects.
1412
1536
  */
1413
- export declare const FetchTokenConversionLimitsResponse: Readonly<{
1537
+ export declare const FetchConversionLimitsResponse: Readonly<{
1414
1538
  /**
1415
- * Create a frozen instance of {@link FetchTokenConversionLimitsResponse}, with defaults specified
1539
+ * Create a frozen instance of {@link FetchConversionLimitsResponse}, with defaults specified
1416
1540
  * in Rust, in the {@link breez_sdk_spark} crate.
1417
1541
  */
1418
- create: (partial: Partial<FetchTokenConversionLimitsResponse> & Required<Omit<FetchTokenConversionLimitsResponse, never>>) => FetchTokenConversionLimitsResponse;
1542
+ create: (partial: Partial<FetchConversionLimitsResponse> & Required<Omit<FetchConversionLimitsResponse, never>>) => FetchConversionLimitsResponse;
1419
1543
  /**
1420
- * Create a frozen instance of {@link FetchTokenConversionLimitsResponse}, with defaults specified
1544
+ * Create a frozen instance of {@link FetchConversionLimitsResponse}, with defaults specified
1421
1545
  * in Rust, in the {@link breez_sdk_spark} crate.
1422
1546
  */
1423
- new: (partial: Partial<FetchTokenConversionLimitsResponse> & Required<Omit<FetchTokenConversionLimitsResponse, never>>) => FetchTokenConversionLimitsResponse;
1547
+ new: (partial: Partial<FetchConversionLimitsResponse> & Required<Omit<FetchConversionLimitsResponse, never>>) => FetchConversionLimitsResponse;
1424
1548
  /**
1425
1549
  * Defaults specified in the {@link breez_sdk_spark} crate.
1426
1550
  */
1427
- defaults: () => Partial<FetchTokenConversionLimitsResponse>;
1551
+ defaults: () => Partial<FetchConversionLimitsResponse>;
1428
1552
  }>;
1429
1553
  /**
1430
1554
  * Wrapper around the [`CurrencyInfo`] of a fiat currency
@@ -1642,6 +1766,28 @@ export declare const GetTokensMetadataResponse: Readonly<{
1642
1766
  */
1643
1767
  defaults: () => Partial<GetTokensMetadataResponse>;
1644
1768
  }>;
1769
+ export type HashedMessageBytes = {
1770
+ bytes: ArrayBuffer;
1771
+ };
1772
+ /**
1773
+ * Generated factory for {@link HashedMessageBytes} record objects.
1774
+ */
1775
+ export declare const HashedMessageBytes: Readonly<{
1776
+ /**
1777
+ * Create a frozen instance of {@link HashedMessageBytes}, with defaults specified
1778
+ * in Rust, in the {@link breez_sdk_spark} crate.
1779
+ */
1780
+ create: (partial: Partial<HashedMessageBytes> & Required<Omit<HashedMessageBytes, never>>) => HashedMessageBytes;
1781
+ /**
1782
+ * Create a frozen instance of {@link HashedMessageBytes}, with defaults specified
1783
+ * in Rust, in the {@link breez_sdk_spark} crate.
1784
+ */
1785
+ new: (partial: Partial<HashedMessageBytes> & Required<Omit<HashedMessageBytes, never>>) => HashedMessageBytes;
1786
+ /**
1787
+ * Defaults specified in the {@link breez_sdk_spark} crate.
1788
+ */
1789
+ defaults: () => Partial<HashedMessageBytes>;
1790
+ }>;
1645
1791
  /**
1646
1792
  * FFI-safe wrapper for (Identifier, `SigningCommitments`) pair
1647
1793
  */
@@ -2049,6 +2195,31 @@ export declare const LnurlAuthRequestDetails: Readonly<{
2049
2195
  */
2050
2196
  defaults: () => Partial<LnurlAuthRequestDetails>;
2051
2197
  }>;
2198
+ /**
2199
+ * LNURL error details
2200
+ */
2201
+ export type LnurlErrorDetails = {
2202
+ reason: string;
2203
+ };
2204
+ /**
2205
+ * Generated factory for {@link LnurlErrorDetails} record objects.
2206
+ */
2207
+ export declare const LnurlErrorDetails: Readonly<{
2208
+ /**
2209
+ * Create a frozen instance of {@link LnurlErrorDetails}, with defaults specified
2210
+ * in Rust, in the {@link breez_sdk_spark} crate.
2211
+ */
2212
+ create: (partial: Partial<LnurlErrorDetails> & Required<Omit<LnurlErrorDetails, never>>) => LnurlErrorDetails;
2213
+ /**
2214
+ * Create a frozen instance of {@link LnurlErrorDetails}, with defaults specified
2215
+ * in Rust, in the {@link breez_sdk_spark} crate.
2216
+ */
2217
+ new: (partial: Partial<LnurlErrorDetails> & Required<Omit<LnurlErrorDetails, never>>) => LnurlErrorDetails;
2218
+ /**
2219
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2220
+ */
2221
+ defaults: () => Partial<LnurlErrorDetails>;
2222
+ }>;
2052
2223
  /**
2053
2224
  * Represents the payment LNURL info
2054
2225
  */
@@ -2413,6 +2584,31 @@ export declare const LogEntry: Readonly<{
2413
2584
  */
2414
2585
  defaults: () => Partial<LogEntry>;
2415
2586
  }>;
2587
+ /**
2588
+ * FFI-safe representation of a 32-byte message digest for ECDSA signing
2589
+ */
2590
+ export type MessageBytes = {
2591
+ bytes: ArrayBuffer;
2592
+ };
2593
+ /**
2594
+ * Generated factory for {@link MessageBytes} record objects.
2595
+ */
2596
+ export declare const MessageBytes: Readonly<{
2597
+ /**
2598
+ * Create a frozen instance of {@link MessageBytes}, with defaults specified
2599
+ * in Rust, in the {@link breez_sdk_spark} crate.
2600
+ */
2601
+ create: (partial: Partial<MessageBytes> & Required<Omit<MessageBytes, never>>) => MessageBytes;
2602
+ /**
2603
+ * Create a frozen instance of {@link MessageBytes}, with defaults specified
2604
+ * in Rust, in the {@link breez_sdk_spark} crate.
2605
+ */
2606
+ new: (partial: Partial<MessageBytes> & Required<Omit<MessageBytes, never>>) => MessageBytes;
2607
+ /**
2608
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2609
+ */
2610
+ defaults: () => Partial<MessageBytes>;
2611
+ }>;
2416
2612
  export type MessageSuccessActionData = {
2417
2613
  message: string;
2418
2614
  };
@@ -2609,7 +2805,7 @@ export type PaymentMetadata = {
2609
2805
  lnurlPayInfo: LnurlPayInfo | undefined;
2610
2806
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
2611
2807
  lnurlDescription: string | undefined;
2612
- tokenConversionInfo: TokenConversionInfo | undefined;
2808
+ conversionInfo: ConversionInfo | undefined;
2613
2809
  };
2614
2810
  /**
2615
2811
  * Generated factory for {@link PaymentMetadata} record objects.
@@ -2718,9 +2914,9 @@ export type PrepareSendPaymentRequest = {
2718
2914
  */
2719
2915
  tokenIdentifier: string | undefined;
2720
2916
  /**
2721
- * If provided, the payment will include a token conversion step before sending the payment
2917
+ * If provided, the payment will include a conversion step before sending the payment
2722
2918
  */
2723
- tokenConversionOptions: TokenConversionOptions | undefined;
2919
+ conversionOptions: ConversionOptions | undefined;
2724
2920
  };
2725
2921
  /**
2726
2922
  * Generated factory for {@link PrepareSendPaymentRequest} record objects.
@@ -2730,12 +2926,12 @@ export declare const PrepareSendPaymentRequest: Readonly<{
2730
2926
  * Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
2731
2927
  * in Rust, in the {@link breez_sdk_spark} crate.
2732
2928
  */
2733
- create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "tokenConversionOptions">>) => PrepareSendPaymentRequest;
2929
+ create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
2734
2930
  /**
2735
2931
  * Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
2736
2932
  * in Rust, in the {@link breez_sdk_spark} crate.
2737
2933
  */
2738
- new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "tokenConversionOptions">>) => PrepareSendPaymentRequest;
2934
+ new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
2739
2935
  /**
2740
2936
  * Defaults specified in the {@link breez_sdk_spark} crate.
2741
2937
  */
@@ -2754,13 +2950,9 @@ export type PrepareSendPaymentResponse = {
2754
2950
  */
2755
2951
  tokenIdentifier: string | undefined;
2756
2952
  /**
2757
- * When set, the payment will include a token conversion step before sending the payment
2953
+ * When set, the payment will include a conversion step before sending the payment
2758
2954
  */
2759
- tokenConversionOptions: TokenConversionOptions | undefined;
2760
- /**
2761
- * The estimated token conversion fee if the payment involves a token conversion
2762
- */
2763
- tokenConversionFee: U128 | undefined;
2955
+ conversionEstimate: ConversionEstimate | undefined;
2764
2956
  };
2765
2957
  /**
2766
2958
  * Generated factory for {@link PrepareSendPaymentResponse} record objects.
@@ -3250,12 +3442,12 @@ export declare const SendPaymentRequest: Readonly<{
3250
3442
  * Create a frozen instance of {@link SendPaymentRequest}, with defaults specified
3251
3443
  * in Rust, in the {@link breez_sdk_spark} crate.
3252
3444
  */
3253
- create: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "idempotencyKey" | "options">>) => SendPaymentRequest;
3445
+ create: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "options" | "idempotencyKey">>) => SendPaymentRequest;
3254
3446
  /**
3255
3447
  * Create a frozen instance of {@link SendPaymentRequest}, with defaults specified
3256
3448
  * in Rust, in the {@link breez_sdk_spark} crate.
3257
3449
  */
3258
- new: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "idempotencyKey" | "options">>) => SendPaymentRequest;
3450
+ new: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "options" | "idempotencyKey">>) => SendPaymentRequest;
3259
3451
  /**
3260
3452
  * Defaults specified in the {@link breez_sdk_spark} crate.
3261
3453
  */
@@ -3425,7 +3617,7 @@ export type SparkHtlcDetails = {
3425
3617
  */
3426
3618
  preimage: string | undefined;
3427
3619
  /**
3428
- * The expiry time of the HTLC in seconds since the Unix epoch
3620
+ * The expiry time of the HTLC as a unix timestamp in seconds
3429
3621
  */
3430
3622
  expiryTime: bigint;
3431
3623
  /**
@@ -3501,7 +3693,7 @@ export type SparkInvoiceDetails = {
3501
3693
  */
3502
3694
  tokenIdentifier: string | undefined;
3503
3695
  /**
3504
- * Optional expiry time. If not provided, the invoice will never expire.
3696
+ * Optional expiry time as a unix timestamp in seconds. If not provided, the invoice will never expire.
3505
3697
  */
3506
3698
  expiryTime: /*u64*/ bigint | undefined;
3507
3699
  /**
@@ -3658,88 +3850,6 @@ export declare const TokenBalance: Readonly<{
3658
3850
  */
3659
3851
  defaults: () => Partial<TokenBalance>;
3660
3852
  }>;
3661
- export type TokenConversionInfo = {
3662
- /**
3663
- * The pool id associated with the conversion
3664
- */
3665
- poolId: string;
3666
- /**
3667
- * The receiving payment id associated with the conversion
3668
- */
3669
- paymentId: string | undefined;
3670
- /**
3671
- * The fee paid for the conversion
3672
- * Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
3673
- */
3674
- fee: U128 | undefined;
3675
- /**
3676
- * The refund payment id if a refund payment was made
3677
- */
3678
- refundIdentifier: string | undefined;
3679
- };
3680
- /**
3681
- * Generated factory for {@link TokenConversionInfo} record objects.
3682
- */
3683
- export declare const TokenConversionInfo: Readonly<{
3684
- /**
3685
- * Create a frozen instance of {@link TokenConversionInfo}, with defaults specified
3686
- * in Rust, in the {@link breez_sdk_spark} crate.
3687
- */
3688
- create: (partial: Partial<TokenConversionInfo> & Required<Omit<TokenConversionInfo, never>>) => TokenConversionInfo;
3689
- /**
3690
- * Create a frozen instance of {@link TokenConversionInfo}, with defaults specified
3691
- * in Rust, in the {@link breez_sdk_spark} crate.
3692
- */
3693
- new: (partial: Partial<TokenConversionInfo> & Required<Omit<TokenConversionInfo, never>>) => TokenConversionInfo;
3694
- /**
3695
- * Defaults specified in the {@link breez_sdk_spark} crate.
3696
- */
3697
- defaults: () => Partial<TokenConversionInfo>;
3698
- }>;
3699
- /**
3700
- * Options for token conversion when fulfilling a payment. When set, the SDK will
3701
- * perform a token conversion before fulfilling the payment. If not set, the payment
3702
- * will only be fulfilled if the wallet has sufficient balance of the required asset.
3703
- */
3704
- export type TokenConversionOptions = {
3705
- /**
3706
- * The type of token conversion to perform when fulfilling the payment
3707
- */
3708
- conversionType: TokenConversionType;
3709
- /**
3710
- * The optional maximum slippage in basis points (1/100 of a percent) allowed when
3711
- * a token conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
3712
- * The token conversion will fail if the actual amount received is less than
3713
- * `estimated_amount * (1 - max_slippage_bps / 10_000)`.
3714
- */
3715
- maxSlippageBps: /*u32*/ number | undefined;
3716
- /**
3717
- * The optional timeout in seconds to wait for the token conversion to complete
3718
- * when fulfilling the payment. This timeout only concerns waiting for the received
3719
- * payment of the token conversion. If the timeout is reached before the conversion
3720
- * is complete, the payment will fail. Defaults to 30 seconds if not set.
3721
- */
3722
- completionTimeoutSecs: /*u32*/ number | undefined;
3723
- };
3724
- /**
3725
- * Generated factory for {@link TokenConversionOptions} record objects.
3726
- */
3727
- export declare const TokenConversionOptions: Readonly<{
3728
- /**
3729
- * Create a frozen instance of {@link TokenConversionOptions}, with defaults specified
3730
- * in Rust, in the {@link breez_sdk_spark} crate.
3731
- */
3732
- create: (partial: Partial<TokenConversionOptions> & Required<Omit<TokenConversionOptions, "completionTimeoutSecs" | "maxSlippageBps">>) => TokenConversionOptions;
3733
- /**
3734
- * Create a frozen instance of {@link TokenConversionOptions}, with defaults specified
3735
- * in Rust, in the {@link breez_sdk_spark} crate.
3736
- */
3737
- new: (partial: Partial<TokenConversionOptions> & Required<Omit<TokenConversionOptions, "completionTimeoutSecs" | "maxSlippageBps">>) => TokenConversionOptions;
3738
- /**
3739
- * Defaults specified in the {@link breez_sdk_spark} crate.
3740
- */
3741
- defaults: () => Partial<TokenConversionOptions>;
3742
- }>;
3743
3853
  export type TokenMetadata = {
3744
3854
  identifier: string;
3745
3855
  /**
@@ -4486,6 +4596,182 @@ export declare const ChainServiceError: Readonly<{
4486
4596
  };
4487
4597
  }>;
4488
4598
  export type ChainServiceError = InstanceType<(typeof ChainServiceError)[keyof Omit<typeof ChainServiceError, 'instanceOf'>]>;
4599
+ export declare enum ConversionPurpose_Tags {
4600
+ OngoingPayment = "OngoingPayment",
4601
+ SelfTransfer = "SelfTransfer"
4602
+ }
4603
+ /**
4604
+ * The purpose of the conversion, which is used to provide context for the conversion
4605
+ * if its related to an ongoing payment or a self-transfer.
4606
+ */
4607
+ export declare const ConversionPurpose: Readonly<{
4608
+ instanceOf: (obj: any) => obj is ConversionPurpose;
4609
+ OngoingPayment: {
4610
+ new (inner: {
4611
+ /**
4612
+ * The payment request of the ongoing payment
4613
+ */ paymentRequest: string;
4614
+ }): {
4615
+ readonly tag: ConversionPurpose_Tags.OngoingPayment;
4616
+ readonly inner: Readonly<{
4617
+ paymentRequest: string;
4618
+ }>;
4619
+ /**
4620
+ * @private
4621
+ * This field is private and should not be used, use `tag` instead.
4622
+ */
4623
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4624
+ };
4625
+ "new"(inner: {
4626
+ /**
4627
+ * The payment request of the ongoing payment
4628
+ */ paymentRequest: string;
4629
+ }): {
4630
+ readonly tag: ConversionPurpose_Tags.OngoingPayment;
4631
+ readonly inner: Readonly<{
4632
+ paymentRequest: string;
4633
+ }>;
4634
+ /**
4635
+ * @private
4636
+ * This field is private and should not be used, use `tag` instead.
4637
+ */
4638
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4639
+ };
4640
+ instanceOf(obj: any): obj is {
4641
+ readonly tag: ConversionPurpose_Tags.OngoingPayment;
4642
+ readonly inner: Readonly<{
4643
+ paymentRequest: string;
4644
+ }>;
4645
+ /**
4646
+ * @private
4647
+ * This field is private and should not be used, use `tag` instead.
4648
+ */
4649
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4650
+ };
4651
+ };
4652
+ SelfTransfer: {
4653
+ new (): {
4654
+ readonly tag: ConversionPurpose_Tags.SelfTransfer;
4655
+ /**
4656
+ * @private
4657
+ * This field is private and should not be used, use `tag` instead.
4658
+ */
4659
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4660
+ };
4661
+ "new"(): {
4662
+ readonly tag: ConversionPurpose_Tags.SelfTransfer;
4663
+ /**
4664
+ * @private
4665
+ * This field is private and should not be used, use `tag` instead.
4666
+ */
4667
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4668
+ };
4669
+ instanceOf(obj: any): obj is {
4670
+ readonly tag: ConversionPurpose_Tags.SelfTransfer;
4671
+ /**
4672
+ * @private
4673
+ * This field is private and should not be used, use `tag` instead.
4674
+ */
4675
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4676
+ };
4677
+ };
4678
+ }>;
4679
+ /**
4680
+ * The purpose of the conversion, which is used to provide context for the conversion
4681
+ * if its related to an ongoing payment or a self-transfer.
4682
+ */
4683
+ export type ConversionPurpose = InstanceType<(typeof ConversionPurpose)[keyof Omit<typeof ConversionPurpose, 'instanceOf'>]>;
4684
+ /**
4685
+ * The status of the conversion
4686
+ */
4687
+ export declare enum ConversionStatus {
4688
+ /**
4689
+ * The conversion was successful
4690
+ */
4691
+ Completed = 0,
4692
+ /**
4693
+ * The conversion failed and no refund was made yet, which requires action by the SDK to
4694
+ * perform the refund. This can happen if there was a failure during the conversion process.
4695
+ */
4696
+ RefundNeeded = 1,
4697
+ /**
4698
+ * The conversion failed and a refund was made
4699
+ */
4700
+ Refunded = 2
4701
+ }
4702
+ export declare enum ConversionType_Tags {
4703
+ FromBitcoin = "FromBitcoin",
4704
+ ToBitcoin = "ToBitcoin"
4705
+ }
4706
+ export declare const ConversionType: Readonly<{
4707
+ instanceOf: (obj: any) => obj is ConversionType;
4708
+ FromBitcoin: {
4709
+ new (): {
4710
+ readonly tag: ConversionType_Tags.FromBitcoin;
4711
+ /**
4712
+ * @private
4713
+ * This field is private and should not be used, use `tag` instead.
4714
+ */
4715
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4716
+ };
4717
+ "new"(): {
4718
+ readonly tag: ConversionType_Tags.FromBitcoin;
4719
+ /**
4720
+ * @private
4721
+ * This field is private and should not be used, use `tag` instead.
4722
+ */
4723
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4724
+ };
4725
+ instanceOf(obj: any): obj is {
4726
+ readonly tag: ConversionType_Tags.FromBitcoin;
4727
+ /**
4728
+ * @private
4729
+ * This field is private and should not be used, use `tag` instead.
4730
+ */
4731
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4732
+ };
4733
+ };
4734
+ ToBitcoin: {
4735
+ new (inner: {
4736
+ fromTokenIdentifier: string;
4737
+ }): {
4738
+ readonly tag: ConversionType_Tags.ToBitcoin;
4739
+ readonly inner: Readonly<{
4740
+ fromTokenIdentifier: string;
4741
+ }>;
4742
+ /**
4743
+ * @private
4744
+ * This field is private and should not be used, use `tag` instead.
4745
+ */
4746
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4747
+ };
4748
+ "new"(inner: {
4749
+ fromTokenIdentifier: string;
4750
+ }): {
4751
+ readonly tag: ConversionType_Tags.ToBitcoin;
4752
+ readonly inner: Readonly<{
4753
+ fromTokenIdentifier: string;
4754
+ }>;
4755
+ /**
4756
+ * @private
4757
+ * This field is private and should not be used, use `tag` instead.
4758
+ */
4759
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4760
+ };
4761
+ instanceOf(obj: any): obj is {
4762
+ readonly tag: ConversionType_Tags.ToBitcoin;
4763
+ readonly inner: Readonly<{
4764
+ fromTokenIdentifier: string;
4765
+ }>;
4766
+ /**
4767
+ * @private
4768
+ * This field is private and should not be used, use `tag` instead.
4769
+ */
4770
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4771
+ };
4772
+ };
4773
+ }>;
4774
+ export type ConversionType = InstanceType<(typeof ConversionType)[keyof Omit<typeof ConversionType, 'instanceOf'>]>;
4489
4775
  export declare enum DepositClaimError_Tags {
4490
4776
  MaxDepositClaimFeeExceeded = "MaxDepositClaimFeeExceeded",
4491
4777
  MissingUtxo = "MissingUtxo",
@@ -5340,6 +5626,85 @@ export declare enum KeySetType {
5340
5626
  WrappedSegwit = 3,
5341
5627
  Legacy = 4
5342
5628
  }
5629
+ export declare enum LnurlCallbackStatus_Tags {
5630
+ Ok = "Ok",
5631
+ ErrorStatus = "ErrorStatus"
5632
+ }
5633
+ /**
5634
+ * The response from a LNURL-auth callback, indicating success or failure.
5635
+ */
5636
+ export declare const LnurlCallbackStatus: Readonly<{
5637
+ instanceOf: (obj: any) => obj is LnurlCallbackStatus;
5638
+ Ok: {
5639
+ new (): {
5640
+ readonly tag: LnurlCallbackStatus_Tags.Ok;
5641
+ /**
5642
+ * @private
5643
+ * This field is private and should not be used, use `tag` instead.
5644
+ */
5645
+ readonly [uniffiTypeNameSymbol]: "LnurlCallbackStatus";
5646
+ };
5647
+ "new"(): {
5648
+ readonly tag: LnurlCallbackStatus_Tags.Ok;
5649
+ /**
5650
+ * @private
5651
+ * This field is private and should not be used, use `tag` instead.
5652
+ */
5653
+ readonly [uniffiTypeNameSymbol]: "LnurlCallbackStatus";
5654
+ };
5655
+ instanceOf(obj: any): obj is {
5656
+ readonly tag: LnurlCallbackStatus_Tags.Ok;
5657
+ /**
5658
+ * @private
5659
+ * This field is private and should not be used, use `tag` instead.
5660
+ */
5661
+ readonly [uniffiTypeNameSymbol]: "LnurlCallbackStatus";
5662
+ };
5663
+ };
5664
+ ErrorStatus: {
5665
+ new (inner: {
5666
+ errorDetails: LnurlErrorDetails;
5667
+ }): {
5668
+ readonly tag: LnurlCallbackStatus_Tags.ErrorStatus;
5669
+ readonly inner: Readonly<{
5670
+ errorDetails: LnurlErrorDetails;
5671
+ }>;
5672
+ /**
5673
+ * @private
5674
+ * This field is private and should not be used, use `tag` instead.
5675
+ */
5676
+ readonly [uniffiTypeNameSymbol]: "LnurlCallbackStatus";
5677
+ };
5678
+ "new"(inner: {
5679
+ errorDetails: LnurlErrorDetails;
5680
+ }): {
5681
+ readonly tag: LnurlCallbackStatus_Tags.ErrorStatus;
5682
+ readonly inner: Readonly<{
5683
+ errorDetails: LnurlErrorDetails;
5684
+ }>;
5685
+ /**
5686
+ * @private
5687
+ * This field is private and should not be used, use `tag` instead.
5688
+ */
5689
+ readonly [uniffiTypeNameSymbol]: "LnurlCallbackStatus";
5690
+ };
5691
+ instanceOf(obj: any): obj is {
5692
+ readonly tag: LnurlCallbackStatus_Tags.ErrorStatus;
5693
+ readonly inner: Readonly<{
5694
+ errorDetails: LnurlErrorDetails;
5695
+ }>;
5696
+ /**
5697
+ * @private
5698
+ * This field is private and should not be used, use `tag` instead.
5699
+ */
5700
+ readonly [uniffiTypeNameSymbol]: "LnurlCallbackStatus";
5701
+ };
5702
+ };
5703
+ }>;
5704
+ /**
5705
+ * The response from a LNURL-auth callback, indicating success or failure.
5706
+ */
5707
+ export type LnurlCallbackStatus = InstanceType<(typeof LnurlCallbackStatus)[keyof Omit<typeof LnurlCallbackStatus, 'instanceOf'>]>;
5343
5708
  export declare enum MaxFee_Tags {
5344
5709
  Fixed = "Fixed",
5345
5710
  Rate = "Rate",
@@ -5705,14 +6070,14 @@ export declare const PaymentDetails: Readonly<{
5705
6070
  * The HTLC transfer details if the payment fulfilled an HTLC transfer
5706
6071
  */ htlcDetails: SparkHtlcDetails | undefined;
5707
6072
  /**
5708
- * The information for a token conversion
5709
- */ tokenConversionInfo: TokenConversionInfo | undefined;
6073
+ * The information for a conversion
6074
+ */ conversionInfo: ConversionInfo | undefined;
5710
6075
  }): {
5711
6076
  readonly tag: PaymentDetails_Tags.Spark;
5712
6077
  readonly inner: Readonly<{
5713
6078
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5714
6079
  htlcDetails: SparkHtlcDetails | undefined;
5715
- tokenConversionInfo: TokenConversionInfo | undefined;
6080
+ conversionInfo: ConversionInfo | undefined;
5716
6081
  }>;
5717
6082
  /**
5718
6083
  * @private
@@ -5728,14 +6093,14 @@ export declare const PaymentDetails: Readonly<{
5728
6093
  * The HTLC transfer details if the payment fulfilled an HTLC transfer
5729
6094
  */ htlcDetails: SparkHtlcDetails | undefined;
5730
6095
  /**
5731
- * The information for a token conversion
5732
- */ tokenConversionInfo: TokenConversionInfo | undefined;
6096
+ * The information for a conversion
6097
+ */ conversionInfo: ConversionInfo | undefined;
5733
6098
  }): {
5734
6099
  readonly tag: PaymentDetails_Tags.Spark;
5735
6100
  readonly inner: Readonly<{
5736
6101
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5737
6102
  htlcDetails: SparkHtlcDetails | undefined;
5738
- tokenConversionInfo: TokenConversionInfo | undefined;
6103
+ conversionInfo: ConversionInfo | undefined;
5739
6104
  }>;
5740
6105
  /**
5741
6106
  * @private
@@ -5748,7 +6113,7 @@ export declare const PaymentDetails: Readonly<{
5748
6113
  readonly inner: Readonly<{
5749
6114
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5750
6115
  htlcDetails: SparkHtlcDetails | undefined;
5751
- tokenConversionInfo: TokenConversionInfo | undefined;
6116
+ conversionInfo: ConversionInfo | undefined;
5752
6117
  }>;
5753
6118
  /**
5754
6119
  * @private
@@ -5765,15 +6130,15 @@ export declare const PaymentDetails: Readonly<{
5765
6130
  * The invoice details if the payment fulfilled a spark invoice
5766
6131
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
5767
6132
  /**
5768
- * The information for a token conversion
5769
- */ tokenConversionInfo: TokenConversionInfo | undefined;
6133
+ * The information for a conversion
6134
+ */ conversionInfo: ConversionInfo | undefined;
5770
6135
  }): {
5771
6136
  readonly tag: PaymentDetails_Tags.Token;
5772
6137
  readonly inner: Readonly<{
5773
6138
  metadata: TokenMetadata;
5774
6139
  txHash: string;
5775
6140
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5776
- tokenConversionInfo: TokenConversionInfo | undefined;
6141
+ conversionInfo: ConversionInfo | undefined;
5777
6142
  }>;
5778
6143
  /**
5779
6144
  * @private
@@ -5788,15 +6153,15 @@ export declare const PaymentDetails: Readonly<{
5788
6153
  * The invoice details if the payment fulfilled a spark invoice
5789
6154
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
5790
6155
  /**
5791
- * The information for a token conversion
5792
- */ tokenConversionInfo: TokenConversionInfo | undefined;
6156
+ * The information for a conversion
6157
+ */ conversionInfo: ConversionInfo | undefined;
5793
6158
  }): {
5794
6159
  readonly tag: PaymentDetails_Tags.Token;
5795
6160
  readonly inner: Readonly<{
5796
6161
  metadata: TokenMetadata;
5797
6162
  txHash: string;
5798
6163
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5799
- tokenConversionInfo: TokenConversionInfo | undefined;
6164
+ conversionInfo: ConversionInfo | undefined;
5800
6165
  }>;
5801
6166
  /**
5802
6167
  * @private
@@ -5810,7 +6175,7 @@ export declare const PaymentDetails: Readonly<{
5810
6175
  metadata: TokenMetadata;
5811
6176
  txHash: string;
5812
6177
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5813
- tokenConversionInfo: TokenConversionInfo | undefined;
6178
+ conversionInfo: ConversionInfo | undefined;
5814
6179
  }>;
5815
6180
  /**
5816
6181
  * @private
@@ -6544,7 +6909,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6544
6909
  * If empty, it is a Bitcoin payment
6545
6910
  */ tokenIdentifier: string | undefined;
6546
6911
  /**
6547
- * The expiry time of the invoice in seconds since the Unix epoch
6912
+ * The expiry time of the invoice as a unix timestamp in seconds
6548
6913
  */ expiryTime: /*u64*/ bigint | undefined;
6549
6914
  /**
6550
6915
  * A description to embed in the invoice.
@@ -6576,7 +6941,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6576
6941
  * If empty, it is a Bitcoin payment
6577
6942
  */ tokenIdentifier: string | undefined;
6578
6943
  /**
6579
- * The expiry time of the invoice in seconds since the Unix epoch
6944
+ * The expiry time of the invoice as a unix timestamp in seconds
6580
6945
  */ expiryTime: /*u64*/ bigint | undefined;
6581
6946
  /**
6582
6947
  * A description to embed in the invoice.
@@ -6646,7 +7011,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6646
7011
  description: string;
6647
7012
  amountSats: /*u64*/ bigint | undefined;
6648
7013
  /**
6649
- * The expiry time of the invoice in seconds
7014
+ * The expiry of the invoice as a duration in seconds
6650
7015
  */ expirySecs: /*u32*/ number | undefined;
6651
7016
  }): {
6652
7017
  readonly tag: ReceivePaymentMethod_Tags.Bolt11Invoice;
@@ -6665,7 +7030,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6665
7030
  description: string;
6666
7031
  amountSats: /*u64*/ bigint | undefined;
6667
7032
  /**
6668
- * The expiry time of the invoice in seconds
7033
+ * The expiry of the invoice as a duration in seconds
6669
7034
  */ expirySecs: /*u32*/ number | undefined;
6670
7035
  }): {
6671
7036
  readonly tag: ReceivePaymentMethod_Tags.Bolt11Invoice;
@@ -10381,79 +10746,6 @@ export declare const SyncStorageError: Readonly<{
10381
10746
  * Errors that can occur during storage operations
10382
10747
  */
10383
10748
  export type SyncStorageError = InstanceType<(typeof SyncStorageError)[keyof Omit<typeof SyncStorageError, 'instanceOf'>]>;
10384
- export declare enum TokenConversionType_Tags {
10385
- FromBitcoin = "FromBitcoin",
10386
- ToBitcoin = "ToBitcoin"
10387
- }
10388
- export declare const TokenConversionType: Readonly<{
10389
- instanceOf: (obj: any) => obj is TokenConversionType;
10390
- FromBitcoin: {
10391
- new (): {
10392
- readonly tag: TokenConversionType_Tags.FromBitcoin;
10393
- /**
10394
- * @private
10395
- * This field is private and should not be used, use `tag` instead.
10396
- */
10397
- readonly [uniffiTypeNameSymbol]: "TokenConversionType";
10398
- };
10399
- "new"(): {
10400
- readonly tag: TokenConversionType_Tags.FromBitcoin;
10401
- /**
10402
- * @private
10403
- * This field is private and should not be used, use `tag` instead.
10404
- */
10405
- readonly [uniffiTypeNameSymbol]: "TokenConversionType";
10406
- };
10407
- instanceOf(obj: any): obj is {
10408
- readonly tag: TokenConversionType_Tags.FromBitcoin;
10409
- /**
10410
- * @private
10411
- * This field is private and should not be used, use `tag` instead.
10412
- */
10413
- readonly [uniffiTypeNameSymbol]: "TokenConversionType";
10414
- };
10415
- };
10416
- ToBitcoin: {
10417
- new (inner: {
10418
- fromTokenIdentifier: string;
10419
- }): {
10420
- readonly tag: TokenConversionType_Tags.ToBitcoin;
10421
- readonly inner: Readonly<{
10422
- fromTokenIdentifier: string;
10423
- }>;
10424
- /**
10425
- * @private
10426
- * This field is private and should not be used, use `tag` instead.
10427
- */
10428
- readonly [uniffiTypeNameSymbol]: "TokenConversionType";
10429
- };
10430
- "new"(inner: {
10431
- fromTokenIdentifier: string;
10432
- }): {
10433
- readonly tag: TokenConversionType_Tags.ToBitcoin;
10434
- readonly inner: Readonly<{
10435
- fromTokenIdentifier: string;
10436
- }>;
10437
- /**
10438
- * @private
10439
- * This field is private and should not be used, use `tag` instead.
10440
- */
10441
- readonly [uniffiTypeNameSymbol]: "TokenConversionType";
10442
- };
10443
- instanceOf(obj: any): obj is {
10444
- readonly tag: TokenConversionType_Tags.ToBitcoin;
10445
- readonly inner: Readonly<{
10446
- fromTokenIdentifier: string;
10447
- }>;
10448
- /**
10449
- * @private
10450
- * This field is private and should not be used, use `tag` instead.
10451
- */
10452
- readonly [uniffiTypeNameSymbol]: "TokenConversionType";
10453
- };
10454
- };
10455
- }>;
10456
- export type TokenConversionType = InstanceType<(typeof TokenConversionType)[keyof Omit<typeof TokenConversionType, 'instanceOf'>]>;
10457
10749
  export declare enum UpdateDepositPayload_Tags {
10458
10750
  ClaimError = "ClaimError",
10459
10751
  Refund = "Refund"
@@ -10653,9 +10945,9 @@ export interface BreezSdkInterface {
10653
10945
  disconnect(asyncOpts_?: {
10654
10946
  signal: AbortSignal;
10655
10947
  }): Promise<void>;
10656
- fetchTokenConversionLimits(request: FetchTokenConversionLimitsRequest, asyncOpts_?: {
10948
+ fetchConversionLimits(request: FetchConversionLimitsRequest, asyncOpts_?: {
10657
10949
  signal: AbortSignal;
10658
- }): Promise<FetchTokenConversionLimitsResponse>;
10950
+ }): Promise<FetchConversionLimitsResponse>;
10659
10951
  /**
10660
10952
  * Returns the balance of the wallet in satoshis
10661
10953
  */
@@ -10730,6 +11022,58 @@ export interface BreezSdkInterface {
10730
11022
  listUnclaimedDeposits(request: ListUnclaimedDepositsRequest, asyncOpts_?: {
10731
11023
  signal: AbortSignal;
10732
11024
  }): Promise<ListUnclaimedDepositsResponse>;
11025
+ /**
11026
+ * Performs LNURL-auth with the service.
11027
+ *
11028
+ * This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
11029
+ * It derives a domain-specific linking key, signs the challenge, and sends the
11030
+ * authentication request to the service.
11031
+ *
11032
+ * # Arguments
11033
+ *
11034
+ * * `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
11035
+ *
11036
+ * # Returns
11037
+ *
11038
+ * * `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
11039
+ * * `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
11040
+ * * `Err(SdkError)` - An error occurred during the authentication process
11041
+ *
11042
+ * # Example
11043
+ *
11044
+ * ```rust,no_run
11045
+ * # use breez_sdk_spark::{BreezSdk, InputType};
11046
+ * # async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
11047
+ * // 1. Parse the LNURL-auth string
11048
+ * let input = sdk.parse("lnurl1...").await?;
11049
+ * let auth_request = match input {
11050
+ * InputType::LnurlAuth(data) => data,
11051
+ * _ => return Err("Not an auth request".into()),
11052
+ * };
11053
+ *
11054
+ * // 2. Show user the domain and get confirmation
11055
+ * println!("Authenticate with {}?", auth_request.domain);
11056
+ *
11057
+ * // 3. Perform authentication
11058
+ * let status = sdk.lnurl_auth(auth_request).await?;
11059
+ * match status {
11060
+ * breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
11061
+ * breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
11062
+ * println!("Error: {}", error_details.reason)
11063
+ * }
11064
+ * }
11065
+ * # Ok(())
11066
+ * # }
11067
+ * ```
11068
+ *
11069
+ * # See Also
11070
+ *
11071
+ * * LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
11072
+ * * LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
11073
+ */
11074
+ lnurlAuth(requestData: LnurlAuthRequestDetails, asyncOpts_?: {
11075
+ signal: AbortSignal;
11076
+ }): Promise<LnurlCallbackStatus>;
10733
11077
  lnurlPay(request: LnurlPayRequest, asyncOpts_?: {
10734
11078
  signal: AbortSignal;
10735
11079
  }): Promise<LnurlPayResponse>;
@@ -10904,9 +11248,9 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
10904
11248
  disconnect(asyncOpts_?: {
10905
11249
  signal: AbortSignal;
10906
11250
  }): Promise<void>;
10907
- fetchTokenConversionLimits(request: FetchTokenConversionLimitsRequest, asyncOpts_?: {
11251
+ fetchConversionLimits(request: FetchConversionLimitsRequest, asyncOpts_?: {
10908
11252
  signal: AbortSignal;
10909
- }): Promise<FetchTokenConversionLimitsResponse>;
11253
+ }): Promise<FetchConversionLimitsResponse>;
10910
11254
  /**
10911
11255
  * Returns the balance of the wallet in satoshis
10912
11256
  */
@@ -10981,6 +11325,58 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
10981
11325
  listUnclaimedDeposits(request: ListUnclaimedDepositsRequest, asyncOpts_?: {
10982
11326
  signal: AbortSignal;
10983
11327
  }): Promise<ListUnclaimedDepositsResponse>;
11328
+ /**
11329
+ * Performs LNURL-auth with the service.
11330
+ *
11331
+ * This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
11332
+ * It derives a domain-specific linking key, signs the challenge, and sends the
11333
+ * authentication request to the service.
11334
+ *
11335
+ * # Arguments
11336
+ *
11337
+ * * `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
11338
+ *
11339
+ * # Returns
11340
+ *
11341
+ * * `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
11342
+ * * `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
11343
+ * * `Err(SdkError)` - An error occurred during the authentication process
11344
+ *
11345
+ * # Example
11346
+ *
11347
+ * ```rust,no_run
11348
+ * # use breez_sdk_spark::{BreezSdk, InputType};
11349
+ * # async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
11350
+ * // 1. Parse the LNURL-auth string
11351
+ * let input = sdk.parse("lnurl1...").await?;
11352
+ * let auth_request = match input {
11353
+ * InputType::LnurlAuth(data) => data,
11354
+ * _ => return Err("Not an auth request".into()),
11355
+ * };
11356
+ *
11357
+ * // 2. Show user the domain and get confirmation
11358
+ * println!("Authenticate with {}?", auth_request.domain);
11359
+ *
11360
+ * // 3. Perform authentication
11361
+ * let status = sdk.lnurl_auth(auth_request).await?;
11362
+ * match status {
11363
+ * breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
11364
+ * breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
11365
+ * println!("Error: {}", error_details.reason)
11366
+ * }
11367
+ * }
11368
+ * # Ok(())
11369
+ * # }
11370
+ * ```
11371
+ *
11372
+ * # See Also
11373
+ *
11374
+ * * LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
11375
+ * * LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
11376
+ */
11377
+ lnurlAuth(requestData: LnurlAuthRequestDetails, asyncOpts_?: {
11378
+ signal: AbortSignal;
11379
+ }): Promise<LnurlCallbackStatus>;
10984
11380
  lnurlPay(request: LnurlPayRequest, asyncOpts_?: {
10985
11381
  signal: AbortSignal;
10986
11382
  }): Promise<LnurlPayResponse>;
@@ -11124,27 +11520,31 @@ export interface ExternalSigner {
11124
11520
  /**
11125
11521
  * Signs a message using ECDSA at the given derivation path.
11126
11522
  *
11523
+ * The message should be a 32-byte digest (typically a hash of the original data).
11524
+ *
11127
11525
  * # Arguments
11128
- * * `message` - The message to sign
11526
+ * * `message` - The 32-byte message digest to sign
11129
11527
  * * `path` - BIP32 derivation path as a string
11130
11528
  *
11131
11529
  * # Returns
11132
11530
  * 64-byte compact ECDSA signature, or a `SignerError`
11133
11531
  */
11134
- signEcdsa(message: ArrayBuffer, path: string, asyncOpts_?: {
11532
+ signEcdsa(message: MessageBytes, path: string, asyncOpts_?: {
11135
11533
  signal: AbortSignal;
11136
11534
  }): Promise<EcdsaSignatureBytes>;
11137
11535
  /**
11138
11536
  * Signs a message using recoverable ECDSA at the given derivation path.
11139
11537
  *
11538
+ * The message should be a 32-byte digest (typically a hash of the original data).
11539
+ *
11140
11540
  * # Arguments
11141
- * * `message` - The message to sign (will be double-SHA256 hashed)
11541
+ * * `message` - The 32-byte message digest to sign
11142
11542
  * * `path` - BIP32 derivation path as a string
11143
11543
  *
11144
11544
  * # Returns
11145
11545
  * 65 bytes: recovery ID (31 + `recovery_id`) + 64-byte signature, or a `SignerError`
11146
11546
  */
11147
- signEcdsaRecoverable(message: ArrayBuffer, path: string, asyncOpts_?: {
11547
+ signEcdsaRecoverable(message: MessageBytes, path: string, asyncOpts_?: {
11148
11548
  signal: AbortSignal;
11149
11549
  }): Promise<RecoverableEcdsaSignatureBytes>;
11150
11550
  /**
@@ -11186,6 +11586,19 @@ export interface ExternalSigner {
11186
11586
  signHashSchnorr(hash: ArrayBuffer, path: string, asyncOpts_?: {
11187
11587
  signal: AbortSignal;
11188
11588
  }): Promise<SchnorrSignatureBytes>;
11589
+ /**
11590
+ * HMAC-SHA256 of a message at the given derivation path.
11591
+ *
11592
+ * # Arguments
11593
+ * * `message` - The message to hash
11594
+ * * `path` - BIP32 derivation path as a string
11595
+ *
11596
+ * # Returns
11597
+ * 32-byte HMAC-SHA256, or a `SignerError`
11598
+ */
11599
+ hmacSha256(message: ArrayBuffer, path: string, asyncOpts_?: {
11600
+ signal: AbortSignal;
11601
+ }): Promise<HashedMessageBytes>;
11189
11602
  /**
11190
11603
  * Generates Frost signing commitments for multi-party signing.
11191
11604
  *
@@ -11366,27 +11779,31 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11366
11779
  /**
11367
11780
  * Signs a message using ECDSA at the given derivation path.
11368
11781
  *
11782
+ * The message should be a 32-byte digest (typically a hash of the original data).
11783
+ *
11369
11784
  * # Arguments
11370
- * * `message` - The message to sign
11785
+ * * `message` - The 32-byte message digest to sign
11371
11786
  * * `path` - BIP32 derivation path as a string
11372
11787
  *
11373
11788
  * # Returns
11374
11789
  * 64-byte compact ECDSA signature, or a `SignerError`
11375
11790
  */
11376
- signEcdsa(message: ArrayBuffer, path: string, asyncOpts_?: {
11791
+ signEcdsa(message: MessageBytes, path: string, asyncOpts_?: {
11377
11792
  signal: AbortSignal;
11378
11793
  }): Promise<EcdsaSignatureBytes>;
11379
11794
  /**
11380
11795
  * Signs a message using recoverable ECDSA at the given derivation path.
11381
11796
  *
11797
+ * The message should be a 32-byte digest (typically a hash of the original data).
11798
+ *
11382
11799
  * # Arguments
11383
- * * `message` - The message to sign (will be double-SHA256 hashed)
11800
+ * * `message` - The 32-byte message digest to sign
11384
11801
  * * `path` - BIP32 derivation path as a string
11385
11802
  *
11386
11803
  * # Returns
11387
11804
  * 65 bytes: recovery ID (31 + `recovery_id`) + 64-byte signature, or a `SignerError`
11388
11805
  */
11389
- signEcdsaRecoverable(message: ArrayBuffer, path: string, asyncOpts_?: {
11806
+ signEcdsaRecoverable(message: MessageBytes, path: string, asyncOpts_?: {
11390
11807
  signal: AbortSignal;
11391
11808
  }): Promise<RecoverableEcdsaSignatureBytes>;
11392
11809
  /**
@@ -11428,6 +11845,19 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11428
11845
  signHashSchnorr(hash: ArrayBuffer, path: string, asyncOpts_?: {
11429
11846
  signal: AbortSignal;
11430
11847
  }): Promise<SchnorrSignatureBytes>;
11848
+ /**
11849
+ * HMAC-SHA256 of a message at the given derivation path.
11850
+ *
11851
+ * # Arguments
11852
+ * * `message` - The message to hash
11853
+ * * `path` - BIP32 derivation path as a string
11854
+ *
11855
+ * # Returns
11856
+ * 32-byte HMAC-SHA256, or a `SignerError`
11857
+ */
11858
+ hmacSha256(message: ArrayBuffer, path: string, asyncOpts_?: {
11859
+ signal: AbortSignal;
11860
+ }): Promise<HashedMessageBytes>;
11431
11861
  /**
11432
11862
  * Generates Frost signing commitments for multi-party signing.
11433
11863
  *
@@ -12756,6 +13186,48 @@ declare const _default: Readonly<{
12756
13186
  lift(value: UniffiByteArray): ConnectWithSignerRequest;
12757
13187
  lower(value: ConnectWithSignerRequest): UniffiByteArray;
12758
13188
  };
13189
+ FfiConverterTypeConversionEstimate: {
13190
+ read(from: RustBuffer): ConversionEstimate;
13191
+ write(value: ConversionEstimate, into: RustBuffer): void;
13192
+ allocationSize(value: ConversionEstimate): number;
13193
+ lift(value: UniffiByteArray): ConversionEstimate;
13194
+ lower(value: ConversionEstimate): UniffiByteArray;
13195
+ };
13196
+ FfiConverterTypeConversionInfo: {
13197
+ read(from: RustBuffer): ConversionInfo;
13198
+ write(value: ConversionInfo, into: RustBuffer): void;
13199
+ allocationSize(value: ConversionInfo): number;
13200
+ lift(value: UniffiByteArray): ConversionInfo;
13201
+ lower(value: ConversionInfo): UniffiByteArray;
13202
+ };
13203
+ FfiConverterTypeConversionOptions: {
13204
+ read(from: RustBuffer): ConversionOptions;
13205
+ write(value: ConversionOptions, into: RustBuffer): void;
13206
+ allocationSize(value: ConversionOptions): number;
13207
+ lift(value: UniffiByteArray): ConversionOptions;
13208
+ lower(value: ConversionOptions): UniffiByteArray;
13209
+ };
13210
+ FfiConverterTypeConversionPurpose: {
13211
+ read(from: RustBuffer): ConversionPurpose;
13212
+ write(value: ConversionPurpose, into: RustBuffer): void;
13213
+ allocationSize(value: ConversionPurpose): number;
13214
+ lift(value: UniffiByteArray): ConversionPurpose;
13215
+ lower(value: ConversionPurpose): UniffiByteArray;
13216
+ };
13217
+ FfiConverterTypeConversionStatus: {
13218
+ read(from: RustBuffer): ConversionStatus;
13219
+ write(value: ConversionStatus, into: RustBuffer): void;
13220
+ allocationSize(value: ConversionStatus): number;
13221
+ lift(value: UniffiByteArray): ConversionStatus;
13222
+ lower(value: ConversionStatus): UniffiByteArray;
13223
+ };
13224
+ FfiConverterTypeConversionType: {
13225
+ read(from: RustBuffer): ConversionType;
13226
+ write(value: ConversionType, into: RustBuffer): void;
13227
+ allocationSize(value: ConversionType): number;
13228
+ lift(value: UniffiByteArray): ConversionType;
13229
+ lower(value: ConversionType): UniffiByteArray;
13230
+ };
12759
13231
  FfiConverterTypeCreateIssuerTokenRequest: {
12760
13232
  read(from: RustBuffer): CreateIssuerTokenRequest;
12761
13233
  write(value: CreateIssuerTokenRequest, into: RustBuffer): void;
@@ -12911,19 +13383,19 @@ declare const _default: Readonly<{
12911
13383
  lift(value: UniffiByteArray): Fee;
12912
13384
  lower(value: Fee): UniffiByteArray;
12913
13385
  };
12914
- FfiConverterTypeFetchTokenConversionLimitsRequest: {
12915
- read(from: RustBuffer): FetchTokenConversionLimitsRequest;
12916
- write(value: FetchTokenConversionLimitsRequest, into: RustBuffer): void;
12917
- allocationSize(value: FetchTokenConversionLimitsRequest): number;
12918
- lift(value: UniffiByteArray): FetchTokenConversionLimitsRequest;
12919
- lower(value: FetchTokenConversionLimitsRequest): UniffiByteArray;
13386
+ FfiConverterTypeFetchConversionLimitsRequest: {
13387
+ read(from: RustBuffer): FetchConversionLimitsRequest;
13388
+ write(value: FetchConversionLimitsRequest, into: RustBuffer): void;
13389
+ allocationSize(value: FetchConversionLimitsRequest): number;
13390
+ lift(value: UniffiByteArray): FetchConversionLimitsRequest;
13391
+ lower(value: FetchConversionLimitsRequest): UniffiByteArray;
12920
13392
  };
12921
- FfiConverterTypeFetchTokenConversionLimitsResponse: {
12922
- read(from: RustBuffer): FetchTokenConversionLimitsResponse;
12923
- write(value: FetchTokenConversionLimitsResponse, into: RustBuffer): void;
12924
- allocationSize(value: FetchTokenConversionLimitsResponse): number;
12925
- lift(value: UniffiByteArray): FetchTokenConversionLimitsResponse;
12926
- lower(value: FetchTokenConversionLimitsResponse): UniffiByteArray;
13393
+ FfiConverterTypeFetchConversionLimitsResponse: {
13394
+ read(from: RustBuffer): FetchConversionLimitsResponse;
13395
+ write(value: FetchConversionLimitsResponse, into: RustBuffer): void;
13396
+ allocationSize(value: FetchConversionLimitsResponse): number;
13397
+ lift(value: UniffiByteArray): FetchConversionLimitsResponse;
13398
+ lower(value: FetchConversionLimitsResponse): UniffiByteArray;
12927
13399
  };
12928
13400
  FfiConverterTypeFiatCurrency: {
12929
13401
  read(from: RustBuffer): FiatCurrency;
@@ -12989,6 +13461,13 @@ declare const _default: Readonly<{
12989
13461
  lift(value: UniffiByteArray): GetTokensMetadataResponse;
12990
13462
  lower(value: GetTokensMetadataResponse): UniffiByteArray;
12991
13463
  };
13464
+ FfiConverterTypeHashedMessageBytes: {
13465
+ read(from: RustBuffer): HashedMessageBytes;
13466
+ write(value: HashedMessageBytes, into: RustBuffer): void;
13467
+ allocationSize(value: HashedMessageBytes): number;
13468
+ lift(value: UniffiByteArray): HashedMessageBytes;
13469
+ lower(value: HashedMessageBytes): UniffiByteArray;
13470
+ };
12992
13471
  FfiConverterTypeIdentifierCommitmentPair: {
12993
13472
  read(from: RustBuffer): IdentifierCommitmentPair;
12994
13473
  write(value: IdentifierCommitmentPair, into: RustBuffer): void;
@@ -13101,6 +13580,20 @@ declare const _default: Readonly<{
13101
13580
  lift(value: UniffiByteArray): LnurlAuthRequestDetails;
13102
13581
  lower(value: LnurlAuthRequestDetails): UniffiByteArray;
13103
13582
  };
13583
+ FfiConverterTypeLnurlCallbackStatus: {
13584
+ read(from: RustBuffer): LnurlCallbackStatus;
13585
+ write(value: LnurlCallbackStatus, into: RustBuffer): void;
13586
+ allocationSize(value: LnurlCallbackStatus): number;
13587
+ lift(value: UniffiByteArray): LnurlCallbackStatus;
13588
+ lower(value: LnurlCallbackStatus): UniffiByteArray;
13589
+ };
13590
+ FfiConverterTypeLnurlErrorDetails: {
13591
+ read(from: RustBuffer): LnurlErrorDetails;
13592
+ write(value: LnurlErrorDetails, into: RustBuffer): void;
13593
+ allocationSize(value: LnurlErrorDetails): number;
13594
+ lift(value: UniffiByteArray): LnurlErrorDetails;
13595
+ lower(value: LnurlErrorDetails): UniffiByteArray;
13596
+ };
13104
13597
  FfiConverterTypeLnurlPayInfo: {
13105
13598
  read(from: RustBuffer): LnurlPayInfo;
13106
13599
  write(value: LnurlPayInfo, into: RustBuffer): void;
@@ -13192,6 +13685,13 @@ declare const _default: Readonly<{
13192
13685
  lift(value: UniffiByteArray): MaxFee;
13193
13686
  lower(value: MaxFee): UniffiByteArray;
13194
13687
  };
13688
+ FfiConverterTypeMessageBytes: {
13689
+ read(from: RustBuffer): MessageBytes;
13690
+ write(value: MessageBytes, into: RustBuffer): void;
13691
+ allocationSize(value: MessageBytes): number;
13692
+ lift(value: UniffiByteArray): MessageBytes;
13693
+ lower(value: MessageBytes): UniffiByteArray;
13694
+ };
13195
13695
  FfiConverterTypeMessageSuccessActionData: {
13196
13696
  read(from: RustBuffer): MessageSuccessActionData;
13197
13697
  write(value: MessageSuccessActionData, into: RustBuffer): void;
@@ -13631,27 +14131,6 @@ declare const _default: Readonly<{
13631
14131
  lift(value: UniffiByteArray): TokenBalance;
13632
14132
  lower(value: TokenBalance): UniffiByteArray;
13633
14133
  };
13634
- FfiConverterTypeTokenConversionInfo: {
13635
- read(from: RustBuffer): TokenConversionInfo;
13636
- write(value: TokenConversionInfo, into: RustBuffer): void;
13637
- allocationSize(value: TokenConversionInfo): number;
13638
- lift(value: UniffiByteArray): TokenConversionInfo;
13639
- lower(value: TokenConversionInfo): UniffiByteArray;
13640
- };
13641
- FfiConverterTypeTokenConversionOptions: {
13642
- read(from: RustBuffer): TokenConversionOptions;
13643
- write(value: TokenConversionOptions, into: RustBuffer): void;
13644
- allocationSize(value: TokenConversionOptions): number;
13645
- lift(value: UniffiByteArray): TokenConversionOptions;
13646
- lower(value: TokenConversionOptions): UniffiByteArray;
13647
- };
13648
- FfiConverterTypeTokenConversionType: {
13649
- read(from: RustBuffer): TokenConversionType;
13650
- write(value: TokenConversionType, into: RustBuffer): void;
13651
- allocationSize(value: TokenConversionType): number;
13652
- lift(value: UniffiByteArray): TokenConversionType;
13653
- lower(value: TokenConversionType): UniffiByteArray;
13654
- };
13655
14134
  FfiConverterTypeTokenIssuer: FfiConverterObject<TokenIssuerInterface>;
13656
14135
  FfiConverterTypeTokenMetadata: {
13657
14136
  read(from: RustBuffer): TokenMetadata;