@breeztech/breez-sdk-spark-react-native 0.10.0 → 0.11.0-dev2

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 (36) hide show
  1. package/{breeztech-breez-sdk-spark-react-native.podspec → BreezSdkSparkReactNative.podspec} +2 -2
  2. package/android/CMakeLists.txt +3 -4
  3. package/android/proguard-rules.pro +4 -0
  4. package/cpp/generated/breez_sdk_spark.cpp +1567 -514
  5. package/cpp/generated/breez_sdk_spark.hpp +73 -25
  6. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  7. package/lib/commonjs/generated/breez_sdk_spark.js +186 -81
  8. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  9. package/lib/commonjs/generated/breez_sdk_spark_bindings.js +4 -2
  10. package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -1
  11. package/lib/commonjs/index.js +11 -1
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  14. package/lib/module/generated/breez_sdk_spark.js +185 -80
  15. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  16. package/lib/module/generated/breez_sdk_spark_bindings.js +4 -2
  17. package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -1
  18. package/lib/module/index.js +7 -0
  19. package/lib/module/index.js.map +1 -1
  20. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +95 -71
  21. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  22. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +409 -5
  23. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  24. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  25. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  26. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +95 -71
  27. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  28. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +409 -5
  29. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  30. package/lib/typescript/module/src/index.d.ts +1 -0
  31. package/lib/typescript/module/src/index.d.ts.map +1 -1
  32. package/package.json +4 -4
  33. package/src/generated/breez_sdk_spark-ffi.ts +163 -95
  34. package/src/generated/breez_sdk_spark.ts +1919 -771
  35. package/src/generated/breez_sdk_spark_bindings.ts +2 -2
  36. package/src/index.tsx +7 -0
@@ -83,7 +83,7 @@ import {
83
83
  } from 'uniffi-bindgen-react-native';
84
84
 
85
85
  // Get converters from the other files, if any.
86
- const uniffiCaller = new UniffiRustCaller();
86
+ const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
87
87
 
88
88
  const uniffiIsDebug =
89
89
  // @ts-ignore -- The process global might not be defined
@@ -336,7 +336,8 @@ const uniffiCallbackInterfaceEventListener: {
336
336
  });
337
337
  };
338
338
  const uniffiHandleSuccess = (returnValue: void) => {
339
- uniffiFutureCallback(
339
+ uniffiFutureCallback.call(
340
+ uniffiFutureCallback,
340
341
  uniffiCallbackData,
341
342
  /* UniffiForeignFutureStructVoid */ {
342
343
  callStatus: uniffiCaller.createCallStatus(),
@@ -344,11 +345,12 @@ const uniffiCallbackInterfaceEventListener: {
344
345
  );
345
346
  };
346
347
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
347
- uniffiFutureCallback(
348
+ uniffiFutureCallback.call(
349
+ uniffiFutureCallback,
348
350
  uniffiCallbackData,
349
351
  /* UniffiForeignFutureStructVoid */ {
350
352
  // TODO create callstatus with error.
351
- callStatus: { code, errorBuf },
353
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
352
354
  }
353
355
  );
354
356
  };
@@ -358,7 +360,7 @@ const uniffiCallbackInterfaceEventListener: {
358
360
  /*handleError:*/ uniffiHandleError,
359
361
  /*lowerString:*/ FfiConverterString.lower
360
362
  );
361
- return UniffiResult.success(uniffiForeignFuture);
363
+ return uniffiForeignFuture;
362
364
  },
363
365
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
364
366
  // EventListener: this will throw a stale handle error if the handle isn't found.
@@ -420,6 +422,70 @@ const uniffiCallbackInterfaceLogger: {
420
422
  // FfiConverter protocol for callback interfaces
421
423
  const FfiConverterTypeLogger = new FfiConverterCallback<Logger>();
422
424
 
425
+ /**
426
+ * Request to add a new contact.
427
+ */
428
+ export type AddContactRequest = {
429
+ name: string;
430
+ /**
431
+ * A Lightning address (user@domain).
432
+ */
433
+ paymentIdentifier: string;
434
+ };
435
+
436
+ /**
437
+ * Generated factory for {@link AddContactRequest} record objects.
438
+ */
439
+ export const AddContactRequest = (() => {
440
+ const defaults = () => ({});
441
+ const create = (() => {
442
+ return uniffiCreateRecord<AddContactRequest, ReturnType<typeof defaults>>(
443
+ defaults
444
+ );
445
+ })();
446
+ return Object.freeze({
447
+ /**
448
+ * Create a frozen instance of {@link AddContactRequest}, with defaults specified
449
+ * in Rust, in the {@link breez_sdk_spark} crate.
450
+ */
451
+ create,
452
+
453
+ /**
454
+ * Create a frozen instance of {@link AddContactRequest}, with defaults specified
455
+ * in Rust, in the {@link breez_sdk_spark} crate.
456
+ */
457
+ new: create,
458
+
459
+ /**
460
+ * Defaults specified in the {@link breez_sdk_spark} crate.
461
+ */
462
+ defaults: () => Object.freeze(defaults()) as Partial<AddContactRequest>,
463
+ });
464
+ })();
465
+
466
+ const FfiConverterTypeAddContactRequest = (() => {
467
+ type TypeName = AddContactRequest;
468
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
469
+ read(from: RustBuffer): TypeName {
470
+ return {
471
+ name: FfiConverterString.read(from),
472
+ paymentIdentifier: FfiConverterString.read(from),
473
+ };
474
+ }
475
+ write(value: TypeName, into: RustBuffer): void {
476
+ FfiConverterString.write(value.name, into);
477
+ FfiConverterString.write(value.paymentIdentifier, into);
478
+ }
479
+ allocationSize(value: TypeName): number {
480
+ return (
481
+ FfiConverterString.allocationSize(value.name) +
482
+ FfiConverterString.allocationSize(value.paymentIdentifier)
483
+ );
484
+ }
485
+ }
486
+ return new FFIConverter();
487
+ })();
488
+
423
489
  /**
424
490
  * Payload of the AES success action, as received from the LNURL endpoint
425
491
  *
@@ -2317,6 +2383,80 @@ const FfiConverterTypeConnectWithSignerRequest = (() => {
2317
2383
  return new FFIConverter();
2318
2384
  })();
2319
2385
 
2386
+ /**
2387
+ * A contact entry containing a name and payment identifier.
2388
+ */
2389
+ export type Contact = {
2390
+ id: string;
2391
+ name: string;
2392
+ /**
2393
+ * A Lightning address (user@domain).
2394
+ */
2395
+ paymentIdentifier: string;
2396
+ createdAt: /*u64*/ bigint;
2397
+ updatedAt: /*u64*/ bigint;
2398
+ };
2399
+
2400
+ /**
2401
+ * Generated factory for {@link Contact} record objects.
2402
+ */
2403
+ export const Contact = (() => {
2404
+ const defaults = () => ({});
2405
+ const create = (() => {
2406
+ return uniffiCreateRecord<Contact, ReturnType<typeof defaults>>(defaults);
2407
+ })();
2408
+ return Object.freeze({
2409
+ /**
2410
+ * Create a frozen instance of {@link Contact}, with defaults specified
2411
+ * in Rust, in the {@link breez_sdk_spark} crate.
2412
+ */
2413
+ create,
2414
+
2415
+ /**
2416
+ * Create a frozen instance of {@link Contact}, with defaults specified
2417
+ * in Rust, in the {@link breez_sdk_spark} crate.
2418
+ */
2419
+ new: create,
2420
+
2421
+ /**
2422
+ * Defaults specified in the {@link breez_sdk_spark} crate.
2423
+ */
2424
+ defaults: () => Object.freeze(defaults()) as Partial<Contact>,
2425
+ });
2426
+ })();
2427
+
2428
+ const FfiConverterTypeContact = (() => {
2429
+ type TypeName = Contact;
2430
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2431
+ read(from: RustBuffer): TypeName {
2432
+ return {
2433
+ id: FfiConverterString.read(from),
2434
+ name: FfiConverterString.read(from),
2435
+ paymentIdentifier: FfiConverterString.read(from),
2436
+ createdAt: FfiConverterUInt64.read(from),
2437
+ updatedAt: FfiConverterUInt64.read(from),
2438
+ };
2439
+ }
2440
+ write(value: TypeName, into: RustBuffer): void {
2441
+ FfiConverterString.write(value.id, into);
2442
+ FfiConverterString.write(value.name, into);
2443
+ FfiConverterString.write(value.paymentIdentifier, into);
2444
+ FfiConverterUInt64.write(value.createdAt, into);
2445
+ FfiConverterUInt64.write(value.updatedAt, into);
2446
+ }
2447
+ allocationSize(value: TypeName): number {
2448
+ return (
2449
+ FfiConverterString.allocationSize(value.id) +
2450
+ FfiConverterString.allocationSize(value.name) +
2451
+ FfiConverterString.allocationSize(value.paymentIdentifier) +
2452
+ FfiConverterUInt64.allocationSize(value.createdAt) +
2453
+ FfiConverterUInt64.allocationSize(value.updatedAt)
2454
+ );
2455
+ }
2456
+ }
2457
+ return new FFIConverter();
2458
+ })();
2459
+
2320
2460
  /**
2321
2461
  * Outlines the steps involved in a conversion
2322
2462
  */
@@ -5205,6 +5345,67 @@ const FfiConverterTypeLightningAddressInfo = (() => {
5205
5345
  return new FFIConverter();
5206
5346
  })();
5207
5347
 
5348
+ /**
5349
+ * Request to list contacts with optional pagination.
5350
+ */
5351
+ export type ListContactsRequest = {
5352
+ offset: /*u32*/ number | undefined;
5353
+ limit: /*u32*/ number | undefined;
5354
+ };
5355
+
5356
+ /**
5357
+ * Generated factory for {@link ListContactsRequest} record objects.
5358
+ */
5359
+ export const ListContactsRequest = (() => {
5360
+ const defaults = () => ({ offset: undefined, limit: undefined });
5361
+ const create = (() => {
5362
+ return uniffiCreateRecord<ListContactsRequest, ReturnType<typeof defaults>>(
5363
+ defaults
5364
+ );
5365
+ })();
5366
+ return Object.freeze({
5367
+ /**
5368
+ * Create a frozen instance of {@link ListContactsRequest}, with defaults specified
5369
+ * in Rust, in the {@link breez_sdk_spark} crate.
5370
+ */
5371
+ create,
5372
+
5373
+ /**
5374
+ * Create a frozen instance of {@link ListContactsRequest}, with defaults specified
5375
+ * in Rust, in the {@link breez_sdk_spark} crate.
5376
+ */
5377
+ new: create,
5378
+
5379
+ /**
5380
+ * Defaults specified in the {@link breez_sdk_spark} crate.
5381
+ */
5382
+ defaults: () => Object.freeze(defaults()) as Partial<ListContactsRequest>,
5383
+ });
5384
+ })();
5385
+
5386
+ const FfiConverterTypeListContactsRequest = (() => {
5387
+ type TypeName = ListContactsRequest;
5388
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
5389
+ read(from: RustBuffer): TypeName {
5390
+ return {
5391
+ offset: FfiConverterOptionalUInt32.read(from),
5392
+ limit: FfiConverterOptionalUInt32.read(from),
5393
+ };
5394
+ }
5395
+ write(value: TypeName, into: RustBuffer): void {
5396
+ FfiConverterOptionalUInt32.write(value.offset, into);
5397
+ FfiConverterOptionalUInt32.write(value.limit, into);
5398
+ }
5399
+ allocationSize(value: TypeName): number {
5400
+ return (
5401
+ FfiConverterOptionalUInt32.allocationSize(value.offset) +
5402
+ FfiConverterOptionalUInt32.allocationSize(value.limit)
5403
+ );
5404
+ }
5405
+ }
5406
+ return new FFIConverter();
5407
+ })();
5408
+
5208
5409
  /**
5209
5410
  * Response from listing fiat currencies
5210
5411
  */
@@ -10399,6 +10600,75 @@ const FfiConverterTypeUnversionedRecordChange = (() => {
10399
10600
  return new FFIConverter();
10400
10601
  })();
10401
10602
 
10603
+ /**
10604
+ * Request to update an existing contact.
10605
+ */
10606
+ export type UpdateContactRequest = {
10607
+ id: string;
10608
+ name: string;
10609
+ /**
10610
+ * A Lightning address (user@domain).
10611
+ */
10612
+ paymentIdentifier: string;
10613
+ };
10614
+
10615
+ /**
10616
+ * Generated factory for {@link UpdateContactRequest} record objects.
10617
+ */
10618
+ export const UpdateContactRequest = (() => {
10619
+ const defaults = () => ({});
10620
+ const create = (() => {
10621
+ return uniffiCreateRecord<
10622
+ UpdateContactRequest,
10623
+ ReturnType<typeof defaults>
10624
+ >(defaults);
10625
+ })();
10626
+ return Object.freeze({
10627
+ /**
10628
+ * Create a frozen instance of {@link UpdateContactRequest}, with defaults specified
10629
+ * in Rust, in the {@link breez_sdk_spark} crate.
10630
+ */
10631
+ create,
10632
+
10633
+ /**
10634
+ * Create a frozen instance of {@link UpdateContactRequest}, with defaults specified
10635
+ * in Rust, in the {@link breez_sdk_spark} crate.
10636
+ */
10637
+ new: create,
10638
+
10639
+ /**
10640
+ * Defaults specified in the {@link breez_sdk_spark} crate.
10641
+ */
10642
+ defaults: () => Object.freeze(defaults()) as Partial<UpdateContactRequest>,
10643
+ });
10644
+ })();
10645
+
10646
+ const FfiConverterTypeUpdateContactRequest = (() => {
10647
+ type TypeName = UpdateContactRequest;
10648
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
10649
+ read(from: RustBuffer): TypeName {
10650
+ return {
10651
+ id: FfiConverterString.read(from),
10652
+ name: FfiConverterString.read(from),
10653
+ paymentIdentifier: FfiConverterString.read(from),
10654
+ };
10655
+ }
10656
+ write(value: TypeName, into: RustBuffer): void {
10657
+ FfiConverterString.write(value.id, into);
10658
+ FfiConverterString.write(value.name, into);
10659
+ FfiConverterString.write(value.paymentIdentifier, into);
10660
+ }
10661
+ allocationSize(value: TypeName): number {
10662
+ return (
10663
+ FfiConverterString.allocationSize(value.id) +
10664
+ FfiConverterString.allocationSize(value.name) +
10665
+ FfiConverterString.allocationSize(value.paymentIdentifier)
10666
+ );
10667
+ }
10668
+ }
10669
+ return new FFIConverter();
10670
+ })();
10671
+
10402
10672
  export type UpdateUserSettingsRequest = {
10403
10673
  sparkPrivateModeEnabled: boolean | undefined;
10404
10674
  };
@@ -18628,6 +18898,7 @@ export enum StorageError_Tags {
18628
18898
  Implementation = 'Implementation',
18629
18899
  InitializationError = 'InitializationError',
18630
18900
  Serialization = 'Serialization',
18901
+ NotFound = 'NotFound',
18631
18902
  }
18632
18903
  /**
18633
18904
  * Errors that can occur during storage operations
@@ -18786,6 +19057,34 @@ export const StorageError = (() => {
18786
19057
  }
18787
19058
  }
18788
19059
 
19060
+ type NotFound__interface = {
19061
+ tag: StorageError_Tags.NotFound;
19062
+ };
19063
+
19064
+ class NotFound_ extends UniffiError implements NotFound__interface {
19065
+ /**
19066
+ * @private
19067
+ * This field is private and should not be used, use `tag` instead.
19068
+ */
19069
+ readonly [uniffiTypeNameSymbol] = 'StorageError';
19070
+ readonly tag = StorageError_Tags.NotFound;
19071
+ constructor() {
19072
+ super('StorageError', 'NotFound');
19073
+ }
19074
+
19075
+ static new(): NotFound_ {
19076
+ return new NotFound_();
19077
+ }
19078
+
19079
+ static instanceOf(obj: any): obj is NotFound_ {
19080
+ return obj.tag === StorageError_Tags.NotFound;
19081
+ }
19082
+
19083
+ static hasInner(obj: any): obj is NotFound_ {
19084
+ return false;
19085
+ }
19086
+ }
19087
+
18789
19088
  function instanceOf(obj: any): obj is StorageError {
18790
19089
  return obj[uniffiTypeNameSymbol] === 'StorageError';
18791
19090
  }
@@ -18796,6 +19095,7 @@ export const StorageError = (() => {
18796
19095
  Implementation: Implementation_,
18797
19096
  InitializationError: InitializationError_,
18798
19097
  Serialization: Serialization_,
19098
+ NotFound: NotFound_,
18799
19099
  });
18800
19100
  })();
18801
19101
 
@@ -18824,6 +19124,8 @@ const FfiConverterTypeStorageError = (() => {
18824
19124
  );
18825
19125
  case 4:
18826
19126
  return new StorageError.Serialization(FfiConverterString.read(from));
19127
+ case 5:
19128
+ return new StorageError.NotFound();
18827
19129
  default:
18828
19130
  throw new UniffiInternalError.UnexpectedEnumCase();
18829
19131
  }
@@ -18854,6 +19156,10 @@ const FfiConverterTypeStorageError = (() => {
18854
19156
  FfiConverterString.write(inner[0], into);
18855
19157
  return;
18856
19158
  }
19159
+ case StorageError_Tags.NotFound: {
19160
+ ordinalConverter.write(5, into);
19161
+ return;
19162
+ }
18857
19163
  default:
18858
19164
  // Throwing from here means that StorageError_Tags hasn't matched an ordinal.
18859
19165
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -18885,6 +19191,9 @@ const FfiConverterTypeStorageError = (() => {
18885
19191
  size += FfiConverterString.allocationSize(inner[0]);
18886
19192
  return size;
18887
19193
  }
19194
+ case StorageError_Tags.NotFound: {
19195
+ return ordinalConverter.allocationSize(5);
19196
+ }
18888
19197
  default:
18889
19198
  throw new UniffiInternalError.UnexpectedEnumCase();
18890
19199
  }
@@ -20017,67 +20326,69 @@ export class BitcoinChainServiceImpl
20017
20326
  }
20018
20327
 
20019
20328
  const uniffiTypeBitcoinChainServiceImplObjectFactory: UniffiObjectFactory<BitcoinChainService> =
20020
- {
20021
- create(pointer: UnsafeMutableRawPointer): BitcoinChainService {
20022
- const instance = Object.create(BitcoinChainServiceImpl.prototype);
20023
- instance[pointerLiteralSymbol] = pointer;
20024
- instance[destructorGuardSymbol] = this.bless(pointer);
20025
- instance[uniffiTypeNameSymbol] = 'BitcoinChainServiceImpl';
20026
- return instance;
20027
- },
20329
+ (() => {
20330
+ return {
20331
+ create(pointer: UnsafeMutableRawPointer): BitcoinChainService {
20332
+ const instance = Object.create(BitcoinChainServiceImpl.prototype);
20333
+ instance[pointerLiteralSymbol] = pointer;
20334
+ instance[destructorGuardSymbol] = this.bless(pointer);
20335
+ instance[uniffiTypeNameSymbol] = 'BitcoinChainServiceImpl';
20336
+ return instance;
20337
+ },
20028
20338
 
20029
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
20030
- return uniffiCaller.rustCall(
20031
- /*caller:*/ (status) =>
20032
- nativeModule().ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_pointer(
20033
- p,
20034
- status
20035
- ),
20036
- /*liftString:*/ FfiConverterString.lift
20037
- );
20038
- },
20339
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
20340
+ return uniffiCaller.rustCall(
20341
+ /*caller:*/ (status) =>
20342
+ nativeModule().ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_pointer(
20343
+ p,
20344
+ status
20345
+ ),
20346
+ /*liftString:*/ FfiConverterString.lift
20347
+ );
20348
+ },
20039
20349
 
20040
- unbless(ptr: UniffiRustArcPtr) {
20041
- ptr.markDestroyed();
20042
- },
20350
+ unbless(ptr: UniffiRustArcPtr) {
20351
+ ptr.markDestroyed();
20352
+ },
20043
20353
 
20044
- pointer(obj: BitcoinChainService): UnsafeMutableRawPointer {
20045
- if ((obj as any)[destructorGuardSymbol] === undefined) {
20046
- throw new UniffiInternalError.UnexpectedNullPointer();
20047
- }
20048
- return (obj as any)[pointerLiteralSymbol];
20049
- },
20354
+ pointer(obj: BitcoinChainService): UnsafeMutableRawPointer {
20355
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
20356
+ throw new UniffiInternalError.UnexpectedNullPointer();
20357
+ }
20358
+ return (obj as any)[pointerLiteralSymbol];
20359
+ },
20050
20360
 
20051
- clonePointer(obj: BitcoinChainService): UnsafeMutableRawPointer {
20052
- const pointer = this.pointer(obj);
20053
- return uniffiCaller.rustCall(
20054
- /*caller:*/ (callStatus) =>
20055
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
20056
- pointer,
20057
- callStatus
20058
- ),
20059
- /*liftString:*/ FfiConverterString.lift
20060
- );
20061
- },
20361
+ clonePointer(obj: BitcoinChainService): UnsafeMutableRawPointer {
20362
+ const pointer = this.pointer(obj);
20363
+ return uniffiCaller.rustCall(
20364
+ /*caller:*/ (callStatus) =>
20365
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
20366
+ pointer,
20367
+ callStatus
20368
+ ),
20369
+ /*liftString:*/ FfiConverterString.lift
20370
+ );
20371
+ },
20062
20372
 
20063
- freePointer(pointer: UnsafeMutableRawPointer): void {
20064
- uniffiCaller.rustCall(
20065
- /*caller:*/ (callStatus) =>
20066
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
20067
- pointer,
20068
- callStatus
20069
- ),
20070
- /*liftString:*/ FfiConverterString.lift
20071
- );
20072
- },
20373
+ freePointer(pointer: UnsafeMutableRawPointer): void {
20374
+ uniffiCaller.rustCall(
20375
+ /*caller:*/ (callStatus) =>
20376
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
20377
+ pointer,
20378
+ callStatus
20379
+ ),
20380
+ /*liftString:*/ FfiConverterString.lift
20381
+ );
20382
+ },
20073
20383
 
20074
- isConcreteType(obj: any): obj is BitcoinChainService {
20075
- return (
20076
- obj[destructorGuardSymbol] &&
20077
- obj[uniffiTypeNameSymbol] === 'BitcoinChainServiceImpl'
20078
- );
20079
- },
20080
- };
20384
+ isConcreteType(obj: any): obj is BitcoinChainService {
20385
+ return (
20386
+ obj[destructorGuardSymbol] &&
20387
+ obj[uniffiTypeNameSymbol] === 'BitcoinChainServiceImpl'
20388
+ );
20389
+ },
20390
+ };
20391
+ })();
20081
20392
  // FfiConverter for BitcoinChainService
20082
20393
  const FfiConverterTypeBitcoinChainService = new FfiConverterObjectWithCallbacks(
20083
20394
  uniffiTypeBitcoinChainServiceImplObjectFactory
@@ -20110,7 +20421,8 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20110
20421
  );
20111
20422
  };
20112
20423
  const uniffiHandleSuccess = (returnValue: Array<Utxo>) => {
20113
- uniffiFutureCallback(
20424
+ uniffiFutureCallback.call(
20425
+ uniffiFutureCallback,
20114
20426
  uniffiCallbackData,
20115
20427
  /* UniffiForeignFutureStructRustBuffer */ {
20116
20428
  returnValue: FfiConverterArrayTypeUtxo.lower(returnValue),
@@ -20119,12 +20431,13 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20119
20431
  );
20120
20432
  };
20121
20433
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
20122
- uniffiFutureCallback(
20434
+ uniffiFutureCallback.call(
20435
+ uniffiFutureCallback,
20123
20436
  uniffiCallbackData,
20124
20437
  /* UniffiForeignFutureStructRustBuffer */ {
20125
20438
  returnValue: /*empty*/ new Uint8Array(0),
20126
20439
  // TODO create callstatus with error.
20127
- callStatus: { code, errorBuf },
20440
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
20128
20441
  }
20129
20442
  );
20130
20443
  };
@@ -20138,7 +20451,7 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20138
20451
  ),
20139
20452
  /*lowerString:*/ FfiConverterString.lower
20140
20453
  );
