@breeztech/breez-sdk-spark-react-native 0.7.21 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,6 +49,15 @@ export declare function defaultConfig(network: Network): Config;
49
49
  * Result containing the signer as `Arc<dyn ExternalSigner>`
50
50
  */
51
51
  export declare function defaultExternalSigner(mnemonic: string, passphrase: string | undefined, network: Network, keySetConfig: KeySetConfig | undefined): ExternalSigner;
52
+ /**
53
+ * Fetches the current status of Spark network services relevant to the SDK.
54
+ *
55
+ * This function queries the Spark status API and returns the worst status
56
+ * across the Spark Operators and SSP services.
57
+ */
58
+ export declare function getSparkStatus(asyncOpts_?: {
59
+ signal: AbortSignal;
60
+ }): Promise<SparkStatus>;
52
61
  export declare function initLogging(logDir: string | undefined, appLogger: Logger | undefined, logFilter: string | undefined): void;
53
62
  /**
54
63
  * Trait for event listeners
@@ -495,6 +504,67 @@ export declare const BurnIssuerTokenRequest: Readonly<{
495
504
  */
496
505
  defaults: () => Partial<BurnIssuerTokenRequest>;
497
506
  }>;
507
+ /**
508
+ * Request to buy Bitcoin using an external provider (`MoonPay`)
509
+ */
510
+ export type BuyBitcoinRequest = {
511
+ /**
512
+ * Optional: Lock the purchase to a specific amount in satoshis.
513
+ * When provided, the user cannot change the amount in the purchase flow.
514
+ */
515
+ lockedAmountSat: /*u64*/ bigint | undefined;
516
+ /**
517
+ * Optional: Custom redirect URL after purchase completion
518
+ */
519
+ redirectUrl: string | undefined;
520
+ };
521
+ /**
522
+ * Generated factory for {@link BuyBitcoinRequest} record objects.
523
+ */
524
+ export declare const BuyBitcoinRequest: Readonly<{
525
+ /**
526
+ * Create a frozen instance of {@link BuyBitcoinRequest}, with defaults specified
527
+ * in Rust, in the {@link breez_sdk_spark} crate.
528
+ */
529
+ create: (partial: Partial<BuyBitcoinRequest> & Required<Omit<BuyBitcoinRequest, "lockedAmountSat" | "redirectUrl">>) => BuyBitcoinRequest;
530
+ /**
531
+ * Create a frozen instance of {@link BuyBitcoinRequest}, with defaults specified
532
+ * in Rust, in the {@link breez_sdk_spark} crate.
533
+ */
534
+ new: (partial: Partial<BuyBitcoinRequest> & Required<Omit<BuyBitcoinRequest, "lockedAmountSat" | "redirectUrl">>) => BuyBitcoinRequest;
535
+ /**
536
+ * Defaults specified in the {@link breez_sdk_spark} crate.
537
+ */
538
+ defaults: () => Partial<BuyBitcoinRequest>;
539
+ }>;
540
+ /**
541
+ * Response containing a URL to complete the Bitcoin purchase
542
+ */
543
+ export type BuyBitcoinResponse = {
544
+ /**
545
+ * The URL to open in a browser to complete the purchase
546
+ */
547
+ url: string;
548
+ };
549
+ /**
550
+ * Generated factory for {@link BuyBitcoinResponse} record objects.
551
+ */
552
+ export declare const BuyBitcoinResponse: Readonly<{
553
+ /**
554
+ * Create a frozen instance of {@link BuyBitcoinResponse}, with defaults specified
555
+ * in Rust, in the {@link breez_sdk_spark} crate.
556
+ */
557
+ create: (partial: Partial<BuyBitcoinResponse> & Required<Omit<BuyBitcoinResponse, never>>) => BuyBitcoinResponse;
558
+ /**
559
+ * Create a frozen instance of {@link BuyBitcoinResponse}, with defaults specified
560
+ * in Rust, in the {@link breez_sdk_spark} crate.
561
+ */
562
+ new: (partial: Partial<BuyBitcoinResponse> & Required<Omit<BuyBitcoinResponse, never>>) => BuyBitcoinResponse;
563
+ /**
564
+ * Defaults specified in the {@link breez_sdk_spark} crate.
565
+ */
566
+ defaults: () => Partial<BuyBitcoinResponse>;
567
+ }>;
498
568
  export type CheckLightningAddressRequest = {
499
569
  username: string;
500
570
  };
@@ -708,6 +778,13 @@ export type Config = {
708
778
  * More leaves allow payments to be made without needing a swap, reducing payment latency.
709
779
  */
710
780
  optimizationConfig: OptimizationConfig;
781
+ /**
782
+ * Configuration for automatic conversion of Bitcoin to stable tokens.
783
+ *
784
+ * When set, received sats will be automatically converted to the specified token
785
+ * once the balance exceeds the threshold.
786
+ */
787
+ stableBalanceConfig: StableBalanceConfig | undefined;
711
788
  };
712
789
  /**
713
790
  * Generated factory for {@link Config} record objects.
@@ -781,6 +858,38 @@ export declare const ConnectWithSignerRequest: Readonly<{
781
858
  */
782
859
  defaults: () => Partial<ConnectWithSignerRequest>;
783
860
  }>;
861
+ /**
862
+ * Outlines the steps involved in a conversion
863
+ */
864
+ export type ConversionDetails = {
865
+ /**
866
+ * First step is converting from the available asset
867
+ */
868
+ from: ConversionStep;
869
+ /**
870
+ * Second step is converting to the requested asset
871
+ */
872
+ to: ConversionStep;
873
+ };
874
+ /**
875
+ * Generated factory for {@link ConversionDetails} record objects.
876
+ */
877
+ export declare const ConversionDetails: Readonly<{
878
+ /**
879
+ * Create a frozen instance of {@link ConversionDetails}, with defaults specified
880
+ * in Rust, in the {@link breez_sdk_spark} crate.
881
+ */
882
+ create: (partial: Partial<ConversionDetails> & Required<Omit<ConversionDetails, never>>) => ConversionDetails;
883
+ /**
884
+ * Create a frozen instance of {@link ConversionDetails}, with defaults specified
885
+ * in Rust, in the {@link breez_sdk_spark} crate.
886
+ */
887
+ new: (partial: Partial<ConversionDetails> & Required<Omit<ConversionDetails, never>>) => ConversionDetails;
888
+ /**
889
+ * Defaults specified in the {@link breez_sdk_spark} crate.
890
+ */
891
+ defaults: () => Partial<ConversionDetails>;
892
+ }>;
784
893
  /**
785
894
  * Response from estimating a conversion, used when preparing a payment that requires conversion
786
895
  */
