@breeztech/breez-sdk-spark-react-native 0.7.1 → 0.7.3

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
@@ -2609,7 +2733,7 @@ export type PaymentMetadata = {
2609
2733
  lnurlPayInfo: LnurlPayInfo | undefined;
2610
2734
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
2611
2735
  lnurlDescription: string | undefined;
2612
- tokenConversionInfo: TokenConversionInfo | undefined;
2736
+ conversionInfo: ConversionInfo | undefined;
2613
2737
  };
2614
2738
  /**
2615
2739
  * Generated factory for {@link PaymentMetadata} record objects.
@@ -2718,9 +2842,9 @@ export type PrepareSendPaymentRequest = {
2718
2842
  */
2719
2843
  tokenIdentifier: string | undefined;
2720
2844
  /**
2721
- * If provided, the payment will include a token conversion step before sending the payment
2845
+ * If provided, the payment will include a conversion step before sending the payment
2722
2846
  */
2723
- tokenConversionOptions: TokenConversionOptions | undefined;
2847
+ conversionOptions: ConversionOptions | undefined;
2724
2848
  };
2725
2849
  /**
2726
2850
  * Generated factory for {@link PrepareSendPaymentRequest} record objects.
@@ -2730,12 +2854,12 @@ export declare const PrepareSendPaymentRequest: Readonly<{
2730
2854
  * Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
2731
2855
  * in Rust, in the {@link breez_sdk_spark} crate.
2732
2856
  */
2733
- create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "tokenConversionOptions">>) => PrepareSendPaymentRequest;
2857
+ create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
2734
2858
  /**
2735
2859
  * Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
2736
2860
  * in Rust, in the {@link breez_sdk_spark} crate.
2737
2861
  */
2738
- new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "tokenConversionOptions">>) => PrepareSendPaymentRequest;
2862
+ new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
2739
2863
  /**
2740
2864
  * Defaults specified in the {@link breez_sdk_spark} crate.
2741
2865
  */
@@ -2754,13 +2878,9 @@ export type PrepareSendPaymentResponse = {
2754
2878
  */
2755
2879
  tokenIdentifier: string | undefined;
2756
2880
  /**
2757
- * When set, the payment will include a token conversion step before sending the payment
2758
- */
2759
- tokenConversionOptions: TokenConversionOptions | undefined;
2760
- /**
2761
- * The estimated token conversion fee if the payment involves a token conversion
2881
+ * When set, the payment will include a conversion step before sending the payment
2762
2882
  */
2763
- tokenConversionFee: U128 | undefined;
2883
+ conversionEstimate: ConversionEstimate | undefined;
2764
2884
  };
2765
2885
  /**
2766
2886
  * Generated factory for {@link PrepareSendPaymentResponse} record objects.
@@ -3250,12 +3370,12 @@ export declare const SendPaymentRequest: Readonly<{
3250
3370
  * Create a frozen instance of {@link SendPaymentRequest}, with defaults specified
3251
3371
  * in Rust, in the {@link breez_sdk_spark} crate.
3252
3372
  */
3253
- create: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "idempotencyKey" | "options">>) => SendPaymentRequest;
3373
+ create: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "options" | "idempotencyKey">>) => SendPaymentRequest;
3254
3374
  /**
3255
3375
  * Create a frozen instance of {@link SendPaymentRequest}, with defaults specified
3256
3376
  * in Rust, in the {@link breez_sdk_spark} crate.
3257
3377
  */
3258
- new: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "idempotencyKey" | "options">>) => SendPaymentRequest;
3378
+ new: (partial: Partial<SendPaymentRequest> & Required<Omit<SendPaymentRequest, "options" | "idempotencyKey">>) => SendPaymentRequest;
3259
3379
  /**
3260
3380
  * Defaults specified in the {@link breez_sdk_spark} crate.
3261
3381
  */