20141
- return UniffiResult.success(uniffiForeignFuture);
20454
+ return uniffiForeignFuture;
20142
20455
  },
20143
20456
  getTransactionStatus: (
20144
20457
  uniffiHandle: bigint,
@@ -20155,7 +20468,8 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20155
20468
  );
20156
20469
  };
20157
20470
  const uniffiHandleSuccess = (returnValue: TxStatus) => {
20158
- uniffiFutureCallback(
20471
+ uniffiFutureCallback.call(
20472
+ uniffiFutureCallback,
20159
20473
  uniffiCallbackData,
20160
20474
  /* UniffiForeignFutureStructRustBuffer */ {
20161
20475
  returnValue: FfiConverterTypeTxStatus.lower(returnValue),
@@ -20164,12 +20478,13 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20164
20478
  );
20165
20479
  };
20166
20480
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
20167
- uniffiFutureCallback(
20481
+ uniffiFutureCallback.call(
20482
+ uniffiFutureCallback,
20168
20483
  uniffiCallbackData,
20169
20484
  /* UniffiForeignFutureStructRustBuffer */ {
20170
20485
  returnValue: /*empty*/ new Uint8Array(0),
20171
20486
  // TODO create callstatus with error.
20172
- callStatus: { code, errorBuf },
20487
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
20173
20488
  }
20174
20489
  );
20175
20490
  };
@@ -20183,7 +20498,7 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20183
20498
  ),
20184
20499
  /*lowerString:*/ FfiConverterString.lower
20185
20500
  );
20186
- return UniffiResult.success(uniffiForeignFuture);
20501
+ return uniffiForeignFuture;
20187
20502
  },
20188
20503
  getTransactionHex: (
20189
20504
  uniffiHandle: bigint,
@@ -20200,7 +20515,8 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20200
20515
  );
20201
20516
  };
20202
20517
  const uniffiHandleSuccess = (returnValue: string) => {
20203
- uniffiFutureCallback(
20518
+ uniffiFutureCallback.call(
20519
+ uniffiFutureCallback,
20204
20520
  uniffiCallbackData,
20205
20521
  /* UniffiForeignFutureStructRustBuffer */ {
20206
20522
  returnValue: FfiConverterString.lower(returnValue),
@@ -20209,12 +20525,13 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20209
20525
  );
20210
20526
  };
20211
20527
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
20212
- uniffiFutureCallback(
20528
+ uniffiFutureCallback.call(
20529
+ uniffiFutureCallback,
20213
20530
  uniffiCallbackData,
20214
20531
  /* UniffiForeignFutureStructRustBuffer */ {
20215
20532
  returnValue: /*empty*/ new Uint8Array(0),
20216
20533
  // TODO create callstatus with error.
20217
- callStatus: { code, errorBuf },
20534
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
20218
20535
  }
20219
20536
  );
20220
20537
  };
@@ -20228,7 +20545,7 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20228
20545
  ),
20229
20546
  /*lowerString:*/ FfiConverterString.lower
20230
20547
  );
20231
- return UniffiResult.success(uniffiForeignFuture);
20548
+ return uniffiForeignFuture;
20232
20549
  },
20233
20550
  broadcastTransaction: (
20234
20551
  uniffiHandle: bigint,
@@ -20245,7 +20562,8 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20245
20562
  );
20246
20563
  };
20247
20564
  const uniffiHandleSuccess = (returnValue: void) => {
20248
- uniffiFutureCallback(
20565
+ uniffiFutureCallback.call(
20566
+ uniffiFutureCallback,
20249
20567
  uniffiCallbackData,
20250
20568
  /* UniffiForeignFutureStructVoid */ {
20251
20569
  callStatus: uniffiCaller.createCallStatus(),
@@ -20253,11 +20571,12 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20253
20571
  );
20254
20572
  };
20255
20573
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
20256
- uniffiFutureCallback(
20574
+ uniffiFutureCallback.call(
20575
+ uniffiFutureCallback,
20257
20576
  uniffiCallbackData,
20258
20577
  /* UniffiForeignFutureStructVoid */ {
20259
20578
  // TODO create callstatus with error.
20260
- callStatus: { code, errorBuf },
20579
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
20261
20580
  }
20262
20581
  );
20263
20582
  };
@@ -20271,7 +20590,7 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20271
20590
  ),
20272
20591
  /*lowerString:*/ FfiConverterString.lower
20273
20592
  );
20274
- return UniffiResult.success(uniffiForeignFuture);
20593
+ return uniffiForeignFuture;
20275
20594
  },
20276
20595
  recommendedFees: (
20277
20596
  uniffiHandle: bigint,
@@ -20286,7 +20605,8 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20286
20605
  return await jsCallback.recommendedFees({ signal });
20287
20606
  };
20288
20607
  const uniffiHandleSuccess = (returnValue: RecommendedFees) => {
20289
- uniffiFutureCallback(
20608
+ uniffiFutureCallback.call(
20609
+ uniffiFutureCallback,
20290
20610
  uniffiCallbackData,
20291
20611
  /* UniffiForeignFutureStructRustBuffer */ {
20292
20612
  returnValue: FfiConverterTypeRecommendedFees.lower(returnValue),
@@ -20295,12 +20615,13 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20295
20615
  );
20296
20616
  };
20297
20617
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
20298
- uniffiFutureCallback(
20618
+ uniffiFutureCallback.call(
20619
+ uniffiFutureCallback,
20299
20620
  uniffiCallbackData,
20300
20621
  /* UniffiForeignFutureStructRustBuffer */ {
20301
20622
  returnValue: /*empty*/ new Uint8Array(0),
20302
20623
  // TODO create callstatus with error.
20303
- callStatus: { code, errorBuf },
20624
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
20304
20625
  }
20305
20626
  );
20306
20627
  };
@@ -20314,7 +20635,7 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20314
20635
  ),
20315
20636
  /*lowerString:*/ FfiConverterString.lower
20316
20637
  );
20317
- return UniffiResult.success(uniffiForeignFuture);
20638
+ return uniffiForeignFuture;
20318
20639
  },
20319
20640
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
20320
20641
  // BitcoinChainService: this will throw a stale handle error if the handle isn't found.
@@ -20333,6 +20654,21 @@ const uniffiCallbackInterfaceBitcoinChainService: {
20333
20654
  * with request/response objects and comprehensive error handling.
20334
20655
  */
20335
20656
  export interface BreezSdkInterface {
20657
+ /**
20658
+ * Adds a new contact.
20659
+ *
20660
+ * # Arguments
20661
+ *
20662
+ * * `request` - The request containing the contact details
20663
+ *
20664
+ * # Returns
20665
+ *
20666
+ * The created contact or an error
20667
+ */
20668
+ addContact(
20669
+ request: AddContactRequest,
20670
+ asyncOpts_?: { signal: AbortSignal }
20671
+ ): /*throws*/ Promise<Contact>;
20336
20672
  /**
20337
20673
  * Registers a listener to receive SDK events
20338
20674
  *
@@ -20401,6 +20737,21 @@ export interface BreezSdkInterface {
20401
20737
  request: ClaimHtlcPaymentRequest,
20402
20738
  asyncOpts_?: { signal: AbortSignal }
20403
20739
  ): /*throws*/ Promise<ClaimHtlcPaymentResponse>;
20740
+ /**
20741
+ * Deletes a contact by its ID.
20742
+ *
20743
+ * # Arguments
20744
+ *
20745
+ * * `id` - The ID of the contact to delete
20746
+ *
20747
+ * # Returns
20748
+ *
20749
+ * Success or an error
20750
+ */
20751
+ deleteContact(
20752
+ id: string,
20753
+ asyncOpts_?: { signal: AbortSignal }
20754
+ ): /*throws*/ Promise<void>;
20404
20755
  deleteLightningAddress(asyncOpts_?: {
20405
20756
  signal: AbortSignal;
20406
20757
  }): /*throws*/ Promise<void>;
@@ -20461,6 +20812,21 @@ export interface BreezSdkInterface {
20461
20812
  getUserSettings(asyncOpts_?: {
20462
20813
  signal: AbortSignal;
20463
20814
  }): /*throws*/ Promise<UserSettings>;
20815
+ /**
20816
+ * Lists contacts with optional pagination.
20817
+ *
20818
+ * # Arguments
20819
+ *
20820
+ * * `request` - The request containing optional pagination parameters
20821
+ *
20822
+ * # Returns
20823
+ *
20824
+ * A list of contacts or an error
20825
+ */
20826
+ listContacts(
20827
+ request: ListContactsRequest,
20828
+ asyncOpts_?: { signal: AbortSignal }
20829
+ ): /*throws*/ Promise<Array<Contact>>;
20464
20830
  /**
20465
20831
  * List fiat currencies for which there is a known exchange rate,
20466
20832
  * sorted by the canonical name of the currency.
@@ -20616,6 +20982,21 @@ export interface BreezSdkInterface {
20616
20982
  request: SyncWalletRequest,
20617
20983
  asyncOpts_?: { signal: AbortSignal }
20618
20984
  ): /*throws*/ Promise<SyncWalletResponse>;
20985
+ /**
20986
+ * Updates an existing contact.
20987
+ *
20988
+ * # Arguments
20989
+ *
20990
+ * * `request` - The request containing the updated contact details
20991
+ *
20992
+ * # Returns
20993
+ *
20994
+ * The updated contact or an error
20995
+ */
20996
+ updateContact(
20997
+ request: UpdateContactRequest,
20998
+ asyncOpts_?: { signal: AbortSignal }
20999
+ ): /*throws*/ Promise<Contact>;
20619
21000
  /**
20620
21001
  * Updates the user settings for the wallet.
20621
21002
  *
@@ -20646,6 +21027,56 @@ export class BreezSdk
20646
21027
  uniffiTypeBreezSdkObjectFactory.bless(pointer);
20647
21028
  }
20648
21029
 
21030
+ /**
21031
+ * Adds a new contact.
21032
+ *
21033
+ * # Arguments
21034
+ *
21035
+ * * `request` - The request containing the contact details
21036
+ *
21037
+ * # Returns
21038
+ *
21039
+ * The created contact or an error
21040
+ */
21041
+ public async addContact(
21042
+ request: AddContactRequest,
21043
+ asyncOpts_?: { signal: AbortSignal }
21044
+ ): Promise<Contact> /*throws*/ {
21045
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
21046
+ try {
21047
+ return await uniffiRustCallAsync(
21048
+ /*rustCaller:*/ uniffiCaller,
21049
+ /*rustFutureFunc:*/ () => {
21050
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact(
21051
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
21052
+ FfiConverterTypeAddContactRequest.lower(request)
21053
+ );
21054
+ },
21055
+ /*pollFunc:*/ nativeModule()
21056
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
21057
+ /*cancelFunc:*/ nativeModule()
21058
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
21059
+ /*completeFunc:*/ nativeModule()
21060
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
21061
+ /*freeFunc:*/ nativeModule()
21062
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
21063
+ /*liftFunc:*/ FfiConverterTypeContact.lift.bind(
21064
+ FfiConverterTypeContact
21065
+ ),
21066
+ /*liftString:*/ FfiConverterString.lift,
21067
+ /*asyncOpts:*/ asyncOpts_,
21068
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
21069
+ FfiConverterTypeSdkError
21070
+ )
21071
+ );
21072
+ } catch (__error: any) {
21073
+ if (uniffiIsDebug && __error instanceof Error) {
21074
+ __error.stack = __stack;
21075
+ }
21076
+ throw __error;
21077
+ }
21078
+ }
21079
+
20649
21080
  /**
20650
21081
  * Registers a listener to receive SDK events
20651
21082
  *
@@ -20949,6 +21380,54 @@ export class BreezSdk
20949
21380
  }
20950
21381
  }
20951
21382
 
21383
+ /**
21384
+ * Deletes a contact by its ID.
21385
+ *
21386
+ * # Arguments
21387
+ *
21388
+ * * `id` - The ID of the contact to delete
21389
+ *
21390
+ * # Returns
21391
+ *
21392
+ * Success or an error
21393
+ */
21394
+ public async deleteContact(
21395
+ id: string,
21396
+ asyncOpts_?: { signal: AbortSignal }
21397
+ ): Promise<void> /*throws*/ {
21398
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
21399
+ try {
21400
+ return await uniffiRustCallAsync(
21401
+ /*rustCaller:*/ uniffiCaller,
21402
+ /*rustFutureFunc:*/ () => {
21403
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact(
21404
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
21405
+ FfiConverterString.lower(id)
21406
+ );
21407
+ },
21408
+ /*pollFunc:*/ nativeModule()
21409
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
21410
+ /*cancelFunc:*/ nativeModule()
21411
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
21412
+ /*completeFunc:*/ nativeModule()
21413
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
21414
+ /*freeFunc:*/ nativeModule()
21415
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_void,
21416
+ /*liftFunc:*/ (_v) => {},
21417
+ /*liftString:*/ FfiConverterString.lift,
21418
+ /*asyncOpts:*/ asyncOpts_,
21419
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
21420
+ FfiConverterTypeSdkError
21421
+ )
21422
+ );
21423
+ } catch (__error: any) {
21424
+ if (uniffiIsDebug && __error instanceof Error) {
21425
+ __error.stack = __stack;
21426
+ }
21427
+ throw __error;
21428
+ }
21429
+ }
21430
+
20952
21431
  public async deleteLightningAddress(asyncOpts_?: {
20953
21432
  signal: AbortSignal;
20954
21433
  }): Promise<void> /*throws*/ {
@@ -21309,6 +21788,56 @@ export class BreezSdk
21309
21788
  }
21310
21789
  }
21311
21790
 
21791
+ /**
21792
+ * Lists contacts with optional pagination.
21793
+ *
21794
+ * # Arguments
21795
+ *
21796
+ * * `request` - The request containing optional pagination parameters
21797
+ *
21798
+ * # Returns
21799
+ *
21800
+ * A list of contacts or an error
21801
+ */
21802
+ public async listContacts(
21803
+ request: ListContactsRequest,
21804
+ asyncOpts_?: { signal: AbortSignal }
21805
+ ): Promise<Array<Contact>> /*throws*/ {
21806
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
21807
+ try {
21808
+ return await uniffiRustCallAsync(
21809
+ /*rustCaller:*/ uniffiCaller,
21810
+ /*rustFutureFunc:*/ () => {
21811
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts(
21812
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
21813
+ FfiConverterTypeListContactsRequest.lower(request)
21814
+ );
21815
+ },
21816
+ /*pollFunc:*/ nativeModule()
21817
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
21818
+ /*cancelFunc:*/ nativeModule()
21819
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
21820
+ /*completeFunc:*/ nativeModule()
21821
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
21822
+ /*freeFunc:*/ nativeModule()
21823
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
21824
+ /*liftFunc:*/ FfiConverterArrayTypeContact.lift.bind(
21825
+ FfiConverterArrayTypeContact
21826
+ ),
21827
+ /*liftString:*/ FfiConverterString.lift,
21828
+ /*asyncOpts:*/ asyncOpts_,
21829
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
21830
+ FfiConverterTypeSdkError
21831
+ )
21832
+ );
21833
+ } catch (__error: any) {
21834
+ if (uniffiIsDebug && __error instanceof Error) {
21835
+ __error.stack = __stack;
21836
+ }
21837
+ throw __error;
21838
+ }
21839
+ }
21840
+
21312
21841
  /**
21313
21842
  * List fiat currencies for which there is a known exchange rate,
21314
21843
  * sorted by the canonical name of the currency.
@@ -22097,6 +22626,56 @@ export class BreezSdk
22097
22626
  }
22098
22627
  }
22099
22628
 
22629
+ /**
22630
+ * Updates an existing contact.
22631
+ *
22632
+ * # Arguments
22633
+ *
22634
+ * * `request` - The request containing the updated contact details
22635
+ *
22636
+ * # Returns
22637
+ *
22638
+ * The updated contact or an error
22639
+ */
22640
+ public async updateContact(
22641
+ request: UpdateContactRequest,
22642
+ asyncOpts_?: { signal: AbortSignal }
22643
+ ): Promise<Contact> /*throws*/ {
22644
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
22645
+ try {
22646
+ return await uniffiRustCallAsync(
22647
+ /*rustCaller:*/ uniffiCaller,
22648
+ /*rustFutureFunc:*/ () => {
22649
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(
22650
+ uniffiTypeBreezSdkObjectFactory.clonePointer(this),
22651
+ FfiConverterTypeUpdateContactRequest.lower(request)
22652
+ );
22653
+ },
22654
+ /*pollFunc:*/ nativeModule()
22655
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
22656
+ /*cancelFunc:*/ nativeModule()
22657
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
22658
+ /*completeFunc:*/ nativeModule()
22659
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
22660
+ /*freeFunc:*/ nativeModule()
22661
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
22662
+ /*liftFunc:*/ FfiConverterTypeContact.lift.bind(
22663
+ FfiConverterTypeContact
22664
+ ),
22665
+ /*liftString:*/ FfiConverterString.lift,
22666
+ /*asyncOpts:*/ asyncOpts_,
22667
+ /*errorHandler:*/ FfiConverterTypeSdkError.lift.bind(
22668
+ FfiConverterTypeSdkError
22669
+ )
22670
+ );
22671
+ } catch (__error: any) {
22672
+ if (uniffiIsDebug && __error instanceof Error) {
22673
+ __error.stack = __stack;
22674
+ }
22675
+ throw __error;
22676
+ }
22677
+ }
22678
+
22100
22679
  /**
22101
22680
  * Updates the user settings for the wallet.
22102
22681
  *
@@ -22158,66 +22737,68 @@ export class BreezSdk
22158
22737
  }
22159
22738
 
22160
22739
  const uniffiTypeBreezSdkObjectFactory: UniffiObjectFactory<BreezSdkInterface> =
22161
- {
22162
- create(pointer: UnsafeMutableRawPointer): BreezSdkInterface {
22163
- const instance = Object.create(BreezSdk.prototype);
22164
- instance[pointerLiteralSymbol] = pointer;
22165
- instance[destructorGuardSymbol] = this.bless(pointer);
22166
- instance[uniffiTypeNameSymbol] = 'BreezSdk';
22167
- return instance;
22168
- },
22740
+ (() => {
22741
+ return {
22742
+ create(pointer: UnsafeMutableRawPointer): BreezSdkInterface {
22743
+ const instance = Object.create(BreezSdk.prototype);
22744
+ instance[pointerLiteralSymbol] = pointer;
22745
+ instance[destructorGuardSymbol] = this.bless(pointer);
22746
+ instance[uniffiTypeNameSymbol] = 'BreezSdk';
22747
+ return instance;
22748
+ },
22169
22749
 
22170
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
22171
- return uniffiCaller.rustCall(
22172
- /*caller:*/ (status) =>
22173
- nativeModule().ubrn_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(
22174
- p,
22175
- status
22176
- ),
22177
- /*liftString:*/ FfiConverterString.lift
22178
- );
22179
- },
22750
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
22751
+ return uniffiCaller.rustCall(
22752
+ /*caller:*/ (status) =>
22753
+ nativeModule().ubrn_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(
22754
+ p,
22755
+ status
22756
+ ),
22757
+ /*liftString:*/ FfiConverterString.lift
22758
+ );
22759
+ },
22180
22760
 
22181
- unbless(ptr: UniffiRustArcPtr) {
22182
- ptr.markDestroyed();
22183
- },
22761
+ unbless(ptr: UniffiRustArcPtr) {
22762
+ ptr.markDestroyed();
22763
+ },
22184
22764
 
22185
- pointer(obj: BreezSdkInterface): UnsafeMutableRawPointer {
22186
- if ((obj as any)[destructorGuardSymbol] === undefined) {
22187
- throw new UniffiInternalError.UnexpectedNullPointer();
22188
- }
22189
- return (obj as any)[pointerLiteralSymbol];
22190
- },
22765
+ pointer(obj: BreezSdkInterface): UnsafeMutableRawPointer {
22766
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
22767
+ throw new UniffiInternalError.UnexpectedNullPointer();
22768
+ }
22769
+ return (obj as any)[pointerLiteralSymbol];
22770
+ },
22191
22771
 
22192
- clonePointer(obj: BreezSdkInterface): UnsafeMutableRawPointer {
22193
- const pointer = this.pointer(obj);
22194
- return uniffiCaller.rustCall(
22195
- /*caller:*/ (callStatus) =>
22196
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk(
22197
- pointer,
22198
- callStatus
22199
- ),
22200
- /*liftString:*/ FfiConverterString.lift
22201
- );
22202
- },
22772
+ clonePointer(obj: BreezSdkInterface): UnsafeMutableRawPointer {
22773
+ const pointer = this.pointer(obj);
22774
+ return uniffiCaller.rustCall(
22775
+ /*caller:*/ (callStatus) =>
22776
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk(
22777
+ pointer,
22778
+ callStatus
22779
+ ),
22780
+ /*liftString:*/ FfiConverterString.lift
22781
+ );
22782
+ },
22203
22783
 
22204
- freePointer(pointer: UnsafeMutableRawPointer): void {
22205
- uniffiCaller.rustCall(
22206
- /*caller:*/ (callStatus) =>
22207
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_breezsdk(
22208
- pointer,
22209
- callStatus
22210
- ),
22211
- /*liftString:*/ FfiConverterString.lift
22212
- );
22213
- },
22784
+ freePointer(pointer: UnsafeMutableRawPointer): void {
22785
+ uniffiCaller.rustCall(
22786
+ /*caller:*/ (callStatus) =>
22787
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_breezsdk(
22788
+ pointer,
22789
+ callStatus
22790
+ ),
22791
+ /*liftString:*/ FfiConverterString.lift
22792
+ );
22793
+ },
22214
22794
 
22215
- isConcreteType(obj: any): obj is BreezSdkInterface {
22216
- return (
22217
- obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'BreezSdk'
22218
- );
22219
- },
22220
- };
22795
+ isConcreteType(obj: any): obj is BreezSdkInterface {
22796
+ return (
22797
+ obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'BreezSdk'
22798
+ );
22799
+ },
22800
+ };
22801
+ })();
22221
22802
  // FfiConverter for BreezSdkInterface
22222
22803
  const FfiConverterTypeBreezSdk = new FfiConverterObject(
22223
22804
  uniffiTypeBreezSdkObjectFactory
@@ -23593,67 +24174,69 @@ export class ExternalSignerImpl
23593
24174
  }
23594
24175
 
23595
24176
  const uniffiTypeExternalSignerImplObjectFactory: UniffiObjectFactory<ExternalSigner> =
