@breeztech/breez-sdk-spark-react-native 0.3.2 → 0.3.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.
Files changed (28) hide show
  1. package/cpp/generated/breez_sdk_spark.cpp +147 -0
  2. package/cpp/generated/breez_sdk_spark.hpp +18 -0
  3. package/lib/commonjs/generated/breez_sdk_common.js +64 -274
  4. package/lib/commonjs/generated/breez_sdk_common.js.map +1 -1
  5. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  6. package/lib/commonjs/generated/breez_sdk_spark.js +589 -24
  7. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  8. package/lib/module/generated/breez_sdk_common.js +63 -273
  9. package/lib/module/generated/breez_sdk_common.js.map +1 -1
  10. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  11. package/lib/module/generated/breez_sdk_spark.js +588 -23
  12. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  13. package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +79 -183
  14. package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts.map +1 -1
  15. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +6 -0
  16. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  17. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +571 -19
  18. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  19. package/lib/typescript/module/src/generated/breez_sdk_common.d.ts +79 -183
  20. package/lib/typescript/module/src/generated/breez_sdk_common.d.ts.map +1 -1
  21. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +6 -0
  22. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  23. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +571 -19
  24. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/generated/breez_sdk_common.ts +118 -373
  27. package/src/generated/breez_sdk_spark-ffi.ts +15 -0
  28. package/src/generated/breez_sdk_spark.ts +1076 -41