@@ -873,7 +982,7 @@ export type ConversionOptions = {
873
982
  conversionType: ConversionType;
874
983
  /**
875
984
  * 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.
985
+ * a conversion is needed to fulfill the payment. Defaults to 10 bps (0.1%) if not set.
877
986
  * The conversion will fail if the actual amount received is less than
878
987
  * `estimated_amount * (1 - max_slippage_bps / 10_000)`.
879
988
  */
@@ -905,6 +1014,51 @@ export declare const ConversionOptions: Readonly<{
905
1014
  */
906
1015
  defaults: () => Partial<ConversionOptions>;
907
1016
  }>;
1017
+ /**
1018
+ * A single step in a conversion
1019
+ */
1020
+ export type ConversionStep = {
1021
+ /**
1022
+ * The underlying payment id of the conversion step
1023
+ */
1024
+ paymentId: string;
1025
+ /**
1026
+ * Payment amount in satoshis or token base units
1027
+ */
1028
+ amount: U128;
1029
+ /**
1030
+ * Fee paid in satoshis or token base units
1031
+ * This represents the payment fee + the conversion fee
1032
+ */
1033
+ fee: U128;
1034
+ /**
1035
+ * Method of payment
1036
+ */
1037
+ method: PaymentMethod;
1038
+ /**
1039
+ * Token metadata if a token is used for payment
1040
+ */
1041
+ tokenMetadata: TokenMetadata | undefined;
1042
+ };
1043
+ /**
1044
+ * Generated factory for {@link ConversionStep} record objects.
1045
+ */
1046
+ export declare const ConversionStep: Readonly<{
1047
+ /**
1048
+ * Create a frozen instance of {@link ConversionStep}, with defaults specified
1049
+ * in Rust, in the {@link breez_sdk_spark} crate.
1050
+ */
1051
+ create: (partial: Partial<ConversionStep> & Required<Omit<ConversionStep, never>>) => ConversionStep;
1052
+ /**
1053
+ * Create a frozen instance of {@link ConversionStep}, with defaults specified
1054
+ * in Rust, in the {@link breez_sdk_spark} crate.
1055
+ */
1056
+ new: (partial: Partial<ConversionStep> & Required<Omit<ConversionStep, never>>) => ConversionStep;
1057
+ /**
1058
+ * Defaults specified in the {@link breez_sdk_spark} crate.
1059
+ */
1060
+ defaults: () => Partial<ConversionStep>;
1061
+ }>;
908
1062
  export type CreateIssuerTokenRequest = {
909
1063
  name: string;
910
1064
  ticker: string;
@@ -1650,6 +1804,10 @@ export declare const GetInfoRequest: Readonly<{
1650
1804
  * Response containing the balance of the wallet
1651
1805
  */
1652
1806
  export type GetInfoResponse = {
1807
+ /**
1808
+ * The identity public key of the wallet as a hex string
1809
+ */
1810
+ identityPubkey: string;
1653
1811
  /**
1654
1812
  * The balance in satoshis
1655
1813
  */
@@ -1953,7 +2111,7 @@ export declare const LightningAddressDetails: Readonly<{
1953
2111
  export type LightningAddressInfo = {
1954
2112
  description: string;
1955
2113
  lightningAddress: string;
1956
- lnurl: string;
2114
+ lnurl: LnurlInfo;
1957
2115
  username: string;
1958
2116
  };
1959
2117
  /**
@@ -2220,6 +2378,29 @@ export declare const LnurlErrorDetails: Readonly<{
2220
2378
  */
2221
2379
  defaults: () => Partial<LnurlErrorDetails>;
2222
2380
  }>;
2381
+ export type LnurlInfo = {
2382
+ url: string;
2383
+ bech32: string;
2384
+ };
2385
+ /**
2386
+ * Generated factory for {@link LnurlInfo} record objects.
2387
+ */
2388
+ export declare const LnurlInfo: Readonly<{
2389
+ /**
2390
+ * Create a frozen instance of {@link LnurlInfo}, with defaults specified
2391
+ * in Rust, in the {@link breez_sdk_spark} crate.
2392
+ */
2393
+ create: (partial: Partial<LnurlInfo> & Required<Omit<LnurlInfo, never>>) => LnurlInfo;
2394
+ /**
2395
+ * Create a frozen instance of {@link LnurlInfo}, with defaults specified
2396
+ * in Rust, in the {@link breez_sdk_spark} crate.
2397
+ */
2398
+ new: (partial: Partial<LnurlInfo> & Required<Omit<LnurlInfo, never>>) => LnurlInfo;
2399
+ /**
2400
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2401
+ */
2402
+ defaults: () => Partial<LnurlInfo>;
2403
+ }>;
2223
2404
  /**
2224
2405
  * Represents the payment LNURL info
2225
2406
  */
@@ -2777,6 +2958,10 @@ export type Payment = {
2777
2958
  * Details of the payment
2778
2959
  */
2779
2960
  details: PaymentDetails | undefined;
2961
+ /**
2962
+ * If set, this payment involved a conversion before the payment
2963
+ */
2964
+ conversionDetails: ConversionDetails | undefined;
2780
2965
  };
2781
2966
  /**
2782
2967
  * Generated factory for {@link Payment} record objects.
@@ -2850,10 +3035,21 @@ export declare const PaymentRequestSource: Readonly<{
2850
3035
  defaults: () => Partial<PaymentRequestSource>;
2851
3036
  }>;
2852
3037
  export type PrepareLnurlPayRequest = {
3038
+ /**
3039
+ * The amount to send in satoshis.
3040
+ */
2853
3041
  amountSats: bigint;
2854
3042
  payRequest: LnurlPayRequestDetails;
2855
3043
  comment: string | undefined;
2856
3044
  validateSuccessActionUrl: boolean | undefined;
3045
+ /**
3046
+ * If provided, the payment will include a token conversion step before sending the payment
3047
+ */
3048
+ conversionOptions: ConversionOptions | undefined;
3049
+ /**
3050
+ * How fees should be handled. Defaults to `FeesExcluded` (fees added on top).
3051
+ */
3052
+ feePolicy: FeePolicy | undefined;
2857
3053
  };
2858
3054
  /**
2859
3055
  * Generated factory for {@link PrepareLnurlPayRequest} record objects.
@@ -2863,24 +3059,39 @@ export declare const PrepareLnurlPayRequest: Readonly<{
2863
3059
  * Create a frozen instance of {@link PrepareLnurlPayRequest}, with defaults specified
2864
3060
  * in Rust, in the {@link breez_sdk_spark} crate.
2865
3061
  */
2866
- create: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl">>) => PrepareLnurlPayRequest;
3062
+ create: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl" | "conversionOptions" | "feePolicy">>) => PrepareLnurlPayRequest;
2867
3063
  /**
2868
3064
  * Create a frozen instance of {@link PrepareLnurlPayRequest}, with defaults specified
2869
3065
  * in Rust, in the {@link breez_sdk_spark} crate.
2870
3066
  */
2871
- new: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl">>) => PrepareLnurlPayRequest;
3067
+ new: (partial: Partial<PrepareLnurlPayRequest> & Required<Omit<PrepareLnurlPayRequest, "comment" | "validateSuccessActionUrl" | "conversionOptions" | "feePolicy">>) => PrepareLnurlPayRequest;
2872
3068
  /**
2873
3069
  * Defaults specified in the {@link breez_sdk_spark} crate.
2874
3070
  */
2875
3071
  defaults: () => Partial<PrepareLnurlPayRequest>;
2876
3072
  }>;
2877
3073
  export type PrepareLnurlPayResponse = {
3074
+ /**
3075
+ * The amount to send in satoshis.
3076
+ */
2878
3077
  amountSats: bigint;
2879
3078
  comment: string | undefined;
2880
3079
  payRequest: LnurlPayRequestDetails;
3080
+ /**
3081
+ * The fee in satoshis. For `FeesIncluded` operations, this represents the total fee
3082
+ * (including potential overpayment).
3083
+ */
2881
3084
  feeSats: bigint;
2882
3085
  invoiceDetails: Bolt11InvoiceDetails;
2883
3086
  successAction: SuccessAction | undefined;
3087
+ /**
3088
+ * When set, the payment will include a token conversion step before sending the payment
3089
+ */
3090
+ conversionEstimate: ConversionEstimate | undefined;
3091
+ /**
3092
+ * How fees are handled for this payment.
3093
+ */
3094
+ feePolicy: FeePolicy;
2884
3095
  };
2885
3096
  /**
2886
3097
  * Generated factory for {@link PrepareLnurlPayResponse} record objects.
@@ -2904,19 +3115,25 @@ export declare const PrepareLnurlPayResponse: Readonly<{
2904
3115
  export type PrepareSendPaymentRequest = {
2905
3116
  paymentRequest: string;
2906
3117
  /**
2907
- * Amount to send. By default is denominated in sats.
2908
- * If a token identifier is provided, the amount will be denominated in the token base units.
3118
+ * The amount to send.
3119
+ * Optional for payment requests with embedded amounts (e.g., Spark/Bolt11 invoices with amounts).
3120
+ * Required for Spark addresses, Bitcoin addresses, and amountless invoices.
3121
+ * Denominated in satoshis for Bitcoin payments, or token base units for token payments.
2909
3122
  */
2910
3123
  amount: U128 | undefined;
2911
3124
  /**
2912
- * If provided, the payment will be for a token.
2913
- * May only be provided if the payment request is a spark address.
3125
+ * Optional token identifier for token payments.
3126
+ * Absence indicates that the payment is a Bitcoin payment.
2914
3127
  */
2915
3128
  tokenIdentifier: string | undefined;
2916
3129
  /**
2917
3130
  * If provided, the payment will include a conversion step before sending the payment
2918
3131
  */
2919
3132
  conversionOptions: ConversionOptions | undefined;
3133
+ /**
3134
+ * How fees should be handled. Defaults to `FeesExcluded` (fees added on top).
3135
+ */
3136
+ feePolicy: FeePolicy | undefined;
2920
3137
  };
2921
3138
  /**
2922
3139
  * Generated factory for {@link PrepareSendPaymentRequest} record objects.
@@ -2926,12 +3143,12 @@ export declare const PrepareSendPaymentRequest: Readonly<{
2926
3143
  * Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
2927
3144
  * in Rust, in the {@link breez_sdk_spark} crate.
2928
3145
  */
2929
- create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
3146
+ create: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions" | "feePolicy">>) => PrepareSendPaymentRequest;
2930
3147
  /**
2931
3148
  * Create a frozen instance of {@link PrepareSendPaymentRequest}, with defaults specified
2932
3149
  * in Rust, in the {@link breez_sdk_spark} crate.
2933
3150
  */
2934
- new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions">>) => PrepareSendPaymentRequest;
3151
+ new: (partial: Partial<PrepareSendPaymentRequest> & Required<Omit<PrepareSendPaymentRequest, "amount" | "tokenIdentifier" | "conversionOptions" | "feePolicy">>) => PrepareSendPaymentRequest;
2935
3152
  /**
2936
3153
  * Defaults specified in the {@link breez_sdk_spark} crate.
2937
3154
  */
@@ -2940,19 +3157,23 @@ export declare const PrepareSendPaymentRequest: Readonly<{
2940
3157
  export type PrepareSendPaymentResponse = {
2941
3158
  paymentMethod: SendPaymentMethod;
2942
3159
  /**
2943
- * Amount to send. By default is denominated in sats.
2944
- * If a token identifier is provided, the amount will be denominated in the token base units.
3160
+ * The amount for the payment.
3161
+ * Denominated in satoshis for Bitcoin payments, or token base units for token payments.
2945
3162
  */
2946
3163
  amount: U128;
2947
3164
  /**
2948
- * The presence of this field indicates that the payment is for a token.
2949
- * If empty, it is a Bitcoin payment.
3165
+ * Optional token identifier for token payments.
3166
+ * Absence indicates that the payment is a Bitcoin payment.
2950
3167
  */
2951
3168
  tokenIdentifier: string | undefined;
2952
3169
  /**
2953
3170
  * When set, the payment will include a conversion step before sending the payment
2954
3171
  */
2955
3172
  conversionEstimate: ConversionEstimate | undefined;
3173
+ /**
3174
+ * How fees are handled for this payment.
3175
+ */
3176
+ feePolicy: FeePolicy;
2956
3177
  };
2957
3178
  /**
2958
3179
  * Generated factory for {@link PrepareSendPaymentResponse} record objects.
@@ -3161,7 +3382,7 @@ export type RecordChange = {
3161
3382
  id: RecordId;
3162
3383
  schemaVersion: string;
3163
3384
  updatedFields: Map<string, string>;
3164
- revision: bigint;
3385
+ localRevision: bigint;
3165
3386
  };
3166
3387
  /**
3167
3388
  * Generated factory for {@link RecordChange} record objects.
@@ -3753,6 +3974,96 @@ export declare const SparkInvoicePaymentDetails: Readonly<{
3753
3974
  */
3754
3975
  defaults: () => Partial<SparkInvoicePaymentDetails>;
3755
3976
  }>;
3977
+ /**
3978
+ * The status of the Spark network services relevant to the SDK.
3979
+ */
3980
+ export type SparkStatus = {
3981
+ /**
3982
+ * The worst status across all relevant services.
3983
+ */
3984
+ status: ServiceStatus;
3985
+ /**
3986
+ * The last time the status was updated, as a unix timestamp in seconds.
3987
+ */
3988
+ lastUpdated: bigint;
3989
+ };
3990
+ /**
3991
+ * Generated factory for {@link SparkStatus} record objects.
3992
+ */
3993
+ export declare const SparkStatus: Readonly<{
3994
+ /**
3995
+ * Create a frozen instance of {@link SparkStatus}, with defaults specified
3996
+ * in Rust, in the {@link breez_sdk_spark} crate.
3997
+ */
3998
+ create: (partial: Partial<SparkStatus> & Required<Omit<SparkStatus, never>>) => SparkStatus;
3999
+ /**
4000
+ * Create a frozen instance of {@link SparkStatus}, with defaults specified
4001
+ * in Rust, in the {@link breez_sdk_spark} crate.
4002
+ */
4003
+ new: (partial: Partial<SparkStatus> & Required<Omit<SparkStatus, never>>) => SparkStatus;
4004
+ /**
4005
+ * Defaults specified in the {@link breez_sdk_spark} crate.
4006
+ */
4007
+ defaults: () => Partial<SparkStatus>;
4008
+ }>;
4009
+ /**
4010
+ * Configuration for automatic conversion of Bitcoin to stable tokens.
4011
+ *
4012
+ * When configured, the SDK automatically monitors the Bitcoin balance after each
4013
+ * wallet sync. When the balance exceeds the configured threshold plus the reserved
4014
+ * amount, the SDK automatically converts the excess balance (above the reserve)
4015
+ * to the specified stable token.
4016
+ *
4017
+ * When the balance is held in a stable token, Bitcoin payments can still be sent.
4018
+ * The SDK automatically detects when there's not enough Bitcoin balance to cover a
4019
+ * payment and auto-populates the token-to-Bitcoin conversion options to facilitate
4020
+ * the payment.
4021
+ */
4022
+ export type StableBalanceConfig = {
4023
+ /**
4024
+ * The token identifier to convert Bitcoin to (required).
4025
+ */
4026
+ tokenIdentifier: string;
4027
+ /**
4028
+ * The minimum sats balance that triggers auto-conversion.
4029
+ *
4030
+ * If not provided, uses the minimum from conversion limits.
4031
+ * If provided but less than the conversion limit minimum, the limit minimum is used.
4032
+ */
4033
+ thresholdSats: /*u64*/ bigint | undefined;
4034
+ /**
4035
+ * Maximum slippage in basis points (1/100 of a percent).
4036
+ *
4037
+ * Defaults to 50 bps (0.5%) if not set.
4038
+ */
4039
+ maxSlippageBps: /*u32*/ number | undefined;
4040
+ /**
4041
+ * Amount of sats to keep as Bitcoin and not convert to stable tokens.
4042
+ *
4043
+ * This reserve ensures you can send Bitcoin payments without hitting
4044
+ * the minimum conversion limit. Defaults to the conversion minimum if not set.
4045
+ */
4046
+ reservedSats: /*u64*/ bigint | undefined;
4047
+ };
4048
+ /**
4049
+ * Generated factory for {@link StableBalanceConfig} record objects.
4050
+ */
4051
+ export declare const StableBalanceConfig: Readonly<{
4052
+ /**
4053
+ * Create a frozen instance of {@link StableBalanceConfig}, with defaults specified
4054
+ * in Rust, in the {@link breez_sdk_spark} crate.
4055
+ */
4056
+ create: (partial: Partial<StableBalanceConfig> & Required<Omit<StableBalanceConfig, "maxSlippageBps" | "thresholdSats" | "reservedSats">>) => StableBalanceConfig;
4057
+ /**
4058
+ * Create a frozen instance of {@link StableBalanceConfig}, with defaults specified
4059
+ * in Rust, in the {@link breez_sdk_spark} crate.
4060
+ */
4061
+ new: (partial: Partial<StableBalanceConfig> & Required<Omit<StableBalanceConfig, "maxSlippageBps" | "thresholdSats" | "reservedSats">>) => StableBalanceConfig;
4062
+ /**
4063
+ * Defaults specified in the {@link breez_sdk_spark} crate.
4064
+ */
4065
+ defaults: () => Partial<StableBalanceConfig>;
4066
+ }>;
3756
4067
  /**
3757
4068
  * Settings for the symbol representation of a currency
3758
4069
  */
@@ -4598,7 +4909,8 @@ export declare const ChainServiceError: Readonly<{
4598
4909
  export type ChainServiceError = InstanceType<(typeof ChainServiceError)[keyof Omit<typeof ChainServiceError, 'instanceOf'>]>;
4599
4910
  export declare enum ConversionPurpose_Tags {
4600
4911
  OngoingPayment = "OngoingPayment",
4601
- SelfTransfer = "SelfTransfer"
4912
+ SelfTransfer = "SelfTransfer",
4913
+ AutoConversion = "AutoConversion"
4602
4914
  }
4603
4915
  /**
4604
4916
  * The purpose of the conversion, which is used to provide context for the conversion
@@ -4675,6 +4987,32 @@ export declare const ConversionPurpose: Readonly<{
4675
4987
  readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4676
4988
  };
4677
4989
  };
4990
+ AutoConversion: {
4991
+ new (): {
4992
+ readonly tag: ConversionPurpose_Tags.AutoConversion;
4993
+ /**
4994
+ * @private
4995
+ * This field is private and should not be used, use `tag` instead.
4996
+ */
4997
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
4998
+ };
4999
+ "new"(): {
5000
+ readonly tag: ConversionPurpose_Tags.AutoConversion;
5001
+ /**
5002
+ * @private
5003
+ * This field is private and should not be used, use `tag` instead.
5004
+ */
5005
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
5006
+ };
5007
+ instanceOf(obj: any): obj is {
5008
+ readonly tag: ConversionPurpose_Tags.AutoConversion;
5009
+ /**
5010
+ * @private
5011
+ * This field is private and should not be used, use `tag` instead.
5012
+ */
5013
+ readonly [uniffiTypeNameSymbol]: "ConversionPurpose";
5014
+ };
5015
+ };
4678
5016
  }>;