23596
- {
23597
- create(pointer: UnsafeMutableRawPointer): ExternalSigner {
23598
- const instance = Object.create(ExternalSignerImpl.prototype);
23599
- instance[pointerLiteralSymbol] = pointer;
23600
- instance[destructorGuardSymbol] = this.bless(pointer);
23601
- instance[uniffiTypeNameSymbol] = 'ExternalSignerImpl';
23602
- return instance;
23603
- },
24177
+ (() => {
24178
+ return {
24179
+ create(pointer: UnsafeMutableRawPointer): ExternalSigner {
24180
+ const instance = Object.create(ExternalSignerImpl.prototype);
24181
+ instance[pointerLiteralSymbol] = pointer;
24182
+ instance[destructorGuardSymbol] = this.bless(pointer);
24183
+ instance[uniffiTypeNameSymbol] = 'ExternalSignerImpl';
24184
+ return instance;
24185
+ },
23604
24186
 
23605
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
23606
- return uniffiCaller.rustCall(
23607
- /*caller:*/ (status) =>
23608
- nativeModule().ubrn_uniffi_internal_fn_method_externalsigner_ffi__bless_pointer(
23609
- p,
23610
- status
23611
- ),
23612
- /*liftString:*/ FfiConverterString.lift
23613
- );
23614
- },
24187
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
24188
+ return uniffiCaller.rustCall(
24189
+ /*caller:*/ (status) =>
24190
+ nativeModule().ubrn_uniffi_internal_fn_method_externalsigner_ffi__bless_pointer(
24191
+ p,
24192
+ status
24193
+ ),
24194
+ /*liftString:*/ FfiConverterString.lift
24195
+ );
24196
+ },
23615
24197
 
23616
- unbless(ptr: UniffiRustArcPtr) {
23617
- ptr.markDestroyed();
23618
- },
24198
+ unbless(ptr: UniffiRustArcPtr) {
24199
+ ptr.markDestroyed();
24200
+ },
23619
24201
 
23620
- pointer(obj: ExternalSigner): UnsafeMutableRawPointer {
23621
- if ((obj as any)[destructorGuardSymbol] === undefined) {
23622
- throw new UniffiInternalError.UnexpectedNullPointer();
23623
- }
23624
- return (obj as any)[pointerLiteralSymbol];
23625
- },
24202
+ pointer(obj: ExternalSigner): UnsafeMutableRawPointer {
24203
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
24204
+ throw new UniffiInternalError.UnexpectedNullPointer();
24205
+ }
24206
+ return (obj as any)[pointerLiteralSymbol];
24207
+ },
23626
24208
 
23627
- clonePointer(obj: ExternalSigner): UnsafeMutableRawPointer {
23628
- const pointer = this.pointer(obj);
23629
- return uniffiCaller.rustCall(
23630
- /*caller:*/ (callStatus) =>
23631
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_externalsigner(
23632
- pointer,
23633
- callStatus
23634
- ),
23635
- /*liftString:*/ FfiConverterString.lift
23636
- );
23637
- },
24209
+ clonePointer(obj: ExternalSigner): UnsafeMutableRawPointer {
24210
+ const pointer = this.pointer(obj);
24211
+ return uniffiCaller.rustCall(
24212
+ /*caller:*/ (callStatus) =>
24213
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_externalsigner(
24214
+ pointer,
24215
+ callStatus
24216
+ ),
24217
+ /*liftString:*/ FfiConverterString.lift
24218
+ );
24219
+ },
23638
24220
 
23639
- freePointer(pointer: UnsafeMutableRawPointer): void {
23640
- uniffiCaller.rustCall(
23641
- /*caller:*/ (callStatus) =>
23642
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_externalsigner(
23643
- pointer,
23644
- callStatus
23645
- ),
23646
- /*liftString:*/ FfiConverterString.lift
23647
- );
23648
- },
24221
+ freePointer(pointer: UnsafeMutableRawPointer): void {
24222
+ uniffiCaller.rustCall(
24223
+ /*caller:*/ (callStatus) =>
24224
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_externalsigner(
24225
+ pointer,
24226
+ callStatus
24227
+ ),
24228
+ /*liftString:*/ FfiConverterString.lift
24229
+ );
24230
+ },
23649
24231
 
23650
- isConcreteType(obj: any): obj is ExternalSigner {
23651
- return (
23652
- obj[destructorGuardSymbol] &&
23653
- obj[uniffiTypeNameSymbol] === 'ExternalSignerImpl'
23654
- );
23655
- },
23656
- };
24232
+ isConcreteType(obj: any): obj is ExternalSigner {
24233
+ return (
24234
+ obj[destructorGuardSymbol] &&
24235
+ obj[uniffiTypeNameSymbol] === 'ExternalSignerImpl'
24236
+ );
24237
+ },
24238
+ };
24239
+ })();
23657
24240
  // FfiConverter for ExternalSigner
23658
24241
  const FfiConverterTypeExternalSigner = new FfiConverterObjectWithCallbacks(
23659
24242
  uniffiTypeExternalSignerImplObjectFactory
@@ -23711,7 +24294,8 @@ const uniffiCallbackInterfaceExternalSigner: {
23711
24294
  });
23712
24295
  };
23713
24296
  const uniffiHandleSuccess = (returnValue: PublicKeyBytes) => {
23714
- uniffiFutureCallback(
24297
+ uniffiFutureCallback.call(
24298
+ uniffiFutureCallback,
23715
24299
  uniffiCallbackData,
23716
24300
  /* UniffiForeignFutureStructRustBuffer */ {
23717
24301
  returnValue: FfiConverterTypePublicKeyBytes.lower(returnValue),
@@ -23720,12 +24304,13 @@ const uniffiCallbackInterfaceExternalSigner: {
23720
24304
  );
23721
24305
  };
23722
24306
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
23723
- uniffiFutureCallback(
24307
+ uniffiFutureCallback.call(
24308
+ uniffiFutureCallback,
23724
24309
  uniffiCallbackData,
23725
24310
  /* UniffiForeignFutureStructRustBuffer */ {
23726
24311
  returnValue: /*empty*/ new Uint8Array(0),
23727
24312
  // TODO create callstatus with error.
23728
- callStatus: { code, errorBuf },
24313
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
23729
24314
  }
23730
24315
  );
23731
24316
  };
@@ -23739,7 +24324,7 @@ const uniffiCallbackInterfaceExternalSigner: {
23739
24324
  ),
23740
24325
  /*lowerString:*/ FfiConverterString.lower
23741
24326
  );
23742
- return UniffiResult.success(uniffiForeignFuture);
24327
+ return uniffiForeignFuture;
23743
24328
  },
23744
24329
  signEcdsa: (
23745
24330
  uniffiHandle: bigint,
@@ -23759,7 +24344,8 @@ const uniffiCallbackInterfaceExternalSigner: {
23759
24344
  );
23760
24345
  };
23761
24346
  const uniffiHandleSuccess = (returnValue: EcdsaSignatureBytes) => {
23762
- uniffiFutureCallback(
24347
+ uniffiFutureCallback.call(
24348
+ uniffiFutureCallback,
23763
24349
  uniffiCallbackData,
23764
24350
  /* UniffiForeignFutureStructRustBuffer */ {
23765
24351
  returnValue: FfiConverterTypeEcdsaSignatureBytes.lower(returnValue),
@@ -23768,12 +24354,13 @@ const uniffiCallbackInterfaceExternalSigner: {
23768
24354
  );
23769
24355
  };
23770
24356
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
23771
- uniffiFutureCallback(
24357
+ uniffiFutureCallback.call(
24358
+ uniffiFutureCallback,
23772
24359
  uniffiCallbackData,
23773
24360
  /* UniffiForeignFutureStructRustBuffer */ {
23774
24361
  returnValue: /*empty*/ new Uint8Array(0),
23775
24362
  // TODO create callstatus with error.
23776
- callStatus: { code, errorBuf },
24363
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
23777
24364
  }
23778
24365
  );
23779
24366
  };
@@ -23787,7 +24374,7 @@ const uniffiCallbackInterfaceExternalSigner: {
23787
24374
  ),
23788
24375
  /*lowerString:*/ FfiConverterString.lower
23789
24376
  );
23790
- return UniffiResult.success(uniffiForeignFuture);
24377
+ return uniffiForeignFuture;
23791
24378
  },
23792
24379
  signEcdsaRecoverable: (
23793
24380
  uniffiHandle: bigint,
@@ -23809,7 +24396,8 @@ const uniffiCallbackInterfaceExternalSigner: {
23809
24396
  const uniffiHandleSuccess = (
23810
24397
  returnValue: RecoverableEcdsaSignatureBytes
23811
24398
  ) => {
23812
- uniffiFutureCallback(
24399
+ uniffiFutureCallback.call(
24400
+ uniffiFutureCallback,
23813
24401
  uniffiCallbackData,
23814
24402
  /* UniffiForeignFutureStructRustBuffer */ {
23815
24403
  returnValue:
@@ -23819,12 +24407,13 @@ const uniffiCallbackInterfaceExternalSigner: {
23819
24407
  );
23820
24408
  };
23821
24409
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
23822
- uniffiFutureCallback(
24410
+ uniffiFutureCallback.call(
24411
+ uniffiFutureCallback,
23823
24412
  uniffiCallbackData,
23824
24413
  /* UniffiForeignFutureStructRustBuffer */ {
23825
24414
  returnValue: /*empty*/ new Uint8Array(0),
23826
24415
  // TODO create callstatus with error.
23827
- callStatus: { code, errorBuf },
24416
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
23828
24417
  }
23829
24418
  );
23830
24419
  };
@@ -23838,7 +24427,7 @@ const uniffiCallbackInterfaceExternalSigner: {
23838
24427
  ),
23839
24428
  /*lowerString:*/ FfiConverterString.lower
23840
24429
  );
23841
- return UniffiResult.success(uniffiForeignFuture);
24430
+ return uniffiForeignFuture;
23842
24431
  },
23843
24432
  encryptEcies: (
23844
24433
  uniffiHandle: bigint,
@@ -23858,7 +24447,8 @@ const uniffiCallbackInterfaceExternalSigner: {
23858
24447
  );
23859
24448
  };
23860
24449
  const uniffiHandleSuccess = (returnValue: ArrayBuffer) => {
23861
- uniffiFutureCallback(
24450
+ uniffiFutureCallback.call(
24451
+ uniffiFutureCallback,
23862
24452
  uniffiCallbackData,
23863
24453
  /* UniffiForeignFutureStructRustBuffer */ {
23864
24454
  returnValue: FfiConverterArrayBuffer.lower(returnValue),
@@ -23867,12 +24457,13 @@ const uniffiCallbackInterfaceExternalSigner: {
23867
24457
  );
23868
24458
  };
23869
24459
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
23870
- uniffiFutureCallback(
24460
+ uniffiFutureCallback.call(
24461
+ uniffiFutureCallback,
23871
24462
  uniffiCallbackData,
23872
24463
  /* UniffiForeignFutureStructRustBuffer */ {
23873
24464
  returnValue: /*empty*/ new Uint8Array(0),
23874
24465
  // TODO create callstatus with error.
23875
- callStatus: { code, errorBuf },
24466
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
23876
24467
  }
23877
24468
  );
23878
24469
  };
@@ -23886,7 +24477,7 @@ const uniffiCallbackInterfaceExternalSigner: {
23886
24477
  ),
23887
24478
  /*lowerString:*/ FfiConverterString.lower
23888
24479
  );
23889
- return UniffiResult.success(uniffiForeignFuture);
24480
+ return uniffiForeignFuture;
23890
24481
  },
23891
24482
  decryptEcies: (
23892
24483
  uniffiHandle: bigint,
@@ -23906,7 +24497,8 @@ const uniffiCallbackInterfaceExternalSigner: {
23906
24497
  );
23907
24498
  };
23908
24499
  const uniffiHandleSuccess = (returnValue: ArrayBuffer) => {
23909
- uniffiFutureCallback(
24500
+ uniffiFutureCallback.call(
24501
+ uniffiFutureCallback,
23910
24502
  uniffiCallbackData,
23911
24503
  /* UniffiForeignFutureStructRustBuffer */ {
23912
24504
  returnValue: FfiConverterArrayBuffer.lower(returnValue),
@@ -23915,12 +24507,13 @@ const uniffiCallbackInterfaceExternalSigner: {
23915
24507
  );
23916
24508
  };
23917
24509
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
23918
- uniffiFutureCallback(
24510
+ uniffiFutureCallback.call(
24511
+ uniffiFutureCallback,
23919
24512
  uniffiCallbackData,
23920
24513
  /* UniffiForeignFutureStructRustBuffer */ {
23921
24514
  returnValue: /*empty*/ new Uint8Array(0),
23922
24515
  // TODO create callstatus with error.
23923
- callStatus: { code, errorBuf },
24516
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
23924
24517
  }
23925
24518
  );
23926
24519
  };
@@ -23934,7 +24527,7 @@ const uniffiCallbackInterfaceExternalSigner: {
23934
24527
  ),
23935
24528
  /*lowerString:*/ FfiConverterString.lower
23936
24529
  );
23937
- return UniffiResult.success(uniffiForeignFuture);
24530
+ return uniffiForeignFuture;
23938
24531
  },
23939
24532
  signHashSchnorr: (
23940
24533
  uniffiHandle: bigint,
@@ -23954,7 +24547,8 @@ const uniffiCallbackInterfaceExternalSigner: {
23954
24547
  );
23955
24548
  };
23956
24549
  const uniffiHandleSuccess = (returnValue: SchnorrSignatureBytes) => {
23957
- uniffiFutureCallback(
24550
+ uniffiFutureCallback.call(
24551
+ uniffiFutureCallback,
23958
24552
  uniffiCallbackData,
23959
24553
  /* UniffiForeignFutureStructRustBuffer */ {
23960
24554
  returnValue:
@@ -23964,12 +24558,13 @@ const uniffiCallbackInterfaceExternalSigner: {
23964
24558
  );
23965
24559
  };
23966
24560
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
23967
- uniffiFutureCallback(
24561
+ uniffiFutureCallback.call(
24562
+ uniffiFutureCallback,
23968
24563
  uniffiCallbackData,
23969
24564
  /* UniffiForeignFutureStructRustBuffer */ {
23970
24565
  returnValue: /*empty*/ new Uint8Array(0),
23971
24566
  // TODO create callstatus with error.
23972
- callStatus: { code, errorBuf },
24567
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
23973
24568
  }
23974
24569
  );
23975
24570
  };
@@ -23983,7 +24578,7 @@ const uniffiCallbackInterfaceExternalSigner: {
23983
24578
  ),
23984
24579
  /*lowerString:*/ FfiConverterString.lower
23985
24580
  );
23986
- return UniffiResult.success(uniffiForeignFuture);
24581
+ return uniffiForeignFuture;
23987
24582
  },
23988
24583
  hmacSha256: (
23989
24584
  uniffiHandle: bigint,
@@ -24003,7 +24598,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24003
24598
  );
24004
24599
  };
24005
24600
  const uniffiHandleSuccess = (returnValue: HashedMessageBytes) => {
24006
- uniffiFutureCallback(
24601
+ uniffiFutureCallback.call(
24602
+ uniffiFutureCallback,
24007
24603
  uniffiCallbackData,
24008
24604
  /* UniffiForeignFutureStructRustBuffer */ {
24009
24605
  returnValue: FfiConverterTypeHashedMessageBytes.lower(returnValue),
@@ -24012,12 +24608,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24012
24608
  );
24013
24609
  };
24014
24610
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24015
- uniffiFutureCallback(
24611
+ uniffiFutureCallback.call(
24612
+ uniffiFutureCallback,
24016
24613
  uniffiCallbackData,
24017
24614
  /* UniffiForeignFutureStructRustBuffer */ {
24018
24615
  returnValue: /*empty*/ new Uint8Array(0),
24019
24616
  // TODO create callstatus with error.
24020
- callStatus: { code, errorBuf },
24617
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24021
24618
  }
24022
24619
  );
24023
24620
  };
@@ -24031,7 +24628,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24031
24628
  ),
24032
24629
  /*lowerString:*/ FfiConverterString.lower
24033
24630
  );
24034
- return UniffiResult.success(uniffiForeignFuture);
24631
+ return uniffiForeignFuture;
24035
24632
  },
24036
24633
  generateRandomSigningCommitment: (
24037
24634
  uniffiHandle: bigint,
@@ -24045,7 +24642,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24045
24642
  return await jsCallback.generateRandomSigningCommitment({ signal });
24046
24643
  };
24047
24644
  const uniffiHandleSuccess = (returnValue: ExternalFrostCommitments) => {
24048
- uniffiFutureCallback(
24645
+ uniffiFutureCallback.call(
24646
+ uniffiFutureCallback,
24049
24647
  uniffiCallbackData,
24050
24648
  /* UniffiForeignFutureStructRustBuffer */ {
24051
24649
  returnValue:
@@ -24055,12 +24653,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24055
24653
  );
24056
24654
  };
24057
24655
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24058
- uniffiFutureCallback(
24656
+ uniffiFutureCallback.call(
24657
+ uniffiFutureCallback,
24059
24658
  uniffiCallbackData,
24060
24659
  /* UniffiForeignFutureStructRustBuffer */ {
24061
24660
  returnValue: /*empty*/ new Uint8Array(0),
24062
24661
  // TODO create callstatus with error.
24063
- callStatus: { code, errorBuf },
24662
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24064
24663
  }
24065
24664
  );
24066
24665
  };
@@ -24074,7 +24673,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24074
24673
  ),
24075
24674
  /*lowerString:*/ FfiConverterString.lower
24076
24675
  );
24077
- return UniffiResult.success(uniffiForeignFuture);
24676
+ return uniffiForeignFuture;
24078
24677
  },
24079
24678
  getPublicKeyForNode: (
24080
24679
  uniffiHandle: bigint,
@@ -24092,7 +24691,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24092
24691
  );
24093
24692
  };
24094
24693
  const uniffiHandleSuccess = (returnValue: PublicKeyBytes) => {
24095
- uniffiFutureCallback(
24694
+ uniffiFutureCallback.call(
24695
+ uniffiFutureCallback,
24096
24696
  uniffiCallbackData,
24097
24697
  /* UniffiForeignFutureStructRustBuffer */ {
24098
24698
  returnValue: FfiConverterTypePublicKeyBytes.lower(returnValue),
@@ -24101,12 +24701,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24101
24701
  );
24102
24702
  };
24103
24703
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24104
- uniffiFutureCallback(
24704
+ uniffiFutureCallback.call(
24705
+ uniffiFutureCallback,
24105
24706
  uniffiCallbackData,
24106
24707
  /* UniffiForeignFutureStructRustBuffer */ {
24107
24708
  returnValue: /*empty*/ new Uint8Array(0),
24108
24709
  // TODO create callstatus with error.
24109
- callStatus: { code, errorBuf },
24710
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24110
24711
  }
24111
24712
  );
24112
24713
  };
@@ -24120,7 +24721,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24120
24721
  ),
24121
24722
  /*lowerString:*/ FfiConverterString.lower
24122
24723
  );
24123
- return UniffiResult.success(uniffiForeignFuture);
24724
+ return uniffiForeignFuture;
24124
24725
  },
24125
24726
  generateRandomSecret: (
24126
24727
  uniffiHandle: bigint,
@@ -24134,7 +24735,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24134
24735
  return await jsCallback.generateRandomSecret({ signal });
24135
24736
  };
24136
24737
  const uniffiHandleSuccess = (returnValue: ExternalEncryptedSecret) => {
24137
- uniffiFutureCallback(
24738
+ uniffiFutureCallback.call(
24739
+ uniffiFutureCallback,
24138
24740
  uniffiCallbackData,
24139
24741
  /* UniffiForeignFutureStructRustBuffer */ {
24140
24742
  returnValue:
@@ -24144,12 +24746,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24144
24746
  );
24145
24747
  };
24146
24748
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24147
- uniffiFutureCallback(
24749
+ uniffiFutureCallback.call(
24750
+ uniffiFutureCallback,
24148
24751
  uniffiCallbackData,
24149
24752
  /* UniffiForeignFutureStructRustBuffer */ {
24150
24753
  returnValue: /*empty*/ new Uint8Array(0),
24151
24754
  // TODO create callstatus with error.
24152
- callStatus: { code, errorBuf },
24755
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24153
24756
  }
24154
24757
  );
24155
24758
  };
@@ -24163,7 +24766,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24163
24766
  ),
24164
24767
  /*lowerString:*/ FfiConverterString.lower
24165
24768
  );
24166
- return UniffiResult.success(uniffiForeignFuture);
24769
+ return uniffiForeignFuture;
24167
24770
  },
24168
24771
  staticDepositSecretEncrypted: (
24169
24772
  uniffiHandle: bigint,
@@ -24181,7 +24784,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24181
24784
  );
24182
24785
  };
24183
24786
  const uniffiHandleSuccess = (returnValue: ExternalSecretSource) => {
24184
- uniffiFutureCallback(
24787
+ uniffiFutureCallback.call(
24788
+ uniffiFutureCallback,
24185
24789
  uniffiCallbackData,
24186
24790
  /* UniffiForeignFutureStructRustBuffer */ {
24187
24791
  returnValue:
@@ -24191,12 +24795,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24191
24795
  );
24192
24796
  };
24193
24797
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24194
- uniffiFutureCallback(
24798
+ uniffiFutureCallback.call(
24799
+ uniffiFutureCallback,
24195
24800
  uniffiCallbackData,
24196
24801
  /* UniffiForeignFutureStructRustBuffer */ {
24197
24802
  returnValue: /*empty*/ new Uint8Array(0),
24198
24803
  // TODO create callstatus with error.
24199
- callStatus: { code, errorBuf },
24804
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24200
24805
  }
24201
24806
  );
24202
24807
  };
@@ -24210,7 +24815,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24210
24815
  ),
24211
24816
  /*lowerString:*/ FfiConverterString.lower
24212
24817
  );
24213
- return UniffiResult.success(uniffiForeignFuture);
24818
+ return uniffiForeignFuture;
24214
24819
  },
24215
24820
  staticDepositSecret: (
24216
24821
  uniffiHandle: bigint,
@@ -24228,7 +24833,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24228
24833
  );
24229
24834
  };
24230
24835
  const uniffiHandleSuccess = (returnValue: SecretBytes) => {
24231
- uniffiFutureCallback(
24836
+ uniffiFutureCallback.call(
24837
+ uniffiFutureCallback,
24232
24838
  uniffiCallbackData,
24233
24839
  /* UniffiForeignFutureStructRustBuffer */ {
24234
24840
  returnValue: FfiConverterTypeSecretBytes.lower(returnValue),
@@ -24237,12 +24843,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24237
24843
  );
24238
24844
  };
24239
24845
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24240
- uniffiFutureCallback(
24846
+ uniffiFutureCallback.call(
24847
+ uniffiFutureCallback,
24241
24848
  uniffiCallbackData,
24242
24849
  /* UniffiForeignFutureStructRustBuffer */ {
24243
24850
  returnValue: /*empty*/ new Uint8Array(0),
24244
24851
  // TODO create callstatus with error.
24245
- callStatus: { code, errorBuf },
24852
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24246
24853
  }
24247
24854
  );
24248
24855
  };
@@ -24256,7 +24863,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24256
24863
  ),
24257
24864
  /*lowerString:*/ FfiConverterString.lower
24258
24865
  );
24259
- return UniffiResult.success(uniffiForeignFuture);
24866
+ return uniffiForeignFuture;
24260
24867
  },
24261
24868
  staticDepositSigningKey: (
24262
24869
  uniffiHandle: bigint,
@@ -24274,7 +24881,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24274
24881
  );
24275
24882
  };
24276
24883
  const uniffiHandleSuccess = (returnValue: PublicKeyBytes) => {
24277
- uniffiFutureCallback(
24884
+ uniffiFutureCallback.call(
24885
+ uniffiFutureCallback,
24278
24886
  uniffiCallbackData,
24279
24887
  /* UniffiForeignFutureStructRustBuffer */ {
24280
24888
  returnValue: FfiConverterTypePublicKeyBytes.lower(returnValue),
@@ -24283,12 +24891,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24283
24891
  );
24284
24892
  };
24285
24893
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24286
- uniffiFutureCallback(
24894
+ uniffiFutureCallback.call(
24895
+ uniffiFutureCallback,
24287
24896
  uniffiCallbackData,
24288
24897
  /* UniffiForeignFutureStructRustBuffer */ {
24289
24898
  returnValue: /*empty*/ new Uint8Array(0),
24290
24899
  // TODO create callstatus with error.
24291
- callStatus: { code, errorBuf },
24900
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24292
24901
  }
24293
24902
  );
24294
24903
  };
@@ -24302,7 +24911,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24302
24911
  ),
24303
24912
  /*lowerString:*/ FfiConverterString.lower
24304
24913
  );
24305
- return UniffiResult.success(uniffiForeignFuture);
24914
+ return uniffiForeignFuture;
24306
24915
  },
24307
24916
  subtractSecrets: (
24308
24917
  uniffiHandle: bigint,
@@ -24322,7 +24931,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24322
24931
  );
24323
24932
  };