@@ -42,8 +42,10 @@ import {
42
42
  type FiatCurrency,
43
43
  type FiatService,
44
44
  type LnurlPayRequestDetails,
45
+ type LnurlWithdrawRequestDetails,
45
46
  type Rate,
46
47
  type RestClient,
48
+ type SparkInvoiceDetails,
47
49
  InputType,
48
50
  SuccessAction,
49
51
  SuccessActionProcessed,
@@ -98,8 +100,10 @@ const {
98
100
  FfiConverterTypeFiatService,
99
101
  FfiConverterTypeInputType,
100
102
  FfiConverterTypeLnurlPayRequestDetails,
103
+ FfiConverterTypeLnurlWithdrawRequestDetails,
101
104
  FfiConverterTypeRate,
102
105
  FfiConverterTypeRestClient,
106
+ FfiConverterTypeSparkInvoiceDetails,
103
107
  FfiConverterTypeSuccessAction,
104
108
  FfiConverterTypeSuccessActionProcessed,
105
109
  } = uniffiBreezSdkCommonModule.converters;
@@ -378,6 +382,130 @@ const FfiConverterTypeCheckLightningAddressRequest = (() => {
378
382
  return new FFIConverter();
379
383
  })();
380
384
 
385
+ export type CheckMessageRequest = {
386
+ /**
387
+ * The message that was signed
388
+ */
389
+ message: string;
390
+ /**
391
+ * The public key that signed the message
392
+ */
393
+ pubkey: string;
394
+ /**
395
+ * The DER or compact hex encoded signature
396
+ */
397
+ signature: string;
398
+ };
399
+
400
+ /**
401
+ * Generated factory for {@link CheckMessageRequest} record objects.
402
+ */
403
+ export const CheckMessageRequest = (() => {
404
+ const defaults = () => ({});
405
+ const create = (() => {
406
+ return uniffiCreateRecord<CheckMessageRequest, ReturnType<typeof defaults>>(
407
+ defaults
408
+ );
409
+ })();
410
+ return Object.freeze({
411
+ /**
412
+ * Create a frozen instance of {@link CheckMessageRequest}, with defaults specified
413
+ * in Rust, in the {@link breez_sdk_spark} crate.
414
+ */
415
+ create,
416
+
417
+ /**
418
+ * Create a frozen instance of {@link CheckMessageRequest}, with defaults specified
419
+ * in Rust, in the {@link breez_sdk_spark} crate.
420
+ */
421
+ new: create,
422
+
423
+ /**
424
+ * Defaults specified in the {@link breez_sdk_spark} crate.
425
+ */
426
+ defaults: () => Object.freeze(defaults()) as Partial<CheckMessageRequest>,
427
+ });
428
+ })();
429
+
430
+ const FfiConverterTypeCheckMessageRequest = (() => {
431
+ type TypeName = CheckMessageRequest;
432
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
433
+ read(from: RustBuffer): TypeName {
434
+ return {
435
+ message: FfiConverterString.read(from),
436
+ pubkey: FfiConverterString.read(from),
437
+ signature: FfiConverterString.read(from),
438
+ };
439
+ }
440
+ write(value: TypeName, into: RustBuffer): void {
441
+ FfiConverterString.write(value.message, into);
442
+ FfiConverterString.write(value.pubkey, into);
443
+ FfiConverterString.write(value.signature, into);
444
+ }
445
+ allocationSize(value: TypeName): number {
446
+ return (
447
+ FfiConverterString.allocationSize(value.message) +
448
+ FfiConverterString.allocationSize(value.pubkey) +
449
+ FfiConverterString.allocationSize(value.signature)
450
+ );
451
+ }
452
+ }
453
+ return new FFIConverter();
454
+ })();
455
+
456
+ export type CheckMessageResponse = {
457
+ isValid: boolean;
458
+ };
459
+
460
+ /**
461
+ * Generated factory for {@link CheckMessageResponse} record objects.
462
+ */
463
+ export const CheckMessageResponse = (() => {
464
+ const defaults = () => ({});
465
+ const create = (() => {
466
+ return uniffiCreateRecord<
467
+ CheckMessageResponse,
468
+ ReturnType<typeof defaults>
469
+ >(defaults);
470
+ })();
471
+ return Object.freeze({
472
+ /**
473
+ * Create a frozen instance of {@link CheckMessageResponse}, with defaults specified
474
+ * in Rust, in the {@link breez_sdk_spark} crate.
475
+ */
476
+ create,
477
+
478
+ /**
479
+ * Create a frozen instance of {@link CheckMessageResponse}, with defaults specified
480
+ * in Rust, in the {@link breez_sdk_spark} crate.
481
+ */
482
+ new: create,
483
+
484
+ /**
485
+ * Defaults specified in the {@link breez_sdk_spark} crate.
486
+ */
487
+ defaults: () => Object.freeze(defaults()) as Partial<CheckMessageResponse>,
488
+ });
489
+ })();
490
+
491
+ const FfiConverterTypeCheckMessageResponse = (() => {
492
+ type TypeName = CheckMessageResponse;
493
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
494
+ read(from: RustBuffer): TypeName {
495
+ return {
496
+ isValid: FfiConverterBool.read(from),
497
+ };
498
+ }
499
+ write(value: TypeName, into: RustBuffer): void {
500
+ FfiConverterBool.write(value.isValid, into);
501
+ }
502
+ allocationSize(value: TypeName): number {
503
+ return FfiConverterBool.allocationSize(value.isValid);
504
+ }
505
+ }
506
+ return new FFIConverter();
507
+ })();
508
+
381
509
  export type ClaimDepositRequest = {
382
510
  txid: string;
383
511
  vout: /*u32*/ number;
@@ -1797,6 +1925,200 @@ const FfiConverterTypeLnurlPayResponse = (() => {
1797
1925
  return new FFIConverter();
1798
1926
  })();
1799
1927
 
1928
+ /**
1929
+ * Represents the withdraw LNURL info
1930
+ */
1931
+ export type LnurlWithdrawInfo = {
1932
+ withdrawUrl: string;
1933
+ };
1934
+
1935
+ /**
1936
+ * Generated factory for {@link LnurlWithdrawInfo} record objects.
1937
+ */
1938
+ export const LnurlWithdrawInfo = (() => {
1939
+ const defaults = () => ({});
1940
+ const create = (() => {
1941
+ return uniffiCreateRecord<LnurlWithdrawInfo, ReturnType<typeof defaults>>(
1942
+ defaults
1943
+ );
1944
+ })();
1945
+ return Object.freeze({
1946
+ /**
1947
+ * Create a frozen instance of {@link LnurlWithdrawInfo}, with defaults specified
1948
+ * in Rust, in the {@link breez_sdk_spark} crate.
1949
+ */
1950
+ create,
1951
+
1952
+ /**
1953
+ * Create a frozen instance of {@link LnurlWithdrawInfo}, with defaults specified
1954
+ * in Rust, in the {@link breez_sdk_spark} crate.
1955
+ */
1956
+ new: create,
1957
+
1958
+ /**
1959
+ * Defaults specified in the {@link breez_sdk_spark} crate.
1960
+ */
1961
+ defaults: () => Object.freeze(defaults()) as Partial<LnurlWithdrawInfo>,
1962
+ });
1963
+ })();
1964
+
1965
+ const FfiConverterTypeLnurlWithdrawInfo = (() => {
1966
+ type TypeName = LnurlWithdrawInfo;
1967
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1968
+ read(from: RustBuffer): TypeName {
1969
+ return {
1970
+ withdrawUrl: FfiConverterString.read(from),
1971
+ };
1972
+ }
1973
+ write(value: TypeName, into: RustBuffer): void {
1974
+ FfiConverterString.write(value.withdrawUrl, into);
1975
+ }
1976
+ allocationSize(value: TypeName): number {
1977
+ return FfiConverterString.allocationSize(value.withdrawUrl);
1978
+ }
1979
+ }
1980
+ return new FFIConverter();
1981
+ })();
1982
+
1983
+ export type LnurlWithdrawRequest = {
1984
+ /**
1985
+ * The amount to withdraw in satoshis
1986
+ * Must be within the min and max withdrawable limits
1987
+ */
1988
+ amountSats: /*u64*/ bigint;
1989
+ withdrawRequest: LnurlWithdrawRequestDetails;
1990
+ /**
1991
+ * If set, the function will return the payment if it is still pending after this
1992
+ * number of seconds. If unset, the function will return immediately after
1993
+ * initiating the LNURL withdraw.
1994
+ */
1995
+ completionTimeoutSecs: /*u32*/ number | undefined;
1996
+ };
1997
+
1998
+ /**
1999
+ * Generated factory for {@link LnurlWithdrawRequest} record objects.
2000
+ */
2001
+ export const LnurlWithdrawRequest = (() => {
2002
+ const defaults = () => ({ completionTimeoutSecs: undefined });
2003
+ const create = (() => {
2004
+ return uniffiCreateRecord<
2005
+ LnurlWithdrawRequest,
2006
+ ReturnType<typeof defaults>
2007
+ >(defaults);
2008
+ })();
2009
+ return Object.freeze({
2010
+ /**
2011
+ * Create a frozen instance of {@link LnurlWithdrawRequest}, with defaults specified
2012
+ * in Rust, in the {@link breez_sdk_spark} crate.
2013
+ */
2014
+ create,
2015
+
2016
+ /**
2017
+ * Create a frozen instance of {@link LnurlWithdrawRequest}, with defaults specified
2018
+ * in Rust, in the {@link breez_sdk_spark} crate.
2019
+ */
2020
+ new: create,
2021
+
2022
+ /**
2023
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2024
+ */
2025
+ defaults: () => Object.freeze(defaults()) as Partial<LnurlWithdrawRequest>,
2026
+ });
2027
+ })();
2028
+
2029
+ const FfiConverterTypeLnurlWithdrawRequest = (() => {
2030
+ type TypeName = LnurlWithdrawRequest;
2031
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2032
+ read(from: RustBuffer): TypeName {
2033
+ return {
2034
+ amountSats: FfiConverterUInt64.read(from),
2035
+ withdrawRequest: FfiConverterTypeLnurlWithdrawRequestDetails.read(from),
2036
+ completionTimeoutSecs: FfiConverterOptionalUInt32.read(from),
2037
+ };
2038
+ }
2039
+ write(value: TypeName, into: RustBuffer): void {
2040
+ FfiConverterUInt64.write(value.amountSats, into);
2041
+ FfiConverterTypeLnurlWithdrawRequestDetails.write(
2042
+ value.withdrawRequest,
2043
+ into
2044
+ );
2045
+ FfiConverterOptionalUInt32.write(value.completionTimeoutSecs, into);
2046
+ }
2047
+ allocationSize(value: TypeName): number {
2048
+ return (
2049
+ FfiConverterUInt64.allocationSize(value.amountSats) +
2050
+ FfiConverterTypeLnurlWithdrawRequestDetails.allocationSize(
2051
+ value.withdrawRequest
2052
+ ) +
2053
+ FfiConverterOptionalUInt32.allocationSize(value.completionTimeoutSecs)
2054
+ );
2055
+ }
2056
+ }
2057
+ return new FFIConverter();
2058
+ })();
2059
+
2060
+ export type LnurlWithdrawResponse = {
2061
+ /**
2062
+ * The Lightning invoice generated for the LNURL withdraw
2063
+ */
2064
+ paymentRequest: string;
2065
+ payment: Payment | undefined;
2066
+ };
2067
+
2068
+ /**
2069
+ * Generated factory for {@link LnurlWithdrawResponse} record objects.
2070
+ */
2071
+ export const LnurlWithdrawResponse = (() => {
2072
+ const defaults = () => ({});
2073
+ const create = (() => {
2074
+ return uniffiCreateRecord<
2075
+ LnurlWithdrawResponse,
2076
+ ReturnType<typeof defaults>
2077
+ >(defaults);
2078
+ })();
2079
+ return Object.freeze({
2080
+ /**
2081
+ * Create a frozen instance of {@link LnurlWithdrawResponse}, with defaults specified
2082
+ * in Rust, in the {@link breez_sdk_spark} crate.
2083
+ */
2084
+ create,
2085
+
2086
+ /**
2087
+ * Create a frozen instance of {@link LnurlWithdrawResponse}, with defaults specified
2088
+ * in Rust, in the {@link breez_sdk_spark} crate.
2089
+ */
2090
+ new: create,
2091
+
2092
+ /**
2093
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2094
+ */
2095
+ defaults: () => Object.freeze(defaults()) as Partial<LnurlWithdrawResponse>,
2096
+ });
2097
+ })();
2098
+
2099
+ const FfiConverterTypeLnurlWithdrawResponse = (() => {
2100
+ type TypeName = LnurlWithdrawResponse;
2101
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2102
+ read(from: RustBuffer): TypeName {
2103
+ return {
2104
+ paymentRequest: FfiConverterString.read(from),
2105
+ payment: FfiConverterOptionalTypePayment.read(from),
2106
+ };
2107
+ }
2108
+ write(value: TypeName, into: RustBuffer): void {
2109
+ FfiConverterString.write(value.paymentRequest, into);
2110
+ FfiConverterOptionalTypePayment.write(value.payment, into);
2111
+ }
2112
+ allocationSize(value: TypeName): number {
2113
+ return (
2114
+ FfiConverterString.allocationSize(value.paymentRequest) +
2115
+ FfiConverterOptionalTypePayment.allocationSize(value.payment)
2116
+ );
2117
+ }
2118
+ }
2119
+ return new FFIConverter();
2120
+ })();
2121
+
1800
2122
  export type LogEntry = {
1801
2123
  line: string;
1802
2124
  level: string;
@@ -1966,6 +2288,7 @@ const FfiConverterTypePayment = (() => {
1966
2288
  */
1967
2289
  export type PaymentMetadata = {
1968
2290
  lnurlPayInfo: LnurlPayInfo | undefined;
2291
+ lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
1969
2292
  lnurlDescription: string | undefined;
1970
2293
  };
1971
2294
 
@@ -2005,18 +2328,27 @@ const FfiConverterTypePaymentMetadata = (() => {
2005
2328
  read(from: RustBuffer): TypeName {
2006
2329
  return {
2007
2330
  lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
2331
+ lnurlWithdrawInfo: FfiConverterOptionalTypeLnurlWithdrawInfo.read(from),
2008
2332
  lnurlDescription: FfiConverterOptionalString.read(from),
2009
2333
  };
2010
2334
  }
2011
2335
  write(value: TypeName, into: RustBuffer): void {
2012
2336
  FfiConverterOptionalTypeLnurlPayInfo.write(value.lnurlPayInfo, into);
2337
+ FfiConverterOptionalTypeLnurlWithdrawInfo.write(
2338
+ value.lnurlWithdrawInfo,
2339
+ into
2340
+ );
2013
2341
  FfiConverterOptionalString.write(value.lnurlDescription, into);
2014
2342
  }
2015
2343
  allocationSize(value: TypeName): number {
2016
2344
  return (
2017
2345
  FfiConverterOptionalTypeLnurlPayInfo.allocationSize(
2018
2346
  value.lnurlPayInfo
2019
- ) + FfiConverterOptionalString.allocationSize(value.lnurlDescription)
2347
+ ) +
2348
+ FfiConverterOptionalTypeLnurlWithdrawInfo.allocationSize(
2349
+ value.lnurlWithdrawInfo
2350
+ ) +
2351
+ FfiConverterOptionalString.allocationSize(value.lnurlDescription)
2020
2352
  );
2021
2353
  }
2022
2354
  }
@@ -2450,7 +2782,11 @@ const FfiConverterTypeReceivePaymentRequest = (() => {
2450
2782
 
2451
2783
  export type ReceivePaymentResponse = {
2452
2784
  paymentRequest: string;
2453
- feeSats: /*u64*/ bigint;
2785
+ /**
2786
+ * Fee to pay to receive the payment
2787
+ * Denominated in sats or token base units
2788
+ */
2789
+ fee: U128;
2454
2790
  };
2455
2791
 
2456
2792
  /**
@@ -2491,17 +2827,17 @@ const FfiConverterTypeReceivePaymentResponse = (() => {
2491
2827
  read(from: RustBuffer): TypeName {
2492
2828
  return {
2493
2829
  paymentRequest: FfiConverterString.read(from),
2494
- feeSats: FfiConverterUInt64.read(from),
2830
+ fee: FfiConverterTypeu128.read(from),
2495
2831
  };
2496
2832
  }
2497
2833
  write(value: TypeName, into: RustBuffer): void {
2498
2834
  FfiConverterString.write(value.paymentRequest, into);
2499
- FfiConverterUInt64.write(value.feeSats, into);
2835
+ FfiConverterTypeu128.write(value.fee, into);
2500
2836
  }
2501
2837
  allocationSize(value: TypeName): number {
2502
2838
  return (
2503
2839
  FfiConverterString.allocationSize(value.paymentRequest) +
2504
- FfiConverterUInt64.allocationSize(value.feeSats)
2840
+ FfiConverterTypeu128.allocationSize(value.fee)
2505
2841
  );
2506
2842
  }
2507
2843
  }
@@ -2943,6 +3279,194 @@ const FfiConverterTypeSendPaymentResponse = (() => {
2943
3279
  return new FFIConverter();
2944
3280
  })();
2945
3281
 
3282
+ export type SignMessageRequest = {
3283
+ message: string;
3284
+ /**
3285
+ * If true, the signature will be encoded in compact format instead of DER format
3286
+ */
3287
+ compact: boolean;
3288
+ };
3289
+
3290
+ /**
3291
+ * Generated factory for {@link SignMessageRequest} record objects.
3292
+ */
3293
+ export const SignMessageRequest = (() => {
3294
+ const defaults = () => ({});
3295
+ const create = (() => {
3296
+ return uniffiCreateRecord<SignMessageRequest, ReturnType<typeof defaults>>(
3297
+ defaults
3298
+ );
3299
+ })();
3300
+ return Object.freeze({
3301
+ /**
3302
+ * Create a frozen instance of {@link SignMessageRequest}, with defaults specified
3303
+ * in Rust, in the {@link breez_sdk_spark} crate.
3304
+ */
3305
+ create,
3306
+
3307
+ /**
3308
+ * Create a frozen instance of {@link SignMessageRequest}, with defaults specified
3309
+ * in Rust, in the {@link breez_sdk_spark} crate.
3310
+ */
3311
+ new: create,
3312
+
3313
+ /**
3314
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3315
+ */
3316
+ defaults: () => Object.freeze(defaults()) as Partial<SignMessageRequest>,
3317
+ });
3318
+ })();
3319
+
3320
+ const FfiConverterTypeSignMessageRequest = (() => {
3321
+ type TypeName = SignMessageRequest;
3322
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
3323
+ read(from: RustBuffer): TypeName {
3324
+ return {
3325
+ message: FfiConverterString.read(from),
3326
+ compact: FfiConverterBool.read(from),
3327
+ };
3328
+ }
3329
+ write(value: TypeName, into: RustBuffer): void {
3330
+ FfiConverterString.write(value.message, into);
3331
+ FfiConverterBool.write(value.compact, into);
3332
+ }
3333
+ allocationSize(value: TypeName): number {
3334
+ return (
3335
+ FfiConverterString.allocationSize(value.message) +
3336
+ FfiConverterBool.allocationSize(value.compact)
3337
+ );
3338
+ }
3339
+ }
3340
+ return new FFIConverter();
3341
+ })();
3342
+
3343
+ export type SignMessageResponse = {
3344
+ pubkey: string;
3345
+ /**
3346
+ * The DER or compact hex encoded signature
3347
+ */
3348
+ signature: string;
3349
+ };
3350
+
3351
+ /**
3352
+ * Generated factory for {@link SignMessageResponse} record objects.
3353
+ */
3354
+ export const SignMessageResponse = (() => {
3355
+ const defaults = () => ({});
3356
+ const create = (() => {
3357
+ return uniffiCreateRecord<SignMessageResponse, ReturnType<typeof defaults>>(
3358
+ defaults
3359
+ );
3360
+ })();
3361
+ return Object.freeze({
3362
+ /**
3363
+ * Create a frozen instance of {@link SignMessageResponse}, with defaults specified
3364
+ * in Rust, in the {@link breez_sdk_spark} crate.
3365
+ */
3366
+ create,
3367
+
3368
+ /**
3369
+ * Create a frozen instance of {@link SignMessageResponse}, with defaults specified
3370
+ * in Rust, in the {@link breez_sdk_spark} crate.
3371
+ */
3372
+ new: create,
3373
+
3374
+ /**
3375
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3376
+ */
3377
+ defaults: () => Object.freeze(defaults()) as Partial<SignMessageResponse>,
3378
+ });
3379
+ })();
3380
+
3381
+ const FfiConverterTypeSignMessageResponse = (() => {
3382
+ type TypeName = SignMessageResponse;
3383
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
3384
+ read(from: RustBuffer): TypeName {
3385
+ return {
3386
+ pubkey: FfiConverterString.read(from),
3387
+ signature: FfiConverterString.read(from),
3388
+ };
3389
+ }
3390
+ write(value: TypeName, into: RustBuffer): void {
3391
+ FfiConverterString.write(value.pubkey, into);
3392
+ FfiConverterString.write(value.signature, into);
3393
+ }
3394
+ allocationSize(value: TypeName): number {
3395
+ return (
3396
+ FfiConverterString.allocationSize(value.pubkey) +
3397
+ FfiConverterString.allocationSize(value.signature)
3398
+ );
3399
+ }
3400
+ }
3401
+ return new FFIConverter();
3402
+ })();
3403
+
3404
+ export type SparkInvoicePaymentDetails = {
3405
+ /**
3406
+ * Represents the spark invoice description
3407
+ */
3408
+ description: string | undefined;
3409
+ /**
3410
+ * The raw spark invoice string
3411
+ */
3412
+ invoice: string;
3413
+ };
3414
+
3415
+ /**
3416
+ * Generated factory for {@link SparkInvoicePaymentDetails} record objects.
3417
+ */
3418
+ export const SparkInvoicePaymentDetails = (() => {
3419
+ const defaults = () => ({});
3420
+ const create = (() => {
3421
+ return uniffiCreateRecord<
3422
+ SparkInvoicePaymentDetails,
3423
+ ReturnType<typeof defaults>
3424
+ >(defaults);
3425
+ })();
3426
+ return Object.freeze({
3427
+ /**
3428
+ * Create a frozen instance of {@link SparkInvoicePaymentDetails}, with defaults specified
3429
+ * in Rust, in the {@link breez_sdk_spark} crate.
3430
+ */
3431
+ create,
3432
+
3433
+ /**
3434
+ * Create a frozen instance of {@link SparkInvoicePaymentDetails}, with defaults specified
3435
+ * in Rust, in the {@link breez_sdk_spark} crate.
3436
+ */
3437
+ new: create,
3438
+
3439
+ /**
3440
+ * Defaults specified in the {@link breez_sdk_spark} crate.
3441
+ */
3442
+ defaults: () =>
3443
+ Object.freeze(defaults()) as Partial<SparkInvoicePaymentDetails>,
3444
+ });
3445
+ })();
3446
+
3447
+ const FfiConverterTypeSparkInvoicePaymentDetails = (() => {
3448
+ type TypeName = SparkInvoicePaymentDetails;
3449
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
3450
+ read(from: RustBuffer): TypeName {
3451
+ return {
3452
+ description: FfiConverterOptionalString.read(from),
3453
+ invoice: FfiConverterString.read(from),
3454
+ };
3455
+ }
3456
+ write(value: TypeName, into: RustBuffer): void {
3457
+ FfiConverterOptionalString.write(value.description, into);
3458
+ FfiConverterString.write(value.invoice, into);
3459
+ }
3460
+ allocationSize(value: TypeName): number {
3461
+ return (
3462
+ FfiConverterOptionalString.allocationSize(value.description) +
3463
+ FfiConverterString.allocationSize(value.invoice)
3464
+ );
3465
+ }
3466
+ }
3467
+ return new FFIConverter();
3468
+ })();
3469
+
2946
3470
  /**
2947
3471
  * Request to sync the wallet with the Spark network
2948
3472
  */
@@ -4309,6 +4833,7 @@ export enum PaymentDetails_Tags {
4309
4833
  export const PaymentDetails = (() => {
4310
4834
  type Spark__interface = {
4311
4835
  tag: PaymentDetails_Tags.Spark;
4836
+ inner: Readonly<{ invoiceDetails: SparkInvoicePaymentDetails | undefined }>;
4312
4837
  };
4313
4838
 
4314
4839
  class Spark_ extends UniffiEnum implements Spark__interface {
@@ -4318,12 +4843,24 @@ export const PaymentDetails = (() => {
4318
4843
  */
4319
4844
  readonly [uniffiTypeNameSymbol] = 'PaymentDetails';
4320
4845
  readonly tag = PaymentDetails_Tags.Spark;
4321
- constructor() {
4846
+ readonly inner: Readonly<{
4847
+ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4848
+ }>;
4849
+ constructor(inner: {
4850
+ /**
4851
+ * The invoice details if the payment fulfilled a spark invoice
4852
+ */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4853
+ }) {
4322
4854
  super('PaymentDetails', 'Spark');
4855
+ this.inner = Object.freeze(inner);
4323
4856
  }
4324
4857
 
4325
- static new(): Spark_ {
4326
- return new Spark_();
4858
+ static new(inner: {
4859
+ /**
4860
+ * The invoice details if the payment fulfilled a spark invoice
4861
+ */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4862
+ }): Spark_ {
4863
+ return new Spark_(inner);
4327
4864
  }
4328
4865
 
4329
4866
  static instanceOf(obj: any): obj is Spark_ {
@@ -4333,7 +4870,11 @@ export const PaymentDetails = (() => {
4333
4870
 
4334
4871
  type Token__interface = {
4335
4872
  tag: PaymentDetails_Tags.Token;
4336
- inner: Readonly<{ metadata: TokenMetadata; txHash: string }>;
4873
+ inner: Readonly<{
4874
+ metadata: TokenMetadata;
4875
+ txHash: string;
4876
+ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4877
+ }>;
4337
4878
  };
4338
4879
 
4339
4880
  class Token_ extends UniffiEnum implements Token__interface {
@@ -4343,13 +4884,29 @@ export const PaymentDetails = (() => {
4343
4884
  */
4344
4885
  readonly [uniffiTypeNameSymbol] = 'PaymentDetails';
4345
4886
  readonly tag = PaymentDetails_Tags.Token;
4346
- readonly inner: Readonly<{ metadata: TokenMetadata; txHash: string }>;
4347
- constructor(inner: { metadata: TokenMetadata; txHash: string }) {
4887
+ readonly inner: Readonly<{
4888
+ metadata: TokenMetadata;
4889
+ txHash: string;
4890
+ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4891
+ }>;
4892
+ constructor(inner: {
4893
+ metadata: TokenMetadata;
4894
+ txHash: string;
4895
+ /**
4896
+ * The invoice details if the payment fulfilled a spark invoice
4897
+ */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4898
+ }) {
4348
4899
  super('PaymentDetails', 'Token');
4349
4900
  this.inner = Object.freeze(inner);
4350
4901
  }
4351
4902
 
4352
- static new(inner: { metadata: TokenMetadata; txHash: string }): Token_ {
4903
+ static new(inner: {
4904
+ metadata: TokenMetadata;
4905
+ txHash: string;
4906
+ /**
4907
+ * The invoice details if the payment fulfilled a spark invoice
4908
+ */ invoiceDetails: SparkInvoicePaymentDetails | undefined;
4909
+ }): Token_ {
4353
4910
  return new Token_(inner);
4354
4911
  }
4355
4912
 
@@ -4367,6 +4924,7 @@ export const PaymentDetails = (() => {
4367
4924
  paymentHash: string;
4368
4925
  destinationPubkey: string;
4369
4926
  lnurlPayInfo: LnurlPayInfo | undefined;
4927
+ lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
4370
4928
  }>;
4371
4929
  };
4372
4930
 
@@ -4384,6 +4942,7 @@ export const PaymentDetails = (() => {
4384
4942
  paymentHash: string;
4385
4943
  destinationPubkey: string;
4386
4944
  lnurlPayInfo: LnurlPayInfo | undefined;
4945
+ lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
4387
4946
  }>;
4388
4947
  constructor(inner: {
4389
4948
  /**
@@ -4406,6 +4965,9 @@ export const PaymentDetails = (() => {
4406
4965
  /**
4407
4966
  * Lnurl payment information if this was an lnurl payment.
4408
4967
  */ lnurlPayInfo: LnurlPayInfo | undefined;
4968
+ /**
4969
+ * Lnurl withdrawal information if this was an lnurl payment.
4970
+ */ lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
4409
4971
  }) {
4410
4972
  super('PaymentDetails', 'Lightning');
4411
4973
  this.inner = Object.freeze(inner);
@@ -4432,6 +4994,9 @@ export const PaymentDetails = (() => {
4432
4994
  /**
4433
4995
  * Lnurl payment information if this was an lnurl payment.
4434
4996
  */ lnurlPayInfo: LnurlPayInfo | undefined;
4997
+ /**
4998
+ * Lnurl withdrawal information if this was an lnurl payment.
4999
+ */ lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
4435
5000
  }): Lightning_ {
4436
5001
  return new Lightning_(inner);
4437
5002
  }
@@ -4521,11 +5086,16 @@ const FfiConverterTypePaymentDetails = (() => {
4521
5086
  read(from: RustBuffer): TypeName {
4522
5087
  switch (ordinalConverter.read(from)) {
4523
5088
  case 1:
4524
- return new PaymentDetails.Spark();
5089
+ return new PaymentDetails.Spark({
5090
+ invoiceDetails:
5091
+ FfiConverterOptionalTypeSparkInvoicePaymentDetails.read(from),
5092
+ });
4525
5093
  case 2:
4526
5094
  return new PaymentDetails.Token({
4527
5095
  metadata: FfiConverterTypeTokenMetadata.read(from),
4528
5096
  txHash: FfiConverterString.read(from),
5097
+ invoiceDetails:
5098
+ FfiConverterOptionalTypeSparkInvoicePaymentDetails.read(from),
4529
5099
  });
4530
5100
  case 3:
4531
5101
  return new PaymentDetails.Lightning({
@@ -4535,6 +5105,8 @@ const FfiConverterTypePaymentDetails = (() => {
4535
5105
  paymentHash: FfiConverterString.read(from),
4536
5106
  destinationPubkey: FfiConverterString.read(from),
4537
5107
  lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
5108
+ lnurlWithdrawInfo:
5109
+ FfiConverterOptionalTypeLnurlWithdrawInfo.read(from),
4538
5110
  });
4539
5111
  case 4:
4540
5112
  return new PaymentDetails.Withdraw({
@@ -4552,6 +5124,11 @@ const FfiConverterTypePaymentDetails = (() => {
4552
5124
  switch (value.tag) {
4553
5125
  case PaymentDetails_Tags.Spark: {
4554
5126
  ordinalConverter.write(1, into);
5127
+ const inner = value.inner;
5128
+ FfiConverterOptionalTypeSparkInvoicePaymentDetails.write(
5129
+ inner.invoiceDetails,
5130
+ into
5131
+ );
4555
5132
  return;
4556
5133
  }
4557
5134
  case PaymentDetails_Tags.Token: {
@@ -4559,6 +5136,10 @@ const FfiConverterTypePaymentDetails = (() => {
4559
5136
  const inner = value.inner;
4560
5137
  FfiConverterTypeTokenMetadata.write(inner.metadata, into);
4561
5138
  FfiConverterString.write(inner.txHash, into);
5139
+ FfiConverterOptionalTypeSparkInvoicePaymentDetails.write(
5140
+ inner.invoiceDetails,
5141
+ into
5142
+ );
4562
5143
  return;
4563
5144
  }
4564
5145
  case PaymentDetails_Tags.Lightning: {
@@ -4570,6 +5151,10 @@ const FfiConverterTypePaymentDetails = (() => {
4570
5151
  FfiConverterString.write(inner.paymentHash, into);
4571
5152
  FfiConverterString.write(inner.destinationPubkey, into);
4572
5153
  FfiConverterOptionalTypeLnurlPayInfo.write(inner.lnurlPayInfo, into);
5154
+ FfiConverterOptionalTypeLnurlWithdrawInfo.write(
5155
+ inner.lnurlWithdrawInfo,
5156
+ into
5157
+ );
4573
5158
  return;
4574
5159
  }
4575
5160
  case PaymentDetails_Tags.Withdraw: {
@@ -4592,13 +5177,23 @@ const FfiConverterTypePaymentDetails = (() => {
4592
5177
  allocationSize(value: TypeName): number {
4593
5178
  switch (value.tag) {
4594
5179
  case PaymentDetails_Tags.Spark: {
4595
- return ordinalConverter.allocationSize(1);
5180
+ const inner = value.inner;
5181
+ let size = ordinalConverter.allocationSize(1);
5182
+ size +=
5183
+ FfiConverterOptionalTypeSparkInvoicePaymentDetails.allocationSize(
5184
+ inner.invoiceDetails
5185
+ );
5186
+ return size;
4596
5187
  }
4597
5188
  case PaymentDetails_Tags.Token: {
4598
5189
  const inner = value.inner;
4599
5190
  let size = ordinalConverter.allocationSize(2);
4600
5191
  size += FfiConverterTypeTokenMetadata.allocationSize(inner.metadata);
4601
5192
  size += FfiConverterString.allocationSize(inner.txHash);
5193
+ size +=
5194
+ FfiConverterOptionalTypeSparkInvoicePaymentDetails.allocationSize(
5195
+ inner.invoiceDetails
5196
+ );
4602
5197
  return size;
4603
5198
  }
4604
5199
  case PaymentDetails_Tags.Lightning: {
@@ -4612,6 +5207,9 @@ const FfiConverterTypePaymentDetails = (() => {
4612
5207
  size += FfiConverterOptionalTypeLnurlPayInfo.allocationSize(
4613
5208
  inner.lnurlPayInfo
4614
5209
  );
5210
+ size += FfiConverterOptionalTypeLnurlWithdrawInfo.allocationSize(
5211
+ inner.lnurlWithdrawInfo
5212
+ );
4615
5213
  return size;
4616
5214
  }
4617
5215
  case PaymentDetails_Tags.Withdraw: {
@@ -5021,7 +5619,7 @@ export const ProvisionalPaymentDetails = (() => {
5021
5619
 
5022
5620
  type Spark__interface = {
5023
5621
  tag: ProvisionalPaymentDetails_Tags.Spark;
5024
- inner: Readonly<{ receiverAddress: string }>;
5622
+ inner: Readonly<{ payRequest: string }>;
5025
5623
  };
5026
5624
 
5027
5625
  class Spark_ extends UniffiEnum implements Spark__interface {
@@ -5031,11 +5629,11 @@ export const ProvisionalPaymentDetails = (() => {
5031
5629
  */
5032
5630
  readonly [uniffiTypeNameSymbol] = 'ProvisionalPaymentDetails';
5033
5631
  readonly tag = ProvisionalPaymentDetails_Tags.Spark;
5034
- readonly inner: Readonly<{ receiverAddress: string }>;
5632
+ readonly inner: Readonly<{ payRequest: string }>;
5035
5633
  constructor(inner: {
5036
5634
  /**
5037
- * Spark receiver address
5038
- */ receiverAddress: string;
5635
+ * Spark pay request being paid (either a Spark address or a Spark invoice)
5636
+ */ payRequest: string;
5039
5637
  }) {
5040
5638
  super('ProvisionalPaymentDetails', 'Spark');
5041
5639
  this.inner = Object.freeze(inner);
@@ -5043,8 +5641,8 @@ export const ProvisionalPaymentDetails = (() => {
5043
5641
 
5044
5642
  static new(inner: {
5045
5643
  /**
5046
- * Spark receiver address
5047
- */ receiverAddress: string;
5644
+ * Spark pay request being paid (either a Spark address or a Spark invoice)
5645
+ */ payRequest: string;
5048
5646
  }): Spark_ {
5049
5647
  return new Spark_(inner);
5050
5648
  }
@@ -5056,7 +5654,7 @@ export const ProvisionalPaymentDetails = (() => {
5056
5654
 
5057
5655
  type Token__interface = {
5058
5656
  tag: ProvisionalPaymentDetails_Tags.Token;
5059
- inner: Readonly<{ tokenId: string; receiverAddress: string }>;
5657
+ inner: Readonly<{ tokenId: string; payRequest: string }>;
5060
5658
  };
5061
5659
 
5062
5660
  class Token_ extends UniffiEnum implements Token__interface {
@@ -5066,14 +5664,14 @@ export const ProvisionalPaymentDetails = (() => {
5066
5664
  */
5067
5665
  readonly [uniffiTypeNameSymbol] = 'ProvisionalPaymentDetails';
5068
5666
  readonly tag = ProvisionalPaymentDetails_Tags.Token;
5069
- readonly inner: Readonly<{ tokenId: string; receiverAddress: string }>;
5667
+ readonly inner: Readonly<{ tokenId: string; payRequest: string }>;
5070
5668
  constructor(inner: {
5071
5669
  /**
5072
5670
  * Token identifier
5073
5671
  */ tokenId: string;
5074
5672
  /**
5075
- * Spark receiver address
5076
- */ receiverAddress: string;
5673
+ * Spark pay request being paid (either a Spark address or a Spark invoice)
5674
+ */ payRequest: string;
5077
5675
  }) {
5078
5676
  super('ProvisionalPaymentDetails', 'Token');
5079
5677
  this.inner = Object.freeze(inner);
@@ -5084,8 +5682,8 @@ export const ProvisionalPaymentDetails = (() => {
5084
5682
  * Token identifier
5085
5683
  */ tokenId: string;
5086
5684
  /**
5087
- * Spark receiver address
5088
- */ receiverAddress: string;
5685
+ * Spark pay request being paid (either a Spark address or a Spark invoice)
5686
+ */ payRequest: string;
5089
5687
  }): Token_ {
5090
5688
  return new Token_(inner);
5091
5689
  }
@@ -5132,12 +5730,12 @@ const FfiConverterTypeProvisionalPaymentDetails = (() => {
5132
5730
  });
5133
5731
  case 3:
5134
5732
  return new ProvisionalPaymentDetails.Spark({
5135
- receiverAddress: FfiConverterString.read(from),
5733
+ payRequest: FfiConverterString.read(from),
5136
5734
  });
5137
5735
  case 4:
5138
5736
  return new ProvisionalPaymentDetails.Token({
5139
5737
  tokenId: FfiConverterString.read(from),
5140
- receiverAddress: FfiConverterString.read(from),
5738
+ payRequest: FfiConverterString.read(from),
5141
5739
  });
5142
5740
  default:
5143
5741
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -5160,14 +5758,14 @@ const FfiConverterTypeProvisionalPaymentDetails = (() => {
5160
5758
  case ProvisionalPaymentDetails_Tags.Spark: {
5161
5759
  ordinalConverter.write(3, into);
5162
5760
  const inner = value.inner;
5163
- FfiConverterString.write(inner.receiverAddress, into);
5761
+ FfiConverterString.write(inner.payRequest, into);
5164
5762
  return;
5165
5763
  }
5166
5764
  case ProvisionalPaymentDetails_Tags.Token: {
5167
5765
  ordinalConverter.write(4, into);
5168
5766
  const inner = value.inner;
5169
5767
  FfiConverterString.write(inner.tokenId, into);
5170
- FfiConverterString.write(inner.receiverAddress, into);
5768
+ FfiConverterString.write(inner.payRequest, into);
5171
5769
  return;
5172
5770
  }
5173
5771
  default:
@@ -5192,14 +5790,14 @@ const FfiConverterTypeProvisionalPaymentDetails = (() => {
5192
5790
  case ProvisionalPaymentDetails_Tags.Spark: {
5193
5791
  const inner = value.inner;
5194
5792
  let size = ordinalConverter.allocationSize(3);
5195
- size += FfiConverterString.allocationSize(inner.receiverAddress);
5793
+ size += FfiConverterString.allocationSize(inner.payRequest);
5196
5794
  return size;
5197
5795
  }
5198
5796
  case ProvisionalPaymentDetails_Tags.Token: {
5199
5797
  const inner = value.inner;
5200
5798
  let size = ordinalConverter.allocationSize(4);
5201
5799
  size += FfiConverterString.allocationSize(inner.tokenId);
5202
- size += FfiConverterString.allocationSize(inner.receiverAddress);
5800
+ size += FfiConverterString.allocationSize(inner.payRequest);
5203
5801
  return size;
5204
5802
  }
5205
5803
  default:
@@ -5213,6 +5811,7 @@ const FfiConverterTypeProvisionalPaymentDetails = (() => {
5213
5811
  // Enum: ReceivePaymentMethod
5214
5812
  export enum ReceivePaymentMethod_Tags {
5215
5813
  SparkAddress = 'SparkAddress',
5814
+ SparkInvoice = 'SparkInvoice',
5216
5815
  BitcoinAddress = 'BitcoinAddress',
5217
5816
  Bolt11Invoice = 'Bolt11Invoice',
5218
5817
  }
@@ -5232,12 +5831,85 @@ export const ReceivePaymentMethod = (() => {
5232
5831
  super('ReceivePaymentMethod', 'SparkAddress');
5233
5832
  }
5234
5833
 
5235
- static new(): SparkAddress_ {
5236
- return new SparkAddress_();
5834
+ static new(): SparkAddress_ {
5835
+ return new SparkAddress_();
5836
+ }
5837
+
5838
+ static instanceOf(obj: any): obj is SparkAddress_ {
5839
+ return obj.tag === ReceivePaymentMethod_Tags.SparkAddress;
5840
+ }
5841
+ }
5842
+
5843
+ type SparkInvoice__interface = {
5844
+ tag: ReceivePaymentMethod_Tags.SparkInvoice;
5845
+ inner: Readonly<{
5846
+ amount: U128 | undefined;
5847
+ tokenIdentifier: string | undefined;
5848
+ expiryTime: /*u64*/ bigint | undefined;
5849
+ description: string | undefined;
5850
+ senderPublicKey: string | undefined;
5851
+ }>;
5852
+ };
5853
+
5854
+ class SparkInvoice_ extends UniffiEnum implements SparkInvoice__interface {
5855
+ /**
5856
+ * @private
5857
+ * This field is private and should not be used, use `tag` instead.
5858
+ */
5859
+ readonly [uniffiTypeNameSymbol] = 'ReceivePaymentMethod';
5860
+ readonly tag = ReceivePaymentMethod_Tags.SparkInvoice;
5861
+ readonly inner: Readonly<{
5862
+ amount: U128 | undefined;
5863
+ tokenIdentifier: string | undefined;
5864
+ expiryTime: /*u64*/ bigint | undefined;
5865
+ description: string | undefined;
5866
+ senderPublicKey: string | undefined;
5867
+ }>;
5868
+ constructor(inner: {
5869
+ /**
5870
+ * Amount to receive. Denominated in sats if token identifier is empty, otherwise in the token base units
5871
+ */ amount: U128 | undefined;
5872
+ /**
5873
+ * The presence of this field indicates that the payment is for a token
5874
+ * If empty, it is a Bitcoin payment
5875
+ */ tokenIdentifier: string | undefined;
5876
+ /**
5877
+ * The expiry time of the invoice in seconds since the Unix epoch
5878
+ */ expiryTime: /*u64*/ bigint | undefined;
5879
+ /**
5880
+ * A description to embed in the invoice.
5881
+ */ description: string | undefined;
5882
+ /**
5883
+ * If set, the invoice may only be fulfilled by a payer with this public key
5884
+ */ senderPublicKey: string | undefined;
5885
+ }) {
5886
+ super('ReceivePaymentMethod', 'SparkInvoice');
5887
+ this.inner = Object.freeze(inner);
5888
+ }
5889
+
5890
+ static new(inner: {
5891
+ /**
5892
+ * Amount to receive. Denominated in sats if token identifier is empty, otherwise in the token base units
5893
+ */ amount: U128 | undefined;
5894
+ /**
5895
+ * The presence of this field indicates that the payment is for a token
5896
+ * If empty, it is a Bitcoin payment
5897
+ */ tokenIdentifier: string | undefined;
5898
+ /**
5899
+ * The expiry time of the invoice in seconds since the Unix epoch
5900
+ */ expiryTime: /*u64*/ bigint | undefined;
5901
+ /**
5902
+ * A description to embed in the invoice.
5903
+ */ description: string | undefined;
5904
+ /**
5905
+ * If set, the invoice may only be fulfilled by a payer with this public key
5906
+ */ senderPublicKey: string | undefined;
5907
+ }): SparkInvoice_ {
5908
+ return new SparkInvoice_(inner);
5237
5909
  }
5238
5910
 
5239
- static instanceOf(obj: any): obj is SparkAddress_ {
5240
- return obj.tag === ReceivePaymentMethod_Tags.SparkAddress;
5911
+ static instanceOf(obj: any): obj is SparkInvoice_ {
5912
+ return obj.tag === ReceivePaymentMethod_Tags.SparkInvoice;
5241
5913
  }
5242
5914
  }
5243
5915
 
@@ -5314,6 +5986,7 @@ export const ReceivePaymentMethod = (() => {
5314
5986
  return Object.freeze({
5315
5987
  instanceOf,
5316
5988
  SparkAddress: SparkAddress_,
5989
+ SparkInvoice: SparkInvoice_,
5317
5990
  BitcoinAddress: BitcoinAddress_,
5318
5991
  Bolt11Invoice: Bolt11Invoice_,
5319
5992
  });
@@ -5336,8 +6009,16 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
5336
6009
  case 1:
5337
6010
  return new ReceivePaymentMethod.SparkAddress();
5338
6011
  case 2:
5339
- return new ReceivePaymentMethod.BitcoinAddress();
6012
+ return new ReceivePaymentMethod.SparkInvoice({
6013
+ amount: FfiConverterOptionalTypeu128.read(from),
6014
+ tokenIdentifier: FfiConverterOptionalString.read(from),
6015
+ expiryTime: FfiConverterOptionalUInt64.read(from),
6016
+ description: FfiConverterOptionalString.read(from),
6017
+ senderPublicKey: FfiConverterOptionalString.read(from),
6018
+ });
5340
6019
  case 3:
6020
+ return new ReceivePaymentMethod.BitcoinAddress();
6021
+ case 4:
5341
6022
  return new ReceivePaymentMethod.Bolt11Invoice({
5342
6023
  description: FfiConverterString.read(from),
5343
6024
  amountSats: FfiConverterOptionalUInt64.read(from),
@@ -5352,12 +6033,22 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
5352
6033
  ordinalConverter.write(1, into);
5353
6034
  return;
5354
6035
  }
5355
- case ReceivePaymentMethod_Tags.BitcoinAddress: {
6036
+ case ReceivePaymentMethod_Tags.SparkInvoice: {
5356
6037
  ordinalConverter.write(2, into);
6038
+ const inner = value.inner;
6039
+ FfiConverterOptionalTypeu128.write(inner.amount, into);
6040
+ FfiConverterOptionalString.write(inner.tokenIdentifier, into);
6041
+ FfiConverterOptionalUInt64.write(inner.expiryTime, into);
6042
+ FfiConverterOptionalString.write(inner.description, into);
6043
+ FfiConverterOptionalString.write(inner.senderPublicKey, into);
5357
6044
  return;
5358
6045
  }
5359
- case ReceivePaymentMethod_Tags.Bolt11Invoice: {
6046
+ case ReceivePaymentMethod_Tags.BitcoinAddress: {
5360
6047
  ordinalConverter.write(3, into);
6048
+ return;
6049
+ }
6050
+ case ReceivePaymentMethod_Tags.Bolt11Invoice: {
6051
+ ordinalConverter.write(4, into);
5361
6052
  const inner = value.inner;
5362
6053
  FfiConverterString.write(inner.description, into);
5363
6054
  FfiConverterOptionalUInt64.write(inner.amountSats, into);
@@ -5373,12 +6064,26 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
5373
6064
  case ReceivePaymentMethod_Tags.SparkAddress: {
5374
6065
  return ordinalConverter.allocationSize(1);
5375
6066
  }
6067
+ case ReceivePaymentMethod_Tags.SparkInvoice: {
6068
+ const inner = value.inner;
6069
+ let size = ordinalConverter.allocationSize(2);
6070
+ size += FfiConverterOptionalTypeu128.allocationSize(inner.amount);
6071
+ size += FfiConverterOptionalString.allocationSize(
6072
+ inner.tokenIdentifier
6073
+ );
6074
+ size += FfiConverterOptionalUInt64.allocationSize(inner.expiryTime);
6075
+ size += FfiConverterOptionalString.allocationSize(inner.description);
6076
+ size += FfiConverterOptionalString.allocationSize(
6077
+ inner.senderPublicKey
6078
+ );
6079
+ return size;
6080
+ }
5376
6081
  case ReceivePaymentMethod_Tags.BitcoinAddress: {
5377
- return ordinalConverter.allocationSize(2);
6082
+ return ordinalConverter.allocationSize(3);
5378
6083
  }
5379
6084
  case ReceivePaymentMethod_Tags.Bolt11Invoice: {
5380
6085
  const inner = value.inner;
5381
- let size = ordinalConverter.allocationSize(3);
6086
+ let size = ordinalConverter.allocationSize(4);
5382
6087
  size += FfiConverterString.allocationSize(inner.description);
5383
6088
  size += FfiConverterOptionalUInt64.allocationSize(inner.amountSats);
5384
6089
  return size;
@@ -6478,6 +7183,7 @@ export enum SendPaymentMethod_Tags {
6478
7183
  BitcoinAddress = 'BitcoinAddress',
6479
7184
  Bolt11Invoice = 'Bolt11Invoice',
6480
7185
  SparkAddress = 'SparkAddress',
7186
+ SparkInvoice = 'SparkInvoice',
6481
7187
  }
6482
7188
  export const SendPaymentMethod = (() => {
6483
7189
  type BitcoinAddress__interface = {
@@ -6620,6 +7326,61 @@ export const SendPaymentMethod = (() => {
6620
7326
  }
6621
7327
  }
6622
7328
 
7329
+ type SparkInvoice__interface = {
7330
+ tag: SendPaymentMethod_Tags.SparkInvoice;
7331
+ inner: Readonly<{
7332
+ sparkInvoiceDetails: SparkInvoiceDetails;
7333
+ fee: U128;
7334
+ tokenIdentifier: string | undefined;
7335
+ }>;
7336
+ };
7337
+
7338
+ class SparkInvoice_ extends UniffiEnum implements SparkInvoice__interface {
7339
+ /**
7340
+ * @private
7341
+ * This field is private and should not be used, use `tag` instead.
7342
+ */
7343
+ readonly [uniffiTypeNameSymbol] = 'SendPaymentMethod';
7344
+ readonly tag = SendPaymentMethod_Tags.SparkInvoice;
7345
+ readonly inner: Readonly<{
7346
+ sparkInvoiceDetails: SparkInvoiceDetails;
7347
+ fee: U128;
7348
+ tokenIdentifier: string | undefined;
7349
+ }>;
7350
+ constructor(inner: {
7351
+ sparkInvoiceDetails: SparkInvoiceDetails;
7352
+ /**
7353
+ * Fee to pay for the transaction
7354
+ * Denominated in sats if token identifier is empty, otherwise in the token base units
7355
+ */ fee: U128;
7356
+ /**
7357
+ * The presence of this field indicates that the payment is for a token
7358
+ * If empty, it is a Bitcoin payment
7359
+ */ tokenIdentifier: string | undefined;
7360
+ }) {
7361
+ super('SendPaymentMethod', 'SparkInvoice');
7362
+ this.inner = Object.freeze(inner);
7363
+ }
7364
+
7365
+ static new(inner: {
7366
+ sparkInvoiceDetails: SparkInvoiceDetails;
7367
+ /**
7368
+ * Fee to pay for the transaction
7369
+ * Denominated in sats if token identifier is empty, otherwise in the token base units
7370
+ */ fee: U128;
7371
+ /**
7372
+ * The presence of this field indicates that the payment is for a token
7373
+ * If empty, it is a Bitcoin payment
7374
+ */ tokenIdentifier: string | undefined;
7375
+ }): SparkInvoice_ {
7376
+ return new SparkInvoice_(inner);
7377
+ }
7378
+
7379
+ static instanceOf(obj: any): obj is SparkInvoice_ {
7380
+ return obj.tag === SendPaymentMethod_Tags.SparkInvoice;
7381
+ }
7382
+ }
7383
+
6623
7384
  function instanceOf(obj: any): obj is SendPaymentMethod {
6624
7385
  return obj[uniffiTypeNameSymbol] === 'SendPaymentMethod';
6625
7386
  }
@@ -6629,6 +7390,7 @@ export const SendPaymentMethod = (() => {
6629
7390
  BitcoinAddress: BitcoinAddress_,
6630
7391
  Bolt11Invoice: Bolt11Invoice_,
6631
7392
  SparkAddress: SparkAddress_,
7393
+ SparkInvoice: SparkInvoice_,
6632
7394
  });
6633
7395
  })();
6634
7396
 
@@ -6660,6 +7422,12 @@ const FfiConverterTypeSendPaymentMethod = (() => {
6660
7422
  fee: FfiConverterTypeu128.read(from),
6661
7423
  tokenIdentifier: FfiConverterOptionalString.read(from),
6662
7424
  });
7425
+ case 4:
7426
+ return new SendPaymentMethod.SparkInvoice({
7427
+ sparkInvoiceDetails: FfiConverterTypeSparkInvoiceDetails.read(from),
7428
+ fee: FfiConverterTypeu128.read(from),
7429
+ tokenIdentifier: FfiConverterOptionalString.read(from),
7430
+ });
6663
7431
  default:
6664
7432
  throw new UniffiInternalError.UnexpectedEnumCase();
6665
7433
  }
@@ -6692,6 +7460,17 @@ const FfiConverterTypeSendPaymentMethod = (() => {
6692
7460
  FfiConverterOptionalString.write(inner.tokenIdentifier, into);
6693
7461
  return;
6694
7462
  }
7463
+ case SendPaymentMethod_Tags.SparkInvoice: {
7464
+ ordinalConverter.write(4, into);
7465
+ const inner = value.inner;
7466
+ FfiConverterTypeSparkInvoiceDetails.write(
7467
+ inner.sparkInvoiceDetails,
7468
+ into
7469
+ );
7470
+ FfiConverterTypeu128.write(inner.fee, into);
7471
+ FfiConverterOptionalString.write(inner.tokenIdentifier, into);
7472
+ return;
7473
+ }
6695
7474
  default:
6696
7475
  // Throwing from here means that SendPaymentMethod_Tags hasn't matched an ordinal.
6697
7476
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -6732,6 +7511,18 @@ const FfiConverterTypeSendPaymentMethod = (() => {
6732
7511
  );
6733
7512
  return size;
6734
7513
  }
7514
+ case SendPaymentMethod_Tags.SparkInvoice: {
7515
+ const inner = value.inner;
7516
+ let size = ordinalConverter.allocationSize(4);
7517
+ size += FfiConverterTypeSparkInvoiceDetails.allocationSize(
7518
+ inner.sparkInvoiceDetails
7519
+ );
7520
+ size += FfiConverterTypeu128.allocationSize(inner.fee);
7521
+ size += FfiConverterOptionalString.allocationSize(
7522
+ inner.tokenIdentifier
7523
+ );
7524
+ return size;
7525
+ }
6735
7526
  default:
6736
7527
  throw new UniffiInternalError.UnexpectedEnumCase();
6737
7528
  }
@@ -7916,6 +8707,15 @@ export interface BreezSdkInterface {
7916
8707
  req: CheckLightningAddressRequest,
7917
8708
  asyncOpts_?: { signal: AbortSignal }
7918
8709
  ) /*throws*/ : Promise<boolean>;
8710
+ /**
8711
+ * Verifies a message signature against the provided public key. The message
8712
+ * is SHA256 hashed before verification. The signature can be hex encoded
8713
+ * in either DER or compact format.
8714
+ */
8715
+ checkMessage(
8716
+ request: CheckMessageRequest,
8717
+ asyncOpts_?: { signal: AbortSignal }
8718
+ ) /*throws*/ : Promise<CheckMessageResponse>;
7919
8719
  claimDeposit(
7920
8720
  request: ClaimDepositRequest,
7921
8721
  asyncOpts_?: { signal: AbortSignal }
@@ -8001,6 +8801,37 @@ export interface BreezSdkInterface {
8001
8801
  request: LnurlPayRequest,
8002
8802
  asyncOpts_?: { signal: AbortSignal }
8003
8803
  ) /*throws*/ : Promise<LnurlPayResponse>;
8804
+ /**
8805
+ * Performs an LNURL withdraw operation for the amount of satoshis to
8806
+ * withdraw and the LNURL withdraw request details. The LNURL withdraw request
8807
+ * details can be obtained from calling [`BreezSdk::parse`].
8808
+ *
8809
+ * The method generates a Lightning invoice for the withdraw amount, stores
8810
+ * the LNURL withdraw metadata, and performs the LNURL withdraw using the generated
8811
+ * invoice.
8812
+ *
8813
+ * If the `completion_timeout_secs` parameter is provided and greater than 0, the
8814
+ * method will wait for the payment to be completed within that period. If the
8815
+ * withdraw is completed within the timeout, the `payment` field in the response
8816
+ * will be set with the payment details. If the `completion_timeout_secs`
8817
+ * parameter is not provided or set to 0, the method will not wait for the payment
8818
+ * to be completed. If the withdraw is not completed within the
8819
+ * timeout, the `payment` field will be empty.
8820
+ *
8821
+ * # Arguments
8822
+ *
8823
+ * * `request` - The LNURL withdraw request
8824
+ *
8825
+ * # Returns
8826
+ *
8827
+ * Result containing either:
8828
+ * * `LnurlWithdrawResponse` - The payment details if the withdraw request was successful
8829
+ * * `SdkError` - If there was an error during the withdraw process
8830
+ */
8831
+ lnurlWithdraw(
8832
+ request: LnurlWithdrawRequest,
8833
+ asyncOpts_?: { signal: AbortSignal }
8834
+ ) /*throws*/ : Promise<LnurlWithdrawResponse>;
8004
8835
  parse(
8005
8836
  input: string,
8006
8837
  asyncOpts_?: { signal: AbortSignal }
@@ -8044,6 +8875,15 @@ export interface BreezSdkInterface {
8044
8875
  request: SendPaymentRequest,
8045
8876
  asyncOpts_?: { signal: AbortSignal }
8046
8877
  ) /*throws*/ : Promise<SendPaymentResponse>;
8878
+ /**
8879
+ * Signs a message with the wallet's identity key. The message is SHA256
8880
+ * hashed before signing. The returned signature will be hex encoded in
8881
+ * DER format by default, or compact format if specified.
8882
+ */
8883
+ signMessage(
8884
+ request: SignMessageRequest,
8885
+ asyncOpts_?: { signal: AbortSignal }
8886
+ ) /*throws*/ : Promise<SignMessageResponse>;
8047
8887
  /**
8048
8888
  * Synchronizes the wallet with the Spark network
8049
8889
  */
@@ -8158,6 +8998,50 @@ export class BreezSdk
8158
8998
  }
8159
8999
  }
8160
9000
 
9001
+ /**
9002
+ * Verifies a message signature against the provided public key. The message
9003
+ * is SHA256 hashed before verification. The signature can be hex encoded
9004
+ * in either DER or compact format.
9005
+ */
9006
+ public async checkMessage(
9007
+ request: CheckMessageRequest,
9008
+ asyncOpts_?: { signal: AbortSignal }
9009
+ ): Promise<CheckMessageResponse> /*throws*/ {
9010
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
9011
+ try {
9012
+ return await uniffiRustCallAsync(
9013
+ /*rustCaller:*/ uniffiCaller,
9014
+ /*rustFutureFunc:*/ () => {
9015
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(
9016
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
9017
+ FfiConverterTypeCheckMessageRequest.lower(request)
9018
+ );
9019
+ },
9020
+ /*pollFunc:*/ nativeModule()
9021
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
9022
+ /*cancelFunc:*/ nativeModule()
9023
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
9024
+ /*completeFunc:*/ nativeModule()
9025
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
9026
+ /*freeFunc:*/ nativeModule()
9027
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
9028
+ /*liftFunc:*/ FfiConverterTypeCheckMessageResponse.lift.bind(
9029
+ FfiConverterTypeCheckMessageResponse
9030
+ ),
9031
+ /*liftString:*/ FfiConverterString.lift,
9032
+ /*asyncOpts:*/ asyncOpts_,
9033
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
9034
+ FfiConverterTypeSdkError
9035
+ )
9036
+ );
9037
+ } catch (__error: any) {
9038
+ if (uniffiIsDebug && __error instanceof Error) {
9039
+ __error.stack = __stack;
9040
+ }
9041
+ throw __error;
9042
+ }
9043
+ }
9044
+
8161
9045
  public async claimDeposit(
8162
9046
  request: ClaimDepositRequest,
8163
9047
  asyncOpts_?: { signal: AbortSignal }
@@ -8656,6 +9540,72 @@ export class BreezSdk
8656
9540
  }
8657
9541
  }
8658
9542
 
9543
+ /**
9544
+ * Performs an LNURL withdraw operation for the amount of satoshis to
9545
+ * withdraw and the LNURL withdraw request details. The LNURL withdraw request
9546
+ * details can be obtained from calling [`BreezSdk::parse`].
9547
+ *
9548
+ * The method generates a Lightning invoice for the withdraw amount, stores
9549
+ * the LNURL withdraw metadata, and performs the LNURL withdraw using the generated
9550
+ * invoice.
9551
+ *
9552
+ * If the `completion_timeout_secs` parameter is provided and greater than 0, the
9553
+ * method will wait for the payment to be completed within that period. If the
9554
+ * withdraw is completed within the timeout, the `payment` field in the response
9555
+ * will be set with the payment details. If the `completion_timeout_secs`
9556
+ * parameter is not provided or set to 0, the method will not wait for the payment
9557
+ * to be completed. If the withdraw is not completed within the
9558
+ * timeout, the `payment` field will be empty.
9559
+ *
9560
+ * # Arguments
9561
+ *
9562
+ * * `request` - The LNURL withdraw request
9563
+ *
9564
+ * # Returns
9565
+ *
9566
+ * Result containing either:
9567
+ * * `LnurlWithdrawResponse` - The payment details if the withdraw request was successful
9568
+ * * `SdkError` - If there was an error during the withdraw process
9569
+ */
9570
+ public async lnurlWithdraw(
9571
+ request: LnurlWithdrawRequest,
9572
+ asyncOpts_?: { signal: AbortSignal }
9573
+ ): Promise<LnurlWithdrawResponse> /*throws*/ {
9574
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
9575
+ try {
9576
+ return await uniffiRustCallAsync(
9577
+ /*rustCaller:*/ uniffiCaller,
9578
+ /*rustFutureFunc:*/ () => {
9579
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_withdraw(
9580
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
9581
+ FfiConverterTypeLnurlWithdrawRequest.lower(request)
9582
+ );
9583
+ },
9584
+ /*pollFunc:*/ nativeModule()
9585
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
9586
+ /*cancelFunc:*/ nativeModule()
9587
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
9588
+ /*completeFunc:*/ nativeModule()
9589
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
9590
+ /*freeFunc:*/ nativeModule()
9591
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
9592
+ /*liftFunc:*/ FfiConverterTypeLnurlWithdrawResponse.lift.bind(
9593
+ FfiConverterTypeLnurlWithdrawResponse
9594
+ ),
9595
+ /*liftString:*/ FfiConverterString.lift,
9596
+ /*asyncOpts:*/ asyncOpts_,
9597
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
9598
+ FfiConverterTypeSdkError
9599
+ )
9600
+ );
9601
+ } catch (__error: any) {
9602
+ if (uniffiIsDebug && __error instanceof Error) {
9603
+ __error.stack = __stack;
9604
+ }
9605
+ throw __error;
9606
+ }
9607
+ }
9608
+
8659
9609
  public async parse(
8660
9610
  input: string,
8661
9611
  asyncOpts_?: { signal: AbortSignal }
@@ -8974,6 +9924,50 @@ export class BreezSdk
8974
9924
  }
8975
9925
  }
8976
9926
 
9927
+ /**
9928
+ * Signs a message with the wallet's identity key. The message is SHA256
9929
+ * hashed before signing. The returned signature will be hex encoded in
9930
+ * DER format by default, or compact format if specified.
9931
+ */
9932
+ public async signMessage(
9933
+ request: SignMessageRequest,
9934
+ asyncOpts_?: { signal: AbortSignal }
9935
+ ): Promise<SignMessageResponse> /*throws*/ {
9936
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
9937
+ try {
9938
+ return await uniffiRustCallAsync(
9939
+ /*rustCaller:*/ uniffiCaller,
9940
+ /*rustFutureFunc:*/ () => {
9941
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sign_message(
9942
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
9943
+ FfiConverterTypeSignMessageRequest.lower(request)
9944
+ );
9945
+ },
9946
+ /*pollFunc:*/ nativeModule()
9947
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
9948
+ /*cancelFunc:*/ nativeModule()
9949
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
9950
+ /*completeFunc:*/ nativeModule()
9951
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
9952
+ /*freeFunc:*/ nativeModule()
9953
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
9954
+ /*liftFunc:*/ FfiConverterTypeSignMessageResponse.lift.bind(
9955
+ FfiConverterTypeSignMessageResponse
9956
+ ),
9957
+ /*liftString:*/ FfiConverterString.lift,
9958
+ /*asyncOpts:*/ asyncOpts_,
9959
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
9960
+ FfiConverterTypeSdkError
9961
+ )
9962
+ );
9963
+ } catch (__error: any) {
9964
+ if (uniffiIsDebug && __error instanceof Error) {
9965
+ __error.stack = __stack;
9966
+ }
9967
+ throw __error;
9968
+ }
9969
+ }
9970
+
8977
9971
  /**
8978
9972
  * Synchronizes the wallet with the Spark network
8979
9973
  */
@@ -11219,11 +12213,20 @@ const FfiConverterOptionalTypeLnurlPayInfo = new FfiConverterOptional(
11219
12213
  FfiConverterTypeLnurlPayInfo
11220
12214
  );
11221
12215
 
12216
+ // FfiConverter for LnurlWithdrawInfo | undefined
12217
+ const FfiConverterOptionalTypeLnurlWithdrawInfo = new FfiConverterOptional(
12218
+ FfiConverterTypeLnurlWithdrawInfo
12219
+ );
12220
+
11222
12221
  // FfiConverter for Payment | undefined
11223
12222
  const FfiConverterOptionalTypePayment = new FfiConverterOptional(
11224
12223
  FfiConverterTypePayment
11225
12224
  );
11226
12225
 
12226
+ // FfiConverter for SparkInvoicePaymentDetails | undefined
12227
+ const FfiConverterOptionalTypeSparkInvoicePaymentDetails =
12228
+ new FfiConverterOptional(FfiConverterTypeSparkInvoicePaymentDetails);
12229
+
11227
12230
  // FfiConverter for string | undefined
11228
12231
  const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
11229
12232
 
@@ -11427,6 +12430,14 @@ function uniffiEnsureInitialized() {
11427
12430
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available'
11428
12431
  );
11429
12432
  }
12433
+ if (
12434
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message() !==
12435
+ 4385
12436
+ ) {
12437
+ throw new UniffiInternalError.ApiChecksumMismatch(
12438
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message'
12439
+ );
12440
+ }
11430
12441
  if (
11431
12442
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit() !==
11432
12443
  43529
@@ -11523,6 +12534,14 @@ function uniffiEnsureInitialized() {
11523
12534
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay'
11524
12535
  );
11525
12536
  }
12537
+ if (
12538
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw() !==
12539
+ 45652
12540
+ ) {
12541
+ throw new UniffiInternalError.ApiChecksumMismatch(
12542
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw'
12543
+ );
12544
+ }
11526
12545
  if (
11527
12546
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_parse() !==
11528
12547
  195
@@ -11587,6 +12606,14 @@ function uniffiEnsureInitialized() {
11587
12606
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment'
11588
12607
  );
11589
12608
  }
12609
+ if (
12610
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message() !==
12611
+ 57563
12612
+ ) {
12613
+ throw new UniffiInternalError.ApiChecksumMismatch(
12614
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message'
12615
+ );
12616
+ }
11590
12617
  if (
11591
12618
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() !==
11592
12619
  30368
@@ -11802,6 +12829,8 @@ export default Object.freeze({
11802
12829
  FfiConverterTypeBitcoinChainService,
11803
12830
  FfiConverterTypeBreezSdk,
11804
12831
  FfiConverterTypeCheckLightningAddressRequest,
12832
+ FfiConverterTypeCheckMessageRequest,
12833
+ FfiConverterTypeCheckMessageResponse,
11805
12834
  FfiConverterTypeClaimDepositRequest,
11806
12835
  FfiConverterTypeClaimDepositResponse,
11807
12836
  FfiConverterTypeConfig,
@@ -11827,6 +12856,9 @@ export default Object.freeze({
11827
12856
  FfiConverterTypeLnurlPayInfo,
11828
12857
  FfiConverterTypeLnurlPayRequest,
11829
12858
  FfiConverterTypeLnurlPayResponse,
12859
+ FfiConverterTypeLnurlWithdrawInfo,
12860
+ FfiConverterTypeLnurlWithdrawRequest,
12861
+ FfiConverterTypeLnurlWithdrawResponse,
11830
12862
  FfiConverterTypeLogEntry,
11831
12863
  FfiConverterTypeNetwork,
11832
12864
  FfiConverterTypeOnchainConfirmationSpeed,
@@ -11858,6 +12890,9 @@ export default Object.freeze({
11858
12890
  FfiConverterTypeSendPaymentOptions,
11859
12891
  FfiConverterTypeSendPaymentRequest,
11860
12892
  FfiConverterTypeSendPaymentResponse,
12893
+ FfiConverterTypeSignMessageRequest,
12894
+ FfiConverterTypeSignMessageResponse,
12895
+ FfiConverterTypeSparkInvoicePaymentDetails,
11861
12896
  FfiConverterTypeStorage,
11862
12897
  FfiConverterTypeSyncWalletRequest,
11863
12898
  FfiConverterTypeSyncWalletResponse,