@@ -3425,7 +3545,7 @@ export type SparkHtlcDetails = {
3425
3545
  */
3426
3546
  preimage: string | undefined;
3427
3547
  /**
3428
- * The expiry time of the HTLC in seconds since the Unix epoch
3548
+ * The expiry time of the HTLC as a unix timestamp in seconds
3429
3549
  */
3430
3550
  expiryTime: bigint;
3431
3551
  /**
@@ -3501,7 +3621,7 @@ export type SparkInvoiceDetails = {
3501
3621
  */
3502
3622
  tokenIdentifier: string | undefined;
3503
3623
  /**
3504
- * Optional expiry time. If not provided, the invoice will never expire.
3624
+ * Optional expiry time as a unix timestamp in seconds. If not provided, the invoice will never expire.
3505
3625
  */
3506
3626
  expiryTime: /*u64*/ bigint | undefined;
3507
3627
  /**
@@ -3658,88 +3778,6 @@ export declare const TokenBalance: Readonly<{
3658
3778
  */
3659
3779
  defaults: () => Partial<TokenBalance>;
3660
3780
  }>;
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
3781
  export type TokenMetadata = {
3744
3782
  identifier: string;
3745
3783
  /**
@@ -4486,6 +4524,182 @@ export declare const ChainServiceError: Readonly<{
4486
4524
  };
4487
4525
  }>;
4488
4526
  export type ChainServiceError = InstanceType<(typeof ChainServiceError)[keyof Omit<typeof ChainServiceError, 'instanceOf'>]>;
4527
+ export declare enum ConversionPurpose_Tags {
4528
+ OngoingPayment = "OngoingPayment",
4529
+ SelfTransfer = "SelfTransfer"
4530
+ }
4531
+ /**
4532
+ * The purpose of the conversion, which is used to provide context for the conversion
4533
+ * if its related to an ongoing payment or a self-transfer.
4534
+ */
4535
+ export declare const ConversionPurpose: Readonly<{
4536
+ instanceOf: (obj: any) => obj is ConversionPurpose;
4537
+ OngoingPayment: {
4538
+ new (inner: {
4539
+ /**
4540
+ * The payment request of the ongoing payment
4541
+ */ paymentRequest: string;
4542
+ }): {
4543
+ readonly tag: ConversionPurpose_Tags.OngoingPayment;
4544
+ readonly inner: Readonly<{
4545
+ paymentRequest: string;
4546
+ }>;
4547
+ /**
4548
+ * @private
4549
+ * This field is private and should not be used, use `tag` instead.
4550
+ */
4551
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4552
+ };
4553
+ "new"(inner: {
4554
+ /**
4555
+ * The payment request of the ongoing payment
4556
+ */ paymentRequest: string;
4557
+ }): {
4558
+ readonly tag: ConversionPurpose_Tags.OngoingPayment;
4559
+ readonly inner: Readonly<{
4560
+ paymentRequest: string;
4561
+ }>;
4562
+ /**
4563
+ * @private
4564
+ * This field is private and should not be used, use `tag` instead.
4565
+ */
4566
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4567
+ };
4568
+ instanceOf(obj: any): obj is {
4569
+ readonly tag: ConversionPurpose_Tags.OngoingPayment;
4570
+ readonly inner: Readonly<{
4571
+ paymentRequest: string;
4572
+ }>;
4573
+ /**
4574
+ * @private
4575
+ * This field is private and should not be used, use `tag` instead.
4576
+ */
4577
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4578
+ };
4579
+ };
4580
+ SelfTransfer: {
4581
+ new (): {
4582
+ readonly tag: ConversionPurpose_Tags.SelfTransfer;
4583
+ /**
4584
+ * @private
4585
+ * This field is private and should not be used, use `tag` instead.
4586
+ */
4587
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4588
+ };
4589
+ "new"(): {
4590
+ readonly tag: ConversionPurpose_Tags.SelfTransfer;
4591
+ /**
4592
+ * @private
4593
+ * This field is private and should not be used, use `tag` instead.
4594
+ */
4595
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4596
+ };
4597
+ instanceOf(obj: any): obj is {
4598
+ readonly tag: ConversionPurpose_Tags.SelfTransfer;
4599
+ /**
4600
+ * @private
4601
+ * This field is private and should not be used, use `tag` instead.
4602
+ */
4603
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4604
+ };
4605
+ };
4606
+ }>;
4607
+ /**
4608
+ * The purpose of the conversion, which is used to provide context for the conversion
4609
+ * if its related to an ongoing payment or a self-transfer.
4610
+ */
4611
+ export type ConversionPurpose = InstanceType<(typeof ConversionPurpose)[keyof Omit<typeof ConversionPurpose, 'instanceOf'>]>;
4612
+ /**
4613
+ * The status of the conversion
4614
+ */
4615
+ export declare enum ConversionStatus {
4616
+ /**
4617
+ * The conversion was successful
4618
+ */
4619
+ Completed = 0,
4620
+ /**
4621
+ * The conversion failed and no refund was made yet, which requires action by the SDK to
4622
+ * perform the refund. This can happen if there was a failure during the conversion process.
4623
+ */
4624
+ RefundNeeded = 1,
4625
+ /**
4626
+ * The conversion failed and a refund was made
4627
+ */
4628
+ Refunded = 2
4629
+ }
4630
+ export declare enum ConversionType_Tags {
4631
+ FromBitcoin = "FromBitcoin",
4632
+ ToBitcoin = "ToBitcoin"
4633
+ }
4634
+ export declare const ConversionType: Readonly<{
4635
+ instanceOf: (obj: any) => obj is ConversionType;
4636
+ FromBitcoin: {
4637
+ new (): {
4638
+ readonly tag: ConversionType_Tags.FromBitcoin;
4639
+ /**
4640
+ * @private
4641
+ * This field is private and should not be used, use `tag` instead.
4642
+ */
4643
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4644
+ };
4645
+ "new"(): {
4646
+ readonly tag: ConversionType_Tags.FromBitcoin;
4647
+ /**
4648
+ * @private
4649
+ * This field is private and should not be used, use `tag` instead.
4650
+ */
4651
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4652
+ };
4653
+ instanceOf(obj: any): obj is {
4654
+ readonly tag: ConversionType_Tags.FromBitcoin;
4655
+ /**
4656
+ * @private
4657
+ * This field is private and should not be used, use `tag` instead.
4658
+ */
4659
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4660
+ };
4661
+ };
4662
+ ToBitcoin: {
4663
+ new (inner: {
4664
+ fromTokenIdentifier: string;
4665
+ }): {
4666
+ readonly tag: ConversionType_Tags.ToBitcoin;
4667
+ readonly inner: Readonly<{
4668
+ fromTokenIdentifier: string;
4669
+ }>;
4670
+ /**
4671
+ * @private
4672
+ * This field is private and should not be used, use `tag` instead.
4673
+ */
4674
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4675
+ };
4676
+ "new"(inner: {
4677
+ fromTokenIdentifier: string;
4678
+ }): {
4679
+ readonly tag: ConversionType_Tags.ToBitcoin;
4680
+ readonly inner: Readonly<{
4681
+ fromTokenIdentifier: string;
4682
+ }>;
4683
+ /**
4684
+ * @private
4685
+ * This field is private and should not be used, use `tag` instead.
4686
+ */
4687
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4688
+ };
4689
+ instanceOf(obj: any): obj is {
4690
+ readonly tag: ConversionType_Tags.ToBitcoin;
4691
+ readonly inner: Readonly<{
4692
+ fromTokenIdentifier: string;
4693
+ }>;
4694
+ /**
4695
+ * @private
4696
+ * This field is private and should not be used, use `tag` instead.
4697
+ */
4698
+ readonly [uniffiTypeNameSymbol]: "ConversionType";
4699
+ };
4700
+ };
4701
+ }>;
4702
+ export type ConversionType = InstanceType<(typeof ConversionType)[keyof Omit<typeof ConversionType, 'instanceOf'>]>;
4489
4703
  export declare enum DepositClaimError_Tags {
4490
4704
  MaxDepositClaimFeeExceeded = "MaxDepositClaimFeeExceeded",
4491
4705
  MissingUtxo = "MissingUtxo",
@@ -5705,14 +5919,14 @@ export declare const PaymentDetails: Readonly<{
5705
5919
  * The HTLC transfer details if the payment fulfilled an HTLC transfer
5706
5920
  */ htlcDetails: SparkHtlcDetails | undefined;
5707
5921
  /**
5708
- * The information for a token conversion
5709
- */ tokenConversionInfo: TokenConversionInfo | undefined;
5922
+ * The information for a conversion
5923
+ */ conversionInfo: ConversionInfo | undefined;
5710
5924
  }): {
5711
5925
  readonly tag: PaymentDetails_Tags.Spark;
5712
5926
  readonly inner: Readonly<{
5713
5927
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5714
5928
  htlcDetails: SparkHtlcDetails | undefined;
5715
- tokenConversionInfo: TokenConversionInfo | undefined;
5929
+ conversionInfo: ConversionInfo | undefined;
5716
5930
  }>;
5717
5931
  /**
5718
5932
  * @private
@@ -5728,14 +5942,14 @@ export declare const PaymentDetails: Readonly<{
5728
5942
  * The HTLC transfer details if the payment fulfilled an HTLC transfer
5729
5943
  */ htlcDetails: SparkHtlcDetails | undefined;
5730
5944
  /**
5731
- * The information for a token conversion
5732
- */ tokenConversionInfo: TokenConversionInfo | undefined;
5945
+ * The information for a conversion
5946
+ */ conversionInfo: ConversionInfo | undefined;
5733
5947
  }): {
5734
5948
  readonly tag: PaymentDetails_Tags.Spark;
5735
5949
  readonly inner: Readonly<{
5736
5950
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5737
5951
  htlcDetails: SparkHtlcDetails | undefined;
5738
- tokenConversionInfo: TokenConversionInfo | undefined;
5952
+ conversionInfo: ConversionInfo | undefined;
5739
5953
  }>;
5740
5954
  /**
5741
5955
  * @private
@@ -5748,7 +5962,7 @@ export declare const PaymentDetails: Readonly<{
5748
5962
  readonly inner: Readonly<{
5749
5963
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5750
5964
  htlcDetails: SparkHtlcDetails | undefined;
5751
- tokenConversionInfo: TokenConversionInfo | undefined;
5965
+ conversionInfo: ConversionInfo | undefined;
5752
5966
  }>;
5753
5967
  /**
5754
5968
  * @private
@@ -5765,15 +5979,15 @@ export declare const PaymentDetails: Readonly<{
5765
5979
  * The invoice details if the payment fulfilled a spark invoice
5766
5980
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
5767
5981
  /**
5768
- * The information for a token conversion
5769
- */ tokenConversionInfo: TokenConversionInfo | undefined;
5982
+ * The information for a conversion
5983
+ */ conversionInfo: ConversionInfo | undefined;
5770
5984
  }): {
5771
5985
  readonly tag: PaymentDetails_Tags.Token;
5772
5986
  readonly inner: Readonly<{
5773
5987
  metadata: TokenMetadata;
5774
5988
  txHash: string;
5775
5989
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5776
- tokenConversionInfo: TokenConversionInfo | undefined;
5990
+ conversionInfo: ConversionInfo | undefined;
5777
5991
  }>;
5778
5992
  /**
5779
5993
  * @private
@@ -5788,15 +6002,15 @@ export declare const PaymentDetails: Readonly<{
5788
6002
  * The invoice details if the payment fulfilled a spark invoice
5789
6003
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
5790
6004
  /**
5791
- * The information for a token conversion
5792
- */ tokenConversionInfo: TokenConversionInfo | undefined;
6005
+ * The information for a conversion
6006
+ */ conversionInfo: ConversionInfo | undefined;
5793
6007
  }): {
5794
6008
  readonly tag: PaymentDetails_Tags.Token;
5795
6009
  readonly inner: Readonly<{
5796
6010
  metadata: TokenMetadata;
5797
6011
  txHash: string;
5798
6012
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5799
- tokenConversionInfo: TokenConversionInfo | undefined;
6013
+ conversionInfo: ConversionInfo | undefined;
5800
6014
  }>;
5801
6015
  /**
5802
6016
  * @private
@@ -5810,7 +6024,7 @@ export declare const PaymentDetails: Readonly<{
5810
6024
  metadata: TokenMetadata;
5811
6025
  txHash: string;
5812
6026
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
5813
- tokenConversionInfo: TokenConversionInfo | undefined;
6027
+ conversionInfo: ConversionInfo | undefined;
5814
6028
  }>;
5815
6029
  /**
5816
6030
  * @private
@@ -6544,7 +6758,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6544
6758
  * If empty, it is a Bitcoin payment
6545
6759
  */ tokenIdentifier: string | undefined;
6546
6760
  /**
6547
- * The expiry time of the invoice in seconds since the Unix epoch
6761
+ * The expiry time of the invoice as a unix timestamp in seconds
6548
6762
  */ expiryTime: /*u64*/ bigint | undefined;
6549
6763
  /**
6550
6764
  * A description to embed in the invoice.
@@ -6576,7 +6790,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6576
6790
  * If empty, it is a Bitcoin payment
6577
6791
  */ tokenIdentifier: string | undefined;
6578
6792
  /**
6579
- * The expiry time of the invoice in seconds since the Unix epoch
6793
+ * The expiry time of the invoice as a unix timestamp in seconds
6580
6794
  */ expiryTime: /*u64*/ bigint | undefined;
6581
6795
  /**
6582
6796
  * A description to embed in the invoice.
@@ -6646,7 +6860,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6646
6860
  description: string;
6647
6861
  amountSats: /*u64*/ bigint | undefined;
6648
6862
  /**
6649
- * The expiry time of the invoice in seconds
6863
+ * The expiry of the invoice as a duration in seconds
6650
6864
  */ expirySecs: /*u32*/ number | undefined;
6651
6865
  }): {
6652
6866
  readonly tag: ReceivePaymentMethod_Tags.Bolt11Invoice;
@@ -6665,7 +6879,7 @@ export declare const ReceivePaymentMethod: Readonly<{
6665
6879
  description: string;
6666
6880
  amountSats: /*u64*/ bigint | undefined;
6667
6881
  /**
6668
- * The expiry time of the invoice in seconds
6882
+ * The expiry of the invoice as a duration in seconds
6669
6883
  */ expirySecs: /*u32*/ number | undefined;
6670
6884
  }): {
6671
6885
  readonly tag: ReceivePaymentMethod_Tags.Bolt11Invoice;
@@ -10381,79 +10595,6 @@ export declare const SyncStorageError: Readonly<{
10381
10595
  * Errors that can occur during storage operations
10382
10596
  */
10383
10597
  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
10598
  export declare enum UpdateDepositPayload_Tags {
10458
10599
  ClaimError = "ClaimError",
10459
10600
  Refund = "Refund"
@@ -10653,9 +10794,9 @@ export interface BreezSdkInterface {
10653
10794
  disconnect(asyncOpts_?: {
10654
10795
  signal: AbortSignal;
10655
10796
  }): Promise<void>;
10656
- fetchTokenConversionLimits(request: FetchTokenConversionLimitsRequest, asyncOpts_?: {
10797
+ fetchConversionLimits(request: FetchConversionLimitsRequest, asyncOpts_?: {
10657
10798
  signal: AbortSignal;
10658
- }): Promise<FetchTokenConversionLimitsResponse>;
10799
+ }): Promise<FetchConversionLimitsResponse>;
10659
10800
  /**
10660
10801
  * Returns the balance of the wallet in satoshis
10661
10802
  */
@@ -10904,9 +11045,9 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
10904
11045
  disconnect(asyncOpts_?: {
10905
11046
  signal: AbortSignal;
10906
11047
  }): Promise<void>;
10907
- fetchTokenConversionLimits(request: FetchTokenConversionLimitsRequest, asyncOpts_?: {
11048
+ fetchConversionLimits(request: FetchConversionLimitsRequest, asyncOpts_?: {
10908
11049
  signal: AbortSignal;
10909
- }): Promise<FetchTokenConversionLimitsResponse>;
11050
+ }): Promise<FetchConversionLimitsResponse>;
10910
11051
  /**
10911
11052
  * Returns the balance of the wallet in satoshis
10912
11053
  */
@@ -12756,6 +12897,48 @@ declare const _default: Readonly<{
12756
12897
  lift(value: UniffiByteArray): ConnectWithSignerRequest;
12757
12898
  lower(value: ConnectWithSignerRequest): UniffiByteArray;
12758
12899
  };
12900
+ FfiConverterTypeConversionEstimate: {
12901
+ read(from: RustBuffer): ConversionEstimate;
12902
+ write(value: ConversionEstimate, into: RustBuffer): void;
12903
+ allocationSize(value: ConversionEstimate): number;
12904
+ lift(value: UniffiByteArray): ConversionEstimate;
12905
+ lower(value: ConversionEstimate): UniffiByteArray;
12906
+ };
12907
+ FfiConverterTypeConversionInfo: {
12908
+ read(from: RustBuffer): ConversionInfo;
12909
+ write(value: ConversionInfo, into: RustBuffer): void;
12910
+ allocationSize(value: ConversionInfo): number;
12911
+ lift(value: UniffiByteArray): ConversionInfo;
12912
+ lower(value: ConversionInfo): UniffiByteArray;
12913
+ };
12914
+ FfiConverterTypeConversionOptions: {
12915
+ read(from: RustBuffer): ConversionOptions;
12916
+ write(value: ConversionOptions, into: RustBuffer): void;
12917
+ allocationSize(value: ConversionOptions): number;
12918
+ lift(value: UniffiByteArray): ConversionOptions;
12919
+ lower(value: ConversionOptions): UniffiByteArray;
12920
+ };
12921
+ FfiConverterTypeConversionPurpose: {
12922
+ read(from: RustBuffer): ConversionPurpose;
12923
+ write(value: ConversionPurpose, into: RustBuffer): void;
12924
+ allocationSize(value: ConversionPurpose): number;
12925
+ lift(value: UniffiByteArray): ConversionPurpose;
12926
+ lower(value: ConversionPurpose): UniffiByteArray;
12927
+ };
12928
+ FfiConverterTypeConversionStatus: {
12929
+ read(from: RustBuffer): ConversionStatus;
12930
+ write(value: ConversionStatus, into: RustBuffer): void;
12931
+ allocationSize(value: ConversionStatus): number;
12932
+ lift(value: UniffiByteArray): ConversionStatus;
12933
+ lower(value: ConversionStatus): UniffiByteArray;
12934
+ };
12935
+ FfiConverterTypeConversionType: {
12936
+ read(from: RustBuffer): ConversionType;
12937
+ write(value: ConversionType, into: RustBuffer): void;
12938
+ allocationSize(value: ConversionType): number;
12939
+ lift(value: UniffiByteArray): ConversionType;
12940
+ lower(value: ConversionType): UniffiByteArray;
12941
+ };
12759
12942
  FfiConverterTypeCreateIssuerTokenRequest: {
12760
12943
  read(from: RustBuffer): CreateIssuerTokenRequest;
12761
12944
  write(value: CreateIssuerTokenRequest, into: RustBuffer): void;
@@ -12911,19 +13094,19 @@ declare const _default: Readonly<{
12911
13094
  lift(value: UniffiByteArray): Fee;
12912
13095
  lower(value: Fee): UniffiByteArray;
12913
13096
  };
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;
13097
+ FfiConverterTypeFetchConversionLimitsRequest: {
13098
+ read(from: RustBuffer): FetchConversionLimitsRequest;
13099
+ write(value: FetchConversionLimitsRequest, into: RustBuffer): void;
13100
+ allocationSize(value: FetchConversionLimitsRequest): number;
13101
+ lift(value: UniffiByteArray): FetchConversionLimitsRequest;
13102
+ lower(value: FetchConversionLimitsRequest): UniffiByteArray;
12920
13103
  };
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;
13104
+ FfiConverterTypeFetchConversionLimitsResponse: {
13105
+ read(from: RustBuffer): FetchConversionLimitsResponse;
13106
+ write(value: FetchConversionLimitsResponse, into: RustBuffer): void;
13107
+ allocationSize(value: FetchConversionLimitsResponse): number;
13108
+ lift(value: UniffiByteArray): FetchConversionLimitsResponse;
13109
+ lower(value: FetchConversionLimitsResponse): UniffiByteArray;
12927
13110
  };
12928
13111
  FfiConverterTypeFiatCurrency: {
12929
13112
  read(from: RustBuffer): FiatCurrency;
@@ -13631,27 +13814,6 @@ declare const _default: Readonly<{
13631
13814
  lift(value: UniffiByteArray): TokenBalance;
13632
13815
  lower(value: TokenBalance): UniffiByteArray;
13633
13816
  };
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
13817
  FfiConverterTypeTokenIssuer: FfiConverterObject<TokenIssuerInterface>;
13656
13818
  FfiConverterTypeTokenMetadata: {
13657
13819
  read(from: RustBuffer): TokenMetadata;