24324
24933
  const uniffiHandleSuccess = (returnValue: ExternalSecretSource) => {
24325
- uniffiFutureCallback(
24934
+ uniffiFutureCallback.call(
24935
+ uniffiFutureCallback,
24326
24936
  uniffiCallbackData,
24327
24937
  /* UniffiForeignFutureStructRustBuffer */ {
24328
24938
  returnValue:
@@ -24332,12 +24942,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24332
24942
  );
24333
24943
  };
24334
24944
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24335
- uniffiFutureCallback(
24945
+ uniffiFutureCallback.call(
24946
+ uniffiFutureCallback,
24336
24947
  uniffiCallbackData,
24337
24948
  /* UniffiForeignFutureStructRustBuffer */ {
24338
24949
  returnValue: /*empty*/ new Uint8Array(0),
24339
24950
  // TODO create callstatus with error.
24340
- callStatus: { code, errorBuf },
24951
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24341
24952
  }
24342
24953
  );
24343
24954
  };
@@ -24351,7 +24962,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24351
24962
  ),
24352
24963
  /*lowerString:*/ FfiConverterString.lower
24353
24964
  );
24354
- return UniffiResult.success(uniffiForeignFuture);
24965
+ return uniffiForeignFuture;
24355
24966
  },
24356
24967
  splitSecretWithProofs: (
24357
24968
  uniffiHandle: bigint,
@@ -24375,7 +24986,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24375
24986
  const uniffiHandleSuccess = (
24376
24987
  returnValue: Array<ExternalVerifiableSecretShare>
24377
24988
  ) => {
24378
- uniffiFutureCallback(
24989
+ uniffiFutureCallback.call(
24990
+ uniffiFutureCallback,
24379
24991
  uniffiCallbackData,
24380
24992
  /* UniffiForeignFutureStructRustBuffer */ {
24381
24993
  returnValue:
@@ -24387,12 +24999,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24387
24999
  );
24388
25000
  };
24389
25001
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24390
- uniffiFutureCallback(
25002
+ uniffiFutureCallback.call(
25003
+ uniffiFutureCallback,
24391
25004
  uniffiCallbackData,
24392
25005
  /* UniffiForeignFutureStructRustBuffer */ {
24393
25006
  returnValue: /*empty*/ new Uint8Array(0),
24394
25007
  // TODO create callstatus with error.
24395
- callStatus: { code, errorBuf },
25008
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24396
25009
  }
24397
25010
  );
24398
25011
  };
@@ -24406,7 +25019,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24406
25019
  ),
24407
25020
  /*lowerString:*/ FfiConverterString.lower
24408
25021
  );
24409
- return UniffiResult.success(uniffiForeignFuture);
25022
+ return uniffiForeignFuture;
24410
25023
  },
24411
25024
  encryptSecretForReceiver: (
24412
25025
  uniffiHandle: bigint,
@@ -24426,7 +25039,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24426
25039
  );
24427
25040
  };
24428
25041
  const uniffiHandleSuccess = (returnValue: ArrayBuffer) => {
24429
- uniffiFutureCallback(
25042
+ uniffiFutureCallback.call(
25043
+ uniffiFutureCallback,
24430
25044
  uniffiCallbackData,
24431
25045
  /* UniffiForeignFutureStructRustBuffer */ {
24432
25046
  returnValue: FfiConverterArrayBuffer.lower(returnValue),
@@ -24435,12 +25049,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24435
25049
  );
24436
25050
  };
24437
25051
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24438
- uniffiFutureCallback(
25052
+ uniffiFutureCallback.call(
25053
+ uniffiFutureCallback,
24439
25054
  uniffiCallbackData,
24440
25055
  /* UniffiForeignFutureStructRustBuffer */ {
24441
25056
  returnValue: /*empty*/ new Uint8Array(0),
24442
25057
  // TODO create callstatus with error.
24443
- callStatus: { code, errorBuf },
25058
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24444
25059
  }
24445
25060
  );
24446
25061
  };
@@ -24454,7 +25069,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24454
25069
  ),
24455
25070
  /*lowerString:*/ FfiConverterString.lower
24456
25071
  );
24457
- return UniffiResult.success(uniffiForeignFuture);
25072
+ return uniffiForeignFuture;
24458
25073
  },
24459
25074
  publicKeyFromSecret: (
24460
25075
  uniffiHandle: bigint,
@@ -24472,7 +25087,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24472
25087
  );
24473
25088
  };
24474
25089
  const uniffiHandleSuccess = (returnValue: PublicKeyBytes) => {
24475
- uniffiFutureCallback(
25090
+ uniffiFutureCallback.call(
25091
+ uniffiFutureCallback,
24476
25092
  uniffiCallbackData,
24477
25093
  /* UniffiForeignFutureStructRustBuffer */ {
24478
25094
  returnValue: FfiConverterTypePublicKeyBytes.lower(returnValue),
@@ -24481,12 +25097,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24481
25097
  );
24482
25098
  };
24483
25099
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24484
- uniffiFutureCallback(
25100
+ uniffiFutureCallback.call(
25101
+ uniffiFutureCallback,
24485
25102
  uniffiCallbackData,
24486
25103
  /* UniffiForeignFutureStructRustBuffer */ {
24487
25104
  returnValue: /*empty*/ new Uint8Array(0),
24488
25105
  // TODO create callstatus with error.
24489
- callStatus: { code, errorBuf },
25106
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24490
25107
  }
24491
25108
  );
24492
25109
  };
@@ -24500,7 +25117,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24500
25117
  ),
24501
25118
  /*lowerString:*/ FfiConverterString.lower
24502
25119
  );
24503
- return UniffiResult.success(uniffiForeignFuture);
25120
+ return uniffiForeignFuture;
24504
25121
  },
24505
25122
  signFrost: (
24506
25123
  uniffiHandle: bigint,
@@ -24520,7 +25137,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24520
25137
  const uniffiHandleSuccess = (
24521
25138
  returnValue: ExternalFrostSignatureShare
24522
25139
  ) => {
24523
- uniffiFutureCallback(
25140
+ uniffiFutureCallback.call(
25141
+ uniffiFutureCallback,
24524
25142
  uniffiCallbackData,
24525
25143
  /* UniffiForeignFutureStructRustBuffer */ {
24526
25144
  returnValue:
@@ -24530,12 +25148,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24530
25148
  );
24531
25149
  };
24532
25150
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24533
- uniffiFutureCallback(
25151
+ uniffiFutureCallback.call(
25152
+ uniffiFutureCallback,
24534
25153
  uniffiCallbackData,
24535
25154
  /* UniffiForeignFutureStructRustBuffer */ {
24536
25155
  returnValue: /*empty*/ new Uint8Array(0),
24537
25156
  // TODO create callstatus with error.
24538
- callStatus: { code, errorBuf },
25157
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24539
25158
  }
24540
25159
  );
24541
25160
  };
@@ -24549,7 +25168,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24549
25168
  ),
24550
25169
  /*lowerString:*/ FfiConverterString.lower
24551
25170
  );
24552
- return UniffiResult.success(uniffiForeignFuture);
25171
+ return uniffiForeignFuture;
24553
25172
  },
24554
25173
  aggregateFrost: (
24555
25174
  uniffiHandle: bigint,
@@ -24567,7 +25186,8 @@ const uniffiCallbackInterfaceExternalSigner: {
24567
25186
  );
24568
25187
  };
24569
25188
  const uniffiHandleSuccess = (returnValue: ExternalFrostSignature) => {
24570
- uniffiFutureCallback(
25189
+ uniffiFutureCallback.call(
25190
+ uniffiFutureCallback,
24571
25191
  uniffiCallbackData,
24572
25192
  /* UniffiForeignFutureStructRustBuffer */ {
24573
25193
  returnValue:
@@ -24577,12 +25197,13 @@ const uniffiCallbackInterfaceExternalSigner: {
24577
25197
  );
24578
25198
  };
24579
25199
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24580
- uniffiFutureCallback(
25200
+ uniffiFutureCallback.call(
25201
+ uniffiFutureCallback,
24581
25202
  uniffiCallbackData,
24582
25203
  /* UniffiForeignFutureStructRustBuffer */ {
24583
25204
  returnValue: /*empty*/ new Uint8Array(0),
24584
25205
  // TODO create callstatus with error.
24585
- callStatus: { code, errorBuf },
25206
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24586
25207
  }
24587
25208
  );
24588
25209
  };
@@ -24596,7 +25217,7 @@ const uniffiCallbackInterfaceExternalSigner: {
24596
25217
  ),
24597
25218
  /*lowerString:*/ FfiConverterString.lower
24598
25219
  );
24599
- return UniffiResult.success(uniffiForeignFuture);
25220
+ return uniffiForeignFuture;
24600
25221
  },
24601
25222
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
24602
25223
  // ExternalSigner: this will throw a stale handle error if the handle isn't found.
@@ -24745,67 +25366,69 @@ export class FiatServiceImpl
24745
25366
  }
24746
25367
 
24747
25368
  const uniffiTypeFiatServiceImplObjectFactory: UniffiObjectFactory<FiatService> =
24748
- {
24749
- create(pointer: UnsafeMutableRawPointer): FiatService {
24750
- const instance = Object.create(FiatServiceImpl.prototype);
24751
- instance[pointerLiteralSymbol] = pointer;
24752
- instance[destructorGuardSymbol] = this.bless(pointer);
24753
- instance[uniffiTypeNameSymbol] = 'FiatServiceImpl';
24754
- return instance;
24755
- },
25369
+ (() => {
25370
+ return {
25371
+ create(pointer: UnsafeMutableRawPointer): FiatService {
25372
+ const instance = Object.create(FiatServiceImpl.prototype);
25373
+ instance[pointerLiteralSymbol] = pointer;
25374
+ instance[destructorGuardSymbol] = this.bless(pointer);
25375
+ instance[uniffiTypeNameSymbol] = 'FiatServiceImpl';
25376
+ return instance;
25377
+ },
24756
25378
 
24757
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
24758
- return uniffiCaller.rustCall(
24759
- /*caller:*/ (status) =>
24760
- nativeModule().ubrn_uniffi_internal_fn_method_fiatservice_ffi__bless_pointer(
24761
- p,
24762
- status
24763
- ),
24764
- /*liftString:*/ FfiConverterString.lift
24765
- );
24766
- },
25379
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
25380
+ return uniffiCaller.rustCall(
25381
+ /*caller:*/ (status) =>
25382
+ nativeModule().ubrn_uniffi_internal_fn_method_fiatservice_ffi__bless_pointer(
25383
+ p,
25384
+ status
25385
+ ),
25386
+ /*liftString:*/ FfiConverterString.lift
25387
+ );
25388
+ },
24767
25389
 
24768
- unbless(ptr: UniffiRustArcPtr) {
24769
- ptr.markDestroyed();
24770
- },
25390
+ unbless(ptr: UniffiRustArcPtr) {
25391
+ ptr.markDestroyed();
25392
+ },
24771
25393
 
24772
- pointer(obj: FiatService): UnsafeMutableRawPointer {
24773
- if ((obj as any)[destructorGuardSymbol] === undefined) {
24774
- throw new UniffiInternalError.UnexpectedNullPointer();
24775
- }
24776
- return (obj as any)[pointerLiteralSymbol];
24777
- },
25394
+ pointer(obj: FiatService): UnsafeMutableRawPointer {
25395
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
25396
+ throw new UniffiInternalError.UnexpectedNullPointer();
25397
+ }
25398
+ return (obj as any)[pointerLiteralSymbol];
25399
+ },
24778
25400
 
24779
- clonePointer(obj: FiatService): UnsafeMutableRawPointer {
24780
- const pointer = this.pointer(obj);
24781
- return uniffiCaller.rustCall(
24782
- /*caller:*/ (callStatus) =>
24783
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice(
24784
- pointer,
24785
- callStatus
24786
- ),
24787
- /*liftString:*/ FfiConverterString.lift
24788
- );
24789
- },
25401
+ clonePointer(obj: FiatService): UnsafeMutableRawPointer {
25402
+ const pointer = this.pointer(obj);
25403
+ return uniffiCaller.rustCall(
25404
+ /*caller:*/ (callStatus) =>
25405
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice(
25406
+ pointer,
25407
+ callStatus
25408
+ ),
25409
+ /*liftString:*/ FfiConverterString.lift
25410
+ );
25411
+ },
24790
25412
 
24791
- freePointer(pointer: UnsafeMutableRawPointer): void {
24792
- uniffiCaller.rustCall(
24793
- /*caller:*/ (callStatus) =>
24794
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice(
24795
- pointer,
24796
- callStatus
24797
- ),
24798
- /*liftString:*/ FfiConverterString.lift
24799
- );
24800
- },
25413
+ freePointer(pointer: UnsafeMutableRawPointer): void {
25414
+ uniffiCaller.rustCall(
25415
+ /*caller:*/ (callStatus) =>
25416
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice(
25417
+ pointer,
25418
+ callStatus
25419
+ ),
25420
+ /*liftString:*/ FfiConverterString.lift
25421
+ );
25422
+ },
24801
25423
 
24802
- isConcreteType(obj: any): obj is FiatService {
24803
- return (
24804
- obj[destructorGuardSymbol] &&
24805
- obj[uniffiTypeNameSymbol] === 'FiatServiceImpl'
24806
- );
24807
- },
24808
- };
25424
+ isConcreteType(obj: any): obj is FiatService {
25425
+ return (
25426
+ obj[destructorGuardSymbol] &&
25427
+ obj[uniffiTypeNameSymbol] === 'FiatServiceImpl'
25428
+ );
25429
+ },
25430
+ };
25431
+ })();
24809
25432
  // FfiConverter for FiatService
24810
25433
  const FfiConverterTypeFiatService = new FfiConverterObjectWithCallbacks(
24811
25434
  uniffiTypeFiatServiceImplObjectFactory
@@ -24833,7 +25456,8 @@ const uniffiCallbackInterfaceFiatService: {
24833
25456
  return await jsCallback.fetchFiatCurrencies({ signal });
24834
25457
  };
24835
25458
  const uniffiHandleSuccess = (returnValue: Array<FiatCurrency>) => {
24836
- uniffiFutureCallback(
25459
+ uniffiFutureCallback.call(
25460
+ uniffiFutureCallback,
24837
25461
  uniffiCallbackData,
24838
25462
  /* UniffiForeignFutureStructRustBuffer */ {
24839
25463
  returnValue: FfiConverterArrayTypeFiatCurrency.lower(returnValue),
@@ -24842,12 +25466,13 @@ const uniffiCallbackInterfaceFiatService: {
24842
25466
  );
24843
25467
  };
24844
25468
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24845
- uniffiFutureCallback(
25469
+ uniffiFutureCallback.call(
25470
+ uniffiFutureCallback,
24846
25471
  uniffiCallbackData,
24847
25472
  /* UniffiForeignFutureStructRustBuffer */ {
24848
25473
  returnValue: /*empty*/ new Uint8Array(0),
24849
25474
  // TODO create callstatus with error.
24850
- callStatus: { code, errorBuf },
25475
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24851
25476
  }
24852
25477
  );
24853
25478
  };
@@ -24861,7 +25486,7 @@ const uniffiCallbackInterfaceFiatService: {
24861
25486
  ),
24862
25487
  /*lowerString:*/ FfiConverterString.lower
24863
25488
  );
24864
- return UniffiResult.success(uniffiForeignFuture);
25489
+ return uniffiForeignFuture;
24865
25490
  },
24866
25491
  fetchFiatRates: (
24867
25492
  uniffiHandle: bigint,
@@ -24875,7 +25500,8 @@ const uniffiCallbackInterfaceFiatService: {
24875
25500
  return await jsCallback.fetchFiatRates({ signal });
24876
25501
  };
24877
25502
  const uniffiHandleSuccess = (returnValue: Array<Rate>) => {
24878
- uniffiFutureCallback(
25503
+ uniffiFutureCallback.call(
25504
+ uniffiFutureCallback,
24879
25505
  uniffiCallbackData,
24880
25506
  /* UniffiForeignFutureStructRustBuffer */ {
24881
25507
  returnValue: FfiConverterArrayTypeRate.lower(returnValue),
@@ -24884,12 +25510,13 @@ const uniffiCallbackInterfaceFiatService: {
24884
25510
  );
24885
25511
  };
24886
25512
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
24887
- uniffiFutureCallback(
25513
+ uniffiFutureCallback.call(
25514
+ uniffiFutureCallback,
24888
25515
  uniffiCallbackData,
24889
25516
  /* UniffiForeignFutureStructRustBuffer */ {
24890
25517
  returnValue: /*empty*/ new Uint8Array(0),
24891
25518
  // TODO create callstatus with error.
24892
- callStatus: { code, errorBuf },
25519
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
24893
25520
  }
24894
25521
  );
24895
25522
  };
@@ -24903,7 +25530,7 @@ const uniffiCallbackInterfaceFiatService: {
24903
25530
  ),
24904
25531
  /*lowerString:*/ FfiConverterString.lower
24905
25532
  );
24906
- return UniffiResult.success(uniffiForeignFuture);
25533
+ return uniffiForeignFuture;
24907
25534
  },
24908
25535
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
24909
25536
  // FiatService: this will throw a stale handle error if the handle isn't found.
@@ -25009,67 +25636,69 @@ export class PaymentObserverImpl
25009
25636
  }
25010
25637
 
25011
25638
  const uniffiTypePaymentObserverImplObjectFactory: UniffiObjectFactory<PaymentObserver> =
25012
- {
25013
- create(pointer: UnsafeMutableRawPointer): PaymentObserver {
25014
- const instance = Object.create(PaymentObserverImpl.prototype);
25015
- instance[pointerLiteralSymbol] = pointer;
25016
- instance[destructorGuardSymbol] = this.bless(pointer);
25017
- instance[uniffiTypeNameSymbol] = 'PaymentObserverImpl';
25018
- return instance;
25019
- },
25639
+ (() => {
25640
+ return {
25641
+ create(pointer: UnsafeMutableRawPointer): PaymentObserver {
25642
+ const instance = Object.create(PaymentObserverImpl.prototype);
25643
+ instance[pointerLiteralSymbol] = pointer;
25644
+ instance[destructorGuardSymbol] = this.bless(pointer);
25645
+ instance[uniffiTypeNameSymbol] = 'PaymentObserverImpl';
25646
+ return instance;
25647
+ },
25020
25648
 
25021
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
25022
- return uniffiCaller.rustCall(
25023
- /*caller:*/ (status) =>
25024
- nativeModule().ubrn_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer(
25025
- p,
25026
- status
25027
- ),
25028
- /*liftString:*/ FfiConverterString.lift
25029
- );
25030
- },
25649
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
25650
+ return uniffiCaller.rustCall(
25651
+ /*caller:*/ (status) =>
25652
+ nativeModule().ubrn_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer(
25653
+ p,
25654
+ status
25655
+ ),
25656
+ /*liftString:*/ FfiConverterString.lift
25657
+ );
25658
+ },
25031
25659
 
25032
- unbless(ptr: UniffiRustArcPtr) {
25033
- ptr.markDestroyed();
25034
- },
25660
+ unbless(ptr: UniffiRustArcPtr) {
25661
+ ptr.markDestroyed();
25662
+ },
25035
25663
 
25036
- pointer(obj: PaymentObserver): UnsafeMutableRawPointer {
25037
- if ((obj as any)[destructorGuardSymbol] === undefined) {
25038
- throw new UniffiInternalError.UnexpectedNullPointer();
25039
- }
25040
- return (obj as any)[pointerLiteralSymbol];
25041
- },
25664
+ pointer(obj: PaymentObserver): UnsafeMutableRawPointer {
25665
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
25666
+ throw new UniffiInternalError.UnexpectedNullPointer();
25667
+ }
25668
+ return (obj as any)[pointerLiteralSymbol];
25669
+ },
25042
25670
 
25043
- clonePointer(obj: PaymentObserver): UnsafeMutableRawPointer {
25044
- const pointer = this.pointer(obj);
25045
- return uniffiCaller.rustCall(
25046
- /*caller:*/ (callStatus) =>
25047
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_paymentobserver(
25048
- pointer,
25049
- callStatus
25050
- ),
25051
- /*liftString:*/ FfiConverterString.lift
25052
- );
25053
- },
25671
+ clonePointer(obj: PaymentObserver): UnsafeMutableRawPointer {
25672
+ const pointer = this.pointer(obj);
25673
+ return uniffiCaller.rustCall(
25674
+ /*caller:*/ (callStatus) =>
25675
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_paymentobserver(
25676
+ pointer,
25677
+ callStatus
25678
+ ),
25679
+ /*liftString:*/ FfiConverterString.lift
25680
+ );
25681
+ },
25054
25682
 
25055
- freePointer(pointer: UnsafeMutableRawPointer): void {
25056
- uniffiCaller.rustCall(
25057
- /*caller:*/ (callStatus) =>
25058
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_paymentobserver(
25059
- pointer,
25060
- callStatus
25061
- ),
25062
- /*liftString:*/ FfiConverterString.lift
25063
- );
25064
- },
25683
+ freePointer(pointer: UnsafeMutableRawPointer): void {
25684
+ uniffiCaller.rustCall(
25685
+ /*caller:*/ (callStatus) =>
25686
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_paymentobserver(
25687
+ pointer,
25688
+ callStatus
25689
+ ),
25690
+ /*liftString:*/ FfiConverterString.lift
25691
+ );
25692
+ },
25065
25693
 
25066
- isConcreteType(obj: any): obj is PaymentObserver {
25067
- return (
25068
- obj[destructorGuardSymbol] &&
25069
- obj[uniffiTypeNameSymbol] === 'PaymentObserverImpl'
25070
- );
25071
- },
25072
- };
25694
+ isConcreteType(obj: any): obj is PaymentObserver {
25695
+ return (
25696
+ obj[destructorGuardSymbol] &&
25697
+ obj[uniffiTypeNameSymbol] === 'PaymentObserverImpl'
25698
+ );
25699
+ },
25700
+ };
25701
+ })();
25073
25702
  // FfiConverter for PaymentObserver
25074
25703
  const FfiConverterTypePaymentObserver = new FfiConverterObjectWithCallbacks(
25075
25704
  uniffiTypePaymentObserverImplObjectFactory
@@ -25099,7 +25728,8 @@ const uniffiCallbackInterfacePaymentObserver: {
25099
25728
  );
25100
25729
  };
25101
25730
  const uniffiHandleSuccess = (returnValue: void) => {
25102
- uniffiFutureCallback(
25731
+ uniffiFutureCallback.call(
25732
+ uniffiFutureCallback,
25103
25733
  uniffiCallbackData,
25104
25734
  /* UniffiForeignFutureStructVoid */ {
25105
25735
  callStatus: uniffiCaller.createCallStatus(),
@@ -25107,11 +25737,12 @@ const uniffiCallbackInterfacePaymentObserver: {
25107
25737
  );
25108
25738
  };
25109
25739
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
25110
- uniffiFutureCallback(
25740
+ uniffiFutureCallback.call(
25741
+ uniffiFutureCallback,
25111
25742
  uniffiCallbackData,
25112
25743
  /* UniffiForeignFutureStructVoid */ {
25113
25744
  // TODO create callstatus with error.
25114
- callStatus: { code, errorBuf },
25745
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
25115
25746
  }
25116
25747
  );
25117
25748
  };
@@ -25125,7 +25756,7 @@ const uniffiCallbackInterfacePaymentObserver: {
25125
25756
  ),
25126
25757
  /*lowerString:*/ FfiConverterString.lower
25127
25758
  );
25128
- return UniffiResult.success(uniffiForeignFuture);
25759
+ return uniffiForeignFuture;
25129
25760
  },
25130
25761
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
25131
25762
  // PaymentObserver: this will throw a stale handle error if the handle isn't found.
@@ -25370,67 +26001,70 @@ export class RestClientImpl extends UniffiAbstractObject implements RestClient {
25370
26001
  }
25371
26002
  }
25372
26003
 