4679
5017
  /**
4680
5018
  * The purpose of the conversion, which is used to provide context for the conversion
@@ -5193,6 +5531,21 @@ export declare const Fee: Readonly<{
5193
5531
  };
5194
5532
  }>;
5195
5533
  export type Fee = InstanceType<(typeof Fee)[keyof Omit<typeof Fee, 'instanceOf'>]>;
5534
+ /**
5535
+ * Specifies how fees are handled in a payment.
5536
+ */
5537
+ export declare enum FeePolicy {
5538
+ /**
5539
+ * Fees are added on top of the specified amount (default behavior).
5540
+ * The receiver gets the exact amount specified.
5541
+ */
5542
+ FeesExcluded = 0,
5543
+ /**
5544
+ * Fees are deducted from the specified amount.
5545
+ * The receiver gets the amount minus fees.
5546
+ */
5547
+ FeesIncluded = 1
5548
+ }
5196
5549
  export declare enum InputType_Tags {
5197
5550
  BitcoinAddress = "BitcoinAddress",
5198
5551
  Bolt11Invoice = "Bolt11Invoice",
@@ -6126,6 +6479,7 @@ export declare const PaymentDetails: Readonly<{
6126
6479
  new (inner: {
6127
6480
  metadata: TokenMetadata;
6128
6481
  txHash: string;
6482
+ txType: TokenTransactionType;
6129
6483
  /**
6130
6484
  * The invoice details if the payment fulfilled a spark invoice
6131
6485
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
@@ -6137,6 +6491,7 @@ export declare const PaymentDetails: Readonly<{
6137
6491
  readonly inner: Readonly<{
6138
6492
  metadata: TokenMetadata;
6139
6493
  txHash: string;
6494
+ txType: TokenTransactionType;
6140
6495
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
6141
6496
  conversionInfo: ConversionInfo | undefined;
6142
6497
  }>;
@@ -6149,6 +6504,7 @@ export declare const PaymentDetails: Readonly<{
6149
6504
  "new"(inner: {
6150
6505
  metadata: TokenMetadata;
6151
6506
  txHash: string;
6507
+ txType: TokenTransactionType;
6152
6508
  /**
6153
6509
  * The invoice details if the payment fulfilled a spark invoice
6154
6510
  */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
@@ -6160,6 +6516,7 @@ export declare const PaymentDetails: Readonly<{
6160
6516
  readonly inner: Readonly<{
6161
6517
  metadata: TokenMetadata;
6162
6518
  txHash: string;
6519
+ txType: TokenTransactionType;
6163
6520
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
6164
6521
  conversionInfo: ConversionInfo | undefined;
6165
6522
  }>;
@@ -6174,6 +6531,7 @@ export declare const PaymentDetails: Readonly<{
6174
6531
  readonly inner: Readonly<{
6175
6532
  metadata: TokenMetadata;
6176
6533
  txHash: string;
6534
+ txType: TokenTransactionType;
6177
6535
  invoiceDetails: SparkInvoicePaymentDetails | undefined;
6178
6536
  conversionInfo: ConversionInfo | undefined;
6179
6537
  }>;
@@ -6189,20 +6547,17 @@ export declare const PaymentDetails: Readonly<{
6189
6547
  /**
6190
6548
  * Represents the invoice description
6191
6549
  */ description: string | undefined;
6192
- /**
6193
- * The preimage of the paid invoice (proof of payment).
6194
- */ preimage: string | undefined;
6195
6550
  /**
6196
6551
  * Represents the Bolt11/Bolt12 invoice associated with a payment
6197
6552
  * In the case of a Send payment, this is the invoice paid by the user
6198
6553
  * In the case of a Receive payment, this is the invoice paid to the user
6199
6554
  */ invoice: string;
6200
- /**
6201
- * The payment hash of the invoice
6202
- */ paymentHash: string;
6203
6555
  /**
6204
6556
  * The invoice destination/payee pubkey
6205
6557
  */ destinationPubkey: string;
6558
+ /**
6559
+ * The HTLC transfer details
6560
+ */ htlcDetails: SparkHtlcDetails;
6206
6561
  /**
6207
6562
  * Lnurl payment information if this was an lnurl payment.
6208
6563
  */ lnurlPayInfo: LnurlPayInfo | undefined;
@@ -6216,10 +6571,9 @@ export declare const PaymentDetails: Readonly<{
6216
6571
  readonly tag: PaymentDetails_Tags.Lightning;
6217
6572
  readonly inner: Readonly<{
6218
6573
  description: string | undefined;
6219
- preimage: string | undefined;
6220
6574
  invoice: string;
6221
- paymentHash: string;
6222
6575
  destinationPubkey: string;
6576
+ htlcDetails: SparkHtlcDetails;
6223
6577
  lnurlPayInfo: LnurlPayInfo | undefined;
6224
6578
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
6225
6579
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -6234,20 +6588,17 @@ export declare const PaymentDetails: Readonly<{
6234
6588
  /**
6235
6589
  * Represents the invoice description
6236
6590
  */ description: string | undefined;
6237
- /**
6238
- * The preimage of the paid invoice (proof of payment).
6239
- */ preimage: string | undefined;
6240
6591
  /**
6241
6592
  * Represents the Bolt11/Bolt12 invoice associated with a payment
6242
6593
  * In the case of a Send payment, this is the invoice paid by the user
6243
6594
  * In the case of a Receive payment, this is the invoice paid to the user
6244
6595
  */ invoice: string;
6245
- /**
6246
- * The payment hash of the invoice
6247
- */ paymentHash: string;
6248
6596
  /**
6249
6597
  * The invoice destination/payee pubkey
6250
6598
  */ destinationPubkey: string;
6599
+ /**
6600
+ * The HTLC transfer details
6601
+ */ htlcDetails: SparkHtlcDetails;
6251
6602
  /**
6252
6603
  * Lnurl payment information if this was an lnurl payment.
6253
6604
  */ lnurlPayInfo: LnurlPayInfo | undefined;
@@ -6261,10 +6612,9 @@ export declare const PaymentDetails: Readonly<{
6261
6612
  readonly tag: PaymentDetails_Tags.Lightning;
6262
6613
  readonly inner: Readonly<{
6263
6614
  description: string | undefined;
6264
- preimage: string | undefined;
6265
6615
  invoice: string;
6266
- paymentHash: string;
6267
6616
  destinationPubkey: string;
6617
+ htlcDetails: SparkHtlcDetails;
6268
6618
  lnurlPayInfo: LnurlPayInfo | undefined;
6269
6619
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
6270
6620
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -6279,10 +6629,9 @@ export declare const PaymentDetails: Readonly<{
6279
6629
  readonly tag: PaymentDetails_Tags.Lightning;
6280
6630
  readonly inner: Readonly<{
6281
6631
  description: string | undefined;
6282
- preimage: string | undefined;
6283
6632
  invoice: string;
6284
- paymentHash: string;
6285
6633
  destinationPubkey: string;
6634
+ htlcDetails: SparkHtlcDetails;
6286
6635
  lnurlPayInfo: LnurlPayInfo | undefined;
6287
6636
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
6288
6637
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -6376,7 +6725,8 @@ export declare const PaymentDetails: Readonly<{
6376
6725
  export type PaymentDetails = InstanceType<(typeof PaymentDetails)[keyof Omit<typeof PaymentDetails, 'instanceOf'>]>;
6377
6726
  export declare enum PaymentDetailsFilter_Tags {
6378
6727
  Spark = "Spark",
6379
- Token = "Token"
6728
+ Token = "Token",
6729
+ Lightning = "Lightning"
6380
6730
  }
6381
6731
  export declare const PaymentDetailsFilter: Readonly<{
6382
6732
  instanceOf: (obj: any) => obj is PaymentDetailsFilter;
@@ -6440,11 +6790,15 @@ export declare const PaymentDetailsFilter: Readonly<{
6440
6790
  /**
6441
6791
  * Filter by transaction hash
6442
6792
  */ txHash: string | undefined;
6793
+ /**
6794
+ * Filter by transaction type
6795
+ */ txType: TokenTransactionType | undefined;
6443
6796
  }): {
6444
6797
  readonly tag: PaymentDetailsFilter_Tags.Token;
6445
6798
  readonly inner: Readonly<{
6446
6799
  conversionRefundNeeded: boolean | undefined;
6447
6800
  txHash: string | undefined;
6801
+ txType: TokenTransactionType | undefined;
6448
6802
  }>;
6449
6803
  /**
6450
6804
  * @private
@@ -6459,11 +6813,15 @@ export declare const PaymentDetailsFilter: Readonly<{
6459
6813
  /**
6460
6814
  * Filter by transaction hash
6461
6815
  */ txHash: string | undefined;
6816
+ /**
6817
+ * Filter by transaction type
6818
+ */ txType: TokenTransactionType | undefined;
6462
6819
  }): {
6463
6820
  readonly tag: PaymentDetailsFilter_Tags.Token;
6464
6821
  readonly inner: Readonly<{
6465
6822
  conversionRefundNeeded: boolean | undefined;
6466
6823
  txHash: string | undefined;
6824
+ txType: TokenTransactionType | undefined;
6467
6825
  }>;
6468
6826
  /**
6469
6827
  * @private
@@ -6476,6 +6834,7 @@ export declare const PaymentDetailsFilter: Readonly<{
6476
6834
  readonly inner: Readonly<{
6477
6835
  conversionRefundNeeded: boolean | undefined;
6478
6836
  txHash: string | undefined;
6837
+ txType: TokenTransactionType | undefined;
6479
6838
  }>;
6480
6839
  /**
6481
6840
  * @private
@@ -6484,38 +6843,81 @@ export declare const PaymentDetailsFilter: Readonly<{
6484
6843
  readonly [uniffiTypeNameSymbol]: "PaymentDetailsFilter";
6485
6844
  };
6486
6845
  };
6487
- }>;
6488
- export type PaymentDetailsFilter = InstanceType<(typeof PaymentDetailsFilter)[keyof Omit<typeof PaymentDetailsFilter, 'instanceOf'>]>;
6489
- export declare enum PaymentMethod {
6490
- Lightning = 0,
6491
- Spark = 1,
6492
- Token = 2,
6493
- Deposit = 3,
6494
- Withdraw = 4,
6495
- Unknown = 5
6496
- }
6497
- export declare enum PaymentObserverError_Tags {
6498
- ServiceConnectivity = "ServiceConnectivity",
6499
- Generic = "Generic"
6500
- }
6501
- export declare const PaymentObserverError: Readonly<{
6502
- instanceOf: (obj: any) => obj is PaymentObserverError;
6503
- ServiceConnectivity: {
6504
- new (v0: string): {
6505
- readonly tag: PaymentObserverError_Tags.ServiceConnectivity;
6506
- readonly inner: Readonly<[string]>;
6846
+ Lightning: {
6847
+ new (inner: {
6848
+ /**
6849
+ * Filter specific Spark HTLC statuses
6850
+ */ htlcStatus: Array<SparkHtlcStatus> | undefined;
6851
+ }): {
6852
+ readonly tag: PaymentDetailsFilter_Tags.Lightning;
6853
+ readonly inner: Readonly<{
6854
+ htlcStatus: Array<SparkHtlcStatus> | undefined;
6855
+ }>;
6507
6856
  /**
6508
6857
  * @private
6509
6858
  * This field is private and should not be used, use `tag` instead.
6510
6859
  */
6511
- readonly [uniffiTypeNameSymbol]: "PaymentObserverError";
6512
- name: string;
6513
- message: string;
6514
- stack?: string;
6515
- cause?: unknown;
6860
+ readonly [uniffiTypeNameSymbol]: "PaymentDetailsFilter";
6516
6861
  };
6517
- "new"(v0: string): {
6518
- readonly tag: PaymentObserverError_Tags.ServiceConnectivity;
6862
+ "new"(inner: {
6863
+ /**
6864
+ * Filter specific Spark HTLC statuses
6865
+ */ htlcStatus: Array<SparkHtlcStatus> | undefined;
6866
+ }): {
6867
+ readonly tag: PaymentDetailsFilter_Tags.Lightning;
6868
+ readonly inner: Readonly<{
6869
+ htlcStatus: Array<SparkHtlcStatus> | undefined;
6870
+ }>;
6871
+ /**
6872
+ * @private
6873
+ * This field is private and should not be used, use `tag` instead.
6874
+ */
6875
+ readonly [uniffiTypeNameSymbol]: "PaymentDetailsFilter";
6876
+ };
6877
+ instanceOf(obj: any): obj is {
6878
+ readonly tag: PaymentDetailsFilter_Tags.Lightning;
6879
+ readonly inner: Readonly<{
6880
+ htlcStatus: Array<SparkHtlcStatus> | undefined;
6881
+ }>;
6882
+ /**
6883
+ * @private
6884
+ * This field is private and should not be used, use `tag` instead.
6885
+ */
6886
+ readonly [uniffiTypeNameSymbol]: "PaymentDetailsFilter";
6887
+ };
6888
+ };
6889
+ }>;
6890
+ export type PaymentDetailsFilter = InstanceType<(typeof PaymentDetailsFilter)[keyof Omit<typeof PaymentDetailsFilter, 'instanceOf'>]>;
6891
+ export declare enum PaymentMethod {
6892
+ Lightning = 0,
6893
+ Spark = 1,
6894
+ Token = 2,
6895
+ Deposit = 3,
6896
+ Withdraw = 4,
6897
+ Unknown = 5
6898
+ }
6899
+ export declare enum PaymentObserverError_Tags {
6900
+ ServiceConnectivity = "ServiceConnectivity",
6901
+ Generic = "Generic"
6902
+ }
6903
+ export declare const PaymentObserverError: Readonly<{
6904
+ instanceOf: (obj: any) => obj is PaymentObserverError;
6905
+ ServiceConnectivity: {
6906
+ new (v0: string): {
6907
+ readonly tag: PaymentObserverError_Tags.ServiceConnectivity;
6908
+ readonly inner: Readonly<[string]>;
6909
+ /**
6910
+ * @private
6911
+ * This field is private and should not be used, use `tag` instead.
6912
+ */
6913
+ readonly [uniffiTypeNameSymbol]: "PaymentObserverError";
6914
+ name: string;
6915
+ message: string;
6916
+ stack?: string;
6917
+ cause?: unknown;
6918
+ };
6919
+ "new"(v0: string): {
6920
+ readonly tag: PaymentObserverError_Tags.ServiceConnectivity;
6519
6921
  readonly inner: Readonly<[string]>;
6520
6922
  /**
6521
6923
  * @private
@@ -7013,12 +7415,18 @@ export declare const ReceivePaymentMethod: Readonly<{
7013
7415
  /**
7014
7416
  * The expiry of the invoice as a duration in seconds
7015
7417
  */ expirySecs: /*u32*/ number | undefined;
7418
+ /**
7419
+ * If set, creates a HODL invoice with this payment hash (hex-encoded).
7420
+ * The payer's HTLC will be held until the preimage is provided via
7421
+ * `claim_htlc_payment` or the HTLC expires.
7422
+ */ paymentHash: string | undefined;
7016
7423
  }): {
7017
7424
  readonly tag: ReceivePaymentMethod_Tags.Bolt11Invoice;
7018
7425
  readonly inner: Readonly<{
7019
7426
  description: string;
7020
7427
  amountSats: /*u64*/ bigint | undefined;
7021
7428
  expirySecs: /*u32*/ number | undefined;
7429
+ paymentHash: string | undefined;
7022
7430
  }>;
7023
7431
  /**
7024
7432
  * @private
@@ -7032,12 +7440,18 @@ export declare const ReceivePaymentMethod: Readonly<{
7032
7440
  /**
7033
7441
  * The expiry of the invoice as a duration in seconds
7034
7442
  */ expirySecs: /*u32*/ number | undefined;
7443
+ /**
7444
+ * If set, creates a HODL invoice with this payment hash (hex-encoded).
7445
+ * The payer's HTLC will be held until the preimage is provided via
7446
+ * `claim_htlc_payment` or the HTLC expires.
7447
+ */ paymentHash: string | undefined;
7035
7448
  }): {
7036
7449
  readonly tag: ReceivePaymentMethod_Tags.Bolt11Invoice;
7037
7450
  readonly inner: Readonly<{
7038
7451
  description: string;
7039
7452
  amountSats: /*u64*/ bigint | undefined;
7040
7453
  expirySecs: /*u32*/ number | undefined;
7454
+ paymentHash: string | undefined;
7041
7455
  }>;
7042
7456
  /**
7043
7457
  * @private
@@ -7051,6 +7465,7 @@ export declare const ReceivePaymentMethod: Readonly<{
7051
7465
  description: string;
7052
7466
  amountSats: /*u64*/ bigint | undefined;
7053
7467
  expirySecs: /*u32*/ number | undefined;
7468
+ paymentHash: string | undefined;
7054
7469
  }>;
7055
7470
  /**
7056
7471
  * @private
@@ -8602,7 +9017,9 @@ export declare const SendPaymentOptions: Readonly<{
8602
9017
  instanceOf: (obj: any) => obj is SendPaymentOptions;
8603
9018
  BitcoinAddress: {
8604
9019
  new (inner: {
8605
- confirmationSpeed: OnchainConfirmationSpeed;
9020
+ /**
9021
+ * Confirmation speed for the on-chain transaction.
9022
+ */ confirmationSpeed: OnchainConfirmationSpeed;
8606
9023
  }): {
8607
9024
  readonly tag: SendPaymentOptions_Tags.BitcoinAddress;
8608
9025
  readonly inner: Readonly<{
@@ -8615,7 +9032,9 @@ export declare const SendPaymentOptions: Readonly<{
8615
9032
  readonly [uniffiTypeNameSymbol]: "SendPaymentOptions";
8616
9033
  };
8617
9034
  "new"(inner: {
8618
- confirmationSpeed: OnchainConfirmationSpeed;
9035
+ /**
9036
+ * Confirmation speed for the on-chain transaction.
9037
+ */ confirmationSpeed: OnchainConfirmationSpeed;
8619
9038
  }): {
8620
9039
  readonly tag: SendPaymentOptions_Tags.BitcoinAddress;
8621
9040
  readonly inner: Readonly<{
@@ -9486,6 +9905,31 @@ export declare const ServiceConnectivityError: Readonly<{
9486
9905
  };
9487
9906
  }>;
9488
9907
  export type ServiceConnectivityError = InstanceType<(typeof ServiceConnectivityError)[keyof Omit<typeof ServiceConnectivityError, 'instanceOf'>]>;
9908
+ /**
9909
+ * The operational status of a Spark service.
9910
+ */
9911
+ export declare enum ServiceStatus {
9912
+ /**
9913
+ * Service is fully operational.
9914
+ */
9915
+ Operational = 0,
9916
+ /**
9917
+ * Service is experiencing degraded performance.
9918
+ */
9919
+ Degraded = 1,
9920
+ /**
9921
+ * Service is partially unavailable.
9922
+ */
9923
+ Partial = 2,
9924
+ /**
9925
+ * Service status is unknown.
9926
+ */
9927
+ Unknown = 3,
9928
+ /**
9929
+ * Service is experiencing a major outage.
9930
+ */
9931
+ Major = 4
9932
+ }
9489
9933
  export declare enum SignerError_Tags {
9490
9934
  KeyDerivation = "KeyDerivation",
9491
9935
  Signing = "Signing",
@@ -10017,6 +10461,7 @@ export declare enum SparkHtlcStatus {
10017
10461
  Returned = 2
10018
10462
  }
10019
10463
  export declare enum StorageError_Tags {
10464
+ Connection = "Connection",
10020
10465
  Implementation = "Implementation",
10021
10466
  InitializationError = "InitializationError",
10022
10467
  Serialization = "Serialization"
@@ -10026,6 +10471,77 @@ export declare enum StorageError_Tags {
10026
10471
  */
10027
10472
  export declare const StorageError: Readonly<{
10028
10473
  instanceOf: (obj: any) => obj is StorageError;
10474
+ Connection: {
10475
+ new (v0: string): {
10476
+ readonly tag: StorageError_Tags.Connection;
10477
+ readonly inner: Readonly<[string]>;
10478
+ /**
10479
+ * @private
10480
+ * This field is private and should not be used, use `tag` instead.
10481
+ */
10482
+ readonly [uniffiTypeNameSymbol]: "StorageError";
10483
+ name: string;
10484
+ message: string;
10485
+ stack?: string;
10486
+ cause?: unknown;
10487
+ };
10488
+ "new"(v0: string): {
10489
+ readonly tag: StorageError_Tags.Connection;
10490
+ readonly inner: Readonly<[string]>;
10491
+ /**
10492
+ * @private
10493
+ * This field is private and should not be used, use `tag` instead.
10494
+ */
10495
+ readonly [uniffiTypeNameSymbol]: "StorageError";
10496
+ name: string;
10497
+ message: string;
10498
+ stack?: string;
10499
+ cause?: unknown;
10500
+ };
10501
+ instanceOf(obj: any): obj is {
10502
+ readonly tag: StorageError_Tags.Connection;
10503
+ readonly inner: Readonly<[string]>;
10504
+ /**
10505
+ * @private
10506
+ * This field is private and should not be used, use `tag` instead.
10507
+ */
10508
+ readonly [uniffiTypeNameSymbol]: "StorageError";
10509
+ name: string;
10510
+ message: string;
10511
+ stack?: string;
10512
+ cause?: unknown;
10513
+ };
10514
+ hasInner(obj: any): obj is {
10515
+ readonly tag: StorageError_Tags.Connection;
10516
+ readonly inner: Readonly<[string]>;
10517
+ /**
10518
+ * @private
10519
+ * This field is private and should not be used, use `tag` instead.
10520
+ */
10521
+ readonly [uniffiTypeNameSymbol]: "StorageError";
10522
+ name: string;
10523
+ message: string;
10524
+ stack?: string;
10525
+ cause?: unknown;
10526
+ };
10527
+ getInner(obj: {
10528
+ readonly tag: StorageError_Tags.Connection;
10529
+ readonly inner: Readonly<[string]>;
10530
+ /**
10531
+ * @private
10532
+ * This field is private and should not be used, use `tag` instead.
10533
+ */
10534
+ readonly [uniffiTypeNameSymbol]: "StorageError";
10535
+ name: string;
10536
+ message: string;
10537
+ stack?: string;
10538
+ cause?: unknown;
10539
+ }): Readonly<[string]>;
10540
+ isError(error: unknown): error is Error;
10541
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
10542
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
10543
+ stackTraceLimit: number;
10544
+ };
10029
10545
  Implementation: {
10030
10546
  new (v0: string): {
10031
10547
  readonly tag: StorageError_Tags.Implementation;
@@ -10518,321 +11034,98 @@ export declare const SuccessActionProcessed: Readonly<{
10518
11034
  * Contents are identical to [`SuccessAction`], except for AES where the ciphertext is decrypted.
10519
11035
  */
10520
11036
  export type SuccessActionProcessed = InstanceType<(typeof SuccessActionProcessed)[keyof Omit<typeof SuccessActionProcessed, 'instanceOf'>]>;
10521
- export declare enum SyncStorageError_Tags {
10522
- Implementation = "Implementation",
10523
- InitializationError = "InitializationError",
10524
- Serialization = "Serialization"
11037
+ export declare enum TokenTransactionType {
11038
+ Transfer = 0,
11039
+ Mint = 1,
11040
+ Burn = 2
10525
11041
  }
10526
- /**
10527
- * Errors that can occur during storage operations
10528
- */
10529
- export declare const SyncStorageError: Readonly<{
10530
- instanceOf: (obj: any) => obj is SyncStorageError;
10531
- Implementation: {
10532
- new (v0: string): {
10533
- readonly tag: SyncStorageError_Tags.Implementation;
10534
- readonly inner: Readonly<[string]>;
11042
+ export declare enum UpdateDepositPayload_Tags {
11043
+ ClaimError = "ClaimError",
11044
+ Refund = "Refund"
11045
+ }
11046
+ export declare const UpdateDepositPayload: Readonly<{
11047
+ instanceOf: (obj: any) => obj is UpdateDepositPayload;
11048
+ ClaimError: {
11049
+ new (inner: {
11050
+ error: DepositClaimError;
11051
+ }): {
11052
+ readonly tag: UpdateDepositPayload_Tags.ClaimError;
11053
+ readonly inner: Readonly<{
11054
+ error: DepositClaimError;
11055
+ }>;
10535
11056
  /**
10536
11057
  * @private
10537
11058
  * This field is private and should not be used, use `tag` instead.
10538
11059
  */
10539
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10540
- name: string;
10541
- message: string;
10542
- stack?: string;
10543
- cause?: unknown;
11060
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10544
11061
  };
10545
- "new"(v0: string): {
10546
- readonly tag: SyncStorageError_Tags.Implementation;
10547
- readonly inner: Readonly<[string]>;
11062
+ "new"(inner: {
11063
+ error: DepositClaimError;
11064
+ }): {
11065
+ readonly tag: UpdateDepositPayload_Tags.ClaimError;
11066
+ readonly inner: Readonly<{
11067
+ error: DepositClaimError;
11068
+ }>;
10548
11069
  /**
10549
11070
  * @private
10550
11071
  * This field is private and should not be used, use `tag` instead.
10551
11072
  */
10552
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10553
- name: string;
10554
- message: string;
10555
- stack?: string;
10556
- cause?: unknown;
11073
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10557
11074
  };
10558
11075
  instanceOf(obj: any): obj is {
10559
- readonly tag: SyncStorageError_Tags.Implementation;
10560
- readonly inner: Readonly<[string]>;
11076
+ readonly tag: UpdateDepositPayload_Tags.ClaimError;
11077
+ readonly inner: Readonly<{
11078
+ error: DepositClaimError;
11079
+ }>;
10561
11080
  /**
10562
11081
  * @private
10563
11082
  * This field is private and should not be used, use `tag` instead.
10564
11083
  */
10565
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10566
- name: string;
10567
- message: string;
10568
- stack?: string;
10569
- cause?: unknown;
11084
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10570
11085
  };
10571
- hasInner(obj: any): obj is {
10572
- readonly tag: SyncStorageError_Tags.Implementation;
10573
- readonly inner: Readonly<[string]>;
11086
+ };
11087
+ Refund: {
11088
+ new (inner: {
11089
+ refundTxid: string;
11090
+ refundTx: string;
11091
+ }): {
11092
+ readonly tag: UpdateDepositPayload_Tags.Refund;
11093
+ readonly inner: Readonly<{
11094
+ refundTxid: string;
11095
+ refundTx: string;
11096
+ }>;
10574
11097
  /**
10575
11098
  * @private
10576
11099
  * This field is private and should not be used, use `tag` instead.
10577
11100
  */
10578
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10579
- name: string;
10580
- message: string;
10581
- stack?: string;
10582
- cause?: unknown;
11101
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10583
11102
  };
10584
- getInner(obj: {
10585
- readonly tag: SyncStorageError_Tags.Implementation;
10586
- readonly inner: Readonly<[string]>;
10587
- /**
10588
- * @private
10589
- * This field is private and should not be used, use `tag` instead.
10590
- */
10591
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10592
- name: string;
10593
- message: string;
10594
- stack?: string;
10595
- cause?: unknown;
10596
- }): Readonly<[string]>;
10597
- isError(error: unknown): error is Error;
10598
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
10599
- prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
10600
- stackTraceLimit: number;
10601
- };
10602
- InitializationError: {
10603
- new (v0: string): {
10604
- readonly tag: SyncStorageError_Tags.InitializationError;
10605
- readonly inner: Readonly<[string]>;
11103
+ "new"(inner: {
11104
+ refundTxid: string;
11105
+ refundTx: string;
11106
+ }): {
11107
+ readonly tag: UpdateDepositPayload_Tags.Refund;
11108
+ readonly inner: Readonly<{
11109
+ refundTxid: string;
11110
+ refundTx: string;
11111
+ }>;
10606
11112
  /**
10607
11113
  * @private
10608
11114
  * This field is private and should not be used, use `tag` instead.
10609
11115
  */
10610
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10611
- name: string;
10612
- message: string;
10613
- stack?: string;
10614
- cause?: unknown;
11116
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10615
11117
  };
10616
- "new"(v0: string): {
10617
- readonly tag: SyncStorageError_Tags.InitializationError;
10618
- readonly inner: Readonly<[string]>;
11118
+ instanceOf(obj: any): obj is {
11119
+ readonly tag: UpdateDepositPayload_Tags.Refund;
11120
+ readonly inner: Readonly<{
11121
+ refundTxid: string;
11122
+ refundTx: string;
11123
+ }>;
10619
11124
  /**
10620
11125
  * @private
10621
11126
  * This field is private and should not be used, use `tag` instead.
10622
11127
  */
10623
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10624
- name: string;
10625
- message: string;
10626
- stack?: string;
10627
- cause?: unknown;
10628
- };
10629
- instanceOf(obj: any): obj is {
10630
- readonly tag: SyncStorageError_Tags.InitializationError;
10631
- readonly inner: Readonly<[string]>;
10632
- /**
10633
- * @private
10634
- * This field is private and should not be used, use `tag` instead.
10635
- */
10636
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10637
- name: string;
10638
- message: string;
10639
- stack?: string;
10640
- cause?: unknown;
10641
- };
10642
- hasInner(obj: any): obj is {
10643
- readonly tag: SyncStorageError_Tags.InitializationError;
10644
- readonly inner: Readonly<[string]>;
10645
- /**
10646
- * @private
10647
- * This field is private and should not be used, use `tag` instead.
10648
- */
10649
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10650
- name: string;
10651
- message: string;
10652
- stack?: string;
10653
- cause?: unknown;
10654
- };
10655
- getInner(obj: {
10656
- readonly tag: SyncStorageError_Tags.InitializationError;
10657
- readonly inner: Readonly<[string]>;
10658
- /**
10659
- * @private
10660
- * This field is private and should not be used, use `tag` instead.
10661
- */
10662
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10663
- name: string;
10664
- message: string;
10665
- stack?: string;
10666
- cause?: unknown;
10667
- }): Readonly<[string]>;
10668
- isError(error: unknown): error is Error;
10669
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
10670
- prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
10671
- stackTraceLimit: number;
10672
- };
10673
- Serialization: {
10674
- new (v0: string): {
10675
- readonly tag: SyncStorageError_Tags.Serialization;
10676
- readonly inner: Readonly<[string]>;
10677
- /**
10678
- * @private
10679
- * This field is private and should not be used, use `tag` instead.
10680
- */
10681
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10682
- name: string;
10683
- message: string;
10684
- stack?: string;
10685
- cause?: unknown;
10686
- };
10687
- "new"(v0: string): {
10688
- readonly tag: SyncStorageError_Tags.Serialization;
10689
- readonly inner: Readonly<[string]>;
10690
- /**
10691
- * @private
10692
- * This field is private and should not be used, use `tag` instead.
10693
- */
10694
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10695
- name: string;
10696
- message: string;
10697
- stack?: string;
10698
- cause?: unknown;
10699
- };
10700
- instanceOf(obj: any): obj is {
10701
- readonly tag: SyncStorageError_Tags.Serialization;
10702
- readonly inner: Readonly<[string]>;
10703
- /**
10704
- * @private
10705
- * This field is private and should not be used, use `tag` instead.
10706
- */
10707
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10708
- name: string;
10709
- message: string;
10710
- stack?: string;
10711
- cause?: unknown;
10712
- };
10713
- hasInner(obj: any): obj is {
10714
- readonly tag: SyncStorageError_Tags.Serialization;
10715
- readonly inner: Readonly<[string]>;
10716
- /**
10717
- * @private
10718
- * This field is private and should not be used, use `tag` instead.
10719
- */
10720
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10721
- name: string;
10722
- message: string;
10723
- stack?: string;
10724
- cause?: unknown;
10725
- };
10726
- getInner(obj: {
10727
- readonly tag: SyncStorageError_Tags.Serialization;
10728
- readonly inner: Readonly<[string]>;
10729
- /**
10730
- * @private
10731
- * This field is private and should not be used, use `tag` instead.
10732
- */
10733
- readonly [uniffiTypeNameSymbol]: "SyncStorageError";
10734
- name: string;
10735
- message: string;
10736
- stack?: string;
10737
- cause?: unknown;
10738
- }): Readonly<[string]>;
10739
- isError(error: unknown): error is Error;
10740
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
10741
- prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
10742
- stackTraceLimit: number;
10743
- };
10744
- }>;
10745
- /**
10746
- * Errors that can occur during storage operations
10747
- */
10748
- export type SyncStorageError = InstanceType<(typeof SyncStorageError)[keyof Omit<typeof SyncStorageError, 'instanceOf'>]>;
10749
- export declare enum UpdateDepositPayload_Tags {
10750
- ClaimError = "ClaimError",
10751
- Refund = "Refund"
10752
- }
10753
- export declare const UpdateDepositPayload: Readonly<{
10754
- instanceOf: (obj: any) => obj is UpdateDepositPayload;
10755
- ClaimError: {
10756
- new (inner: {
10757
- error: DepositClaimError;
10758
- }): {
10759
- readonly tag: UpdateDepositPayload_Tags.ClaimError;
10760
- readonly inner: Readonly<{
10761
- error: DepositClaimError;
10762
- }>;
10763
- /**
10764
- * @private
10765
- * This field is private and should not be used, use `tag` instead.
10766
- */
10767
- readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10768
- };
10769
- "new"(inner: {
10770
- error: DepositClaimError;
10771
- }): {
10772
- readonly tag: UpdateDepositPayload_Tags.ClaimError;
10773
- readonly inner: Readonly<{
10774
- error: DepositClaimError;
10775
- }>;
10776
- /**
10777
- * @private
10778
- * This field is private and should not be used, use `tag` instead.
10779
- */
10780
- readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10781
- };
10782
- instanceOf(obj: any): obj is {
10783
- readonly tag: UpdateDepositPayload_Tags.ClaimError;
10784
- readonly inner: Readonly<{
10785
- error: DepositClaimError;
10786
- }>;
10787
- /**
10788
- * @private
10789
- * This field is private and should not be used, use `tag` instead.
10790
- */
10791
- readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10792
- };
10793
- };
10794
- Refund: {
10795
- new (inner: {
10796
- refundTxid: string;
10797
- refundTx: string;
10798
- }): {
10799
- readonly tag: UpdateDepositPayload_Tags.Refund;
10800
- readonly inner: Readonly<{
10801
- refundTxid: string;
10802
- refundTx: string;
10803
- }>;
10804
- /**
10805
- * @private
10806
- * This field is private and should not be used, use `tag` instead.
10807
- */
10808
- readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10809
- };
10810
- "new"(inner: {
10811
- refundTxid: string;
10812
- refundTx: string;
10813
- }): {
10814
- readonly tag: UpdateDepositPayload_Tags.Refund;
10815
- readonly inner: Readonly<{
10816
- refundTxid: string;
10817
- refundTx: string;
10818
- }>;
10819
- /**
10820
- * @private
10821
- * This field is private and should not be used, use `tag` instead.
10822
- */
10823
- readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10824
- };
10825
- instanceOf(obj: any): obj is {
10826
- readonly tag: UpdateDepositPayload_Tags.Refund;
10827
- readonly inner: Readonly<{
10828
- refundTxid: string;
10829
- refundTx: string;
10830
- }>;
10831
- /**
10832
- * @private
10833
- * This field is private and should not be used, use `tag` instead.
10834
- */
10835
- readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
11128
+ readonly [uniffiTypeNameSymbol]: "UpdateDepositPayload";
10836
11129
  };
10837
11130
  };
10838
11131
  }>;
@@ -10899,6 +11192,24 @@ export interface BreezSdkInterface {
10899
11192
  addEventListener(listener: EventListener, asyncOpts_?: {
10900
11193
  signal: AbortSignal;
10901
11194
  }): Promise<string>;
11195
+ /**
11196
+ * Initiates a Bitcoin purchase flow via an external provider (`MoonPay`).
11197
+ *
11198
+ * This method generates a URL that the user can open in a browser to complete
11199
+ * the Bitcoin purchase. The purchased Bitcoin will be sent to an automatically
11200
+ * generated deposit address.
11201
+ *
11202
+ * # Arguments
11203
+ *
11204
+ * * `request` - The purchase request containing optional amount and redirect URL
11205
+ *
11206
+ * # Returns
11207
+ *
11208
+ * A response containing the URL to open in a browser to complete the purchase
11209
+ */
11210
+ buyBitcoin(request: BuyBitcoinRequest, asyncOpts_?: {
11211
+ signal: AbortSignal;
11212
+ }): Promise<BuyBitcoinResponse>;
10902
11213
  /**
10903
11214
  * Cancels the ongoing leaf optimization.
10904
11215
  *
@@ -11001,21 +11312,20 @@ export interface BreezSdkInterface {
11001
11312
  signal: AbortSignal;
11002
11313
  }): Promise<ListFiatRatesResponse>;
11003
11314
  /**
11004
- * Lists payments from the storage with pagination
11005
- *
11006
- * This method provides direct access to the payment history stored in the database.
11007
- * It returns payments in reverse chronological order (newest first).
11008
- *
11009
- * # Arguments
11010
- *
11011
- * * `request` - Contains pagination parameters (offset and limit)
11012
- *
11013
- * # Returns
11014
- *
11015
- * * `Ok(ListPaymentsResponse)` - Contains the list of payments if successful
11016
- * * `Err(SdkError)` - If there was an error accessing the storage
11017
-
11018
- */
11315
+ * Lists payments from the storage with pagination
11316
+ *
11317
+ * This method provides direct access to the payment history stored in the database.
11318
+ * It returns payments in reverse chronological order (newest first).
11319
+ *
11320
+ * # Arguments
11321
+ *
11322
+ * * `request` - Contains pagination parameters (offset and limit)
11323
+ *
11324
+ * # Returns
11325
+ *
11326
+ * * `Ok(ListPaymentsResponse)` - Contains the list of payments if successful
11327
+ * * `Err(SdkError)` - If there was an error accessing the storage
11328
+ */
11019
11329
  listPayments(request: ListPaymentsRequest, asyncOpts_?: {
11020
11330
  signal: AbortSignal;
11021
11331
  }): Promise<ListPaymentsResponse>;
@@ -11028,48 +11338,6 @@ export interface BreezSdkInterface {
11028
11338
  * This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
11029
11339
  * It derives a domain-specific linking key, signs the challenge, and sends the
11030
11340
  * 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
11341
  */
11074
11342
  lnurlAuth(requestData: LnurlAuthRequestDetails, asyncOpts_?: {
11075
11343
  signal: AbortSignal;
@@ -11202,6 +11470,24 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
11202
11470
  addEventListener(listener: EventListener, asyncOpts_?: {
11203
11471
  signal: AbortSignal;
11204
11472
  }): Promise<string>;
11473
+ /**
11474
+ * Initiates a Bitcoin purchase flow via an external provider (`MoonPay`).
11475
+ *
11476
+ * This method generates a URL that the user can open in a browser to complete
11477
+ * the Bitcoin purchase. The purchased Bitcoin will be sent to an automatically
11478
+ * generated deposit address.
11479
+ *
11480
+ * # Arguments
11481
+ *
11482
+ * * `request` - The purchase request containing optional amount and redirect URL
11483
+ *
11484
+ * # Returns
11485
+ *
11486
+ * A response containing the URL to open in a browser to complete the purchase
11487
+ */
11488
+ buyBitcoin(request: BuyBitcoinRequest, asyncOpts_?: {
11489
+ signal: AbortSignal;
11490
+ }): Promise<BuyBitcoinResponse>;
11205
11491
  /**
11206
11492
  * Cancels the ongoing leaf optimization.
11207
11493
  *
@@ -11304,21 +11590,20 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
11304
11590
  signal: AbortSignal;
11305
11591
  }): Promise<ListFiatRatesResponse>;
11306
11592
  /**
11307
- * Lists payments from the storage with pagination
11308
- *
11309
- * This method provides direct access to the payment history stored in the database.
11310
- * It returns payments in reverse chronological order (newest first).
11311
- *
11312
- * # Arguments
11313
- *
11314
- * * `request` - Contains pagination parameters (offset and limit)
11315
- *
11316
- * # Returns
11317
- *
11318
- * * `Ok(ListPaymentsResponse)` - Contains the list of payments if successful
11319
- * * `Err(SdkError)` - If there was an error accessing the storage
11320
-
11321
- */
11593
+ * Lists payments from the storage with pagination
11594
+ *
11595
+ * This method provides direct access to the payment history stored in the database.
11596
+ * It returns payments in reverse chronological order (newest first).
11597
+ *
11598
+ * # Arguments
11599
+ *
11600
+ * * `request` - Contains pagination parameters (offset and limit)
11601
+ *
11602
+ * # Returns
11603
+ *
11604
+ * * `Ok(ListPaymentsResponse)` - Contains the list of payments if successful
11605
+ * * `Err(SdkError)` - If there was an error accessing the storage
11606
+ */
11322
11607
  listPayments(request: ListPaymentsRequest, asyncOpts_?: {
11323
11608
  signal: AbortSignal;
11324
11609
  }): Promise<ListPaymentsResponse>;
@@ -11331,48 +11616,6 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
11331
11616
  * This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
11332
11617
  * It derives a domain-specific linking key, signs the challenge, and sends the
11333
11618
  * 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
11619
  */
11377
11620
  lnurlAuth(requestData: LnurlAuthRequestDetails, asyncOpts_?: {
11378
11621
  signal: AbortSignal;
@@ -11697,6 +11940,8 @@ export interface ExternalSigner {
11697
11940
  /**
11698
11941
  * Subtracts one secret from another.
11699
11942
  *
11943
+ * This is a lower-level primitive used as part of key tweaking operations.
11944
+ *
11700
11945
  * # Arguments
11701
11946
  * * `signing_key` - The first secret
11702
11947
  * * `new_signing_key` - The second secret to subtract
@@ -11996,6 +12241,8 @@ export declare class ExternalSignerImpl extends UniffiAbstractObject implements
11996
12241
  /**
11997
12242
  * Subtracts one secret from another.
11998
12243
  *
12244
+ * This is a lower-level primitive used as part of key tweaking operations.
12245
+ *
11999
12246
  * # Arguments
12000
12247
  * * `signing_key` - The first secret
12001
12248
  * * `new_signing_key` - The second secret to subtract
@@ -12162,6 +12409,13 @@ export declare class PaymentObserverImpl extends UniffiAbstractObject implements
12162
12409
  uniffiDestroy(): void;
12163
12410
  static instanceOf(obj: any): obj is PaymentObserverImpl;
12164
12411
  }
12412
+ /**
12413
+ * REST client trait for making HTTP requests.
12414
+ *
12415
+ * This trait provides a way for users to supply their own HTTP client implementation
12416
+ * for use with the SDK. The SDK will use this client for all HTTP operations including
12417
+ * LNURL flows and chain service requests.
12418
+ */
12165
12419
  export interface RestClient {
12166
12420
  /**
12167
12421
  * Makes a GET request and logs on DEBUG.
@@ -12193,6 +12447,13 @@ export interface RestClient {
12193
12447
  signal: AbortSignal;
12194
12448
  }): Promise<RestResponse>;
12195
12449
  }
12450
+ /**
12451
+ * REST client trait for making HTTP requests.
12452
+ *
12453
+ * This trait provides a way for users to supply their own HTTP client implementation
12454
+ * for use with the SDK. The SDK will use this client for all HTTP operations including
12455
+ * LNURL flows and chain service requests.
12456
+ */
12196
12457
  export declare class RestClientImpl extends UniffiAbstractObject implements RestClient {
12197
12458
  readonly [uniffiTypeNameSymbol] = "RestClientImpl";
12198
12459
  readonly [destructorGuardSymbol]: UniffiRustArcPtr;
@@ -12288,14 +12549,6 @@ export interface SdkBuilderInterface {
12288
12549
  withPaymentObserver(paymentObserver: PaymentObserver, asyncOpts_?: {
12289
12550
  signal: AbortSignal;
12290
12551
  }): Promise<void>;
12291
- /**
12292
- * Sets the real-time sync storage implementation to be used by the SDK.
12293
- * Arguments:
12294
- * - `storage`: The sync storage implementation to be used.
12295
- */
12296
- withRealTimeSyncStorage(storage: SyncStorage, asyncOpts_?: {
12297
- signal: AbortSignal;
12298
- }): Promise<void>;
12299
12552
  /**
12300
12553
  * Sets the REST chain service to be used by the SDK.
12301
12554
  * Arguments:
@@ -12380,14 +12633,6 @@ export declare class SdkBuilder extends UniffiAbstractObject implements SdkBuild
12380
12633
  withPaymentObserver(paymentObserver: PaymentObserver, asyncOpts_?: {
12381
12634
  signal: AbortSignal;
12382
12635
  }): Promise<void>;
12383
- /**
12384
- * Sets the real-time sync storage implementation to be used by the SDK.
12385
- * Arguments:
12386
- * - `storage`: The sync storage implementation to be used.
12387
- */
12388
- withRealTimeSyncStorage(storage: SyncStorage, asyncOpts_?: {
12389
- signal: AbortSignal;
12390
- }): Promise<void>;
12391
12636
  /**
12392
12637
  * Sets the REST chain service to be used by the SDK.
12393
12638
  * Arguments:
@@ -12465,7 +12710,7 @@ export interface Storage {
12465
12710
  *
12466
12711
  * Success or a `StorageError`
12467
12712
  */
12468
- setPaymentMetadata(paymentId: string, metadata: PaymentMetadata, asyncOpts_?: {
12713
+ insertPaymentMetadata(paymentId: string, metadata: PaymentMetadata, asyncOpts_?: {
12469
12714
  signal: AbortSignal;
12470
12715
  }): Promise<void>;
12471
12716
  /**
@@ -12493,6 +12738,21 @@ export interface Storage {
12493
12738
  getPaymentByInvoice(invoice: string, asyncOpts_?: {
12494
12739
  signal: AbortSignal;
12495
12740
  }): Promise<Payment | undefined>;
12741
+ /**
12742
+ * Gets payments that have any of the specified parent payment IDs.
12743
+ * Used to load related payments for a set of parent payments.
12744
+ *
12745
+ * # Arguments
12746
+ *
12747
+ * * `parent_payment_ids` - The IDs of the parent payments
12748
+ *
12749
+ * # Returns
12750
+ *
12751
+ * A map of `parent_payment_id` -> Vec<Payment> or a `StorageError`
12752
+ */
12753
+ getPaymentsByParentIds(parentPaymentIds: Array<string>, asyncOpts_?: {
12754
+ signal: AbortSignal;
12755
+ }): Promise<Map<string, Array<Payment>>>;
12496
12756
  /**
12497
12757
  * Add a deposit to storage
12498
12758
  * # Arguments
@@ -12549,6 +12809,56 @@ export interface Storage {
12549
12809
  setLnurlMetadata(metadata: Array<SetLnurlMetadataItem>, asyncOpts_?: {
12550
12810
  signal: AbortSignal;
12551
12811
  }): Promise<void>;
12812
+ addOutgoingChange(record: UnversionedRecordChange, asyncOpts_?: {
12813
+ signal: AbortSignal;
12814
+ }): Promise</*u64*/ bigint>;
12815
+ completeOutgoingSync(record: Record, localRevision: bigint, asyncOpts_?: {
12816
+ signal: AbortSignal;
12817
+ }): Promise<void>;
12818
+ getPendingOutgoingChanges(limit: number, asyncOpts_?: {
12819
+ signal: AbortSignal;
12820
+ }): Promise<Array<OutgoingChange>>;
12821
+ /**
12822
+ * Get the last committed sync revision.
12823
+ *
12824
+ * The `sync_revision` table tracks the highest revision that has been committed
12825
+ * (i.e. acknowledged by the server or received from it). It does NOT include
12826
+ * pending outgoing queue ids. This value is used by the sync protocol to
12827
+ * request changes from the server.
12828
+ */
12829
+ getLastRevision(asyncOpts_?: {
12830
+ signal: AbortSignal;
12831
+ }): Promise</*u64*/ bigint>;
12832
+ /**
12833
+ * Insert incoming records from remote sync
12834
+ */
12835
+ insertIncomingRecords(records: Array<Record>, asyncOpts_?: {
12836
+ signal: AbortSignal;
12837
+ }): Promise<void>;
12838
+ /**
12839
+ * Delete an incoming record after it has been processed
12840
+ */
12841
+ deleteIncomingRecord(record: Record, asyncOpts_?: {
12842
+ signal: AbortSignal;
12843
+ }): Promise<void>;
12844
+ /**
12845
+ * Get incoming records that need to be processed, up to the specified limit
12846
+ */
12847
+ getIncomingRecords(limit: number, asyncOpts_?: {
12848
+ signal: AbortSignal;
12849
+ }): Promise<Array<IncomingChange>>;
12850
+ /**
12851
+ * Get the latest outgoing record if any exists
12852
+ */
12853
+ getLatestOutgoingChange(asyncOpts_?: {
12854
+ signal: AbortSignal;
12855
+ }): Promise<OutgoingChange | undefined>;
12856
+ /**
12857
+ * Update the sync state record from an incoming record
12858
+ */
12859
+ updateRecordFromIncoming(record: Record, asyncOpts_?: {
12860
+ signal: AbortSignal;
12861
+ }): Promise<void>;
12552
12862
  }
12553
12863
  /**
12554
12864
  * Trait for persistent storage
@@ -12607,7 +12917,7 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
12607
12917
  *
12608
12918
  * Success or a `StorageError`
12609
12919
  */
12610
- setPaymentMetadata(paymentId: string, metadata: PaymentMetadata, asyncOpts_?: {
12920
+ insertPaymentMetadata(paymentId: string, metadata: PaymentMetadata, asyncOpts_?: {
12611
12921
  signal: AbortSignal;
12612
12922
  }): Promise<void>;
12613
12923
  /**
@@ -12635,6 +12945,21 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
12635
12945
  getPaymentByInvoice(invoice: string, asyncOpts_?: {
12636
12946
  signal: AbortSignal;
12637
12947
  }): Promise<Payment | undefined>;
12948
+ /**
12949
+ * Gets payments that have any of the specified parent payment IDs.
12950
+ * Used to load related payments for a set of parent payments.
12951
+ *
12952
+ * # Arguments
12953
+ *
12954
+ * * `parent_payment_ids` - The IDs of the parent payments
12955
+ *
12956
+ * # Returns
12957
+ *
12958
+ * A map of `parent_payment_id` -> Vec<Payment> or a `StorageError`
12959
+ */
12960
+ getPaymentsByParentIds(parentPaymentIds: Array<string>, asyncOpts_?: {
12961
+ signal: AbortSignal;
12962
+ }): Promise<Map<string, Array<Payment>>>;
12638
12963
  /**
12639
12964
  * Add a deposit to storage
12640
12965
  * # Arguments
@@ -12691,81 +13016,22 @@ export declare class StorageImpl extends UniffiAbstractObject implements Storage
12691
13016
  setLnurlMetadata(metadata: Array<SetLnurlMetadataItem>, asyncOpts_?: {
12692
13017
  signal: AbortSignal;
12693
13018
  }): Promise<void>;
12694
- /**
12695
- * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
12696
- */
12697
- uniffiDestroy(): void;
12698
- static instanceOf(obj: any): obj is StorageImpl;
12699
- }
12700
- export interface SyncStorage {
12701
13019
  addOutgoingChange(record: UnversionedRecordChange, asyncOpts_?: {
12702
13020
  signal: AbortSignal;
12703
13021
  }): Promise</*u64*/ bigint>;
12704
- completeOutgoingSync(record: Record, asyncOpts_?: {
13022
+ completeOutgoingSync(record: Record, localRevision: bigint, asyncOpts_?: {
12705
13023
  signal: AbortSignal;
12706
13024
  }): Promise<void>;
12707
13025
  getPendingOutgoingChanges(limit: number, asyncOpts_?: {
12708
13026
  signal: AbortSignal;
12709
13027
  }): Promise<Array<OutgoingChange>>;
12710
13028
  /**
12711
- * Get the revision number of the last synchronized record
12712
- */
12713
- getLastRevision(asyncOpts_?: {
12714
- signal: AbortSignal;
12715
- }): Promise</*u64*/ bigint>;
12716
- /**
12717
- * Insert incoming records from remote sync
12718
- */
12719
- insertIncomingRecords(records: Array<Record>, asyncOpts_?: {
12720
- signal: AbortSignal;
12721
- }): Promise<void>;
12722
- /**
12723
- * Delete an incoming record after it has been processed
12724
- */
12725
- deleteIncomingRecord(record: Record, asyncOpts_?: {
12726
- signal: AbortSignal;
12727
- }): Promise<void>;
12728
- /**
12729
- * Update revision numbers of pending outgoing records to be higher than the given revision
12730
- */
12731
- rebasePendingOutgoingRecords(revision: bigint, asyncOpts_?: {
12732
- signal: AbortSignal;
12733
- }): Promise<void>;
12734
- /**
12735
- * Get incoming records that need to be processed, up to the specified limit
12736
- */
12737
- getIncomingRecords(limit: number, asyncOpts_?: {
12738
- signal: AbortSignal;
12739
- }): Promise<Array<IncomingChange>>;
12740
- /**
12741
- * Get the latest outgoing record if any exists
12742
- */
12743
- getLatestOutgoingChange(asyncOpts_?: {
12744
- signal: AbortSignal;
12745
- }): Promise<OutgoingChange | undefined>;
12746
- /**
12747
- * Update the sync state record from an incoming record
12748
- */
12749
- updateRecordFromIncoming(record: Record, asyncOpts_?: {
12750
- signal: AbortSignal;
12751
- }): Promise<void>;
12752
- }
12753
- export declare class SyncStorageImpl extends UniffiAbstractObject implements SyncStorage {
12754
- readonly [uniffiTypeNameSymbol] = "SyncStorageImpl";
12755
- readonly [destructorGuardSymbol]: UniffiRustArcPtr;
12756
- readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
12757
- private constructor();
12758
- addOutgoingChange(record: UnversionedRecordChange, asyncOpts_?: {
12759
- signal: AbortSignal;
12760
- }): Promise</*u64*/ bigint>;
12761
- completeOutgoingSync(record: Record, asyncOpts_?: {
12762
- signal: AbortSignal;
12763
- }): Promise<void>;
12764
- getPendingOutgoingChanges(limit: number, asyncOpts_?: {
12765
- signal: AbortSignal;
12766
- }): Promise<Array<OutgoingChange>>;
12767
- /**
12768
- * Get the revision number of the last synchronized record
13029
+ * Get the last committed sync revision.
13030
+ *
13031
+ * The `sync_revision` table tracks the highest revision that has been committed
13032
+ * (i.e. acknowledged by the server or received from it). It does NOT include
13033
+ * pending outgoing queue ids. This value is used by the sync protocol to
13034
+ * request changes from the server.
12769
13035
  */
12770
13036
  getLastRevision(asyncOpts_?: {
12771
13037
  signal: AbortSignal;
@@ -12782,12 +13048,6 @@ export declare class SyncStorageImpl extends UniffiAbstractObject implements Syn
12782
13048
  deleteIncomingRecord(record: Record, asyncOpts_?: {
12783
13049
  signal: AbortSignal;
12784
13050
  }): Promise<void>;
12785
- /**
12786
- * Update revision numbers of pending outgoing records to be higher than the given revision
12787
- */
12788
- rebasePendingOutgoingRecords(revision: bigint, asyncOpts_?: {
12789
- signal: AbortSignal;
12790
- }): Promise<void>;
12791
13051
  /**
12792
13052
  * Get incoming records that need to be processed, up to the specified limit
12793
13053
  */
@@ -12810,7 +13070,7 @@ export declare class SyncStorageImpl extends UniffiAbstractObject implements Syn
12810
13070
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
12811
13071
  */
12812
13072
  uniffiDestroy(): void;
12813
- static instanceOf(obj: any): obj is SyncStorageImpl;
13073
+ static instanceOf(obj: any): obj is StorageImpl;
12814
13074
  }
12815
13075
  export interface TokenIssuerInterface {
12816
13076
  /**
@@ -13189,6 +13449,20 @@ declare const _default: Readonly<{
13189
13449
  lift(value: UniffiByteArray): BurnIssuerTokenRequest;
13190
13450
  lower(value: BurnIssuerTokenRequest): UniffiByteArray;
13191
13451
  };
13452
+ FfiConverterTypeBuyBitcoinRequest: {
13453
+ read(from: RustBuffer): BuyBitcoinRequest;
13454
+ write(value: BuyBitcoinRequest, into: RustBuffer): void;
13455
+ allocationSize(value: BuyBitcoinRequest): number;
13456
+ lift(value: UniffiByteArray): BuyBitcoinRequest;
13457
+ lower(value: BuyBitcoinRequest): UniffiByteArray;
13458
+ };
13459
+ FfiConverterTypeBuyBitcoinResponse: {
13460
+ read(from: RustBuffer): BuyBitcoinResponse;
13461
+ write(value: BuyBitcoinResponse, into: RustBuffer): void;
13462
+ allocationSize(value: BuyBitcoinResponse): number;
13463
+ lift(value: UniffiByteArray): BuyBitcoinResponse;
13464
+ lower(value: BuyBitcoinResponse): UniffiByteArray;
13465
+ };
13192
13466
  FfiConverterTypeChainApiType: {
13193
13467
  read(from: RustBuffer): ChainApiType;
13194
13468
  write(value: ChainApiType, into: RustBuffer): void;
@@ -13266,6 +13540,13 @@ declare const _default: Readonly<{
13266
13540
  lift(value: UniffiByteArray): ConnectWithSignerRequest;
13267
13541
  lower(value: ConnectWithSignerRequest): UniffiByteArray;
13268
13542
  };
13543
+ FfiConverterTypeConversionDetails: {
13544
+ read(from: RustBuffer): ConversionDetails;
13545
+ write(value: ConversionDetails, into: RustBuffer): void;
13546
+ allocationSize(value: ConversionDetails): number;
13547
+ lift(value: UniffiByteArray): ConversionDetails;
13548
+ lower(value: ConversionDetails): UniffiByteArray;
13549
+ };
13269
13550
  FfiConverterTypeConversionEstimate: {
13270
13551
  read(from: RustBuffer): ConversionEstimate;
13271
13552
  write(value: ConversionEstimate, into: RustBuffer): void;
@@ -13301,6 +13582,13 @@ declare const _default: Readonly<{
13301
13582
  lift(value: UniffiByteArray): ConversionStatus;
13302
13583
  lower(value: ConversionStatus): UniffiByteArray;
13303
13584
  };
13585
+ FfiConverterTypeConversionStep: {
13586
+ read(from: RustBuffer): ConversionStep;
13587
+ write(value: ConversionStep, into: RustBuffer): void;
13588
+ allocationSize(value: ConversionStep): number;
13589
+ lift(value: UniffiByteArray): ConversionStep;
13590
+ lower(value: ConversionStep): UniffiByteArray;
13591
+ };
13304
13592
  FfiConverterTypeConversionType: {
13305
13593
  read(from: RustBuffer): ConversionType;
13306
13594
  write(value: ConversionType, into: RustBuffer): void;
@@ -13463,6 +13751,13 @@ declare const _default: Readonly<{
13463
13751
  lift(value: UniffiByteArray): Fee;
13464
13752
  lower(value: Fee): UniffiByteArray;
13465
13753
  };
13754
+ FfiConverterTypeFeePolicy: {
13755
+ read(from: RustBuffer): FeePolicy;
13756
+ write(value: FeePolicy, into: RustBuffer): void;
13757
+ allocationSize(value: FeePolicy): number;
13758
+ lift(value: UniffiByteArray): FeePolicy;
13759
+ lower(value: FeePolicy): UniffiByteArray;
13760
+ };
13466
13761
  FfiConverterTypeFetchConversionLimitsRequest: {
13467
13762
  read(from: RustBuffer): FetchConversionLimitsRequest;
13468
13763
  write(value: FetchConversionLimitsRequest, into: RustBuffer): void;
@@ -13674,6 +13969,13 @@ declare const _default: Readonly<{
13674
13969
  lift(value: UniffiByteArray): LnurlErrorDetails;
13675
13970
  lower(value: LnurlErrorDetails): UniffiByteArray;
13676
13971
  };
13972
+ FfiConverterTypeLnurlInfo: {
13973
+ read(from: RustBuffer): LnurlInfo;
13974
+ write(value: LnurlInfo, into: RustBuffer): void;
13975
+ allocationSize(value: LnurlInfo): number;
13976
+ lift(value: UniffiByteArray): LnurlInfo;
13977
+ lower(value: LnurlInfo): UniffiByteArray;
13978
+ };
13677
13979
  FfiConverterTypeLnurlPayInfo: {
13678
13980
  read(from: RustBuffer): LnurlPayInfo;
13679
13981
  write(value: LnurlPayInfo, into: RustBuffer): void;
@@ -14097,6 +14399,13 @@ declare const _default: Readonly<{
14097
14399
  lift(value: UniffiByteArray): SendPaymentResponse;
14098
14400
  lower(value: SendPaymentResponse): UniffiByteArray;
14099
14401
  };
14402
+ FfiConverterTypeServiceStatus: {
14403
+ read(from: RustBuffer): ServiceStatus;
14404
+ write(value: ServiceStatus, into: RustBuffer): void;
14405
+ allocationSize(value: ServiceStatus): number;
14406
+ lift(value: UniffiByteArray): ServiceStatus;
14407
+ lower(value: ServiceStatus): UniffiByteArray;
14408
+ };
14100
14409
  FfiConverterTypeSetLnurlMetadataItem: {
14101
14410
  read(from: RustBuffer): SetLnurlMetadataItem;
14102
14411
  write(value: SetLnurlMetadataItem, into: RustBuffer): void;
@@ -14167,6 +14476,20 @@ declare const _default: Readonly<{
14167
14476
  lift(value: UniffiByteArray): SparkInvoicePaymentDetails;
14168
14477
  lower(value: SparkInvoicePaymentDetails): UniffiByteArray;
14169
14478
  };
14479
+ FfiConverterTypeSparkStatus: {
14480
+ read(from: RustBuffer): SparkStatus;
14481
+ write(value: SparkStatus, into: RustBuffer): void;
14482
+ allocationSize(value: SparkStatus): number;
14483
+ lift(value: UniffiByteArray): SparkStatus;
14484
+ lower(value: SparkStatus): UniffiByteArray;
14485
+ };
14486
+ FfiConverterTypeStableBalanceConfig: {
14487
+ read(from: RustBuffer): StableBalanceConfig;
14488
+ write(value: StableBalanceConfig, into: RustBuffer): void;
14489
+ allocationSize(value: StableBalanceConfig): number;
14490
+ lift(value: UniffiByteArray): StableBalanceConfig;
14491
+ lower(value: StableBalanceConfig): UniffiByteArray;
14492
+ };
14170
14493
  FfiConverterTypeStorage: FfiConverterObjectWithCallbacks<Storage>;
14171
14494
  FfiConverterTypeSuccessAction: {
14172
14495
  read(from: RustBuffer): SuccessAction;
@@ -14189,7 +14512,6 @@ declare const _default: Readonly<{
14189
14512
  lift(value: UniffiByteArray): Symbol;
14190
14513
  lower(value: Symbol): UniffiByteArray;
14191
14514
  };
14192
- FfiConverterTypeSyncStorage: FfiConverterObjectWithCallbacks<SyncStorage>;
14193
14515
  FfiConverterTypeSyncWalletRequest: {
14194
14516
  read(from: RustBuffer): SyncWalletRequest;
14195
14517
  write(value: SyncWalletRequest, into: RustBuffer): void;
@@ -14219,6 +14541,13 @@ declare const _default: Readonly<{
14219
14541
  lift(value: UniffiByteArray): TokenMetadata;
14220
14542
  lower(value: TokenMetadata): UniffiByteArray;
14221
14543
  };
14544
+ FfiConverterTypeTokenTransactionType: {
14545
+ read(from: RustBuffer): TokenTransactionType;
14546
+ write(value: TokenTransactionType, into: RustBuffer): void;
14547
+ allocationSize(value: TokenTransactionType): number;
14548
+ lift(value: UniffiByteArray): TokenTransactionType;
14549
+ lower(value: TokenTransactionType): UniffiByteArray;
14550
+ };
14222
14551
  FfiConverterTypeTxStatus: {
14223
14552
  read(from: RustBuffer): TxStatus;
14224
14553
  write(value: TxStatus, into: RustBuffer): void;