25373
- const uniffiTypeRestClientImplObjectFactory: UniffiObjectFactory<RestClient> = {
25374
- create(pointer: UnsafeMutableRawPointer): RestClient {
25375
- const instance = Object.create(RestClientImpl.prototype);
25376
- instance[pointerLiteralSymbol] = pointer;
25377
- instance[destructorGuardSymbol] = this.bless(pointer);
25378
- instance[uniffiTypeNameSymbol] = 'RestClientImpl';
25379
- return instance;
25380
- },
26004
+ const uniffiTypeRestClientImplObjectFactory: UniffiObjectFactory<RestClient> =
26005
+ (() => {
26006
+ return {
26007
+ create(pointer: UnsafeMutableRawPointer): RestClient {
26008
+ const instance = Object.create(RestClientImpl.prototype);
26009
+ instance[pointerLiteralSymbol] = pointer;
26010
+ instance[destructorGuardSymbol] = this.bless(pointer);
26011
+ instance[uniffiTypeNameSymbol] = 'RestClientImpl';
26012
+ return instance;
26013
+ },
25381
26014
 
25382
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
25383
- return uniffiCaller.rustCall(
25384
- /*caller:*/ (status) =>
25385
- nativeModule().ubrn_uniffi_internal_fn_method_restclient_ffi__bless_pointer(
25386
- p,
25387
- status
25388
- ),
25389
- /*liftString:*/ FfiConverterString.lift
25390
- );
25391
- },
26015
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
26016
+ return uniffiCaller.rustCall(
26017
+ /*caller:*/ (status) =>
26018
+ nativeModule().ubrn_uniffi_internal_fn_method_restclient_ffi__bless_pointer(
26019
+ p,
26020
+ status
26021
+ ),
26022
+ /*liftString:*/ FfiConverterString.lift
26023
+ );
26024
+ },
25392
26025
 
25393
- unbless(ptr: UniffiRustArcPtr) {
25394
- ptr.markDestroyed();
25395
- },
26026
+ unbless(ptr: UniffiRustArcPtr) {
26027
+ ptr.markDestroyed();
26028
+ },
25396
26029
 
25397
- pointer(obj: RestClient): UnsafeMutableRawPointer {
25398
- if ((obj as any)[destructorGuardSymbol] === undefined) {
25399
- throw new UniffiInternalError.UnexpectedNullPointer();
25400
- }
25401
- return (obj as any)[pointerLiteralSymbol];
25402
- },
26030
+ pointer(obj: RestClient): UnsafeMutableRawPointer {
26031
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
26032
+ throw new UniffiInternalError.UnexpectedNullPointer();
26033
+ }
26034
+ return (obj as any)[pointerLiteralSymbol];
26035
+ },
25403
26036
 
25404
- clonePointer(obj: RestClient): UnsafeMutableRawPointer {
25405
- const pointer = this.pointer(obj);
25406
- return uniffiCaller.rustCall(
25407
- /*caller:*/ (callStatus) =>
25408
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_restclient(
25409
- pointer,
25410
- callStatus
25411
- ),
25412
- /*liftString:*/ FfiConverterString.lift
25413
- );
25414
- },
26037
+ clonePointer(obj: RestClient): UnsafeMutableRawPointer {
26038
+ const pointer = this.pointer(obj);
26039
+ return uniffiCaller.rustCall(
26040
+ /*caller:*/ (callStatus) =>
26041
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_restclient(
26042
+ pointer,
26043
+ callStatus
26044
+ ),
26045
+ /*liftString:*/ FfiConverterString.lift
26046
+ );
26047
+ },
25415
26048
 
25416
- freePointer(pointer: UnsafeMutableRawPointer): void {
25417
- uniffiCaller.rustCall(
25418
- /*caller:*/ (callStatus) =>
25419
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_restclient(
25420
- pointer,
25421
- callStatus
25422
- ),
25423
- /*liftString:*/ FfiConverterString.lift
25424
- );
25425
- },
26049
+ freePointer(pointer: UnsafeMutableRawPointer): void {
26050
+ uniffiCaller.rustCall(
26051
+ /*caller:*/ (callStatus) =>
26052
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_restclient(
26053
+ pointer,
26054
+ callStatus
26055
+ ),
26056
+ /*liftString:*/ FfiConverterString.lift
26057
+ );
26058
+ },
25426
26059
 
25427
- isConcreteType(obj: any): obj is RestClient {
25428
- return (
25429
- obj[destructorGuardSymbol] &&
25430
- obj[uniffiTypeNameSymbol] === 'RestClientImpl'
25431
- );
25432
- },
25433
- };
26060
+ isConcreteType(obj: any): obj is RestClient {
26061
+ return (
26062
+ obj[destructorGuardSymbol] &&
26063
+ obj[uniffiTypeNameSymbol] === 'RestClientImpl'
26064
+ );
26065
+ },
26066
+ };
26067
+ })();
25434
26068
  // FfiConverter for RestClient
25435
26069
  const FfiConverterTypeRestClient = new FfiConverterObjectWithCallbacks(
25436
26070
  uniffiTypeRestClientImplObjectFactory
@@ -25464,7 +26098,8 @@ const uniffiCallbackInterfaceRestClient: {
25464
26098
  );
25465
26099
  };
25466
26100
  const uniffiHandleSuccess = (returnValue: RestResponse) => {
25467
- uniffiFutureCallback(
26101
+ uniffiFutureCallback.call(
26102
+ uniffiFutureCallback,
25468
26103
  uniffiCallbackData,
25469
26104
  /* UniffiForeignFutureStructRustBuffer */ {
25470
26105
  returnValue: FfiConverterTypeRestResponse.lower(returnValue),
@@ -25473,12 +26108,13 @@ const uniffiCallbackInterfaceRestClient: {
25473
26108
  );
25474
26109
  };
25475
26110
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
25476
- uniffiFutureCallback(
26111
+ uniffiFutureCallback.call(
26112
+ uniffiFutureCallback,
25477
26113
  uniffiCallbackData,
25478
26114
  /* UniffiForeignFutureStructRustBuffer */ {
25479
26115
  returnValue: /*empty*/ new Uint8Array(0),
25480
26116
  // TODO create callstatus with error.
25481
- callStatus: { code, errorBuf },
26117
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
25482
26118
  }
25483
26119
  );
25484
26120
  };
@@ -25492,7 +26128,7 @@ const uniffiCallbackInterfaceRestClient: {
25492
26128
  ),
25493
26129
  /*lowerString:*/ FfiConverterString.lower
25494
26130
  );
25495
- return UniffiResult.success(uniffiForeignFuture);
26131
+ return uniffiForeignFuture;
25496
26132
  },
25497
26133
  postRequest: (
25498
26134
  uniffiHandle: bigint,
@@ -25514,7 +26150,8 @@ const uniffiCallbackInterfaceRestClient: {
25514
26150
  );
25515
26151
  };
25516
26152
  const uniffiHandleSuccess = (returnValue: RestResponse) => {
25517
- uniffiFutureCallback(
26153
+ uniffiFutureCallback.call(
26154
+ uniffiFutureCallback,
25518
26155
  uniffiCallbackData,
25519
26156
  /* UniffiForeignFutureStructRustBuffer */ {
25520
26157
  returnValue: FfiConverterTypeRestResponse.lower(returnValue),
@@ -25523,12 +26160,13 @@ const uniffiCallbackInterfaceRestClient: {
25523
26160
  );
25524
26161
  };
25525
26162
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
25526
- uniffiFutureCallback(
26163
+ uniffiFutureCallback.call(
26164
+ uniffiFutureCallback,
25527
26165
  uniffiCallbackData,
25528
26166
  /* UniffiForeignFutureStructRustBuffer */ {
25529
26167
  returnValue: /*empty*/ new Uint8Array(0),
25530
26168
  // TODO create callstatus with error.
25531
- callStatus: { code, errorBuf },
26169
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
25532
26170
  }
25533
26171
  );
25534
26172
  };
@@ -25542,7 +26180,7 @@ const uniffiCallbackInterfaceRestClient: {
25542
26180
  ),
25543
26181
  /*lowerString:*/ FfiConverterString.lower
25544
26182
  );
25545
- return UniffiResult.success(uniffiForeignFuture);
26183
+ return uniffiForeignFuture;
25546
26184
  },
25547
26185
  deleteRequest: (
25548
26186
  uniffiHandle: bigint,
@@ -25564,7 +26202,8 @@ const uniffiCallbackInterfaceRestClient: {
25564
26202
  );
25565
26203
  };
25566
26204
  const uniffiHandleSuccess = (returnValue: RestResponse) => {
25567
- uniffiFutureCallback(
26205
+ uniffiFutureCallback.call(
26206
+ uniffiFutureCallback,
25568
26207
  uniffiCallbackData,
25569
26208
  /* UniffiForeignFutureStructRustBuffer */ {
25570
26209
  returnValue: FfiConverterTypeRestResponse.lower(returnValue),
@@ -25573,12 +26212,13 @@ const uniffiCallbackInterfaceRestClient: {
25573
26212
  );
25574
26213
  };
25575
26214
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
25576
- uniffiFutureCallback(
26215
+ uniffiFutureCallback.call(
26216
+ uniffiFutureCallback,
25577
26217
  uniffiCallbackData,
25578
26218
  /* UniffiForeignFutureStructRustBuffer */ {
25579
26219
  returnValue: /*empty*/ new Uint8Array(0),
25580
26220
  // TODO create callstatus with error.
25581
- callStatus: { code, errorBuf },
26221
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
25582
26222
  }
25583
26223
  );
25584
26224
  };
@@ -25592,7 +26232,7 @@ const uniffiCallbackInterfaceRestClient: {
25592
26232
  ),
25593
26233
  /*lowerString:*/ FfiConverterString.lower
25594
26234
  );
25595
- return UniffiResult.success(uniffiForeignFuture);
26235
+ return uniffiForeignFuture;
25596
26236
  },
25597
26237
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
25598
26238
  // RestClient: this will throw a stale handle error if the handle isn't found.
@@ -26098,66 +26738,69 @@ export class SdkBuilder
26098
26738
  }
26099
26739
 
26100
26740
  const uniffiTypeSdkBuilderObjectFactory: UniffiObjectFactory<SdkBuilderInterface> =
26101
- {
26102
- create(pointer: UnsafeMutableRawPointer): SdkBuilderInterface {
26103
- const instance = Object.create(SdkBuilder.prototype);
26104
- instance[pointerLiteralSymbol] = pointer;
26105
- instance[destructorGuardSymbol] = this.bless(pointer);
26106
- instance[uniffiTypeNameSymbol] = 'SdkBuilder';
26107
- return instance;
26108
- },
26741
+ (() => {
26742
+ return {
26743
+ create(pointer: UnsafeMutableRawPointer): SdkBuilderInterface {
26744
+ const instance = Object.create(SdkBuilder.prototype);
26745
+ instance[pointerLiteralSymbol] = pointer;
26746
+ instance[destructorGuardSymbol] = this.bless(pointer);
26747
+ instance[uniffiTypeNameSymbol] = 'SdkBuilder';
26748
+ return instance;
26749
+ },
26109
26750
 
26110
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
26111
- return uniffiCaller.rustCall(
26112
- /*caller:*/ (status) =>
26113
- nativeModule().ubrn_uniffi_internal_fn_method_sdkbuilder_ffi__bless_pointer(
26114
- p,
26115
- status
26116
- ),
26117
- /*liftString:*/ FfiConverterString.lift
26118
- );
26119
- },
26751
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
26752
+ return uniffiCaller.rustCall(
26753
+ /*caller:*/ (status) =>
26754
+ nativeModule().ubrn_uniffi_internal_fn_method_sdkbuilder_ffi__bless_pointer(
26755
+ p,
26756
+ status
26757
+ ),
26758
+ /*liftString:*/ FfiConverterString.lift
26759
+ );
26760
+ },
26120
26761
 
26121
- unbless(ptr: UniffiRustArcPtr) {
26122
- ptr.markDestroyed();
26123
- },
26762
+ unbless(ptr: UniffiRustArcPtr) {
26763
+ ptr.markDestroyed();
26764
+ },
26124
26765
 
26125
- pointer(obj: SdkBuilderInterface): UnsafeMutableRawPointer {
26126
- if ((obj as any)[destructorGuardSymbol] === undefined) {
26127
- throw new UniffiInternalError.UnexpectedNullPointer();
26128
- }
26129
- return (obj as any)[pointerLiteralSymbol];
26130
- },
26766
+ pointer(obj: SdkBuilderInterface): UnsafeMutableRawPointer {
26767
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
26768
+ throw new UniffiInternalError.UnexpectedNullPointer();
26769
+ }
26770
+ return (obj as any)[pointerLiteralSymbol];
26771
+ },
26131
26772
 
26132
- clonePointer(obj: SdkBuilderInterface): UnsafeMutableRawPointer {
26133
- const pointer = this.pointer(obj);
26134
- return uniffiCaller.rustCall(
26135
- /*caller:*/ (callStatus) =>
26136
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(
26137
- pointer,
26138
- callStatus
26139
- ),
26140
- /*liftString:*/ FfiConverterString.lift
26141
- );
26142
- },
26773
+ clonePointer(obj: SdkBuilderInterface): UnsafeMutableRawPointer {
26774
+ const pointer = this.pointer(obj);
26775
+ return uniffiCaller.rustCall(
26776
+ /*caller:*/ (callStatus) =>
26777
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(
26778
+ pointer,
26779
+ callStatus
26780
+ ),
26781
+ /*liftString:*/ FfiConverterString.lift
26782
+ );
26783
+ },
26143
26784
 
26144
- freePointer(pointer: UnsafeMutableRawPointer): void {
26145
- uniffiCaller.rustCall(
26146
- /*caller:*/ (callStatus) =>
26147
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_sdkbuilder(
26148
- pointer,
26149
- callStatus
26150
- ),
26151
- /*liftString:*/ FfiConverterString.lift
26152
- );
26153
- },
26785
+ freePointer(pointer: UnsafeMutableRawPointer): void {
26786
+ uniffiCaller.rustCall(
26787
+ /*caller:*/ (callStatus) =>
26788
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_sdkbuilder(
26789
+ pointer,
26790
+ callStatus
26791
+ ),
26792
+ /*liftString:*/ FfiConverterString.lift
26793
+ );
26794
+ },
26154
26795
 
26155
- isConcreteType(obj: any): obj is SdkBuilderInterface {
26156
- return (
26157
- obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'SdkBuilder'
26158
- );
26159
- },
26160
- };
26796
+ isConcreteType(obj: any): obj is SdkBuilderInterface {
26797
+ return (
26798
+ obj[destructorGuardSymbol] &&
26799
+ obj[uniffiTypeNameSymbol] === 'SdkBuilder'
26800
+ );
26801
+ },
26802
+ };
26803
+ })();
26161
26804
  // FfiConverter for SdkBuilderInterface
26162
26805
  const FfiConverterTypeSdkBuilder = new FfiConverterObject(
26163
26806
  uniffiTypeSdkBuilderObjectFactory
@@ -26335,6 +26978,35 @@ export interface Storage {
26335
26978
  metadata: Array<SetLnurlMetadataItem>,
26336
26979
  asyncOpts_?: { signal: AbortSignal }
26337
26980
  ): /*throws*/ Promise<void>;
26981
+ /**
26982
+ * Lists contacts from storage with optional pagination
26983
+ */
26984
+ listContacts(
26985
+ request: ListContactsRequest,
26986
+ asyncOpts_?: { signal: AbortSignal }
26987
+ ): /*throws*/ Promise<Array<Contact>>;
26988
+ /**
26989
+ * Gets a single contact by its ID
26990
+ */
26991
+ getContact(
26992
+ id: string,
26993
+ asyncOpts_?: { signal: AbortSignal }
26994
+ ): /*throws*/ Promise<Contact>;
26995
+ /**
26996
+ * Inserts or updates a contact in storage (upsert by id).
26997
+ * Preserves `created_at` on update.
26998
+ */
26999
+ insertContact(
27000
+ contact: Contact,
27001
+ asyncOpts_?: { signal: AbortSignal }
27002
+ ): /*throws*/ Promise<void>;
27003
+ /**
27004
+ * Deletes a contact by its ID
27005
+ */
27006
+ deleteContact(
27007
+ id: string,
27008
+ asyncOpts_?: { signal: AbortSignal }
27009
+ ): /*throws*/ Promise<void>;
26338
27010
  addOutgoingChange(
26339
27011
  record: UnversionedRecordChange,
26340
27012
  asyncOpts_?: { signal: AbortSignal }
@@ -27058,29 +27730,34 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
27058
27730
  }
27059
27731
  }
27060
27732
 
27061
- public async addOutgoingChange(
27062
- record: UnversionedRecordChange,
27733
+ /**
27734
+ * Lists contacts from storage with optional pagination
27735
+ */
27736
+ public async listContacts(
27737
+ request: ListContactsRequest,
27063
27738
  asyncOpts_?: { signal: AbortSignal }
27064
- ): Promise</*u64*/ bigint> /*throws*/ {
27739
+ ): Promise<Array<Contact>> /*throws*/ {
27065
27740
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
27066
27741
  try {
27067
27742
  return await uniffiRustCallAsync(
27068
27743
  /*rustCaller:*/ uniffiCaller,
27069
27744
  /*rustFutureFunc:*/ () => {
27070
- return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(
27745
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_contacts(
27071
27746
  uniffiTypeStorageImplObjectFactory.clonePointer(this),
27072
- FfiConverterTypeUnversionedRecordChange.lower(record)
27747
+ FfiConverterTypeListContactsRequest.lower(request)
27073
27748
  );
27074
27749
  },
27075
27750
  /*pollFunc:*/ nativeModule()
27076
- .ubrn_ffi_breez_sdk_spark_rust_future_poll_u64,
27751
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
27077
27752
  /*cancelFunc:*/ nativeModule()
27078
- .ubrn_ffi_breez_sdk_spark_rust_future_cancel_u64,
27753
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
27079
27754
  /*completeFunc:*/ nativeModule()
27080
- .ubrn_ffi_breez_sdk_spark_rust_future_complete_u64,
27755
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
27081
27756
  /*freeFunc:*/ nativeModule()
27082
- .ubrn_ffi_breez_sdk_spark_rust_future_free_u64,
27083
- /*liftFunc:*/ FfiConverterUInt64.lift.bind(FfiConverterUInt64),
27757
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
27758
+ /*liftFunc:*/ FfiConverterArrayTypeContact.lift.bind(
27759
+ FfiConverterArrayTypeContact
27760
+ ),
27084
27761
  /*liftString:*/ FfiConverterString.lift,
27085
27762
  /*asyncOpts:*/ asyncOpts_,
27086
27763
  /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
@@ -27095,31 +27772,34 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
27095
27772
  }
27096
27773
  }
27097
27774
 
27098
- public async completeOutgoingSync(
27099
- record: Record,
27100
- localRevision: /*u64*/ bigint,
27775
+ /**
27776
+ * Gets a single contact by its ID
27777
+ */
27778
+ public async getContact(
27779
+ id: string,
27101
27780
  asyncOpts_?: { signal: AbortSignal }
27102
- ): Promise<void> /*throws*/ {
27781
+ ): Promise<Contact> /*throws*/ {
27103
27782
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
27104
27783
  try {
27105
27784
  return await uniffiRustCallAsync(
27106
27785
  /*rustCaller:*/ uniffiCaller,
27107
27786
  /*rustFutureFunc:*/ () => {
27108
- return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(
27787
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_contact(
27109
27788
  uniffiTypeStorageImplObjectFactory.clonePointer(this),
27110
- FfiConverterTypeRecord.lower(record),
27111
- FfiConverterUInt64.lower(localRevision)
27789
+ FfiConverterString.lower(id)
27112
27790
  );
27113
27791
  },
27114
27792
  /*pollFunc:*/ nativeModule()
27115
- .ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
27793
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
27116
27794
  /*cancelFunc:*/ nativeModule()
27117
- .ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
27795
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
27118
27796
  /*completeFunc:*/ nativeModule()
27119
- .ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
27797
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
27120
27798
  /*freeFunc:*/ nativeModule()
27121
- .ubrn_ffi_breez_sdk_spark_rust_future_free_void,
27122
- /*liftFunc:*/ (_v) => {},
27799
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
27800
+ /*liftFunc:*/ FfiConverterTypeContact.lift.bind(
27801
+ FfiConverterTypeContact
27802
+ ),
27123
27803
  /*liftString:*/ FfiConverterString.lift,
27124
27804
  /*asyncOpts:*/ asyncOpts_,
27125
27805
  /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
@@ -27134,31 +27814,33 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
27134
27814
  }
27135
27815
  }
27136
27816
 
27137
- public async getPendingOutgoingChanges(
27138
- limit: /*u32*/ number,
27817
+ /**
27818
+ * Inserts or updates a contact in storage (upsert by id).
27819
+ * Preserves `created_at` on update.
27820
+ */
27821
+ public async insertContact(
27822
+ contact: Contact,
27139
27823
  asyncOpts_?: { signal: AbortSignal }
27140
- ): Promise<Array<OutgoingChange>> /*throws*/ {
27824
+ ): Promise<void> /*throws*/ {
27141
27825
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
27142
27826
  try {
27143
27827
  return await uniffiRustCallAsync(
27144
27828
  /*rustCaller:*/ uniffiCaller,
27145
27829
  /*rustFutureFunc:*/ () => {
27146
- return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(
27830
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_contact(
27147
27831
  uniffiTypeStorageImplObjectFactory.clonePointer(this),
27148
- FfiConverterUInt32.lower(limit)
27832
+ FfiConverterTypeContact.lower(contact)
27149
27833
  );
27150
27834
  },
27151
27835
  /*pollFunc:*/ nativeModule()
27152
- .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
27836
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
27153
27837
  /*cancelFunc:*/ nativeModule()
27154
- .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
27838
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
27155
27839
  /*completeFunc:*/ nativeModule()
27156
- .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
27840
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
27157
27841
  /*freeFunc:*/ nativeModule()
27158
- .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
27159
- /*liftFunc:*/ FfiConverterArrayTypeOutgoingChange.lift.bind(
27160
- FfiConverterArrayTypeOutgoingChange
27161
- ),
27842
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_void,
27843
+ /*liftFunc:*/ (_v) => {},
27162
27844
  /*liftString:*/ FfiConverterString.lift,
27163
27845
  /*asyncOpts:*/ asyncOpts_,
27164
27846
  /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
@@ -27174,34 +27856,31 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
27174
27856
  }
27175
27857
 
27176
27858
  /**
27177
- * Get the last committed sync revision.
27178
- *
27179
- * The `sync_revision` table tracks the highest revision that has been committed
27180
- * (i.e. acknowledged by the server or received from it). It does NOT include
27181
- * pending outgoing queue ids. This value is used by the sync protocol to
27182
- * request changes from the server.
27859
+ * Deletes a contact by its ID
27183
27860
  */
27184
- public async getLastRevision(asyncOpts_?: {
27185
- signal: AbortSignal;
27186
- }): Promise</*u64*/ bigint> /*throws*/ {
27861
+ public async deleteContact(
27862
+ id: string,
27863
+ asyncOpts_?: { signal: AbortSignal }
27864
+ ): Promise<void> /*throws*/ {
27187
27865
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
27188
27866
  try {
27189
27867
  return await uniffiRustCallAsync(
27190
27868
  /*rustCaller:*/ uniffiCaller,
27191
27869
  /*rustFutureFunc:*/ () => {
27192
- return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_last_revision(
27193
- uniffiTypeStorageImplObjectFactory.clonePointer(this)
27870
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_contact(
27871
+ uniffiTypeStorageImplObjectFactory.clonePointer(this),
27872
+ FfiConverterString.lower(id)
27194
27873
  );
27195
27874
  },
27196
27875
  /*pollFunc:*/ nativeModule()
27197
- .ubrn_ffi_breez_sdk_spark_rust_future_poll_u64,
27876
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
27198
27877
  /*cancelFunc:*/ nativeModule()
27199
- .ubrn_ffi_breez_sdk_spark_rust_future_cancel_u64,
27878
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
27200
27879
  /*completeFunc:*/ nativeModule()
27201
- .ubrn_ffi_breez_sdk_spark_rust_future_complete_u64,
27880
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
27202
27881
  /*freeFunc:*/ nativeModule()
27203
- .ubrn_ffi_breez_sdk_spark_rust_future_free_u64,
27204
- /*liftFunc:*/ FfiConverterUInt64.lift.bind(FfiConverterUInt64),
27882
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_void,
27883
+ /*liftFunc:*/ (_v) => {},
27205
27884
  /*liftString:*/ FfiConverterString.lift,
27206
27885
  /*asyncOpts:*/ asyncOpts_,
27207
27886
  /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
@@ -27216,8 +27895,166 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
27216
27895
  }
27217
27896
  }
27218
27897
 
27219
- /**
27220
- * Insert incoming records from remote sync
27898
+ public async addOutgoingChange(
27899
+ record: UnversionedRecordChange,
27900
+ asyncOpts_?: { signal: AbortSignal }
27901
+ ): Promise</*u64*/ bigint> /*throws*/ {
27902
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
27903
+ try {
27904
+ return await uniffiRustCallAsync(
27905
+ /*rustCaller:*/ uniffiCaller,
27906
+ /*rustFutureFunc:*/ () => {
27907
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(
27908
+ uniffiTypeStorageImplObjectFactory.clonePointer(this),
27909
+ FfiConverterTypeUnversionedRecordChange.lower(record)
27910
+ );
27911
+ },
27912
+ /*pollFunc:*/ nativeModule()
27913
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_u64,
27914
+ /*cancelFunc:*/ nativeModule()
27915
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_u64,
27916
+ /*completeFunc:*/ nativeModule()
27917
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_u64,
27918
+ /*freeFunc:*/ nativeModule()
27919
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_u64,
27920
+ /*liftFunc:*/ FfiConverterUInt64.lift.bind(FfiConverterUInt64),
27921
+ /*liftString:*/ FfiConverterString.lift,
27922
+ /*asyncOpts:*/ asyncOpts_,
27923
+ /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
27924
+ FfiConverterTypeStorageError
27925
+ )
27926
+ );
27927
+ } catch (__error: any) {
27928
+ if (uniffiIsDebug && __error instanceof Error) {
27929
+ __error.stack = __stack;
27930
+ }
27931
+ throw __error;
27932
+ }
27933
+ }
27934
+
27935
+ public async completeOutgoingSync(
27936
+ record: Record,
27937
+ localRevision: /*u64*/ bigint,
27938
+ asyncOpts_?: { signal: AbortSignal }
27939
+ ): Promise<void> /*throws*/ {
27940
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
27941
+ try {
27942
+ return await uniffiRustCallAsync(
27943
+ /*rustCaller:*/ uniffiCaller,
27944
+ /*rustFutureFunc:*/ () => {
27945
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(
27946
+ uniffiTypeStorageImplObjectFactory.clonePointer(this),
27947
+ FfiConverterTypeRecord.lower(record),
27948
+ FfiConverterUInt64.lower(localRevision)
27949
+ );
27950
+ },
27951
+ /*pollFunc:*/ nativeModule()
27952
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
27953
+ /*cancelFunc:*/ nativeModule()
27954
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
27955
+ /*completeFunc:*/ nativeModule()
27956
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
27957
+ /*freeFunc:*/ nativeModule()
27958
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_void,
27959
+ /*liftFunc:*/ (_v) => {},
27960
+ /*liftString:*/ FfiConverterString.lift,
27961
+ /*asyncOpts:*/ asyncOpts_,
27962
+ /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
27963
+ FfiConverterTypeStorageError
27964
+ )
27965
+ );
27966
+ } catch (__error: any) {
27967
+ if (uniffiIsDebug && __error instanceof Error) {
27968
+ __error.stack = __stack;
27969
+ }
27970
+ throw __error;
27971
+ }
27972
+ }
27973
+
27974
+ public async getPendingOutgoingChanges(
27975
+ limit: /*u32*/ number,
27976
+ asyncOpts_?: { signal: AbortSignal }
27977
+ ): Promise<Array<OutgoingChange>> /*throws*/ {
27978
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
27979
+ try {
27980
+ return await uniffiRustCallAsync(
27981
+ /*rustCaller:*/ uniffiCaller,
27982
+ /*rustFutureFunc:*/ () => {
27983
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(
27984
+ uniffiTypeStorageImplObjectFactory.clonePointer(this),
27985
+ FfiConverterUInt32.lower(limit)
27986
+ );
27987
+ },
27988
+ /*pollFunc:*/ nativeModule()
27989
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
27990
+ /*cancelFunc:*/ nativeModule()
27991
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
27992
+ /*completeFunc:*/ nativeModule()
27993
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
27994
+ /*freeFunc:*/ nativeModule()
27995
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
27996
+ /*liftFunc:*/ FfiConverterArrayTypeOutgoingChange.lift.bind(
27997
+ FfiConverterArrayTypeOutgoingChange
27998
+ ),
27999
+ /*liftString:*/ FfiConverterString.lift,
28000
+ /*asyncOpts:*/ asyncOpts_,
28001
+ /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
28002
+ FfiConverterTypeStorageError
28003
+ )
28004
+ );
28005
+ } catch (__error: any) {
28006
+ if (uniffiIsDebug && __error instanceof Error) {
28007
+ __error.stack = __stack;
28008
+ }
28009
+ throw __error;
28010
+ }
28011
+ }
28012
+
28013
+ /**
28014
+ * Get the last committed sync revision.
28015
+ *
28016
+ * The `sync_revision` table tracks the highest revision that has been committed
28017
+ * (i.e. acknowledged by the server or received from it). It does NOT include
28018
+ * pending outgoing queue ids. This value is used by the sync protocol to
28019
+ * request changes from the server.
28020
+ */
28021
+ public async getLastRevision(asyncOpts_?: {
28022
+ signal: AbortSignal;
28023
+ }): Promise</*u64*/ bigint> /*throws*/ {
28024
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
28025
+ try {
28026
+ return await uniffiRustCallAsync(
28027
+ /*rustCaller:*/ uniffiCaller,
28028
+ /*rustFutureFunc:*/ () => {
28029
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_last_revision(
28030
+ uniffiTypeStorageImplObjectFactory.clonePointer(this)
28031
+ );
28032
+ },
28033
+ /*pollFunc:*/ nativeModule()
28034
+ .ubrn_ffi_breez_sdk_spark_rust_future_poll_u64,
28035
+ /*cancelFunc:*/ nativeModule()
28036
+ .ubrn_ffi_breez_sdk_spark_rust_future_cancel_u64,
28037
+ /*completeFunc:*/ nativeModule()
28038
+ .ubrn_ffi_breez_sdk_spark_rust_future_complete_u64,
28039
+ /*freeFunc:*/ nativeModule()
28040
+ .ubrn_ffi_breez_sdk_spark_rust_future_free_u64,
28041
+ /*liftFunc:*/ FfiConverterUInt64.lift.bind(FfiConverterUInt64),
28042
+ /*liftString:*/ FfiConverterString.lift,
28043
+ /*asyncOpts:*/ asyncOpts_,
28044
+ /*errorHandler:*/ FfiConverterTypeStorageError.lift.bind(
28045
+ FfiConverterTypeStorageError
28046
+ )
28047
+ );
28048
+ } catch (__error: any) {
28049
+ if (uniffiIsDebug && __error instanceof Error) {
28050
+ __error.stack = __stack;
28051
+ }
28052
+ throw __error;
28053
+ }
28054
+ }
28055
+
28056
+ /**
28057
+ * Insert incoming records from remote sync
27221
28058
  */
27222
28059
  public async insertIncomingRecords(
27223
28060
  records: Array<Record>,
@@ -27436,66 +28273,70 @@ export class StorageImpl extends UniffiAbstractObject implements Storage {
27436
28273
  }
27437
28274
  }
27438
28275
 
27439
- const uniffiTypeStorageImplObjectFactory: UniffiObjectFactory<Storage> = {
27440
- create(pointer: UnsafeMutableRawPointer): Storage {
27441
- const instance = Object.create(StorageImpl.prototype);
27442
- instance[pointerLiteralSymbol] = pointer;
27443
- instance[destructorGuardSymbol] = this.bless(pointer);
27444
- instance[uniffiTypeNameSymbol] = 'StorageImpl';
27445
- return instance;
27446
- },
28276
+ const uniffiTypeStorageImplObjectFactory: UniffiObjectFactory<Storage> =
28277
+ (() => {
28278
+ return {
28279
+ create(pointer: UnsafeMutableRawPointer): Storage {
28280
+ const instance = Object.create(StorageImpl.prototype);
28281
+ instance[pointerLiteralSymbol] = pointer;
28282
+ instance[destructorGuardSymbol] = this.bless(pointer);
28283
+ instance[uniffiTypeNameSymbol] = 'StorageImpl';
28284
+ return instance;
28285
+ },
27447
28286
 
27448
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
27449
- return uniffiCaller.rustCall(
27450
- /*caller:*/ (status) =>
27451
- nativeModule().ubrn_uniffi_internal_fn_method_storage_ffi__bless_pointer(
27452
- p,
27453
- status
27454
- ),
27455
- /*liftString:*/ FfiConverterString.lift
27456
- );
27457
- },
28287
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
28288
+ return uniffiCaller.rustCall(
28289
+ /*caller:*/ (status) =>
28290
+ nativeModule().ubrn_uniffi_internal_fn_method_storage_ffi__bless_pointer(
28291
+ p,
28292
+ status
28293
+ ),
28294
+ /*liftString:*/ FfiConverterString.lift
28295
+ );
28296
+ },
27458
28297
 
27459
- unbless(ptr: UniffiRustArcPtr) {
27460
- ptr.markDestroyed();
27461
- },
28298
+ unbless(ptr: UniffiRustArcPtr) {
28299
+ ptr.markDestroyed();
28300
+ },
27462
28301
 
27463
- pointer(obj: Storage): UnsafeMutableRawPointer {
27464
- if ((obj as any)[destructorGuardSymbol] === undefined) {
27465
- throw new UniffiInternalError.UnexpectedNullPointer();
27466
- }
27467
- return (obj as any)[pointerLiteralSymbol];
27468
- },
28302
+ pointer(obj: Storage): UnsafeMutableRawPointer {
28303
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
28304
+ throw new UniffiInternalError.UnexpectedNullPointer();
28305
+ }
28306
+ return (obj as any)[pointerLiteralSymbol];
28307
+ },
27469
28308
 
27470
- clonePointer(obj: Storage): UnsafeMutableRawPointer {
27471
- const pointer = this.pointer(obj);
27472
- return uniffiCaller.rustCall(
27473
- /*caller:*/ (callStatus) =>
27474
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_storage(
27475
- pointer,
27476
- callStatus
27477
- ),
27478
- /*liftString:*/ FfiConverterString.lift
27479
- );
27480
- },
28309
+ clonePointer(obj: Storage): UnsafeMutableRawPointer {
28310
+ const pointer = this.pointer(obj);
28311
+ return uniffiCaller.rustCall(
28312
+ /*caller:*/ (callStatus) =>
28313
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_storage(
28314
+ pointer,
28315
+ callStatus
28316
+ ),
28317
+ /*liftString:*/ FfiConverterString.lift
28318
+ );
28319
+ },
27481
28320
 
27482
- freePointer(pointer: UnsafeMutableRawPointer): void {
27483
- uniffiCaller.rustCall(
27484
- /*caller:*/ (callStatus) =>
27485
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_storage(
27486
- pointer,
27487
- callStatus
27488
- ),
27489
- /*liftString:*/ FfiConverterString.lift
27490
- );
27491
- },
28321
+ freePointer(pointer: UnsafeMutableRawPointer): void {
28322
+ uniffiCaller.rustCall(
28323
+ /*caller:*/ (callStatus) =>
28324
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_storage(
28325
+ pointer,
28326
+ callStatus
28327
+ ),
28328
+ /*liftString:*/ FfiConverterString.lift
28329
+ );
28330
+ },
27492
28331
 
27493
- isConcreteType(obj: any): obj is Storage {
27494
- return (
27495
- obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'StorageImpl'
27496
- );
27497
- },
27498
- };
28332
+ isConcreteType(obj: any): obj is Storage {
28333
+ return (
28334
+ obj[destructorGuardSymbol] &&
28335
+ obj[uniffiTypeNameSymbol] === 'StorageImpl'
28336
+ );
28337
+ },
28338
+ };
28339
+ })();
27499
28340
  // FfiConverter for Storage
27500
28341
  const FfiConverterTypeStorage = new FfiConverterObjectWithCallbacks(
27501
28342
  uniffiTypeStorageImplObjectFactory
@@ -27524,7 +28365,8 @@ const uniffiCallbackInterfaceStorage: {
27524
28365
  });
27525
28366
  };
27526
28367
  const uniffiHandleSuccess = (returnValue: void) => {
27527
- uniffiFutureCallback(
28368
+ uniffiFutureCallback.call(
28369
+ uniffiFutureCallback,
27528
28370
  uniffiCallbackData,
27529
28371
  /* UniffiForeignFutureStructVoid */ {
27530
28372
  callStatus: uniffiCaller.createCallStatus(),
@@ -27532,11 +28374,12 @@ const uniffiCallbackInterfaceStorage: {
27532
28374
  );
27533
28375
  };
27534
28376
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27535
- uniffiFutureCallback(
28377
+ uniffiFutureCallback.call(
28378
+ uniffiFutureCallback,
27536
28379
  uniffiCallbackData,
27537
28380
  /* UniffiForeignFutureStructVoid */ {
27538
28381
  // TODO create callstatus with error.
27539
- callStatus: { code, errorBuf },
28382
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27540
28383
  }
27541
28384
  );
27542
28385
  };
@@ -27550,7 +28393,7 @@ const uniffiCallbackInterfaceStorage: {
27550
28393
  ),
27551
28394
  /*lowerString:*/ FfiConverterString.lower
27552
28395
  );
27553
- return UniffiResult.success(uniffiForeignFuture);
28396
+ return uniffiForeignFuture;
27554
28397
  },
27555
28398
  getCachedItem: (
27556
28399
  uniffiHandle: bigint,
@@ -27567,7 +28410,8 @@ const uniffiCallbackInterfaceStorage: {
27567
28410
  });
27568
28411
  };
27569
28412
  const uniffiHandleSuccess = (returnValue: string | undefined) => {
27570
- uniffiFutureCallback(
28413
+ uniffiFutureCallback.call(
28414
+ uniffiFutureCallback,
27571
28415
  uniffiCallbackData,
27572
28416
  /* UniffiForeignFutureStructRustBuffer */ {
27573
28417
  returnValue: FfiConverterOptionalString.lower(returnValue),
@@ -27576,12 +28420,13 @@ const uniffiCallbackInterfaceStorage: {
27576
28420
  );
27577
28421
  };
27578
28422
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27579
- uniffiFutureCallback(
28423
+ uniffiFutureCallback.call(
28424
+ uniffiFutureCallback,
27580
28425
  uniffiCallbackData,
27581
28426
  /* UniffiForeignFutureStructRustBuffer */ {
27582
28427
  returnValue: /*empty*/ new Uint8Array(0),
27583
28428
  // TODO create callstatus with error.
27584
- callStatus: { code, errorBuf },
28429
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27585
28430
  }
27586
28431
  );
27587
28432
  };
@@ -27595,7 +28440,7 @@ const uniffiCallbackInterfaceStorage: {
27595
28440
  ),
27596
28441
  /*lowerString:*/ FfiConverterString.lower
27597
28442
  );
27598
- return UniffiResult.success(uniffiForeignFuture);
28443
+ return uniffiForeignFuture;
27599
28444
  },
27600
28445
  setCachedItem: (
27601
28446
  uniffiHandle: bigint,
@@ -27613,7 +28458,8 @@ const uniffiCallbackInterfaceStorage: {
27613
28458
  );
27614
28459
  };
27615
28460
  const uniffiHandleSuccess = (returnValue: void) => {
27616
- uniffiFutureCallback(
28461
+ uniffiFutureCallback.call(
28462
+ uniffiFutureCallback,
27617
28463
  uniffiCallbackData,
27618
28464
  /* UniffiForeignFutureStructVoid */ {
27619
28465
  callStatus: uniffiCaller.createCallStatus(),
@@ -27621,11 +28467,12 @@ const uniffiCallbackInterfaceStorage: {
27621
28467
  );
27622
28468
  };
27623
28469
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27624
- uniffiFutureCallback(
28470
+ uniffiFutureCallback.call(
28471
+ uniffiFutureCallback,
27625
28472
  uniffiCallbackData,
27626
28473
  /* UniffiForeignFutureStructVoid */ {
27627
28474
  // TODO create callstatus with error.
27628
- callStatus: { code, errorBuf },
28475
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27629
28476
  }
27630
28477
  );
27631
28478
  };
@@ -27639,7 +28486,7 @@ const uniffiCallbackInterfaceStorage: {
27639
28486
  ),
27640
28487
  /*lowerString:*/ FfiConverterString.lower
27641
28488
  );
27642
- return UniffiResult.success(uniffiForeignFuture);
28489
+ return uniffiForeignFuture;
27643
28490
  },
27644
28491
  listPayments: (
27645
28492
  uniffiHandle: bigint,
@@ -27657,7 +28504,8 @@ const uniffiCallbackInterfaceStorage: {
27657
28504
  );
27658
28505
  };
27659
28506
  const uniffiHandleSuccess = (returnValue: Array<Payment>) => {
27660
- uniffiFutureCallback(
28507
+ uniffiFutureCallback.call(
28508
+ uniffiFutureCallback,
27661
28509
  uniffiCallbackData,
27662
28510
  /* UniffiForeignFutureStructRustBuffer */ {
27663
28511
  returnValue: FfiConverterArrayTypePayment.lower(returnValue),
@@ -27666,12 +28514,13 @@ const uniffiCallbackInterfaceStorage: {
27666
28514
  );
27667
28515
  };
27668
28516
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27669
- uniffiFutureCallback(
28517
+ uniffiFutureCallback.call(
28518
+ uniffiFutureCallback,
27670
28519
  uniffiCallbackData,
27671
28520
  /* UniffiForeignFutureStructRustBuffer */ {
27672
28521
  returnValue: /*empty*/ new Uint8Array(0),
27673
28522
  // TODO create callstatus with error.
27674
- callStatus: { code, errorBuf },
28523
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27675
28524
  }
27676
28525
  );
27677
28526
  };
@@ -27685,7 +28534,7 @@ const uniffiCallbackInterfaceStorage: {
27685
28534
  ),
27686
28535
  /*lowerString:*/ FfiConverterString.lower
27687
28536
  );
27688
- return UniffiResult.success(uniffiForeignFuture);
28537
+ return uniffiForeignFuture;
27689
28538
  },
27690
28539
  insertPayment: (
27691
28540
  uniffiHandle: bigint,
@@ -27701,7 +28550,8 @@ const uniffiCallbackInterfaceStorage: {
27701
28550
  );
27702
28551
  };
27703
28552
  const uniffiHandleSuccess = (returnValue: void) => {
27704
- uniffiFutureCallback(
28553
+ uniffiFutureCallback.call(
28554
+ uniffiFutureCallback,
27705
28555
  uniffiCallbackData,
27706
28556
  /* UniffiForeignFutureStructVoid */ {
27707
28557
  callStatus: uniffiCaller.createCallStatus(),
@@ -27709,11 +28559,12 @@ const uniffiCallbackInterfaceStorage: {
27709
28559
  );
27710
28560
  };
27711
28561
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27712
- uniffiFutureCallback(
28562
+ uniffiFutureCallback.call(
28563
+ uniffiFutureCallback,
27713
28564
  uniffiCallbackData,
27714
28565
  /* UniffiForeignFutureStructVoid */ {
27715
28566
  // TODO create callstatus with error.
27716
- callStatus: { code, errorBuf },
28567
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27717
28568
  }
27718
28569
  );
27719
28570
  };
@@ -27727,7 +28578,7 @@ const uniffiCallbackInterfaceStorage: {
27727
28578
  ),
27728
28579
  /*lowerString:*/ FfiConverterString.lower
27729
28580
  );
27730
- return UniffiResult.success(uniffiForeignFuture);
28581
+ return uniffiForeignFuture;
27731
28582
  },
27732
28583
  insertPaymentMetadata: (
27733
28584
  uniffiHandle: bigint,
@@ -27745,7 +28596,8 @@ const uniffiCallbackInterfaceStorage: {
27745
28596
  );
27746
28597
  };
27747
28598
  const uniffiHandleSuccess = (returnValue: void) => {
27748
- uniffiFutureCallback(
28599
+ uniffiFutureCallback.call(
28600
+ uniffiFutureCallback,
27749
28601
  uniffiCallbackData,
27750
28602
  /* UniffiForeignFutureStructVoid */ {
27751
28603
  callStatus: uniffiCaller.createCallStatus(),
@@ -27753,11 +28605,12 @@ const uniffiCallbackInterfaceStorage: {
27753
28605
  );
27754
28606
  };
27755
28607
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27756
- uniffiFutureCallback(
28608
+ uniffiFutureCallback.call(
28609
+ uniffiFutureCallback,
27757
28610
  uniffiCallbackData,
27758
28611
  /* UniffiForeignFutureStructVoid */ {
27759
28612
  // TODO create callstatus with error.
27760
- callStatus: { code, errorBuf },
28613
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27761
28614
  }
27762
28615
  );
27763
28616
  };
@@ -27771,7 +28624,7 @@ const uniffiCallbackInterfaceStorage: {
27771
28624
  ),
27772
28625
  /*lowerString:*/ FfiConverterString.lower
27773
28626
  );
27774
- return UniffiResult.success(uniffiForeignFuture);
28627
+ return uniffiForeignFuture;
27775
28628
  },
27776
28629
  getPaymentById: (
27777
28630
  uniffiHandle: bigint,
@@ -27786,7 +28639,8 @@ const uniffiCallbackInterfaceStorage: {
27786
28639
  });
27787
28640
  };
27788
28641
  const uniffiHandleSuccess = (returnValue: Payment) => {
27789
- uniffiFutureCallback(
28642
+ uniffiFutureCallback.call(
28643
+ uniffiFutureCallback,
27790
28644
  uniffiCallbackData,
27791
28645
  /* UniffiForeignFutureStructRustBuffer */ {
27792
28646
  returnValue: FfiConverterTypePayment.lower(returnValue),
@@ -27795,12 +28649,13 @@ const uniffiCallbackInterfaceStorage: {
27795
28649
  );
27796
28650
  };
27797
28651
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27798
- uniffiFutureCallback(
28652
+ uniffiFutureCallback.call(
28653
+ uniffiFutureCallback,
27799
28654
  uniffiCallbackData,
27800
28655
  /* UniffiForeignFutureStructRustBuffer */ {
27801
28656
  returnValue: /*empty*/ new Uint8Array(0),
27802
28657
  // TODO create callstatus with error.
27803
- callStatus: { code, errorBuf },
28658
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27804
28659
  }
27805
28660
  );
27806
28661
  };
@@ -27814,7 +28669,7 @@ const uniffiCallbackInterfaceStorage: {
27814
28669
  ),
27815
28670
  /*lowerString:*/ FfiConverterString.lower
27816
28671
  );
27817
- return UniffiResult.success(uniffiForeignFuture);
28672
+ return uniffiForeignFuture;
27818
28673
  },
27819
28674
  getPaymentByInvoice: (
27820
28675
  uniffiHandle: bigint,
@@ -27832,7 +28687,8 @@ const uniffiCallbackInterfaceStorage: {
27832
28687
  );
27833
28688
  };
27834
28689
  const uniffiHandleSuccess = (returnValue: Payment | undefined) => {
27835
- uniffiFutureCallback(
28690
+ uniffiFutureCallback.call(
28691
+ uniffiFutureCallback,
27836
28692
  uniffiCallbackData,
27837
28693
  /* UniffiForeignFutureStructRustBuffer */ {
27838
28694
  returnValue: FfiConverterOptionalTypePayment.lower(returnValue),
@@ -27841,12 +28697,13 @@ const uniffiCallbackInterfaceStorage: {
27841
28697
  );
27842
28698
  };
27843
28699
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27844
- uniffiFutureCallback(
28700
+ uniffiFutureCallback.call(
28701
+ uniffiFutureCallback,
27845
28702
  uniffiCallbackData,
27846
28703
  /* UniffiForeignFutureStructRustBuffer */ {
27847
28704
  returnValue: /*empty*/ new Uint8Array(0),
27848
28705
  // TODO create callstatus with error.
27849
- callStatus: { code, errorBuf },
28706
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27850
28707
  }
27851
28708
  );
27852
28709
  };
@@ -27860,7 +28717,7 @@ const uniffiCallbackInterfaceStorage: {
27860
28717
  ),
27861
28718
  /*lowerString:*/ FfiConverterString.lower
27862
28719
  );
27863
- return UniffiResult.success(uniffiForeignFuture);
28720
+ return uniffiForeignFuture;
27864
28721
  },
27865
28722
  getPaymentsByParentIds: (
27866
28723
  uniffiHandle: bigint,
@@ -27880,7 +28737,8 @@ const uniffiCallbackInterfaceStorage: {
27880
28737
  const uniffiHandleSuccess = (
27881
28738
  returnValue: Map<string, Array<Payment>>
27882
28739
  ) => {
27883
- uniffiFutureCallback(
28740
+ uniffiFutureCallback.call(
28741
+ uniffiFutureCallback,
27884
28742
  uniffiCallbackData,
27885
28743
  /* UniffiForeignFutureStructRustBuffer */ {
27886
28744
  returnValue:
@@ -27890,12 +28748,13 @@ const uniffiCallbackInterfaceStorage: {
27890
28748
  );
27891
28749
  };
27892
28750
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27893
- uniffiFutureCallback(
28751
+ uniffiFutureCallback.call(
28752
+ uniffiFutureCallback,
27894
28753
  uniffiCallbackData,
27895
28754
  /* UniffiForeignFutureStructRustBuffer */ {
27896
28755
  returnValue: /*empty*/ new Uint8Array(0),
27897
28756
  // TODO create callstatus with error.
27898
- callStatus: { code, errorBuf },
28757
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27899
28758
  }
27900
28759
  );
27901
28760
  };
@@ -27909,7 +28768,7 @@ const uniffiCallbackInterfaceStorage: {
27909
28768
  ),
27910
28769
  /*lowerString:*/ FfiConverterString.lower
27911
28770
  );
27912
- return UniffiResult.success(uniffiForeignFuture);
28771
+ return uniffiForeignFuture;
27913
28772
  },
27914
28773
  addDeposit: (
27915
28774
  uniffiHandle: bigint,
@@ -27929,7 +28788,8 @@ const uniffiCallbackInterfaceStorage: {
27929
28788
  );
27930
28789
  };
27931
28790
  const uniffiHandleSuccess = (returnValue: void) => {
27932
- uniffiFutureCallback(
28791
+ uniffiFutureCallback.call(
28792
+ uniffiFutureCallback,
27933
28793
  uniffiCallbackData,
27934
28794
  /* UniffiForeignFutureStructVoid */ {
27935
28795
  callStatus: uniffiCaller.createCallStatus(),
@@ -27937,11 +28797,12 @@ const uniffiCallbackInterfaceStorage: {
27937
28797
  );
27938
28798
  };
27939
28799
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27940
- uniffiFutureCallback(
28800
+ uniffiFutureCallback.call(
28801
+ uniffiFutureCallback,
27941
28802
  uniffiCallbackData,
27942
28803
  /* UniffiForeignFutureStructVoid */ {
27943
28804
  // TODO create callstatus with error.
27944
- callStatus: { code, errorBuf },
28805
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27945
28806
  }
27946
28807
  );
27947
28808
  };
@@ -27955,7 +28816,7 @@ const uniffiCallbackInterfaceStorage: {
27955
28816
  ),
27956
28817
  /*lowerString:*/ FfiConverterString.lower
27957
28818
  );
27958
- return UniffiResult.success(uniffiForeignFuture);
28819
+ return uniffiForeignFuture;
27959
28820
  },
27960
28821
  deleteDeposit: (
27961
28822
  uniffiHandle: bigint,
@@ -27973,7 +28834,8 @@ const uniffiCallbackInterfaceStorage: {
27973
28834
  );
27974
28835
  };
27975
28836
  const uniffiHandleSuccess = (returnValue: void) => {
27976
- uniffiFutureCallback(
28837
+ uniffiFutureCallback.call(
28838
+ uniffiFutureCallback,
27977
28839
  uniffiCallbackData,
27978
28840
  /* UniffiForeignFutureStructVoid */ {
27979
28841
  callStatus: uniffiCaller.createCallStatus(),
@@ -27981,11 +28843,12 @@ const uniffiCallbackInterfaceStorage: {
27981
28843
  );
27982
28844
  };
27983
28845
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
27984
- uniffiFutureCallback(
28846
+ uniffiFutureCallback.call(
28847
+ uniffiFutureCallback,
27985
28848
  uniffiCallbackData,
27986
28849
  /* UniffiForeignFutureStructVoid */ {
27987
28850
  // TODO create callstatus with error.
27988
- callStatus: { code, errorBuf },
28851
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
27989
28852
  }
27990
28853
  );
27991
28854
  };
@@ -27999,7 +28862,7 @@ const uniffiCallbackInterfaceStorage: {
27999
28862
  ),
28000
28863
  /*lowerString:*/ FfiConverterString.lower
28001
28864
  );
28002
- return UniffiResult.success(uniffiForeignFuture);
28865
+ return uniffiForeignFuture;
28003
28866
  },
28004
28867
  listDeposits: (
28005
28868
  uniffiHandle: bigint,
@@ -28013,7 +28876,8 @@ const uniffiCallbackInterfaceStorage: {
28013
28876
  return await jsCallback.listDeposits({ signal });
28014
28877
  };
28015
28878
  const uniffiHandleSuccess = (returnValue: Array<DepositInfo>) => {
28016
- uniffiFutureCallback(
28879
+ uniffiFutureCallback.call(
28880
+ uniffiFutureCallback,
28017
28881
  uniffiCallbackData,
28018
28882
  /* UniffiForeignFutureStructRustBuffer */ {
28019
28883
  returnValue: FfiConverterArrayTypeDepositInfo.lower(returnValue),
@@ -28022,12 +28886,13 @@ const uniffiCallbackInterfaceStorage: {
28022
28886
  );
28023
28887
  };
28024
28888
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28025
- uniffiFutureCallback(
28889
+ uniffiFutureCallback.call(
28890
+ uniffiFutureCallback,
28026
28891
  uniffiCallbackData,
28027
28892
  /* UniffiForeignFutureStructRustBuffer */ {
28028
28893
  returnValue: /*empty*/ new Uint8Array(0),
28029
28894
  // TODO create callstatus with error.
28030
- callStatus: { code, errorBuf },
28895
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28031
28896
  }
28032
28897
  );
28033
28898
  };
@@ -28041,7 +28906,7 @@ const uniffiCallbackInterfaceStorage: {
28041
28906
  ),
28042
28907
  /*lowerString:*/ FfiConverterString.lower
28043
28908
  );
28044
- return UniffiResult.success(uniffiForeignFuture);
28909
+ return uniffiForeignFuture;
28045
28910
  },
28046
28911
  updateDeposit: (
28047
28912
  uniffiHandle: bigint,
@@ -28061,7 +28926,8 @@ const uniffiCallbackInterfaceStorage: {
28061
28926
  );
28062
28927
  };
28063
28928
  const uniffiHandleSuccess = (returnValue: void) => {
28064
- uniffiFutureCallback(
28929
+ uniffiFutureCallback.call(
28930
+ uniffiFutureCallback,
28065
28931
  uniffiCallbackData,
28066
28932
  /* UniffiForeignFutureStructVoid */ {
28067
28933
  callStatus: uniffiCaller.createCallStatus(),
@@ -28069,11 +28935,12 @@ const uniffiCallbackInterfaceStorage: {
28069
28935
  );
28070
28936
  };
28071
28937
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28072
- uniffiFutureCallback(
28938
+ uniffiFutureCallback.call(
28939
+ uniffiFutureCallback,
28073
28940
  uniffiCallbackData,
28074
28941
  /* UniffiForeignFutureStructVoid */ {
28075
28942
  // TODO create callstatus with error.
28076
- callStatus: { code, errorBuf },
28943
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28077
28944
  }
28078
28945
  );
28079
28946
  };
@@ -28087,7 +28954,7 @@ const uniffiCallbackInterfaceStorage: {
28087
28954
  ),
28088
28955
  /*lowerString:*/ FfiConverterString.lower
28089
28956
  );
28090
- return UniffiResult.success(uniffiForeignFuture);
28957
+ return uniffiForeignFuture;
28091
28958
  },
28092
28959
  setLnurlMetadata: (
28093
28960
  uniffiHandle: bigint,
@@ -28103,7 +28970,145 @@ const uniffiCallbackInterfaceStorage: {
28103
28970
  );
28104
28971
  };
28105
28972
  const uniffiHandleSuccess = (returnValue: void) => {
28106
- uniffiFutureCallback(
28973
+ uniffiFutureCallback.call(
28974
+ uniffiFutureCallback,
28975
+ uniffiCallbackData,
28976
+ /* UniffiForeignFutureStructVoid */ {
28977
+ callStatus: uniffiCaller.createCallStatus(),
28978
+ }
28979
+ );
28980
+ };
28981
+ const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28982
+ uniffiFutureCallback.call(
28983
+ uniffiFutureCallback,
28984
+ uniffiCallbackData,
28985
+ /* UniffiForeignFutureStructVoid */ {
28986
+ // TODO create callstatus with error.
28987
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28988
+ }
28989
+ );
28990
+ };
28991
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
28992
+ /*makeCall:*/ uniffiMakeCall,
28993
+ /*handleSuccess:*/ uniffiHandleSuccess,
28994
+ /*handleError:*/ uniffiHandleError,
28995
+ /*isErrorType:*/ StorageError.instanceOf,
28996
+ /*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
28997
+ FfiConverterTypeStorageError
28998
+ ),
28999
+ /*lowerString:*/ FfiConverterString.lower
29000
+ );
29001
+ return uniffiForeignFuture;
29002
+ },
29003
+ listContacts: (
29004
+ uniffiHandle: bigint,
29005
+ request: Uint8Array,
29006
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
29007
+ uniffiCallbackData: bigint
29008
+ ) => {
29009
+ const uniffiMakeCall = async (
29010
+ signal: AbortSignal
29011
+ ): Promise<Array<Contact>> => {
29012
+ const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
29013
+ return await jsCallback.listContacts(
29014
+ FfiConverterTypeListContactsRequest.lift(request),
29015
+ { signal }
29016
+ );
29017
+ };
29018
+ const uniffiHandleSuccess = (returnValue: Array<Contact>) => {
29019
+ uniffiFutureCallback.call(
29020
+ uniffiFutureCallback,
29021
+ uniffiCallbackData,
29022
+ /* UniffiForeignFutureStructRustBuffer */ {
29023
+ returnValue: FfiConverterArrayTypeContact.lower(returnValue),
29024
+ callStatus: uniffiCaller.createCallStatus(),
29025
+ }
29026
+ );
29027
+ };
29028
+ const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
29029
+ uniffiFutureCallback.call(
29030
+ uniffiFutureCallback,
29031
+ uniffiCallbackData,
29032
+ /* UniffiForeignFutureStructRustBuffer */ {
29033
+ returnValue: /*empty*/ new Uint8Array(0),
29034
+ // TODO create callstatus with error.
29035
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
29036
+ }
29037
+ );
29038
+ };
29039
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
29040
+ /*makeCall:*/ uniffiMakeCall,
29041
+ /*handleSuccess:*/ uniffiHandleSuccess,
29042
+ /*handleError:*/ uniffiHandleError,
29043
+ /*isErrorType:*/ StorageError.instanceOf,
29044
+ /*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
29045
+ FfiConverterTypeStorageError
29046
+ ),
29047
+ /*lowerString:*/ FfiConverterString.lower
29048
+ );
29049
+ return uniffiForeignFuture;
29050
+ },
29051
+ getContact: (
29052
+ uniffiHandle: bigint,
29053
+ id: Uint8Array,
29054
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
29055
+ uniffiCallbackData: bigint
29056
+ ) => {
29057
+ const uniffiMakeCall = async (signal: AbortSignal): Promise<Contact> => {
29058
+ const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
29059
+ return await jsCallback.getContact(FfiConverterString.lift(id), {
29060
+ signal,
29061
+ });
29062
+ };
29063
+ const uniffiHandleSuccess = (returnValue: Contact) => {
29064
+ uniffiFutureCallback.call(
29065
+ uniffiFutureCallback,
29066
+ uniffiCallbackData,
29067
+ /* UniffiForeignFutureStructRustBuffer */ {
29068
+ returnValue: FfiConverterTypeContact.lower(returnValue),
29069
+ callStatus: uniffiCaller.createCallStatus(),
29070
+ }
29071
+ );
29072
+ };
29073
+ const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
29074
+ uniffiFutureCallback.call(
29075
+ uniffiFutureCallback,
29076
+ uniffiCallbackData,
29077
+ /* UniffiForeignFutureStructRustBuffer */ {
29078
+ returnValue: /*empty*/ new Uint8Array(0),
29079
+ // TODO create callstatus with error.
29080
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
29081
+ }
29082
+ );
29083
+ };
29084
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
29085
+ /*makeCall:*/ uniffiMakeCall,
29086
+ /*handleSuccess:*/ uniffiHandleSuccess,
29087
+ /*handleError:*/ uniffiHandleError,
29088
+ /*isErrorType:*/ StorageError.instanceOf,
29089
+ /*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
29090
+ FfiConverterTypeStorageError
29091
+ ),
29092
+ /*lowerString:*/ FfiConverterString.lower
29093
+ );
29094
+ return uniffiForeignFuture;
29095
+ },
29096
+ insertContact: (
29097
+ uniffiHandle: bigint,
29098
+ contact: Uint8Array,
29099
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
29100
+ uniffiCallbackData: bigint
29101
+ ) => {
29102
+ const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
29103
+ const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
29104
+ return await jsCallback.insertContact(
29105
+ FfiConverterTypeContact.lift(contact),
29106
+ { signal }
29107
+ );
29108
+ };
29109
+ const uniffiHandleSuccess = (returnValue: void) => {
29110
+ uniffiFutureCallback.call(
29111
+ uniffiFutureCallback,
28107
29112
  uniffiCallbackData,
28108
29113
  /* UniffiForeignFutureStructVoid */ {
28109
29114
  callStatus: uniffiCaller.createCallStatus(),
@@ -28111,11 +29116,12 @@ const uniffiCallbackInterfaceStorage: {
28111
29116
  );
28112
29117
  };
28113
29118
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28114
- uniffiFutureCallback(
29119
+ uniffiFutureCallback.call(
29120
+ uniffiFutureCallback,
28115
29121
  uniffiCallbackData,
28116
29122
  /* UniffiForeignFutureStructVoid */ {
28117
29123
  // TODO create callstatus with error.
28118
- callStatus: { code, errorBuf },
29124
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28119
29125
  }
28120
29126
  );
28121
29127
  };
@@ -28129,7 +29135,50 @@ const uniffiCallbackInterfaceStorage: {
28129
29135
  ),
28130
29136
  /*lowerString:*/ FfiConverterString.lower
28131
29137
  );
28132
- return UniffiResult.success(uniffiForeignFuture);
29138
+ return uniffiForeignFuture;
29139
+ },
29140
+ deleteContact: (
29141
+ uniffiHandle: bigint,
29142
+ id: Uint8Array,
29143
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
29144
+ uniffiCallbackData: bigint
29145
+ ) => {
29146
+ const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
29147
+ const jsCallback = FfiConverterTypeStorage.lift(uniffiHandle);
29148
+ return await jsCallback.deleteContact(FfiConverterString.lift(id), {
29149
+ signal,
29150
+ });
29151
+ };
29152
+ const uniffiHandleSuccess = (returnValue: void) => {
29153
+ uniffiFutureCallback.call(
29154
+ uniffiFutureCallback,
29155
+ uniffiCallbackData,
29156
+ /* UniffiForeignFutureStructVoid */ {
29157
+ callStatus: uniffiCaller.createCallStatus(),
29158
+ }
29159
+ );
29160
+ };
29161
+ const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
29162
+ uniffiFutureCallback.call(
29163
+ uniffiFutureCallback,
29164
+ uniffiCallbackData,
29165
+ /* UniffiForeignFutureStructVoid */ {
29166
+ // TODO create callstatus with error.
29167
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
29168
+ }
29169
+ );
29170
+ };
29171
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
29172
+ /*makeCall:*/ uniffiMakeCall,
29173
+ /*handleSuccess:*/ uniffiHandleSuccess,
29174
+ /*handleError:*/ uniffiHandleError,
29175
+ /*isErrorType:*/ StorageError.instanceOf,
29176
+ /*lowerError:*/ FfiConverterTypeStorageError.lower.bind(
29177
+ FfiConverterTypeStorageError
29178
+ ),
29179
+ /*lowerString:*/ FfiConverterString.lower
29180
+ );
29181
+ return uniffiForeignFuture;
28133
29182
  },
28134
29183
  addOutgoingChange: (
28135
29184
  uniffiHandle: bigint,
@@ -28147,7 +29196,8 @@ const uniffiCallbackInterfaceStorage: {
28147
29196
  );
28148
29197
  };
28149
29198
  const uniffiHandleSuccess = (returnValue: /*u64*/ bigint) => {
28150
- uniffiFutureCallback(
29199
+ uniffiFutureCallback.call(
29200
+ uniffiFutureCallback,
28151
29201
  uniffiCallbackData,
28152
29202
  /* UniffiForeignFutureStructU64 */ {
28153
29203
  returnValue: FfiConverterUInt64.lower(returnValue),
@@ -28156,12 +29206,13 @@ const uniffiCallbackInterfaceStorage: {
28156
29206
  );
28157
29207
  };
28158
29208
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28159
- uniffiFutureCallback(
29209
+ uniffiFutureCallback.call(
29210
+ uniffiFutureCallback,
28160
29211
  uniffiCallbackData,
28161
29212
  /* UniffiForeignFutureStructU64 */ {
28162
29213
  returnValue: 0n,
28163
29214
  // TODO create callstatus with error.
28164
- callStatus: { code, errorBuf },
29215
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28165
29216
  }
28166
29217
  );
28167
29218
  };
@@ -28175,7 +29226,7 @@ const uniffiCallbackInterfaceStorage: {
28175
29226
  ),
28176
29227
  /*lowerString:*/ FfiConverterString.lower
28177
29228
  );
28178
- return UniffiResult.success(uniffiForeignFuture);
29229
+ return uniffiForeignFuture;
28179
29230
  },
28180
29231
  completeOutgoingSync: (
28181
29232
  uniffiHandle: bigint,
@@ -28193,7 +29244,8 @@ const uniffiCallbackInterfaceStorage: {
28193
29244
  );
28194
29245
  };
28195
29246
  const uniffiHandleSuccess = (returnValue: void) => {
28196
- uniffiFutureCallback(
29247
+ uniffiFutureCallback.call(
29248
+ uniffiFutureCallback,
28197
29249
  uniffiCallbackData,
28198
29250
  /* UniffiForeignFutureStructVoid */ {
28199
29251
  callStatus: uniffiCaller.createCallStatus(),
@@ -28201,11 +29253,12 @@ const uniffiCallbackInterfaceStorage: {
28201
29253
  );
28202
29254
  };
28203
29255
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28204
- uniffiFutureCallback(
29256
+ uniffiFutureCallback.call(
29257
+ uniffiFutureCallback,
28205
29258
  uniffiCallbackData,
28206
29259
  /* UniffiForeignFutureStructVoid */ {
28207
29260
  // TODO create callstatus with error.
28208
- callStatus: { code, errorBuf },
29261
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28209
29262
  }
28210
29263
  );
28211
29264
  };
@@ -28219,7 +29272,7 @@ const uniffiCallbackInterfaceStorage: {
28219
29272
  ),
28220
29273
  /*lowerString:*/ FfiConverterString.lower
28221
29274
  );
28222
- return UniffiResult.success(uniffiForeignFuture);
29275
+ return uniffiForeignFuture;
28223
29276
  },
28224
29277
  getPendingOutgoingChanges: (
28225
29278
  uniffiHandle: bigint,
@@ -28237,7 +29290,8 @@ const uniffiCallbackInterfaceStorage: {
28237
29290
  );
28238
29291
  };
28239
29292
  const uniffiHandleSuccess = (returnValue: Array<OutgoingChange>) => {
28240
- uniffiFutureCallback(
29293
+ uniffiFutureCallback.call(
29294
+ uniffiFutureCallback,
28241
29295
  uniffiCallbackData,
28242
29296
  /* UniffiForeignFutureStructRustBuffer */ {
28243
29297
  returnValue: FfiConverterArrayTypeOutgoingChange.lower(returnValue),
@@ -28246,12 +29300,13 @@ const uniffiCallbackInterfaceStorage: {
28246
29300
  );
28247
29301
  };
28248
29302
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28249
- uniffiFutureCallback(
29303
+ uniffiFutureCallback.call(
29304
+ uniffiFutureCallback,
28250
29305
  uniffiCallbackData,
28251
29306
  /* UniffiForeignFutureStructRustBuffer */ {
28252
29307
  returnValue: /*empty*/ new Uint8Array(0),
28253
29308
  // TODO create callstatus with error.
28254
- callStatus: { code, errorBuf },
29309
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28255
29310
  }
28256
29311
  );
28257
29312
  };
@@ -28265,7 +29320,7 @@ const uniffiCallbackInterfaceStorage: {
28265
29320
  ),
28266
29321
  /*lowerString:*/ FfiConverterString.lower
28267
29322
  );
28268
- return UniffiResult.success(uniffiForeignFuture);
29323
+ return uniffiForeignFuture;
28269
29324
  },
28270
29325
  getLastRevision: (
28271
29326
  uniffiHandle: bigint,
@@ -28279,7 +29334,8 @@ const uniffiCallbackInterfaceStorage: {
28279
29334
  return await jsCallback.getLastRevision({ signal });
28280
29335
  };
28281
29336
  const uniffiHandleSuccess = (returnValue: /*u64*/ bigint) => {
28282
- uniffiFutureCallback(
29337
+ uniffiFutureCallback.call(
29338
+ uniffiFutureCallback,
28283
29339
  uniffiCallbackData,
28284
29340
  /* UniffiForeignFutureStructU64 */ {
28285
29341
  returnValue: FfiConverterUInt64.lower(returnValue),
@@ -28288,12 +29344,13 @@ const uniffiCallbackInterfaceStorage: {
28288
29344
  );
28289
29345
  };
28290
29346
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28291
- uniffiFutureCallback(
29347
+ uniffiFutureCallback.call(
29348
+ uniffiFutureCallback,
28292
29349
  uniffiCallbackData,
28293
29350
  /* UniffiForeignFutureStructU64 */ {
28294
29351
  returnValue: 0n,
28295
29352
  // TODO create callstatus with error.
28296
- callStatus: { code, errorBuf },
29353
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28297
29354
  }
28298
29355
  );
28299
29356
  };
@@ -28307,7 +29364,7 @@ const uniffiCallbackInterfaceStorage: {
28307
29364
  ),
28308
29365
  /*lowerString:*/ FfiConverterString.lower
28309
29366
  );
28310
- return UniffiResult.success(uniffiForeignFuture);
29367
+ return uniffiForeignFuture;
28311
29368
  },
28312
29369
  insertIncomingRecords: (
28313
29370
  uniffiHandle: bigint,
@@ -28323,7 +29380,8 @@ const uniffiCallbackInterfaceStorage: {
28323
29380
  );
28324
29381
  };
28325
29382
  const uniffiHandleSuccess = (returnValue: void) => {
28326
- uniffiFutureCallback(
29383
+ uniffiFutureCallback.call(
29384
+ uniffiFutureCallback,
28327
29385
  uniffiCallbackData,
28328
29386
  /* UniffiForeignFutureStructVoid */ {
28329
29387
  callStatus: uniffiCaller.createCallStatus(),
@@ -28331,11 +29389,12 @@ const uniffiCallbackInterfaceStorage: {
28331
29389
  );
28332
29390
  };
28333
29391
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28334
- uniffiFutureCallback(
29392
+ uniffiFutureCallback.call(
29393
+ uniffiFutureCallback,
28335
29394
  uniffiCallbackData,
28336
29395
  /* UniffiForeignFutureStructVoid */ {
28337
29396
  // TODO create callstatus with error.
28338
- callStatus: { code, errorBuf },
29397
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28339
29398
  }
28340
29399
  );
28341
29400
  };
@@ -28349,7 +29408,7 @@ const uniffiCallbackInterfaceStorage: {
28349
29408
  ),
28350
29409
  /*lowerString:*/ FfiConverterString.lower
28351
29410
  );
28352
- return UniffiResult.success(uniffiForeignFuture);
29411
+ return uniffiForeignFuture;
28353
29412
  },
28354
29413
  deleteIncomingRecord: (
28355
29414
  uniffiHandle: bigint,
@@ -28365,7 +29424,8 @@ const uniffiCallbackInterfaceStorage: {
28365
29424
  );
28366
29425
  };
28367
29426
  const uniffiHandleSuccess = (returnValue: void) => {
28368
- uniffiFutureCallback(
29427
+ uniffiFutureCallback.call(
29428
+ uniffiFutureCallback,
28369
29429
  uniffiCallbackData,
28370
29430
  /* UniffiForeignFutureStructVoid */ {
28371
29431
  callStatus: uniffiCaller.createCallStatus(),
@@ -28373,11 +29433,12 @@ const uniffiCallbackInterfaceStorage: {
28373
29433
  );
28374
29434
  };
28375
29435
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28376
- uniffiFutureCallback(
29436
+ uniffiFutureCallback.call(
29437
+ uniffiFutureCallback,
28377
29438
  uniffiCallbackData,
28378
29439
  /* UniffiForeignFutureStructVoid */ {
28379
29440
  // TODO create callstatus with error.
28380
- callStatus: { code, errorBuf },
29441
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28381
29442
  }
28382
29443
  );
28383
29444
  };
@@ -28391,7 +29452,7 @@ const uniffiCallbackInterfaceStorage: {
28391
29452
  ),
28392
29453
  /*lowerString:*/ FfiConverterString.lower
28393
29454
  );
28394
- return UniffiResult.success(uniffiForeignFuture);
29455
+ return uniffiForeignFuture;
28395
29456
  },
28396
29457
  getIncomingRecords: (
28397
29458
  uniffiHandle: bigint,
@@ -28409,7 +29470,8 @@ const uniffiCallbackInterfaceStorage: {
28409
29470
  );
28410
29471
  };
28411
29472
  const uniffiHandleSuccess = (returnValue: Array<IncomingChange>) => {
28412
- uniffiFutureCallback(
29473
+ uniffiFutureCallback.call(
29474
+ uniffiFutureCallback,
28413
29475
  uniffiCallbackData,
28414
29476
  /* UniffiForeignFutureStructRustBuffer */ {
28415
29477
  returnValue: FfiConverterArrayTypeIncomingChange.lower(returnValue),
@@ -28418,12 +29480,13 @@ const uniffiCallbackInterfaceStorage: {
28418
29480
  );
28419
29481
  };
28420
29482
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28421
- uniffiFutureCallback(
29483
+ uniffiFutureCallback.call(
29484
+ uniffiFutureCallback,
28422
29485
  uniffiCallbackData,
28423
29486
  /* UniffiForeignFutureStructRustBuffer */ {
28424
29487
  returnValue: /*empty*/ new Uint8Array(0),
28425
29488
  // TODO create callstatus with error.
28426
- callStatus: { code, errorBuf },
29489
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28427
29490
  }
28428
29491
  );
28429
29492
  };
@@ -28437,7 +29500,7 @@ const uniffiCallbackInterfaceStorage: {
28437
29500
  ),
28438
29501
  /*lowerString:*/ FfiConverterString.lower
28439
29502
  );
28440
- return UniffiResult.success(uniffiForeignFuture);
29503
+ return uniffiForeignFuture;
28441
29504
  },
28442
29505
  getLatestOutgoingChange: (
28443
29506
  uniffiHandle: bigint,
@@ -28451,7 +29514,8 @@ const uniffiCallbackInterfaceStorage: {
28451
29514
  return await jsCallback.getLatestOutgoingChange({ signal });
28452
29515
  };
28453
29516
  const uniffiHandleSuccess = (returnValue: OutgoingChange | undefined) => {
28454
- uniffiFutureCallback(
29517
+ uniffiFutureCallback.call(
29518
+ uniffiFutureCallback,
28455
29519
  uniffiCallbackData,
28456
29520
  /* UniffiForeignFutureStructRustBuffer */ {
28457
29521
  returnValue:
@@ -28461,12 +29525,13 @@ const uniffiCallbackInterfaceStorage: {
28461
29525
  );
28462
29526
  };
28463
29527
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28464
- uniffiFutureCallback(
29528
+ uniffiFutureCallback.call(
29529
+ uniffiFutureCallback,
28465
29530
  uniffiCallbackData,
28466
29531
  /* UniffiForeignFutureStructRustBuffer */ {
28467
29532
  returnValue: /*empty*/ new Uint8Array(0),
28468
29533
  // TODO create callstatus with error.
28469
- callStatus: { code, errorBuf },
29534
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28470
29535
  }
28471
29536
  );
28472
29537
  };
@@ -28480,7 +29545,7 @@ const uniffiCallbackInterfaceStorage: {
28480
29545
  ),
28481
29546
  /*lowerString:*/ FfiConverterString.lower
28482
29547
  );
28483
- return UniffiResult.success(uniffiForeignFuture);
29548
+ return uniffiForeignFuture;
28484
29549
  },
28485
29550
  updateRecordFromIncoming: (
28486
29551
  uniffiHandle: bigint,
@@ -28496,7 +29561,8 @@ const uniffiCallbackInterfaceStorage: {
28496
29561
  );
28497
29562
  };
28498
29563
  const uniffiHandleSuccess = (returnValue: void) => {
28499
- uniffiFutureCallback(
29564
+ uniffiFutureCallback.call(
29565
+ uniffiFutureCallback,
28500
29566
  uniffiCallbackData,
28501
29567
  /* UniffiForeignFutureStructVoid */ {
28502
29568
  callStatus: uniffiCaller.createCallStatus(),
@@ -28504,11 +29570,12 @@ const uniffiCallbackInterfaceStorage: {
28504
29570
  );
28505
29571
  };
28506
29572
  const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
28507
- uniffiFutureCallback(
29573
+ uniffiFutureCallback.call(
29574
+ uniffiFutureCallback,
28508
29575
  uniffiCallbackData,
28509
29576
  /* UniffiForeignFutureStructVoid */ {
28510
29577
  // TODO create callstatus with error.
28511
- callStatus: { code, errorBuf },
29578
+ callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
28512
29579
  }
28513
29580
  );
28514
29581
  };
@@ -28522,7 +29589,7 @@ const uniffiCallbackInterfaceStorage: {
28522
29589
  ),
28523
29590
  /*lowerString:*/ FfiConverterString.lower
28524
29591
  );
28525
- return UniffiResult.success(uniffiForeignFuture);
29592
+ return uniffiForeignFuture;
28526
29593
  },
28527
29594
  uniffiFree: (uniffiHandle: UniffiHandle): void => {
28528
29595
  // Storage: this will throw a stale handle error if the handle isn't found.
@@ -29034,67 +30101,69 @@ export class TokenIssuer
29034
30101
  }
29035
30102
 
29036
30103
  const uniffiTypeTokenIssuerObjectFactory: UniffiObjectFactory<TokenIssuerInterface> =
29037
- {
29038
- create(pointer: UnsafeMutableRawPointer): TokenIssuerInterface {
29039
- const instance = Object.create(TokenIssuer.prototype);
29040
- instance[pointerLiteralSymbol] = pointer;
29041
- instance[destructorGuardSymbol] = this.bless(pointer);
29042
- instance[uniffiTypeNameSymbol] = 'TokenIssuer';
29043
- return instance;
29044
- },
30104
+ (() => {
30105
+ return {
30106
+ create(pointer: UnsafeMutableRawPointer): TokenIssuerInterface {
30107
+ const instance = Object.create(TokenIssuer.prototype);
30108
+ instance[pointerLiteralSymbol] = pointer;
30109
+ instance[destructorGuardSymbol] = this.bless(pointer);
30110
+ instance[uniffiTypeNameSymbol] = 'TokenIssuer';
30111
+ return instance;
30112
+ },
29045
30113
 
29046
- bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
29047
- return uniffiCaller.rustCall(
29048
- /*caller:*/ (status) =>
29049
- nativeModule().ubrn_uniffi_internal_fn_method_tokenissuer_ffi__bless_pointer(
29050
- p,
29051
- status
29052
- ),
29053
- /*liftString:*/ FfiConverterString.lift
29054
- );
29055
- },
30114
+ bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
30115
+ return uniffiCaller.rustCall(
30116
+ /*caller:*/ (status) =>
30117
+ nativeModule().ubrn_uniffi_internal_fn_method_tokenissuer_ffi__bless_pointer(
30118
+ p,
30119
+ status
30120
+ ),
30121
+ /*liftString:*/ FfiConverterString.lift
30122
+ );
30123
+ },
29056
30124
 
29057
- unbless(ptr: UniffiRustArcPtr) {
29058
- ptr.markDestroyed();
29059
- },
30125
+ unbless(ptr: UniffiRustArcPtr) {
30126
+ ptr.markDestroyed();
30127
+ },
29060
30128
 
29061
- pointer(obj: TokenIssuerInterface): UnsafeMutableRawPointer {
29062
- if ((obj as any)[destructorGuardSymbol] === undefined) {
29063
- throw new UniffiInternalError.UnexpectedNullPointer();
29064
- }
29065
- return (obj as any)[pointerLiteralSymbol];
29066
- },
30129
+ pointer(obj: TokenIssuerInterface): UnsafeMutableRawPointer {
30130
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
30131
+ throw new UniffiInternalError.UnexpectedNullPointer();
30132
+ }
30133
+ return (obj as any)[pointerLiteralSymbol];
30134
+ },
29067
30135
 
29068
- clonePointer(obj: TokenIssuerInterface): UnsafeMutableRawPointer {
29069
- const pointer = this.pointer(obj);
29070
- return uniffiCaller.rustCall(
29071
- /*caller:*/ (callStatus) =>
29072
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_tokenissuer(
29073
- pointer,
29074
- callStatus
29075
- ),
29076
- /*liftString:*/ FfiConverterString.lift
29077
- );
29078
- },
30136
+ clonePointer(obj: TokenIssuerInterface): UnsafeMutableRawPointer {
30137
+ const pointer = this.pointer(obj);
30138
+ return uniffiCaller.rustCall(
30139
+ /*caller:*/ (callStatus) =>
30140
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_tokenissuer(
30141
+ pointer,
30142
+ callStatus
30143
+ ),
30144
+ /*liftString:*/ FfiConverterString.lift
30145
+ );
30146
+ },
29079
30147
 
29080
- freePointer(pointer: UnsafeMutableRawPointer): void {
29081
- uniffiCaller.rustCall(
29082
- /*caller:*/ (callStatus) =>
29083
- nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_tokenissuer(
29084
- pointer,
29085
- callStatus
29086
- ),
29087
- /*liftString:*/ FfiConverterString.lift
29088
- );
29089
- },
30148
+ freePointer(pointer: UnsafeMutableRawPointer): void {
30149
+ uniffiCaller.rustCall(
30150
+ /*caller:*/ (callStatus) =>
30151
+ nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_tokenissuer(
30152
+ pointer,
30153
+ callStatus
30154
+ ),
30155
+ /*liftString:*/ FfiConverterString.lift
30156
+ );
30157
+ },
29090
30158
 
29091
- isConcreteType(obj: any): obj is TokenIssuerInterface {
29092
- return (
29093
- obj[destructorGuardSymbol] &&
29094
- obj[uniffiTypeNameSymbol] === 'TokenIssuer'
29095
- );
29096
- },
29097
- };
30159
+ isConcreteType(obj: any): obj is TokenIssuerInterface {
30160
+ return (
30161
+ obj[destructorGuardSymbol] &&
30162
+ obj[uniffiTypeNameSymbol] === 'TokenIssuer'
30163
+ );
30164
+ },
30165
+ };
30166
+ })();
29098
30167
  // FfiConverter for TokenIssuerInterface
29099
30168
  const FfiConverterTypeTokenIssuer = new FfiConverterObject(
29100
30169
  uniffiTypeTokenIssuerObjectFactory
@@ -29241,6 +30310,11 @@ const FfiConverterArrayTypeBolt12OfferBlindedPath = new FfiConverterArray(
29241
30310
  FfiConverterTypeBolt12OfferBlindedPath
29242
30311
  );
29243
30312
 
30313
+ // FfiConverter for Array<Contact>
30314
+ const FfiConverterArrayTypeContact = new FfiConverterArray(
30315
+ FfiConverterTypeContact
30316
+ );
30317
+
29244
30318
  // FfiConverter for Array<DepositInfo>
29245
30319
  const FfiConverterArrayTypeDepositInfo = new FfiConverterArray(
29246
30320
  FfiConverterTypeDepositInfo
@@ -29474,7 +30548,7 @@ const FfiConverterOptionalArrayTypeStoragePaymentDetailsFilter =
29474
30548
  */
29475
30549
  function uniffiEnsureInitialized() {
29476
30550
  // Get the bindings contract version from our ComponentInterface
29477
- const bindingsContractVersion = 26;
30551
+ const bindingsContractVersion = 29;
29478
30552
  // Get the scaffolding contract version by calling the into the dylib
29479
30553
  const scaffoldingContractVersion =
29480
30554
  nativeModule().ubrn_ffi_breez_sdk_spark_uniffi_contract_version();
@@ -29571,6 +30645,14 @@ function uniffiEnsureInitialized() {
29571
30645
  'uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees'
29572
30646
  );
29573
30647
  }
30648
+ if (
30649
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact() !==
30650
+ 26497
30651
+ ) {
30652
+ throw new UniffiInternalError.ApiChecksumMismatch(
30653
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact'
30654
+ );
30655
+ }
29574
30656
  if (
29575
30657
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener() !==
29576
30658
  37737
@@ -29627,6 +30709,14 @@ function uniffiEnsureInitialized() {
29627
30709
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment'
29628
30710
  );
29629
30711
  }
30712
+ if (
30713
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact() !==
30714
+ 15670
30715
+ ) {
30716
+ throw new UniffiInternalError.ApiChecksumMismatch(
30717
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact'
30718
+ );
30719
+ }
29630
30720
  if (
29631
30721
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address() !==
29632
30722
  44132
@@ -29707,6 +30797,14 @@ function uniffiEnsureInitialized() {
29707
30797
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings'
29708
30798
  );
29709
30799
  }
30800
+ if (
30801
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts() !==
30802
+ 2729
30803
+ ) {
30804
+ throw new UniffiInternalError.ApiChecksumMismatch(
30805
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts'
30806
+ );
30807
+ }
29710
30808
  if (
29711
30809
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies() !==
29712
30810
  63366
@@ -29859,6 +30957,14 @@ function uniffiEnsureInitialized() {
29859
30957
  'uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet'
29860
30958
  );
29861
30959
  }
30960
+ if (
30961
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact() !==
30962
+ 21170
30963
+ ) {
30964
+ throw new UniffiInternalError.ApiChecksumMismatch(
30965
+ 'uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact'
30966
+ );
30967
+ }
29862
30968
  if (
29863
30969
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings() !==
29864
30970
  1721
@@ -30259,9 +31365,41 @@ function uniffiEnsureInitialized() {
30259
31365
  'uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata'
30260
31366
  );
30261
31367
  }
31368
+ if (
31369
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_contacts() !==
31370
+ 10490
31371
+ ) {
31372
+ throw new UniffiInternalError.ApiChecksumMismatch(
31373
+ 'uniffi_breez_sdk_spark_checksum_method_storage_list_contacts'
31374
+ );
31375
+ }
31376
+ if (
31377
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_contact() !==
31378
+ 19980
31379
+ ) {
31380
+ throw new UniffiInternalError.ApiChecksumMismatch(
31381
+ 'uniffi_breez_sdk_spark_checksum_method_storage_get_contact'
31382
+ );
31383
+ }
31384
+ if (
31385
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_contact() !==
31386
+ 38342
31387
+ ) {
31388
+ throw new UniffiInternalError.ApiChecksumMismatch(
31389
+ 'uniffi_breez_sdk_spark_checksum_method_storage_insert_contact'
31390
+ );
31391
+ }
31392
+ if (
31393
+ nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_contact() !==
31394
+ 50274
31395
+ ) {
31396
+ throw new UniffiInternalError.ApiChecksumMismatch(
31397
+ 'uniffi_breez_sdk_spark_checksum_method_storage_delete_contact'
31398
+ );
31399
+ }
30262
31400
  if (
30263
31401
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change() !==
30264
- 50774
31402
+ 1304
30265
31403
  ) {
30266
31404
  throw new UniffiInternalError.ApiChecksumMismatch(
30267
31405
  'uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change'
@@ -30269,7 +31407,7 @@ function uniffiEnsureInitialized() {
30269
31407
  }
30270
31408
  if (
30271
31409
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync() !==
30272
- 8796
31410
+ 7860
30273
31411
  ) {
30274
31412
  throw new UniffiInternalError.ApiChecksumMismatch(
30275
31413
  'uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync'
@@ -30277,7 +31415,7 @@ function uniffiEnsureInitialized() {
30277
31415
  }
30278
31416
  if (
30279
31417
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes() !==
30280
- 20314
31418
+ 30862
30281
31419
  ) {
30282
31420
  throw new UniffiInternalError.ApiChecksumMismatch(
30283
31421
  'uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes'
@@ -30285,7 +31423,7 @@ function uniffiEnsureInitialized() {
30285
31423
  }
30286
31424
  if (
30287
31425
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision() !==
30288
- 48442
31426
+ 6931
30289
31427
  ) {
30290
31428
  throw new UniffiInternalError.ApiChecksumMismatch(
30291
31429
  'uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision'
@@ -30293,7 +31431,7 @@ function uniffiEnsureInitialized() {
30293
31431
  }
30294
31432
  if (
30295
31433
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records() !==
30296
- 38174
31434
+ 59522
30297
31435
  ) {
30298
31436
  throw new UniffiInternalError.ApiChecksumMismatch(
30299
31437
  'uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records'
@@ -30301,7 +31439,7 @@ function uniffiEnsureInitialized() {
30301
31439
  }
30302
31440
  if (
30303
31441
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record() !==
30304
- 26412
31442
+ 19643
30305
31443
  ) {
30306
31444
  throw new UniffiInternalError.ApiChecksumMismatch(
30307
31445
  'uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record'
@@ -30309,7 +31447,7 @@ function uniffiEnsureInitialized() {
30309
31447
  }
30310
31448
  if (
30311
31449
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records() !==
30312
- 13705
31450
+ 28540
30313
31451
  ) {
30314
31452
  throw new UniffiInternalError.ApiChecksumMismatch(
30315
31453
  'uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records'
@@ -30317,7 +31455,7 @@ function uniffiEnsureInitialized() {
30317
31455
  }
30318
31456
  if (
30319
31457
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change() !==
30320
- 41859
31458
+ 41369
30321
31459
  ) {
30322
31460
  throw new UniffiInternalError.ApiChecksumMismatch(
30323
31461
  'uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change'
@@ -30325,7 +31463,7 @@ function uniffiEnsureInitialized() {
30325
31463
  }
30326
31464
  if (
30327
31465
  nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming() !==
30328
- 54499
31466
+ 18793
30329
31467
  ) {
30330
31468
  throw new UniffiInternalError.ApiChecksumMismatch(
30331
31469
  'uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming'
@@ -30425,6 +31563,7 @@ function uniffiEnsureInitialized() {
30425
31563
  export default Object.freeze({
30426
31564
  initialize: uniffiEnsureInitialized,
30427
31565
  converters: {
31566
+ FfiConverterTypeAddContactRequest,
30428
31567
  FfiConverterTypeAesSuccessActionData,
30429
31568
  FfiConverterTypeAesSuccessActionDataDecrypted,
30430
31569
  FfiConverterTypeAesSuccessActionDataResult,
@@ -30450,6 +31589,7 @@ export default Object.freeze({
30450
31589
  FfiConverterTypeBuyBitcoinRequest,
30451
31590
  FfiConverterTypeBuyBitcoinResponse,
30452
31591
  FfiConverterTypeChainApiType,
31592
+ FfiConverterTypeChainServiceError,
30453
31593
  FfiConverterTypeCheckLightningAddressRequest,
30454
31594
  FfiConverterTypeCheckMessageRequest,
30455
31595
  FfiConverterTypeCheckMessageResponse,
@@ -30460,6 +31600,7 @@ export default Object.freeze({
30460
31600
  FfiConverterTypeConfig,
30461
31601
  FfiConverterTypeConnectRequest,
30462
31602
  FfiConverterTypeConnectWithSignerRequest,
31603
+ FfiConverterTypeContact,
30463
31604
  FfiConverterTypeConversionDetails,
30464
31605
  FfiConverterTypeConversionEstimate,
30465
31606
  FfiConverterTypeConversionInfo,
@@ -30514,6 +31655,7 @@ export default Object.freeze({
30514
31655
  FfiConverterTypeKeySetType,
30515
31656
  FfiConverterTypeLightningAddressDetails,
30516
31657
  FfiConverterTypeLightningAddressInfo,
31658
+ FfiConverterTypeListContactsRequest,
30517
31659
  FfiConverterTypeListFiatCurrenciesResponse,
30518
31660
  FfiConverterTypeListFiatRatesResponse,
30519
31661
  FfiConverterTypeListPaymentsRequest,
@@ -30552,6 +31694,7 @@ export default Object.freeze({
30552
31694
  FfiConverterTypePaymentMetadata,
30553
31695
  FfiConverterTypePaymentMethod,
30554
31696
  FfiConverterTypePaymentObserver,
31697
+ FfiConverterTypePaymentObserverError,
30555
31698
  FfiConverterTypePaymentRequestSource,
30556
31699
  FfiConverterTypePaymentStatus,
30557
31700
  FfiConverterTypePaymentType,
@@ -30578,6 +31721,7 @@ export default Object.freeze({
30578
31721
  FfiConverterTypeRestResponse,
30579
31722
  FfiConverterTypeSchnorrSignatureBytes,
30580
31723
  FfiConverterTypeSdkBuilder,
31724
+ FfiConverterTypeSdkError,
30581
31725
  FfiConverterTypeSdkEvent,
30582
31726
  FfiConverterTypeSecretBytes,
30583
31727
  FfiConverterTypeSeed,
@@ -30587,10 +31731,12 @@ export default Object.freeze({
30587
31731
  FfiConverterTypeSendPaymentOptions,
30588
31732
  FfiConverterTypeSendPaymentRequest,
30589
31733
  FfiConverterTypeSendPaymentResponse,
31734
+ FfiConverterTypeServiceConnectivityError,
30590
31735
  FfiConverterTypeServiceStatus,
30591
31736
  FfiConverterTypeSetLnurlMetadataItem,
30592
31737
  FfiConverterTypeSignMessageRequest,
30593
31738
  FfiConverterTypeSignMessageResponse,
31739
+ FfiConverterTypeSignerError,
30594
31740
  FfiConverterTypeSilentPaymentAddressDetails,
30595
31741
  FfiConverterTypeSparkAddressDetails,
30596
31742
  FfiConverterTypeSparkHtlcDetails,
@@ -30601,6 +31747,7 @@ export default Object.freeze({
30601
31747
  FfiConverterTypeSparkStatus,
30602
31748
  FfiConverterTypeStableBalanceConfig,
30603
31749
  FfiConverterTypeStorage,
31750
+ FfiConverterTypeStorageError,
30604
31751
  FfiConverterTypeStorageListPaymentsRequest,
30605
31752
  FfiConverterTypeStoragePaymentDetailsFilter,
30606
31753
  FfiConverterTypeSuccessAction,
@@ -30616,6 +31763,7 @@ export default Object.freeze({
30616
31763
  FfiConverterTypeUnfreezeIssuerTokenRequest,
30617
31764
  FfiConverterTypeUnfreezeIssuerTokenResponse,
30618
31765
  FfiConverterTypeUnversionedRecordChange,
31766
+ FfiConverterTypeUpdateContactRequest,
30619
31767
  FfiConverterTypeUpdateDepositPayload,
30620
31768
  FfiConverterTypeUpdateUserSettingsRequest,
30621
31769
  FfiConverterTypeUrlSuccessActionData,