@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.
- package/{breeztech-breez-sdk-spark-react-native.podspec → BreezSdkSparkReactNative.podspec} +2 -2
- package/android/CMakeLists.txt +3 -4
- package/android/proguard-rules.pro +4 -0
- package/cpp/generated/breez_sdk_spark.cpp +1567 -514
- package/cpp/generated/breez_sdk_spark.hpp +73 -25
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +186 -81
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js +4 -2
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -1
- package/lib/commonjs/index.js +11 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +185 -80
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark_bindings.js +4 -2
- package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +95 -71
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +409 -5
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +95 -71
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +409 -5
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/breez_sdk_spark-ffi.ts +163 -95
- package/src/generated/breez_sdk_spark.ts +1919 -771
- package/src/generated/breez_sdk_spark_bindings.ts +2 -2
- package/src/index.tsx +7 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
2
|
// Trust me, you don't want to mess with it!
|
|
3
3
|
import nativeModule from"./breez_sdk_spark-ffi.js";import{AbstractFfiConverterByteArray,FfiConverterArray,FfiConverterArrayBuffer,FfiConverterBool,FfiConverterCallback,FfiConverterFloat64,FfiConverterInt32,FfiConverterMap,FfiConverterObject,FfiConverterObjectWithCallbacks,FfiConverterOptional,FfiConverterUInt16,FfiConverterUInt32,FfiConverterUInt64,FfiConverterUInt8,UniffiAbstractObject,UniffiEnum,UniffiError,UniffiInternalError,UniffiResult,UniffiRustCaller,destructorGuardSymbol,pointerLiteralSymbol,uniffiCreateFfiConverterString,uniffiCreateRecord,uniffiRustCallAsync,uniffiTraitInterfaceCall,uniffiTraitInterfaceCallAsync,uniffiTraitInterfaceCallAsyncWithError,uniffiTraitInterfaceCallWithError,uniffiTypeNameSymbol}from'uniffi-bindgen-react-native';// Get converters from the other files, if any.
|
|
4
|
-
const uniffiCaller=new UniffiRustCaller();const uniffiIsDebug=// @ts-ignore -- The process global might not be defined
|
|
4
|
+
const uniffiCaller=new UniffiRustCaller(()=>({code:0}));const uniffiIsDebug=// @ts-ignore -- The process global might not be defined
|
|
5
5
|
typeof process!=='object'||// @ts-ignore -- The process global might not be defined
|
|
6
6
|
process?.env?.NODE_ENV!=='production'||false;// Public interface members begin here.
|
|
7
7
|
/**
|
|
@@ -53,8 +53,8 @@ process?.env?.NODE_ENV!=='production'||false;// Public interface members begin h
|
|
|
53
53
|
*/// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
54
54
|
const uniffiCallbackInterfaceEventListener={// Create the VTable using a series of closures.
|
|
55
55
|
// ts automatically converts these into C callback functions.
|
|
56
|
-
vtable:{onEvent:(uniffiHandle,event,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeEventListener.lift(uniffiHandle);return await jsCallback.onEvent(FfiConverterTypeSdkEvent.lift(event),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
57
|
-
callStatus:
|
|
56
|
+
vtable:{onEvent:(uniffiHandle,event,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeEventListener.lift(uniffiHandle);return await jsCallback.onEvent(FfiConverterTypeSdkEvent.lift(event),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
57
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsync(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// EventListener: this will throw a stale handle error if the handle isn't found.
|
|
58
58
|
FfiConverterTypeEventListener.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(uniffiCallbackInterfaceEventListener.vtable);}};// FfiConverter protocol for callback interfaces
|
|
59
59
|
const FfiConverterTypeEventListener=new FfiConverterCallback();// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
60
60
|
const uniffiCallbackInterfaceLogger={// Create the VTable using a series of closures.
|
|
@@ -62,6 +62,18 @@ const uniffiCallbackInterfaceLogger={// Create the VTable using a series of clos
|
|
|
62
62
|
vtable:{log:(uniffiHandle,l)=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeLogger.lift(uniffiHandle);return jsCallback.log(FfiConverterTypeLogEntry.lift(l));};const uniffiResult=UniffiResult.ready();const uniffiHandleSuccess=obj=>{};const uniffiHandleError=(code,errBuf)=>{UniffiResult.writeError(uniffiResult,code,errBuf);};uniffiTraitInterfaceCall(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*lowerString:*/FfiConverterString.lower);return uniffiResult;},uniffiFree:uniffiHandle=>{// Logger: this will throw a stale handle error if the handle isn't found.
|
|
63
63
|
FfiConverterTypeLogger.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(uniffiCallbackInterfaceLogger.vtable);}};// FfiConverter protocol for callback interfaces
|
|
64
64
|
const FfiConverterTypeLogger=new FfiConverterCallback();/**
|
|
65
|
+
* Request to add a new contact.
|
|
66
|
+
*//**
|
|
67
|
+
* Generated factory for {@link AddContactRequest} record objects.
|
|
68
|
+
*/export const AddContactRequest=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({/**
|
|
69
|
+
* Create a frozen instance of {@link AddContactRequest}, with defaults specified
|
|
70
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
71
|
+
*/create,/**
|
|
72
|
+
* Create a frozen instance of {@link AddContactRequest}, with defaults specified
|
|
73
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
74
|
+
*/new:create,/**
|
|
75
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
76
|
+
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeAddContactRequest=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{name:FfiConverterString.read(from),paymentIdentifier:FfiConverterString.read(from)};}write(value,into){FfiConverterString.write(value.name,into);FfiConverterString.write(value.paymentIdentifier,into);}allocationSize(value){return FfiConverterString.allocationSize(value.name)+FfiConverterString.allocationSize(value.paymentIdentifier);}}return new FFIConverter();})();/**
|
|
65
77
|
* Payload of the AES success action, as received from the LNURL endpoint
|
|
66
78
|
*
|
|
67
79
|
* See [`AesSuccessActionDataDecrypted`] for a similar wrapper containing the decrypted payload
|
|
@@ -356,6 +368,18 @@ const FfiConverterTypeLogger=new FfiConverterCallback();/**
|
|
|
356
368
|
*/new:create,/**
|
|
357
369
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
358
370
|
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeConnectWithSignerRequest=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{config:FfiConverterTypeConfig.read(from),signer:FfiConverterTypeExternalSigner.read(from),storageDir:FfiConverterString.read(from)};}write(value,into){FfiConverterTypeConfig.write(value.config,into);FfiConverterTypeExternalSigner.write(value.signer,into);FfiConverterString.write(value.storageDir,into);}allocationSize(value){return FfiConverterTypeConfig.allocationSize(value.config)+FfiConverterTypeExternalSigner.allocationSize(value.signer)+FfiConverterString.allocationSize(value.storageDir);}}return new FFIConverter();})();/**
|
|
371
|
+
* A contact entry containing a name and payment identifier.
|
|
372
|
+
*//**
|
|
373
|
+
* Generated factory for {@link Contact} record objects.
|
|
374
|
+
*/export const Contact=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({/**
|
|
375
|
+
* Create a frozen instance of {@link Contact}, with defaults specified
|
|
376
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
377
|
+
*/create,/**
|
|
378
|
+
* Create a frozen instance of {@link Contact}, with defaults specified
|
|
379
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
380
|
+
*/new:create,/**
|
|
381
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
382
|
+
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeContact=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{id:FfiConverterString.read(from),name:FfiConverterString.read(from),paymentIdentifier:FfiConverterString.read(from),createdAt:FfiConverterUInt64.read(from),updatedAt:FfiConverterUInt64.read(from)};}write(value,into){FfiConverterString.write(value.id,into);FfiConverterString.write(value.name,into);FfiConverterString.write(value.paymentIdentifier,into);FfiConverterUInt64.write(value.createdAt,into);FfiConverterUInt64.write(value.updatedAt,into);}allocationSize(value){return FfiConverterString.allocationSize(value.id)+FfiConverterString.allocationSize(value.name)+FfiConverterString.allocationSize(value.paymentIdentifier)+FfiConverterUInt64.allocationSize(value.createdAt)+FfiConverterUInt64.allocationSize(value.updatedAt);}}return new FFIConverter();})();/**
|
|
359
383
|
* Outlines the steps involved in a conversion
|
|
360
384
|
*//**
|
|
361
385
|
* Generated factory for {@link ConversionDetails} record objects.
|
|
@@ -832,6 +856,18 @@ const FfiConverterTypeLogger=new FfiConverterCallback();/**
|
|
|
832
856
|
*/new:create,/**
|
|
833
857
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
834
858
|
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeLightningAddressInfo=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{description:FfiConverterString.read(from),lightningAddress:FfiConverterString.read(from),lnurl:FfiConverterTypeLnurlInfo.read(from),username:FfiConverterString.read(from)};}write(value,into){FfiConverterString.write(value.description,into);FfiConverterString.write(value.lightningAddress,into);FfiConverterTypeLnurlInfo.write(value.lnurl,into);FfiConverterString.write(value.username,into);}allocationSize(value){return FfiConverterString.allocationSize(value.description)+FfiConverterString.allocationSize(value.lightningAddress)+FfiConverterTypeLnurlInfo.allocationSize(value.lnurl)+FfiConverterString.allocationSize(value.username);}}return new FFIConverter();})();/**
|
|
859
|
+
* Request to list contacts with optional pagination.
|
|
860
|
+
*//**
|
|
861
|
+
* Generated factory for {@link ListContactsRequest} record objects.
|
|
862
|
+
*/export const ListContactsRequest=(()=>{const defaults=()=>({offset:undefined,limit:undefined});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({/**
|
|
863
|
+
* Create a frozen instance of {@link ListContactsRequest}, with defaults specified
|
|
864
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
865
|
+
*/create,/**
|
|
866
|
+
* Create a frozen instance of {@link ListContactsRequest}, with defaults specified
|
|
867
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
868
|
+
*/new:create,/**
|
|
869
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
870
|
+
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeListContactsRequest=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{offset:FfiConverterOptionalUInt32.read(from),limit:FfiConverterOptionalUInt32.read(from)};}write(value,into){FfiConverterOptionalUInt32.write(value.offset,into);FfiConverterOptionalUInt32.write(value.limit,into);}allocationSize(value){return FfiConverterOptionalUInt32.allocationSize(value.offset)+FfiConverterOptionalUInt32.allocationSize(value.limit);}}return new FFIConverter();})();/**
|
|
835
871
|
* Response from listing fiat currencies
|
|
836
872
|
*//**
|
|
837
873
|
* Generated factory for {@link ListFiatCurrenciesResponse} record objects.
|
|
@@ -1645,6 +1681,18 @@ const FfiConverterTypeLogger=new FfiConverterCallback();/**
|
|
|
1645
1681
|
*/new:create,/**
|
|
1646
1682
|
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1647
1683
|
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeUnversionedRecordChange=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{id:FfiConverterTypeRecordId.read(from),schemaVersion:FfiConverterString.read(from),updatedFields:FfiConverterMapStringString.read(from)};}write(value,into){FfiConverterTypeRecordId.write(value.id,into);FfiConverterString.write(value.schemaVersion,into);FfiConverterMapStringString.write(value.updatedFields,into);}allocationSize(value){return FfiConverterTypeRecordId.allocationSize(value.id)+FfiConverterString.allocationSize(value.schemaVersion)+FfiConverterMapStringString.allocationSize(value.updatedFields);}}return new FFIConverter();})();/**
|
|
1684
|
+
* Request to update an existing contact.
|
|
1685
|
+
*//**
|
|
1686
|
+
* Generated factory for {@link UpdateContactRequest} record objects.
|
|
1687
|
+
*/export const UpdateContactRequest=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({/**
|
|
1688
|
+
* Create a frozen instance of {@link UpdateContactRequest}, with defaults specified
|
|
1689
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1690
|
+
*/create,/**
|
|
1691
|
+
* Create a frozen instance of {@link UpdateContactRequest}, with defaults specified
|
|
1692
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1693
|
+
*/new:create,/**
|
|
1694
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1695
|
+
*/defaults:()=>Object.freeze(defaults())});})();const FfiConverterTypeUpdateContactRequest=(()=>{class FFIConverter extends AbstractFfiConverterByteArray{read(from){return{id:FfiConverterString.read(from),name:FfiConverterString.read(from),paymentIdentifier:FfiConverterString.read(from)};}write(value,into){FfiConverterString.write(value.id,into);FfiConverterString.write(value.name,into);FfiConverterString.write(value.paymentIdentifier,into);}allocationSize(value){return FfiConverterString.allocationSize(value.id)+FfiConverterString.allocationSize(value.name)+FfiConverterString.allocationSize(value.paymentIdentifier);}}return new FFIConverter();})();/**
|
|
1648
1696
|
* Generated factory for {@link UpdateUserSettingsRequest} record objects.
|
|
1649
1697
|
*/export const UpdateUserSettingsRequest=(()=>{const defaults=()=>({});const create=(()=>{return uniffiCreateRecord(defaults);})();return Object.freeze({/**
|
|
1650
1698
|
* Create a frozen instance of {@link UpdateUserSettingsRequest}, with defaults specified
|
|
@@ -2251,7 +2299,7 @@ throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switc
|
|
|
2251
2299
|
* The HTLC has been returned to the sender due to expiry
|
|
2252
2300
|
*/SparkHtlcStatus[SparkHtlcStatus["Returned"]=2]="Returned";return SparkHtlcStatus;}({});const FfiConverterTypeSparkHtlcStatus=(()=>{const ordinalConverter=FfiConverterInt32;class FFIConverter extends AbstractFfiConverterByteArray{read(from){switch(ordinalConverter.read(from)){case 1:return SparkHtlcStatus.WaitingForPreimage;case 2:return SparkHtlcStatus.PreimageShared;case 3:return SparkHtlcStatus.Returned;default:throw new UniffiInternalError.UnexpectedEnumCase();}}write(value,into){switch(value){case SparkHtlcStatus.WaitingForPreimage:return ordinalConverter.write(1,into);case SparkHtlcStatus.PreimageShared:return ordinalConverter.write(2,into);case SparkHtlcStatus.Returned:return ordinalConverter.write(3,into);}}allocationSize(value){return ordinalConverter.allocationSize(0);}}return new FFIConverter();})();// Error type: StorageError
|
|
2253
2301
|
// Enum: StorageError
|
|
2254
|
-
export let StorageError_Tags=/*#__PURE__*/function(StorageError_Tags){StorageError_Tags["Connection"]="Connection";StorageError_Tags["Implementation"]="Implementation";StorageError_Tags["InitializationError"]="InitializationError";StorageError_Tags["Serialization"]="Serialization";return StorageError_Tags;}({});/**
|
|
2302
|
+
export let StorageError_Tags=/*#__PURE__*/function(StorageError_Tags){StorageError_Tags["Connection"]="Connection";StorageError_Tags["Implementation"]="Implementation";StorageError_Tags["InitializationError"]="InitializationError";StorageError_Tags["Serialization"]="Serialization";StorageError_Tags["NotFound"]="NotFound";return StorageError_Tags;}({});/**
|
|
2255
2303
|
* Errors that can occur during storage operations
|
|
2256
2304
|
*/export const StorageError=(()=>{/**
|
|
2257
2305
|
* Connection-related errors (pool exhaustion, timeouts, connection refused).
|
|
@@ -2270,11 +2318,14 @@ export let StorageError_Tags=/*#__PURE__*/function(StorageError_Tags){StorageErr
|
|
|
2270
2318
|
*/[uniffiTypeNameSymbol]='StorageError';tag=StorageError_Tags.InitializationError;constructor(v0){super('StorageError','InitializationError');this.inner=Object.freeze([v0]);}static new(v0){return new InitializationError_(v0);}static instanceOf(obj){return obj.tag===StorageError_Tags.InitializationError;}static hasInner(obj){return InitializationError_.instanceOf(obj);}static getInner(obj){return obj.inner;}}class Serialization_ extends UniffiError{/**
|
|
2271
2319
|
* @private
|
|
2272
2320
|
* This field is private and should not be used, use `tag` instead.
|
|
2273
|
-
*/[uniffiTypeNameSymbol]='StorageError';tag=StorageError_Tags.Serialization;constructor(v0){super('StorageError','Serialization');this.inner=Object.freeze([v0]);}static new(v0){return new Serialization_(v0);}static instanceOf(obj){return obj.tag===StorageError_Tags.Serialization;}static hasInner(obj){return Serialization_.instanceOf(obj);}static getInner(obj){return obj.inner;}}
|
|
2321
|
+
*/[uniffiTypeNameSymbol]='StorageError';tag=StorageError_Tags.Serialization;constructor(v0){super('StorageError','Serialization');this.inner=Object.freeze([v0]);}static new(v0){return new Serialization_(v0);}static instanceOf(obj){return obj.tag===StorageError_Tags.Serialization;}static hasInner(obj){return Serialization_.instanceOf(obj);}static getInner(obj){return obj.inner;}}class NotFound_ extends UniffiError{/**
|
|
2322
|
+
* @private
|
|
2323
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2324
|
+
*/[uniffiTypeNameSymbol]='StorageError';tag=StorageError_Tags.NotFound;constructor(){super('StorageError','NotFound');}static new(){return new NotFound_();}static instanceOf(obj){return obj.tag===StorageError_Tags.NotFound;}static hasInner(obj){return false;}}function instanceOf(obj){return obj[uniffiTypeNameSymbol]==='StorageError';}return Object.freeze({instanceOf,Connection:Connection_,Implementation:Implementation_,InitializationError:InitializationError_,Serialization:Serialization_,NotFound:NotFound_});})();/**
|
|
2274
2325
|
* Errors that can occur during storage operations
|
|
2275
2326
|
*/// FfiConverter for enum StorageError
|
|
2276
|
-
const FfiConverterTypeStorageError=(()=>{const ordinalConverter=FfiConverterInt32;class FFIConverter extends AbstractFfiConverterByteArray{read(from){switch(ordinalConverter.read(from)){case 1:return new StorageError.Connection(FfiConverterString.read(from));case 2:return new StorageError.Implementation(FfiConverterString.read(from));case 3:return new StorageError.InitializationError(FfiConverterString.read(from));case 4:return new StorageError.Serialization(FfiConverterString.read(from));default:throw new UniffiInternalError.UnexpectedEnumCase();}}write(value,into){switch(value.tag){case StorageError_Tags.Connection:{ordinalConverter.write(1,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.Implementation:{ordinalConverter.write(2,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.InitializationError:{ordinalConverter.write(3,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.Serialization:{ordinalConverter.write(4,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}default:// Throwing from here means that StorageError_Tags hasn't matched an ordinal.
|
|
2277
|
-
throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case StorageError_Tags.Connection:{const inner=value.inner;let size=ordinalConverter.allocationSize(1);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.Implementation:{const inner=value.inner;let size=ordinalConverter.allocationSize(2);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.InitializationError:{const inner=value.inner;let size=ordinalConverter.allocationSize(3);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.Serialization:{const inner=value.inner;let size=ordinalConverter.allocationSize(4);size+=FfiConverterString.allocationSize(inner[0]);return size;}default:throw new UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();// Enum: StoragePaymentDetailsFilter
|
|
2327
|
+
const FfiConverterTypeStorageError=(()=>{const ordinalConverter=FfiConverterInt32;class FFIConverter extends AbstractFfiConverterByteArray{read(from){switch(ordinalConverter.read(from)){case 1:return new StorageError.Connection(FfiConverterString.read(from));case 2:return new StorageError.Implementation(FfiConverterString.read(from));case 3:return new StorageError.InitializationError(FfiConverterString.read(from));case 4:return new StorageError.Serialization(FfiConverterString.read(from));case 5:return new StorageError.NotFound();default:throw new UniffiInternalError.UnexpectedEnumCase();}}write(value,into){switch(value.tag){case StorageError_Tags.Connection:{ordinalConverter.write(1,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.Implementation:{ordinalConverter.write(2,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.InitializationError:{ordinalConverter.write(3,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.Serialization:{ordinalConverter.write(4,into);const inner=value.inner;FfiConverterString.write(inner[0],into);return;}case StorageError_Tags.NotFound:{ordinalConverter.write(5,into);return;}default:// Throwing from here means that StorageError_Tags hasn't matched an ordinal.
|
|
2328
|
+
throw new UniffiInternalError.UnexpectedEnumCase();}}allocationSize(value){switch(value.tag){case StorageError_Tags.Connection:{const inner=value.inner;let size=ordinalConverter.allocationSize(1);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.Implementation:{const inner=value.inner;let size=ordinalConverter.allocationSize(2);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.InitializationError:{const inner=value.inner;let size=ordinalConverter.allocationSize(3);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.Serialization:{const inner=value.inner;let size=ordinalConverter.allocationSize(4);size+=FfiConverterString.allocationSize(inner[0]);return size;}case StorageError_Tags.NotFound:{return ordinalConverter.allocationSize(5);}default:throw new UniffiInternalError.UnexpectedEnumCase();}}}return new FFIConverter();})();// Enum: StoragePaymentDetailsFilter
|
|
2278
2329
|
export let StoragePaymentDetailsFilter_Tags=/*#__PURE__*/function(StoragePaymentDetailsFilter_Tags){StoragePaymentDetailsFilter_Tags["Spark"]="Spark";StoragePaymentDetailsFilter_Tags["Token"]="Token";StoragePaymentDetailsFilter_Tags["Lightning"]="Lightning";return StoragePaymentDetailsFilter_Tags;}({});/**
|
|
2279
2330
|
* Storage-internal variant of [`PaymentDetailsFilter`] that includes the
|
|
2280
2331
|
* `has_lnurl_preimage` field on the `Lightning` variant, which is not exposed
|
|
@@ -2364,17 +2415,17 @@ const FfiConverterMapStringTypeTokenBalance=new FfiConverterMap(FfiConverterStri
|
|
|
2364
2415
|
const FfiConverterMapStringString=new FfiConverterMap(FfiConverterString,FfiConverterString);export class BitcoinChainServiceImpl extends UniffiAbstractObject{[uniffiTypeNameSymbol]='BitcoinChainServiceImpl';// No primary constructor declared for this class.
|
|
2365
2416
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeBitcoinChainServiceImplObjectFactory.bless(pointer);}async getAddressUtxos(address,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_utxos(uniffiTypeBitcoinChainServiceImplObjectFactory.clonePointer(this),FfiConverterString.lower(address));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterArrayTypeUtxo.lift.bind(FfiConverterArrayTypeUtxo),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeChainServiceError.lift.bind(FfiConverterTypeChainServiceError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async getTransactionStatus(txid,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_status(uniffiTypeBitcoinChainServiceImplObjectFactory.clonePointer(this),FfiConverterString.lower(txid));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeTxStatus.lift.bind(FfiConverterTypeTxStatus),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeChainServiceError.lift.bind(FfiConverterTypeChainServiceError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async getTransactionHex(txid,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_hex(uniffiTypeBitcoinChainServiceImplObjectFactory.clonePointer(this),FfiConverterString.lower(txid));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeChainServiceError.lift.bind(FfiConverterTypeChainServiceError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async broadcastTransaction(tx,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(uniffiTypeBitcoinChainServiceImplObjectFactory.clonePointer(this),FfiConverterString.lower(tx));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeChainServiceError.lift.bind(FfiConverterTypeChainServiceError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async recommendedFees(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(uniffiTypeBitcoinChainServiceImplObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeRecommendedFees.lift.bind(FfiConverterTypeRecommendedFees),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeChainServiceError.lift.bind(FfiConverterTypeChainServiceError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2366
2417
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2367
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeBitcoinChainServiceImplObjectFactory.pointer(this);uniffiTypeBitcoinChainServiceImplObjectFactory.freePointer(pointer);uniffiTypeBitcoinChainServiceImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeBitcoinChainServiceImplObjectFactory.isConcreteType(obj);}}const uniffiTypeBitcoinChainServiceImplObjectFactory={create(pointer){const instance=Object.create(BitcoinChainServiceImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='BitcoinChainServiceImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='BitcoinChainServiceImpl';}};// FfiConverter for BitcoinChainService
|
|
2418
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeBitcoinChainServiceImplObjectFactory.pointer(this);uniffiTypeBitcoinChainServiceImplObjectFactory.freePointer(pointer);uniffiTypeBitcoinChainServiceImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeBitcoinChainServiceImplObjectFactory.isConcreteType(obj);}}const uniffiTypeBitcoinChainServiceImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(BitcoinChainServiceImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='BitcoinChainServiceImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='BitcoinChainServiceImpl';}};})();// FfiConverter for BitcoinChainService
|
|
2368
2419
|
const FfiConverterTypeBitcoinChainService=new FfiConverterObjectWithCallbacks(uniffiTypeBitcoinChainServiceImplObjectFactory);// Add a vtavble for the callbacks that go in BitcoinChainService.
|
|
2369
2420
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
2370
2421
|
const uniffiCallbackInterfaceBitcoinChainService={// Create the VTable using a series of closures.
|
|
2371
2422
|
// ts automatically converts these into C callback functions.
|
|
2372
|
-
vtable:{getAddressUtxos:(uniffiHandle,address,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeBitcoinChainService.lift(uniffiHandle);return await jsCallback.getAddressUtxos(FfiConverterString.lift(address),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeUtxo.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2373
|
-
callStatus:
|
|
2374
|
-
callStatus:
|
|
2375
|
-
callStatus:
|
|
2376
|
-
callStatus:
|
|
2377
|
-
callStatus:
|
|
2423
|
+
vtable:{getAddressUtxos:(uniffiHandle,address,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeBitcoinChainService.lift(uniffiHandle);return await jsCallback.getAddressUtxos(FfiConverterString.lift(address),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeUtxo.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2424
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ChainServiceError.instanceOf,/*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getTransactionStatus:(uniffiHandle,txid,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeBitcoinChainService.lift(uniffiHandle);return await jsCallback.getTransactionStatus(FfiConverterString.lift(txid),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeTxStatus.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2425
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ChainServiceError.instanceOf,/*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getTransactionHex:(uniffiHandle,txid,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeBitcoinChainService.lift(uniffiHandle);return await jsCallback.getTransactionHex(FfiConverterString.lift(txid),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterString.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2426
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ChainServiceError.instanceOf,/*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},broadcastTransaction:(uniffiHandle,tx,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeBitcoinChainService.lift(uniffiHandle);return await jsCallback.broadcastTransaction(FfiConverterString.lift(tx),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
2427
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ChainServiceError.instanceOf,/*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},recommendedFees:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeBitcoinChainService.lift(uniffiHandle);return await jsCallback.recommendedFees({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeRecommendedFees.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2428
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ChainServiceError.instanceOf,/*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// BitcoinChainService: this will throw a stale handle error if the handle isn't found.
|
|
2378
2429
|
FfiConverterTypeBitcoinChainService.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(uniffiCallbackInterfaceBitcoinChainService.vtable);}};/**
|
|
2379
2430
|
* `BreezSDK` is a wrapper around `SparkSDK` that provides a more structured API
|
|
2380
2431
|
* with request/response objects and comprehensive error handling.
|
|
@@ -2383,6 +2434,16 @@ FfiConverterTypeBitcoinChainService.drop(uniffiHandle);}},register:()=>{nativeMo
|
|
|
2383
2434
|
* with request/response objects and comprehensive error handling.
|
|
2384
2435
|
*/export class BreezSdk extends UniffiAbstractObject{[uniffiTypeNameSymbol]='BreezSdk';// No primary constructor declared for this class.
|
|
2385
2436
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeBreezSdkObjectFactory.bless(pointer);}/**
|
|
2437
|
+
* Adds a new contact.
|
|
2438
|
+
*
|
|
2439
|
+
* # Arguments
|
|
2440
|
+
*
|
|
2441
|
+
* * `request` - The request containing the contact details
|
|
2442
|
+
*
|
|
2443
|
+
* # Returns
|
|
2444
|
+
*
|
|
2445
|
+
* The created contact or an error
|
|
2446
|
+
*/async addContact(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeAddContactRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeContact.lift.bind(FfiConverterTypeContact),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2386
2447
|
* Registers a listener to receive SDK events
|
|
2387
2448
|
*
|
|
2388
2449
|
* # Arguments
|
|
@@ -2419,7 +2480,17 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2419
2480
|
* Verifies a message signature against the provided public key. The message
|
|
2420
2481
|
* is SHA256 hashed before verification. The signature can be hex encoded
|
|
2421
2482
|
* in either DER or compact format.
|
|
2422
|
-
*/async checkMessage(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeCheckMessageRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeCheckMessageResponse.lift.bind(FfiConverterTypeCheckMessageResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async claimDeposit(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeClaimDepositRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeClaimDepositResponse.lift.bind(FfiConverterTypeClaimDepositResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async claimHtlcPayment(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeClaimHtlcPaymentRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeClaimHtlcPaymentResponse.lift.bind(FfiConverterTypeClaimHtlcPaymentResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}
|
|
2483
|
+
*/async checkMessage(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeCheckMessageRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeCheckMessageResponse.lift.bind(FfiConverterTypeCheckMessageResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async claimDeposit(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeClaimDepositRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeClaimDepositResponse.lift.bind(FfiConverterTypeClaimDepositResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async claimHtlcPayment(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeClaimHtlcPaymentRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeClaimHtlcPaymentResponse.lift.bind(FfiConverterTypeClaimHtlcPaymentResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2484
|
+
* Deletes a contact by its ID.
|
|
2485
|
+
*
|
|
2486
|
+
* # Arguments
|
|
2487
|
+
*
|
|
2488
|
+
* * `id` - The ID of the contact to delete
|
|
2489
|
+
*
|
|
2490
|
+
* # Returns
|
|
2491
|
+
*
|
|
2492
|
+
* Success or an error
|
|
2493
|
+
*/async deleteContact(id,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterString.lower(id));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async deleteLightningAddress(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(uniffiTypeBreezSdkObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2423
2494
|
* Stops the SDK's background tasks
|
|
2424
2495
|
*
|
|
2425
2496
|
* This method stops the background tasks started by the `start()` method.
|
|
@@ -2446,6 +2517,16 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2446
2517
|
*
|
|
2447
2518
|
* Some settings are fetched from the Spark network so network requests are performed.
|
|
2448
2519
|
*/async getUserSettings(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_get_user_settings(uniffiTypeBreezSdkObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeUserSettings.lift.bind(FfiConverterTypeUserSettings),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2520
|
+
* Lists contacts with optional pagination.
|
|
2521
|
+
*
|
|
2522
|
+
* # Arguments
|
|
2523
|
+
*
|
|
2524
|
+
* * `request` - The request containing optional pagination parameters
|
|
2525
|
+
*
|
|
2526
|
+
* # Returns
|
|
2527
|
+
*
|
|
2528
|
+
* A list of contacts or an error
|
|
2529
|
+
*/async listContacts(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeListContactsRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterArrayTypeContact.lift.bind(FfiConverterArrayTypeContact),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2449
2530
|
* List fiat currencies for which there is a known exchange rate,
|
|
2450
2531
|
* sorted by the canonical name of the currency.
|
|
2451
2532
|
*/async listFiatCurrencies(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(uniffiTypeBreezSdkObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeListFiatCurrenciesResponse.lift.bind(FfiConverterTypeListFiatCurrenciesResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
@@ -2521,12 +2602,22 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2521
2602
|
*/startLeafOptimization(){uniffiCaller.rustCall(/*caller:*/callStatus=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_start_leaf_optimization(uniffiTypeBreezSdkObjectFactory.clonePointer(this),callStatus);},/*liftString:*/FfiConverterString.lift);}/**
|
|
2522
2603
|
* Synchronizes the wallet with the Spark network
|
|
2523
2604
|
*/async syncWallet(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeSyncWalletRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeSyncWalletResponse.lift.bind(FfiConverterTypeSyncWalletResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2605
|
+
* Updates an existing contact.
|
|
2606
|
+
*
|
|
2607
|
+
* # Arguments
|
|
2608
|
+
*
|
|
2609
|
+
* * `request` - The request containing the updated contact details
|
|
2610
|
+
*
|
|
2611
|
+
* # Returns
|
|
2612
|
+
*
|
|
2613
|
+
* The updated contact or an error
|
|
2614
|
+
*/async updateContact(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeUpdateContactRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeContact.lift.bind(FfiConverterTypeContact),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2524
2615
|
* Updates the user settings for the wallet.
|
|
2525
2616
|
*
|
|
2526
2617
|
* Some settings are updated on the Spark network so network requests may be performed.
|
|
2527
2618
|
*/async updateUserSettings(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(uniffiTypeBreezSdkObjectFactory.clonePointer(this),FfiConverterTypeUpdateUserSettingsRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2528
2619
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2529
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeBreezSdkObjectFactory.pointer(this);uniffiTypeBreezSdkObjectFactory.freePointer(pointer);uniffiTypeBreezSdkObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeBreezSdkObjectFactory.isConcreteType(obj);}}const uniffiTypeBreezSdkObjectFactory={create(pointer){const instance=Object.create(BreezSdk.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='BreezSdk';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_breezsdk(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='BreezSdk';}};// FfiConverter for BreezSdkInterface
|
|
2620
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeBreezSdkObjectFactory.pointer(this);uniffiTypeBreezSdkObjectFactory.freePointer(pointer);uniffiTypeBreezSdkObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeBreezSdkObjectFactory.isConcreteType(obj);}}const uniffiTypeBreezSdkObjectFactory=(()=>{return{create(pointer){const instance=Object.create(BreezSdk.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='BreezSdk';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_breezsdk(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='BreezSdk';}};})();// FfiConverter for BreezSdkInterface
|
|
2530
2621
|
const FfiConverterTypeBreezSdk=new FfiConverterObject(uniffiTypeBreezSdkObjectFactory);/**
|
|
2531
2622
|
* External signer trait that can be implemented by users and passed to the SDK.
|
|
2532
2623
|
*
|
|
@@ -2758,31 +2849,31 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2758
2849
|
* See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
2759
2850
|
*/async aggregateFrost(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost(uniffiTypeExternalSignerImplObjectFactory.clonePointer(this),FfiConverterTypeExternalAggregateFrostRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeExternalFrostSignature.lift.bind(FfiConverterTypeExternalFrostSignature),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSignerError.lift.bind(FfiConverterTypeSignerError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2760
2851
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2761
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeExternalSignerImplObjectFactory.pointer(this);uniffiTypeExternalSignerImplObjectFactory.freePointer(pointer);uniffiTypeExternalSignerImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeExternalSignerImplObjectFactory.isConcreteType(obj);}}const uniffiTypeExternalSignerImplObjectFactory={create(pointer){const instance=Object.create(ExternalSignerImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='ExternalSignerImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_externalsigner_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_externalsigner(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_externalsigner(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='ExternalSignerImpl';}};// FfiConverter for ExternalSigner
|
|
2852
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeExternalSignerImplObjectFactory.pointer(this);uniffiTypeExternalSignerImplObjectFactory.freePointer(pointer);uniffiTypeExternalSignerImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeExternalSignerImplObjectFactory.isConcreteType(obj);}}const uniffiTypeExternalSignerImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(ExternalSignerImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='ExternalSignerImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_externalsigner_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_externalsigner(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_externalsigner(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='ExternalSignerImpl';}};})();// FfiConverter for ExternalSigner
|
|
2762
2853
|
const FfiConverterTypeExternalSigner=new FfiConverterObjectWithCallbacks(uniffiTypeExternalSignerImplObjectFactory);// Add a vtavble for the callbacks that go in ExternalSigner.
|
|
2763
2854
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
2764
2855
|
const uniffiCallbackInterfaceExternalSigner={// Create the VTable using a series of closures.
|
|
2765
2856
|
// ts automatically converts these into C callback functions.
|
|
2766
|
-
vtable:{identityPublicKey:uniffiHandle=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return jsCallback.identityPublicKey();};const uniffiResult=UniffiResult.ready();const uniffiHandleSuccess=obj=>{UniffiResult.writeSuccess(uniffiResult,FfiConverterTypePublicKeyBytes.lower(obj));};const uniffiHandleError=(code,errBuf)=>{UniffiResult.writeError(uniffiResult,code,errBuf);};uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiResult;},derivePublicKey:(uniffiHandle,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.derivePublicKey(FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypePublicKeyBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2767
|
-
callStatus:
|
|
2768
|
-
callStatus:
|
|
2769
|
-
callStatus:
|
|
2770
|
-
callStatus:
|
|
2771
|
-
callStatus:
|
|
2772
|
-
callStatus:
|
|
2773
|
-
callStatus:
|
|
2774
|
-
callStatus:
|
|
2775
|
-
callStatus:
|
|
2776
|
-
callStatus:
|
|
2777
|
-
callStatus:
|
|
2778
|
-
callStatus:
|
|
2779
|
-
callStatus:
|
|
2780
|
-
callStatus:
|
|
2781
|
-
callStatus:
|
|
2782
|
-
callStatus:
|
|
2783
|
-
callStatus:
|
|
2784
|
-
callStatus:
|
|
2785
|
-
callStatus:
|
|
2857
|
+
vtable:{identityPublicKey:uniffiHandle=>{const uniffiMakeCall=()=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return jsCallback.identityPublicKey();};const uniffiResult=UniffiResult.ready();const uniffiHandleSuccess=obj=>{UniffiResult.writeSuccess(uniffiResult,FfiConverterTypePublicKeyBytes.lower(obj));};const uniffiHandleError=(code,errBuf)=>{UniffiResult.writeError(uniffiResult,code,errBuf);};uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiResult;},derivePublicKey:(uniffiHandle,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.derivePublicKey(FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypePublicKeyBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2858
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},signEcdsa:(uniffiHandle,message,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.signEcdsa(FfiConverterTypeMessageBytes.lift(message),FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeEcdsaSignatureBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2859
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},signEcdsaRecoverable:(uniffiHandle,message,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.signEcdsaRecoverable(FfiConverterTypeMessageBytes.lift(message),FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeRecoverableEcdsaSignatureBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2860
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},encryptEcies:(uniffiHandle,message,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.encryptEcies(FfiConverterArrayBuffer.lift(message),FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayBuffer.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2861
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},decryptEcies:(uniffiHandle,message,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.decryptEcies(FfiConverterArrayBuffer.lift(message),FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayBuffer.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2862
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},signHashSchnorr:(uniffiHandle,hash,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.signHashSchnorr(FfiConverterArrayBuffer.lift(hash),FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeSchnorrSignatureBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2863
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},hmacSha256:(uniffiHandle,message,path,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.hmacSha256(FfiConverterArrayBuffer.lift(message),FfiConverterString.lift(path),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeHashedMessageBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2864
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},generateRandomSigningCommitment:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.generateRandomSigningCommitment({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeExternalFrostCommitments.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2865
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getPublicKeyForNode:(uniffiHandle,id,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.getPublicKeyForNode(FfiConverterTypeExternalTreeNodeId.lift(id),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypePublicKeyBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2866
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},generateRandomSecret:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.generateRandomSecret({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeExternalEncryptedSecret.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2867
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},staticDepositSecretEncrypted:(uniffiHandle,index,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.staticDepositSecretEncrypted(FfiConverterUInt32.lift(index),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeExternalSecretSource.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2868
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},staticDepositSecret:(uniffiHandle,index,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.staticDepositSecret(FfiConverterUInt32.lift(index),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeSecretBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2869
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},staticDepositSigningKey:(uniffiHandle,index,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.staticDepositSigningKey(FfiConverterUInt32.lift(index),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypePublicKeyBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2870
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},subtractSecrets:(uniffiHandle,signingKey,newSigningKey,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.subtractSecrets(FfiConverterTypeExternalSecretSource.lift(signingKey),FfiConverterTypeExternalSecretSource.lift(newSigningKey),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeExternalSecretSource.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2871
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},splitSecretWithProofs:(uniffiHandle,secret,threshold,numShares,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.splitSecretWithProofs(FfiConverterTypeExternalSecretToSplit.lift(secret),FfiConverterUInt32.lift(threshold),FfiConverterUInt32.lift(numShares),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeExternalVerifiableSecretShare.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2872
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},encryptSecretForReceiver:(uniffiHandle,encryptedSecret,receiverPublicKey,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.encryptSecretForReceiver(FfiConverterTypeExternalEncryptedSecret.lift(encryptedSecret),FfiConverterTypePublicKeyBytes.lift(receiverPublicKey),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayBuffer.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2873
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},publicKeyFromSecret:(uniffiHandle,secret,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.publicKeyFromSecret(FfiConverterTypeExternalSecretSource.lift(secret),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypePublicKeyBytes.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2874
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},signFrost:(uniffiHandle,request,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.signFrost(FfiConverterTypeExternalSignFrostRequest.lift(request),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeExternalFrostSignatureShare.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2875
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},aggregateFrost:(uniffiHandle,request,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeExternalSigner.lift(uniffiHandle);return await jsCallback.aggregateFrost(FfiConverterTypeExternalAggregateFrostRequest.lift(request),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeExternalFrostSignature.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2876
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/SignerError.instanceOf,/*lowerError:*/FfiConverterTypeSignerError.lower.bind(FfiConverterTypeSignerError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// ExternalSigner: this will throw a stale handle error if the handle isn't found.
|
|
2786
2877
|
FfiConverterTypeExternalSigner.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(uniffiCallbackInterfaceExternalSigner.vtable);}};/**
|
|
2787
2878
|
* Trait covering fiat-related functionality
|
|
2788
2879
|
*//**
|
|
@@ -2794,14 +2885,14 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2794
2885
|
* Get the live rates from the server.
|
|
2795
2886
|
*/async fetchFiatRates(asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(uniffiTypeFiatServiceImplObjectFactory.clonePointer(this));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterArrayTypeRate.lift.bind(FfiConverterArrayTypeRate),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeServiceConnectivityError.lift.bind(FfiConverterTypeServiceConnectivityError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2796
2887
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2797
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeFiatServiceImplObjectFactory.pointer(this);uniffiTypeFiatServiceImplObjectFactory.freePointer(pointer);uniffiTypeFiatServiceImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeFiatServiceImplObjectFactory.isConcreteType(obj);}}const uniffiTypeFiatServiceImplObjectFactory={create(pointer){const instance=Object.create(FiatServiceImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='FiatServiceImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_fiatservice_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='FiatServiceImpl';}};// FfiConverter for FiatService
|
|
2888
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeFiatServiceImplObjectFactory.pointer(this);uniffiTypeFiatServiceImplObjectFactory.freePointer(pointer);uniffiTypeFiatServiceImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeFiatServiceImplObjectFactory.isConcreteType(obj);}}const uniffiTypeFiatServiceImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(FiatServiceImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='FiatServiceImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_fiatservice_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='FiatServiceImpl';}};})();// FfiConverter for FiatService
|
|
2798
2889
|
const FfiConverterTypeFiatService=new FfiConverterObjectWithCallbacks(uniffiTypeFiatServiceImplObjectFactory);// Add a vtavble for the callbacks that go in FiatService.
|
|
2799
2890
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
2800
2891
|
const uniffiCallbackInterfaceFiatService={// Create the VTable using a series of closures.
|
|
2801
2892
|
// ts automatically converts these into C callback functions.
|
|
2802
|
-
vtable:{fetchFiatCurrencies:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeFiatService.lift(uniffiHandle);return await jsCallback.fetchFiatCurrencies({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeFiatCurrency.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2803
|
-
callStatus:
|
|
2804
|
-
callStatus:
|
|
2893
|
+
vtable:{fetchFiatCurrencies:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeFiatService.lift(uniffiHandle);return await jsCallback.fetchFiatCurrencies({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeFiatCurrency.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2894
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ServiceConnectivityError.instanceOf,/*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},fetchFiatRates:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeFiatService.lift(uniffiHandle);return await jsCallback.fetchFiatRates({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeRate.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2895
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ServiceConnectivityError.instanceOf,/*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// FiatService: this will throw a stale handle error if the handle isn't found.
|
|
2805
2896
|
FfiConverterTypeFiatService.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(uniffiCallbackInterfaceFiatService.vtable);}};/**
|
|
2806
2897
|
* This interface is used to observe outgoing payments before Lightning, Spark and onchain Bitcoin payments.
|
|
2807
2898
|
* If the implementation returns an error, the payment is cancelled.
|
|
@@ -2813,13 +2904,13 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2813
2904
|
* Called before Lightning, Spark or onchain Bitcoin payments are made
|
|
2814
2905
|
*/async beforeSend(payments,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_paymentobserver_before_send(uniffiTypePaymentObserverImplObjectFactory.clonePointer(this),FfiConverterArrayTypeProvisionalPayment.lower(payments));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypePaymentObserverError.lift.bind(FfiConverterTypePaymentObserverError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2815
2906
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2816
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypePaymentObserverImplObjectFactory.pointer(this);uniffiTypePaymentObserverImplObjectFactory.freePointer(pointer);uniffiTypePaymentObserverImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypePaymentObserverImplObjectFactory.isConcreteType(obj);}}const uniffiTypePaymentObserverImplObjectFactory={create(pointer){const instance=Object.create(PaymentObserverImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='PaymentObserverImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_paymentobserver(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_paymentobserver(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='PaymentObserverImpl';}};// FfiConverter for PaymentObserver
|
|
2907
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypePaymentObserverImplObjectFactory.pointer(this);uniffiTypePaymentObserverImplObjectFactory.freePointer(pointer);uniffiTypePaymentObserverImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypePaymentObserverImplObjectFactory.isConcreteType(obj);}}const uniffiTypePaymentObserverImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(PaymentObserverImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='PaymentObserverImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_paymentobserver(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_paymentobserver(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='PaymentObserverImpl';}};})();// FfiConverter for PaymentObserver
|
|
2817
2908
|
const FfiConverterTypePaymentObserver=new FfiConverterObjectWithCallbacks(uniffiTypePaymentObserverImplObjectFactory);// Add a vtavble for the callbacks that go in PaymentObserver.
|
|
2818
2909
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
2819
2910
|
const uniffiCallbackInterfacePaymentObserver={// Create the VTable using a series of closures.
|
|
2820
2911
|
// ts automatically converts these into C callback functions.
|
|
2821
|
-
vtable:{beforeSend:(uniffiHandle,payments,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypePaymentObserver.lift(uniffiHandle);return await jsCallback.beforeSend(FfiConverterArrayTypeProvisionalPayment.lift(payments),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
2822
|
-
callStatus:
|
|
2912
|
+
vtable:{beforeSend:(uniffiHandle,payments,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypePaymentObserver.lift(uniffiHandle);return await jsCallback.beforeSend(FfiConverterArrayTypeProvisionalPayment.lift(payments),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
2913
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/PaymentObserverError.instanceOf,/*lowerError:*/FfiConverterTypePaymentObserverError.lower.bind(FfiConverterTypePaymentObserverError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// PaymentObserver: this will throw a stale handle error if the handle isn't found.
|
|
2823
2914
|
FfiConverterTypePaymentObserver.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(uniffiCallbackInterfacePaymentObserver.vtable);}};/**
|
|
2824
2915
|
* REST client trait for making HTTP requests.
|
|
2825
2916
|
*
|
|
@@ -2852,15 +2943,15 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
2852
2943
|
* - `body`: the optional DELETE body
|
|
2853
2944
|
*/async deleteRequest(url,headers,body,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_restclient_delete_request(uniffiTypeRestClientImplObjectFactory.clonePointer(this),FfiConverterString.lower(url),FfiConverterOptionalMapStringString.lower(headers),FfiConverterOptionalString.lower(body));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeRestResponse.lift.bind(FfiConverterTypeRestResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeServiceConnectivityError.lift.bind(FfiConverterTypeServiceConnectivityError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2854
2945
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2855
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeRestClientImplObjectFactory.pointer(this);uniffiTypeRestClientImplObjectFactory.freePointer(pointer);uniffiTypeRestClientImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeRestClientImplObjectFactory.isConcreteType(obj);}}const uniffiTypeRestClientImplObjectFactory={create(pointer){const instance=Object.create(RestClientImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='RestClientImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_restclient_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_restclient(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_restclient(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='RestClientImpl';}};// FfiConverter for RestClient
|
|
2946
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeRestClientImplObjectFactory.pointer(this);uniffiTypeRestClientImplObjectFactory.freePointer(pointer);uniffiTypeRestClientImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeRestClientImplObjectFactory.isConcreteType(obj);}}const uniffiTypeRestClientImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(RestClientImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='RestClientImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_restclient_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_restclient(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_restclient(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='RestClientImpl';}};})();// FfiConverter for RestClient
|
|
2856
2947
|
const FfiConverterTypeRestClient=new FfiConverterObjectWithCallbacks(uniffiTypeRestClientImplObjectFactory);// Add a vtavble for the callbacks that go in RestClient.
|
|
2857
2948
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
2858
2949
|
const uniffiCallbackInterfaceRestClient={// Create the VTable using a series of closures.
|
|
2859
2950
|
// ts automatically converts these into C callback functions.
|
|
2860
|
-
vtable:{getRequest:(uniffiHandle,url,headers,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeRestClient.lift(uniffiHandle);return await jsCallback.getRequest(FfiConverterString.lift(url),FfiConverterOptionalMapStringString.lift(headers),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeRestResponse.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2861
|
-
callStatus:
|
|
2862
|
-
callStatus:
|
|
2863
|
-
callStatus:
|
|
2951
|
+
vtable:{getRequest:(uniffiHandle,url,headers,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeRestClient.lift(uniffiHandle);return await jsCallback.getRequest(FfiConverterString.lift(url),FfiConverterOptionalMapStringString.lift(headers),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeRestResponse.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2952
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ServiceConnectivityError.instanceOf,/*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},postRequest:(uniffiHandle,url,headers,body,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeRestClient.lift(uniffiHandle);return await jsCallback.postRequest(FfiConverterString.lift(url),FfiConverterOptionalMapStringString.lift(headers),FfiConverterOptionalString.lift(body),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeRestResponse.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2953
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ServiceConnectivityError.instanceOf,/*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},deleteRequest:(uniffiHandle,url,headers,body,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeRestClient.lift(uniffiHandle);return await jsCallback.deleteRequest(FfiConverterString.lift(url),FfiConverterOptionalMapStringString.lift(headers),FfiConverterOptionalString.lift(body),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeRestResponse.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
2954
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/ServiceConnectivityError.instanceOf,/*lowerError:*/FfiConverterTypeServiceConnectivityError.lower.bind(FfiConverterTypeServiceConnectivityError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// RestClient: this will throw a stale handle error if the handle isn't found.
|
|
2864
2955
|
FfiConverterTypeRestClient.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(uniffiCallbackInterfaceRestClient.vtable);}};/**
|
|
2865
2956
|
* Builder for creating `BreezSdk` instances with customizable components.
|
|
2866
2957
|
*//**
|
|
@@ -2906,7 +2997,7 @@ FfiConverterTypeRestClient.drop(uniffiHandle);}},register:()=>{nativeModule().ub
|
|
|
2906
2997
|
* - `storage`: The storage implementation to be used.
|
|
2907
2998
|
*/async withStorage(storage,asyncOpts_){const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_storage(uniffiTypeSdkBuilderObjectFactory.clonePointer(this),FfiConverterTypeStorage.lower(storage));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_);}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
2908
2999
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2909
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeSdkBuilderObjectFactory.pointer(this);uniffiTypeSdkBuilderObjectFactory.freePointer(pointer);uniffiTypeSdkBuilderObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeSdkBuilderObjectFactory.isConcreteType(obj);}}const uniffiTypeSdkBuilderObjectFactory={create(pointer){const instance=Object.create(SdkBuilder.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='SdkBuilder';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_sdkbuilder_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_sdkbuilder(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='SdkBuilder';}};// FfiConverter for SdkBuilderInterface
|
|
3000
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeSdkBuilderObjectFactory.pointer(this);uniffiTypeSdkBuilderObjectFactory.freePointer(pointer);uniffiTypeSdkBuilderObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeSdkBuilderObjectFactory.isConcreteType(obj);}}const uniffiTypeSdkBuilderObjectFactory=(()=>{return{create(pointer){const instance=Object.create(SdkBuilder.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='SdkBuilder';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_sdkbuilder_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_sdkbuilder(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='SdkBuilder';}};})();// FfiConverter for SdkBuilderInterface
|
|
2910
3001
|
const FfiConverterTypeSdkBuilder=new FfiConverterObject(uniffiTypeSdkBuilderObjectFactory);/**
|
|
2911
3002
|
* Trait for persistent storage
|
|
2912
3003
|
*//**
|
|
@@ -3008,7 +3099,16 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
3008
3099
|
* # Returns
|
|
3009
3100
|
*
|
|
3010
3101
|
* Success or a `StorageError`
|
|
3011
|
-
*/async updateDeposit(txid,vout,payload,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_deposit(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterString.lower(txid),FfiConverterUInt32.lower(vout),FfiConverterTypeUpdateDepositPayload.lower(payload));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async setLnurlMetadata(metadata,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterArrayTypeSetLnurlMetadataItem.lower(metadata));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}
|
|
3102
|
+
*/async updateDeposit(txid,vout,payload,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_deposit(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterString.lower(txid),FfiConverterUInt32.lower(vout),FfiConverterTypeUpdateDepositPayload.lower(payload));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async setLnurlMetadata(metadata,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterArrayTypeSetLnurlMetadataItem.lower(metadata));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3103
|
+
* Lists contacts from storage with optional pagination
|
|
3104
|
+
*/async listContacts(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_contacts(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterTypeListContactsRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterArrayTypeContact.lift.bind(FfiConverterArrayTypeContact),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3105
|
+
* Gets a single contact by its ID
|
|
3106
|
+
*/async getContact(id,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_contact(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterString.lower(id));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeContact.lift.bind(FfiConverterTypeContact),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3107
|
+
* Inserts or updates a contact in storage (upsert by id).
|
|
3108
|
+
* Preserves `created_at` on update.
|
|
3109
|
+
*/async insertContact(contact,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_contact(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterTypeContact.lower(contact));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3110
|
+
* Deletes a contact by its ID
|
|
3111
|
+
*/async deleteContact(id,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_contact(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterString.lower(id));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async addOutgoingChange(record,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterTypeUnversionedRecordChange.lower(record));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_u64,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_u64,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_u64,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_u64,/*liftFunc:*/FfiConverterUInt64.lift.bind(FfiConverterUInt64),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async completeOutgoingSync(record,localRevision,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterTypeRecord.lower(record),FfiConverterUInt64.lower(localRevision));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}async getPendingOutgoingChanges(limit,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterUInt32.lower(limit));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterArrayTypeOutgoingChange.lift.bind(FfiConverterArrayTypeOutgoingChange),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3012
3112
|
* Get the last committed sync revision.
|
|
3013
3113
|
*
|
|
3014
3114
|
* The `sync_revision` table tracks the highest revision that has been committed
|
|
@@ -3027,35 +3127,39 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
3027
3127
|
* Update the sync state record from an incoming record
|
|
3028
3128
|
*/async updateRecordFromIncoming(record,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_record_from_incoming(uniffiTypeStorageImplObjectFactory.clonePointer(this),FfiConverterTypeRecord.lower(record));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_void,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_void,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_void,/*liftFunc:*/_v=>{},/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeStorageError.lift.bind(FfiConverterTypeStorageError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3029
3129
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
3030
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeStorageImplObjectFactory.pointer(this);uniffiTypeStorageImplObjectFactory.freePointer(pointer);uniffiTypeStorageImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeStorageImplObjectFactory.isConcreteType(obj);}}const uniffiTypeStorageImplObjectFactory={create(pointer){const instance=Object.create(StorageImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='StorageImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_storage_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_storage(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_storage(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='StorageImpl';}};// FfiConverter for Storage
|
|
3130
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeStorageImplObjectFactory.pointer(this);uniffiTypeStorageImplObjectFactory.freePointer(pointer);uniffiTypeStorageImplObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeStorageImplObjectFactory.isConcreteType(obj);}}const uniffiTypeStorageImplObjectFactory=(()=>{return{create(pointer){const instance=Object.create(StorageImpl.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='StorageImpl';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_storage_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_storage(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_storage(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='StorageImpl';}};})();// FfiConverter for Storage
|
|
3031
3131
|
const FfiConverterTypeStorage=new FfiConverterObjectWithCallbacks(uniffiTypeStorageImplObjectFactory);// Add a vtavble for the callbacks that go in Storage.
|
|
3032
3132
|
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
3033
3133
|
const uniffiCallbackInterfaceStorage={// Create the VTable using a series of closures.
|
|
3034
3134
|
// ts automatically converts these into C callback functions.
|
|
3035
|
-
vtable:{deleteCachedItem:(uniffiHandle,key,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.deleteCachedItem(FfiConverterString.lift(key),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback(uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3036
|
-
callStatus:
|
|
3037
|
-
callStatus:
|
|
3038
|
-
callStatus:
|
|
3039
|
-
callStatus:
|
|
3040
|
-
callStatus:
|
|
3041
|
-
callStatus:
|
|
3042
|
-
callStatus:
|
|
3043
|
-
callStatus:
|
|
3044
|
-
callStatus:
|
|
3045
|
-
callStatus:
|
|
3046
|
-
callStatus:
|
|
3047
|
-
callStatus:
|
|
3048
|
-
callStatus:
|
|
3049
|
-
callStatus:
|
|
3050
|
-
callStatus:
|
|
3051
|
-
callStatus:
|
|
3052
|
-
callStatus:
|
|
3053
|
-
callStatus:
|
|
3054
|
-
callStatus:
|
|
3055
|
-
callStatus:
|
|
3056
|
-
callStatus:
|
|
3057
|
-
callStatus:
|
|
3058
|
-
callStatus:
|
|
3135
|
+
vtable:{deleteCachedItem:(uniffiHandle,key,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.deleteCachedItem(FfiConverterString.lift(key),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3136
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getCachedItem:(uniffiHandle,key,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getCachedItem(FfiConverterString.lift(key),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterOptionalString.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3137
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},setCachedItem:(uniffiHandle,key,value,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.setCachedItem(FfiConverterString.lift(key),FfiConverterString.lift(value),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3138
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},listPayments:(uniffiHandle,request,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.listPayments(FfiConverterTypeStorageListPaymentsRequest.lift(request),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypePayment.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3139
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},insertPayment:(uniffiHandle,payment,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.insertPayment(FfiConverterTypePayment.lift(payment),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3140
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},insertPaymentMetadata:(uniffiHandle,paymentId,metadata,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.insertPaymentMetadata(FfiConverterString.lift(paymentId),FfiConverterTypePaymentMetadata.lift(metadata),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3141
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getPaymentById:(uniffiHandle,id,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getPaymentById(FfiConverterString.lift(id),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypePayment.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3142
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getPaymentByInvoice:(uniffiHandle,invoice,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getPaymentByInvoice(FfiConverterString.lift(invoice),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterOptionalTypePayment.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3143
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getPaymentsByParentIds:(uniffiHandle,parentPaymentIds,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getPaymentsByParentIds(FfiConverterArrayString.lift(parentPaymentIds),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterMapStringArrayTypePayment.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3144
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},addDeposit:(uniffiHandle,txid,vout,amountSats,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.addDeposit(FfiConverterString.lift(txid),FfiConverterUInt32.lift(vout),FfiConverterUInt64.lift(amountSats),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3145
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},deleteDeposit:(uniffiHandle,txid,vout,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.deleteDeposit(FfiConverterString.lift(txid),FfiConverterUInt32.lift(vout),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3146
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},listDeposits:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.listDeposits({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeDepositInfo.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3147
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},updateDeposit:(uniffiHandle,txid,vout,payload,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.updateDeposit(FfiConverterString.lift(txid),FfiConverterUInt32.lift(vout),FfiConverterTypeUpdateDepositPayload.lift(payload),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3148
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},setLnurlMetadata:(uniffiHandle,metadata,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.setLnurlMetadata(FfiConverterArrayTypeSetLnurlMetadataItem.lift(metadata),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3149
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},listContacts:(uniffiHandle,request,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.listContacts(FfiConverterTypeListContactsRequest.lift(request),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeContact.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3150
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getContact:(uniffiHandle,id,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getContact(FfiConverterString.lift(id),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterTypeContact.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3151
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},insertContact:(uniffiHandle,contact,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.insertContact(FfiConverterTypeContact.lift(contact),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3152
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},deleteContact:(uniffiHandle,id,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.deleteContact(FfiConverterString.lift(id),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3153
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},addOutgoingChange:(uniffiHandle,record,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.addOutgoingChange(FfiConverterTypeUnversionedRecordChange.lift(record),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructU64 */{returnValue:FfiConverterUInt64.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructU64 */{returnValue:0n,// TODO create callstatus with error.
|
|
3154
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},completeOutgoingSync:(uniffiHandle,record,localRevision,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.completeOutgoingSync(FfiConverterTypeRecord.lift(record),FfiConverterUInt64.lift(localRevision),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3155
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getPendingOutgoingChanges:(uniffiHandle,limit,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getPendingOutgoingChanges(FfiConverterUInt32.lift(limit),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeOutgoingChange.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3156
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getLastRevision:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getLastRevision({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructU64 */{returnValue:FfiConverterUInt64.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructU64 */{returnValue:0n,// TODO create callstatus with error.
|
|
3157
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},insertIncomingRecords:(uniffiHandle,records,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.insertIncomingRecords(FfiConverterArrayTypeRecord.lift(records),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3158
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},deleteIncomingRecord:(uniffiHandle,record,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.deleteIncomingRecord(FfiConverterTypeRecord.lift(record),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3159
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getIncomingRecords:(uniffiHandle,limit,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getIncomingRecords(FfiConverterUInt32.lift(limit),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterArrayTypeIncomingChange.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3160
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},getLatestOutgoingChange:(uniffiHandle,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.getLatestOutgoingChange({signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:FfiConverterOptionalTypeOutgoingChange.lower(returnValue),callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructRustBuffer */{returnValue:/*empty*/new Uint8Array(0),// TODO create callstatus with error.
|
|
3161
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},updateRecordFromIncoming:(uniffiHandle,record,uniffiFutureCallback,uniffiCallbackData)=>{const uniffiMakeCall=async signal=>{const jsCallback=FfiConverterTypeStorage.lift(uniffiHandle);return await jsCallback.updateRecordFromIncoming(FfiConverterTypeRecord.lift(record),{signal});};const uniffiHandleSuccess=returnValue=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{callStatus:uniffiCaller.createCallStatus()});};const uniffiHandleError=(code,errorBuf)=>{uniffiFutureCallback.call(uniffiFutureCallback,uniffiCallbackData,/* UniffiForeignFutureStructVoid */{// TODO create callstatus with error.
|
|
3162
|
+
callStatus:uniffiCaller.createErrorStatus(code,errorBuf)});};const uniffiForeignFuture=uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall,/*handleSuccess:*/uniffiHandleSuccess,/*handleError:*/uniffiHandleError,/*isErrorType:*/StorageError.instanceOf,/*lowerError:*/FfiConverterTypeStorageError.lower.bind(FfiConverterTypeStorageError),/*lowerString:*/FfiConverterString.lower);return uniffiForeignFuture;},uniffiFree:uniffiHandle=>{// Storage: this will throw a stale handle error if the handle isn't found.
|
|
3059
3163
|
FfiConverterTypeStorage.drop(uniffiHandle);}},register:()=>{nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(uniffiCallbackInterfaceStorage.vtable);}};export class TokenIssuer extends UniffiAbstractObject{[uniffiTypeNameSymbol]='TokenIssuer';// No primary constructor declared for this class.
|
|
3060
3164
|
constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorGuardSymbol]=uniffiTypeTokenIssuerObjectFactory.bless(pointer);}/**
|
|
3061
3165
|
* Burns supply of the issuer token
|
|
@@ -3135,7 +3239,7 @@ constructor(pointer){super();this[pointerLiteralSymbol]=pointer;this[destructorG
|
|
|
3135
3239
|
* * `SdkError` - If there was an error during the unfreeze process
|
|
3136
3240
|
*/async unfreezeIssuerToken(request,asyncOpts_)/*throws*/{const __stack=uniffiIsDebug?new Error().stack:undefined;try{return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller,/*rustFutureFunc:*/()=>{return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_tokenissuer_unfreeze_issuer_token(uniffiTypeTokenIssuerObjectFactory.clonePointer(this),FfiConverterTypeUnfreezeIssuerTokenRequest.lower(request));},/*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,/*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,/*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,/*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,/*liftFunc:*/FfiConverterTypeUnfreezeIssuerTokenResponse.lift.bind(FfiConverterTypeUnfreezeIssuerTokenResponse),/*liftString:*/FfiConverterString.lift,/*asyncOpts:*/asyncOpts_,/*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));}catch(__error){if(uniffiIsDebug&&__error instanceof Error){__error.stack=__stack;}throw __error;}}/**
|
|
3137
3241
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
3138
|
-
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeTokenIssuerObjectFactory.pointer(this);uniffiTypeTokenIssuerObjectFactory.freePointer(pointer);uniffiTypeTokenIssuerObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeTokenIssuerObjectFactory.isConcreteType(obj);}}const uniffiTypeTokenIssuerObjectFactory={create(pointer){const instance=Object.create(TokenIssuer.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='TokenIssuer';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_tokenissuer_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_tokenissuer(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_tokenissuer(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='TokenIssuer';}};// FfiConverter for TokenIssuerInterface
|
|
3242
|
+
*/uniffiDestroy(){const ptr=this[destructorGuardSymbol];if(ptr!==undefined){const pointer=uniffiTypeTokenIssuerObjectFactory.pointer(this);uniffiTypeTokenIssuerObjectFactory.freePointer(pointer);uniffiTypeTokenIssuerObjectFactory.unbless(ptr);delete this[destructorGuardSymbol];}}static instanceOf(obj){return uniffiTypeTokenIssuerObjectFactory.isConcreteType(obj);}}const uniffiTypeTokenIssuerObjectFactory=(()=>{return{create(pointer){const instance=Object.create(TokenIssuer.prototype);instance[pointerLiteralSymbol]=pointer;instance[destructorGuardSymbol]=this.bless(pointer);instance[uniffiTypeNameSymbol]='TokenIssuer';return instance;},bless(p){return uniffiCaller.rustCall(/*caller:*/status=>nativeModule().ubrn_uniffi_internal_fn_method_tokenissuer_ffi__bless_pointer(p,status),/*liftString:*/FfiConverterString.lift);},unbless(ptr){ptr.markDestroyed();},pointer(obj){if(obj[destructorGuardSymbol]===undefined){throw new UniffiInternalError.UnexpectedNullPointer();}return obj[pointerLiteralSymbol];},clonePointer(obj){const pointer=this.pointer(obj);return uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_tokenissuer(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},freePointer(pointer){uniffiCaller.rustCall(/*caller:*/callStatus=>nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_tokenissuer(pointer,callStatus),/*liftString:*/FfiConverterString.lift);},isConcreteType(obj){return obj[destructorGuardSymbol]&&obj[uniffiTypeNameSymbol]==='TokenIssuer';}};})();// FfiConverter for TokenIssuerInterface
|
|
3139
3243
|
const FfiConverterTypeTokenIssuer=new FfiConverterObject(uniffiTypeTokenIssuerObjectFactory);// FfiConverter for boolean | undefined
|
|
3140
3244
|
const FfiConverterOptionalBool=new FfiConverterOptional(FfiConverterBool);// FfiConverter for ArrayBuffer | undefined
|
|
3141
3245
|
const FfiConverterOptionalArrayBuffer=new FfiConverterOptional(FfiConverterArrayBuffer);// FfiConverter for Logger | undefined
|
|
@@ -3166,7 +3270,8 @@ const FfiConverterArrayArrayBuffer=new FfiConverterArray(FfiConverterArrayBuffer
|
|
|
3166
3270
|
const FfiConverterArrayTypeBip21Extra=new FfiConverterArray(FfiConverterTypeBip21Extra);// FfiConverter for Array<Bolt11RouteHint>
|
|
3167
3271
|
const FfiConverterArrayTypeBolt11RouteHint=new FfiConverterArray(FfiConverterTypeBolt11RouteHint);// FfiConverter for Array<Bolt11RouteHintHop>
|
|
3168
3272
|
const FfiConverterArrayTypeBolt11RouteHintHop=new FfiConverterArray(FfiConverterTypeBolt11RouteHintHop);// FfiConverter for Array<Bolt12OfferBlindedPath>
|
|
3169
|
-
const FfiConverterArrayTypeBolt12OfferBlindedPath=new FfiConverterArray(FfiConverterTypeBolt12OfferBlindedPath);// FfiConverter for Array<
|
|
3273
|
+
const FfiConverterArrayTypeBolt12OfferBlindedPath=new FfiConverterArray(FfiConverterTypeBolt12OfferBlindedPath);// FfiConverter for Array<Contact>
|
|
3274
|
+
const FfiConverterArrayTypeContact=new FfiConverterArray(FfiConverterTypeContact);// FfiConverter for Array<DepositInfo>
|
|
3170
3275
|
const FfiConverterArrayTypeDepositInfo=new FfiConverterArray(FfiConverterTypeDepositInfo);// FfiConverter for Array<ExternalInputParser>
|
|
3171
3276
|
const FfiConverterArrayTypeExternalInputParser=new FfiConverterArray(FfiConverterTypeExternalInputParser);// FfiConverter for Array<ExternalVerifiableSecretShare>
|
|
3172
3277
|
const FfiConverterArrayTypeExternalVerifiableSecretShare=new FfiConverterArray(FfiConverterTypeExternalVerifiableSecretShare);// FfiConverter for Array<FiatCurrency>
|
|
@@ -3222,6 +3327,6 @@ const FfiConverterOptionalArrayTypeStoragePaymentDetailsFilter=new FfiConverterO
|
|
|
3222
3327
|
*
|
|
3223
3328
|
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
3224
3329
|
*/function uniffiEnsureInitialized(){// Get the bindings contract version from our ComponentInterface
|
|
3225
|
-
const bindingsContractVersion=
|
|
3226
|
-
const scaffoldingContractVersion=nativeModule().ubrn_ffi_breez_sdk_spark_uniffi_contract_version();if(bindingsContractVersion!==scaffoldingContractVersion){throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion,bindingsContractVersion);}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_connect()!==40345){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_connect');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_connect_with_signer()!==1399){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_connect_with_signer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_config()!==62194){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_default_config');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_external_signer()!==40694){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_default_external_signer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_get_spark_status()!==62888){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_get_spark_status');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_init_logging()!==8518){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_init_logging');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos()!==20959){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status()!==23018){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex()!==59376){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction()!==65179){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees()!==43230){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener()!==37737){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin()!==32150){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_optimization()!==56996){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_optimization');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available()!==31624){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message()!==4385){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit()!==43529){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment()!==57587){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address()!==44132){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect()!==330){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits()!==50958){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info()!==6771){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_leaf_optimization_progress()!==38008){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_leaf_optimization_progress');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address()!==36552){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment()!==11540){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer()!==26649){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata()!==40125){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings()!==38537){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies()!==63366){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates()!==5904){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments()!==39170){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits()!==22486){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth()!==125){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay()!==10147){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw()!==45652){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_parse()!==14285){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_parse');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay()!==37691){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment()!==34185){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment()!==36984){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees()!==16947){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit()!==33646){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address()!==530){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener()!==41066){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment()!==54349){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message()!==57563){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_start_leaf_optimization()!==22827){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_start_leaf_optimization');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet()!==30368){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings()!==1721){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key()!==62941){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_derive_public_key()!==23137){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_derive_public_key');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa()!==37648){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable()!==3107){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies()!==60224){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies()!==59601){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr()!==57220){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256()!==57517){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment()!==31862){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node()!==37434){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret()!==26114){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted()!==38925){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret()!==45280){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key()!==62519){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets()!==45969){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs()!==19489){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver()!==51627){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret()!==53055){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost()!==20635){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost()!==53544){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies()!==19092){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates()!==11512){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send()!==30686){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_restclient_get_request()!==8260){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_restclient_get_request');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_restclient_post_request()!==24889){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_restclient_post_request');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_restclient_delete_request()!==51072){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_restclient_delete_request');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build()!==8126){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service()!==2848){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_default_storage()!==14543){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_default_storage');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service()!==37854){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set()!==50052){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client()!==51060){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer()!==21617){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service()!==63155){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage()!==59400){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item()!==6883){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_cached_item()!==30248){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_cached_item');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item()!==7970){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_payments()!==51078){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_list_payments');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment()!==28075){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata()!==32757){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id()!==35394){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice()!==57075){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids()!==10948){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit()!==13181){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_add_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit()!==28477){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_deposits()!==62636){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_list_deposits');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_deposit()!==18714){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_update_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata()!==64210){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change()!==50774){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync()!==8796){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes()!==20314){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision()!==48442){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records()!==38174){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record()!==26412){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records()!==13705){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change()!==41859){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming()!==54499){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token()!==56056){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token()!==33277){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token()!==32344){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance()!==9758){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata()!==57707){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token()!==36459){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token()!==65025){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new()!==65435){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event()!==24807){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log()!==11839){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_logger_log');}uniffiCallbackInterfaceEventListener.register();uniffiCallbackInterfaceLogger.register();uniffiCallbackInterfaceBitcoinChainService.register();uniffiCallbackInterfaceExternalSigner.register();uniffiCallbackInterfaceFiatService.register();uniffiCallbackInterfacePaymentObserver.register();uniffiCallbackInterfaceRestClient.register();uniffiCallbackInterfaceStorage.register();}export default Object.freeze({initialize:uniffiEnsureInitialized,converters:{FfiConverterTypeAesSuccessActionData,FfiConverterTypeAesSuccessActionDataDecrypted,FfiConverterTypeAesSuccessActionDataResult,FfiConverterTypeAmount,FfiConverterTypeAssetFilter,FfiConverterTypeBip21Details,FfiConverterTypeBip21Extra,FfiConverterTypeBitcoinAddressDetails,FfiConverterTypeBitcoinChainService,FfiConverterTypeBitcoinNetwork,FfiConverterTypeBolt11Invoice,FfiConverterTypeBolt11InvoiceDetails,FfiConverterTypeBolt11RouteHint,FfiConverterTypeBolt11RouteHintHop,FfiConverterTypeBolt12Invoice,FfiConverterTypeBolt12InvoiceDetails,FfiConverterTypeBolt12InvoiceRequestDetails,FfiConverterTypeBolt12Offer,FfiConverterTypeBolt12OfferBlindedPath,FfiConverterTypeBolt12OfferDetails,FfiConverterTypeBreezSdk,FfiConverterTypeBurnIssuerTokenRequest,FfiConverterTypeBuyBitcoinRequest,FfiConverterTypeBuyBitcoinResponse,FfiConverterTypeChainApiType,FfiConverterTypeCheckLightningAddressRequest,FfiConverterTypeCheckMessageRequest,FfiConverterTypeCheckMessageResponse,FfiConverterTypeClaimDepositRequest,FfiConverterTypeClaimDepositResponse,FfiConverterTypeClaimHtlcPaymentRequest,FfiConverterTypeClaimHtlcPaymentResponse,FfiConverterTypeConfig,FfiConverterTypeConnectRequest,FfiConverterTypeConnectWithSignerRequest,FfiConverterTypeConversionDetails,FfiConverterTypeConversionEstimate,FfiConverterTypeConversionInfo,FfiConverterTypeConversionOptions,FfiConverterTypeConversionPurpose,FfiConverterTypeConversionStatus,FfiConverterTypeConversionStep,FfiConverterTypeConversionType,FfiConverterTypeCreateIssuerTokenRequest,FfiConverterTypeCredentials,FfiConverterTypeCurrencyInfo,FfiConverterTypeDepositClaimError,FfiConverterTypeDepositInfo,FfiConverterTypeEcdsaSignatureBytes,FfiConverterTypeExternalAggregateFrostRequest,FfiConverterTypeExternalEncryptedSecret,FfiConverterTypeExternalFrostCommitments,FfiConverterTypeExternalFrostSignature,FfiConverterTypeExternalFrostSignatureShare,FfiConverterTypeExternalIdentifier,FfiConverterTypeExternalInputParser,FfiConverterTypeExternalScalar,FfiConverterTypeExternalSecretShare,FfiConverterTypeExternalSecretSource,FfiConverterTypeExternalSecretToSplit,FfiConverterTypeExternalSignFrostRequest,FfiConverterTypeExternalSigner,FfiConverterTypeExternalSigningCommitments,FfiConverterTypeExternalTreeNodeId,FfiConverterTypeExternalVerifiableSecretShare,FfiConverterTypeFee,FfiConverterTypeFeePolicy,FfiConverterTypeFetchConversionLimitsRequest,FfiConverterTypeFetchConversionLimitsResponse,FfiConverterTypeFiatCurrency,FfiConverterTypeFiatService,FfiConverterTypeFreezeIssuerTokenRequest,FfiConverterTypeFreezeIssuerTokenResponse,FfiConverterTypeGetInfoRequest,FfiConverterTypeGetInfoResponse,FfiConverterTypeGetPaymentRequest,FfiConverterTypeGetPaymentResponse,FfiConverterTypeGetTokensMetadataRequest,FfiConverterTypeGetTokensMetadataResponse,FfiConverterTypeHashedMessageBytes,FfiConverterTypeIdentifierCommitmentPair,FfiConverterTypeIdentifierPublicKeyPair,FfiConverterTypeIdentifierSignaturePair,FfiConverterTypeIncomingChange,FfiConverterTypeInputType,FfiConverterTypeKeySetConfig,FfiConverterTypeKeySetType,FfiConverterTypeLightningAddressDetails,FfiConverterTypeLightningAddressInfo,FfiConverterTypeListFiatCurrenciesResponse,FfiConverterTypeListFiatRatesResponse,FfiConverterTypeListPaymentsRequest,FfiConverterTypeListPaymentsResponse,FfiConverterTypeListUnclaimedDepositsRequest,FfiConverterTypeListUnclaimedDepositsResponse,FfiConverterTypeLnurlAuthRequestDetails,FfiConverterTypeLnurlCallbackStatus,FfiConverterTypeLnurlErrorDetails,FfiConverterTypeLnurlInfo,FfiConverterTypeLnurlPayInfo,FfiConverterTypeLnurlPayRequest,FfiConverterTypeLnurlPayRequestDetails,FfiConverterTypeLnurlPayResponse,FfiConverterTypeLnurlReceiveMetadata,FfiConverterTypeLnurlWithdrawInfo,FfiConverterTypeLnurlWithdrawRequest,FfiConverterTypeLnurlWithdrawRequestDetails,FfiConverterTypeLnurlWithdrawResponse,FfiConverterTypeLocaleOverrides,FfiConverterTypeLocalizedName,FfiConverterTypeLogEntry,FfiConverterTypeMaxFee,FfiConverterTypeMessageBytes,FfiConverterTypeMessageSuccessActionData,FfiConverterTypeMintIssuerTokenRequest,FfiConverterTypeNetwork,FfiConverterTypeOnchainConfirmationSpeed,FfiConverterTypeOptimizationConfig,FfiConverterTypeOptimizationEvent,FfiConverterTypeOptimizationProgress,FfiConverterTypeOutgoingChange,FfiConverterTypePayment,FfiConverterTypePaymentDetails,FfiConverterTypePaymentDetailsFilter,FfiConverterTypePaymentMetadata,FfiConverterTypePaymentMethod,FfiConverterTypePaymentObserver,FfiConverterTypePaymentRequestSource,FfiConverterTypePaymentStatus,FfiConverterTypePaymentType,FfiConverterTypePrepareLnurlPayRequest,FfiConverterTypePrepareLnurlPayResponse,FfiConverterTypePrepareSendPaymentRequest,FfiConverterTypePrepareSendPaymentResponse,FfiConverterTypeProvisionalPayment,FfiConverterTypeProvisionalPaymentDetails,FfiConverterTypePublicKeyBytes,FfiConverterTypeRate,FfiConverterTypeReceivePaymentMethod,FfiConverterTypeReceivePaymentRequest,FfiConverterTypeReceivePaymentResponse,FfiConverterTypeRecommendedFees,FfiConverterTypeRecord,FfiConverterTypeRecordChange,FfiConverterTypeRecordId,FfiConverterTypeRecoverableEcdsaSignatureBytes,FfiConverterTypeRefundDepositRequest,FfiConverterTypeRefundDepositResponse,FfiConverterTypeRegisterLightningAddressRequest,FfiConverterTypeRestClient,FfiConverterTypeRestResponse,FfiConverterTypeSchnorrSignatureBytes,FfiConverterTypeSdkBuilder,FfiConverterTypeSdkEvent,FfiConverterTypeSecretBytes,FfiConverterTypeSeed,FfiConverterTypeSendOnchainFeeQuote,FfiConverterTypeSendOnchainSpeedFeeQuote,FfiConverterTypeSendPaymentMethod,FfiConverterTypeSendPaymentOptions,FfiConverterTypeSendPaymentRequest,FfiConverterTypeSendPaymentResponse,FfiConverterTypeServiceStatus,FfiConverterTypeSetLnurlMetadataItem,FfiConverterTypeSignMessageRequest,FfiConverterTypeSignMessageResponse,FfiConverterTypeSilentPaymentAddressDetails,FfiConverterTypeSparkAddressDetails,FfiConverterTypeSparkHtlcDetails,FfiConverterTypeSparkHtlcOptions,FfiConverterTypeSparkHtlcStatus,FfiConverterTypeSparkInvoiceDetails,FfiConverterTypeSparkInvoicePaymentDetails,FfiConverterTypeSparkStatus,FfiConverterTypeStableBalanceConfig,FfiConverterTypeStorage,FfiConverterTypeStorageListPaymentsRequest,FfiConverterTypeStoragePaymentDetailsFilter,FfiConverterTypeSuccessAction,FfiConverterTypeSuccessActionProcessed,FfiConverterTypeSymbol,FfiConverterTypeSyncWalletRequest,FfiConverterTypeSyncWalletResponse,FfiConverterTypeTokenBalance,FfiConverterTypeTokenIssuer,FfiConverterTypeTokenMetadata,FfiConverterTypeTokenTransactionType,FfiConverterTypeTxStatus,FfiConverterTypeUnfreezeIssuerTokenRequest,FfiConverterTypeUnfreezeIssuerTokenResponse,FfiConverterTypeUnversionedRecordChange,FfiConverterTypeUpdateDepositPayload,FfiConverterTypeUpdateUserSettingsRequest,FfiConverterTypeUrlSuccessActionData,FfiConverterTypeUserSettings,FfiConverterTypeUtxo,FfiConverterTypeu128}});
|
|
3330
|
+
const bindingsContractVersion=29;// Get the scaffolding contract version by calling the into the dylib
|
|
3331
|
+
const scaffoldingContractVersion=nativeModule().ubrn_ffi_breez_sdk_spark_uniffi_contract_version();if(bindingsContractVersion!==scaffoldingContractVersion){throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion,bindingsContractVersion);}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_connect()!==40345){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_connect');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_connect_with_signer()!==1399){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_connect_with_signer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_config()!==62194){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_default_config');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_default_external_signer()!==40694){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_default_external_signer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_get_spark_status()!==62888){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_get_spark_status');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_init_logging()!==8518){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_init_logging');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos()!==20959){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status()!==23018){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex()!==59376){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction()!==65179){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees()!==43230){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact()!==26497){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener()!==37737){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin()!==32150){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_optimization()!==56996){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_optimization');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available()!==31624){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message()!==4385){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit()!==43529){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment()!==57587){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact()!==15670){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address()!==44132){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect()!==330){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits()!==50958){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info()!==6771){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_leaf_optimization_progress()!==38008){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_leaf_optimization_progress');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address()!==36552){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment()!==11540){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer()!==26649){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata()!==40125){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings()!==38537){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts()!==2729){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies()!==63366){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates()!==5904){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments()!==39170){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits()!==22486){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth()!==125){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay()!==10147){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw()!==45652){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_parse()!==14285){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_parse');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay()!==37691){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment()!==34185){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment()!==36984){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees()!==16947){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit()!==33646){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address()!==530){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener()!==41066){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment()!==54349){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message()!==57563){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_start_leaf_optimization()!==22827){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_start_leaf_optimization');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet()!==30368){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact()!==21170){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings()!==1721){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key()!==62941){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_derive_public_key()!==23137){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_derive_public_key');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa()!==37648){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable()!==3107){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies()!==60224){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies()!==59601){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr()!==57220){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256()!==57517){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment()!==31862){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node()!==37434){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret()!==26114){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted()!==38925){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret()!==45280){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key()!==62519){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets()!==45969){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs()!==19489){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver()!==51627){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret()!==53055){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost()!==20635){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost()!==53544){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies()!==19092){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates()!==11512){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send()!==30686){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_restclient_get_request()!==8260){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_restclient_get_request');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_restclient_post_request()!==24889){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_restclient_post_request');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_restclient_delete_request()!==51072){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_restclient_delete_request');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build()!==8126){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service()!==2848){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_default_storage()!==14543){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_default_storage');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service()!==37854){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set()!==50052){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client()!==51060){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer()!==21617){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service()!==63155){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage()!==59400){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item()!==6883){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_cached_item()!==30248){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_cached_item');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item()!==7970){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_payments()!==51078){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_list_payments');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment()!==28075){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_payment');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata()!==32757){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id()!==35394){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice()!==57075){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids()!==10948){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit()!==13181){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_add_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit()!==28477){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_deposits()!==62636){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_list_deposits');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_deposit()!==18714){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_update_deposit');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata()!==64210){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_contacts()!==10490){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_list_contacts');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_contact()!==19980){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_contact');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_contact()!==38342){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_contact');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_contact()!==50274){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_contact');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change()!==1304){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync()!==7860){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes()!==30862){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision()!==6931){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records()!==59522){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record()!==19643){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records()!==28540){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change()!==41369){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming()!==18793){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token()!==56056){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token()!==33277){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token()!==32344){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance()!==9758){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata()!==57707){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token()!==36459){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token()!==65025){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new()!==65435){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event()!==24807){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event');}if(nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log()!==11839){throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_logger_log');}uniffiCallbackInterfaceEventListener.register();uniffiCallbackInterfaceLogger.register();uniffiCallbackInterfaceBitcoinChainService.register();uniffiCallbackInterfaceExternalSigner.register();uniffiCallbackInterfaceFiatService.register();uniffiCallbackInterfacePaymentObserver.register();uniffiCallbackInterfaceRestClient.register();uniffiCallbackInterfaceStorage.register();}export default Object.freeze({initialize:uniffiEnsureInitialized,converters:{FfiConverterTypeAddContactRequest,FfiConverterTypeAesSuccessActionData,FfiConverterTypeAesSuccessActionDataDecrypted,FfiConverterTypeAesSuccessActionDataResult,FfiConverterTypeAmount,FfiConverterTypeAssetFilter,FfiConverterTypeBip21Details,FfiConverterTypeBip21Extra,FfiConverterTypeBitcoinAddressDetails,FfiConverterTypeBitcoinChainService,FfiConverterTypeBitcoinNetwork,FfiConverterTypeBolt11Invoice,FfiConverterTypeBolt11InvoiceDetails,FfiConverterTypeBolt11RouteHint,FfiConverterTypeBolt11RouteHintHop,FfiConverterTypeBolt12Invoice,FfiConverterTypeBolt12InvoiceDetails,FfiConverterTypeBolt12InvoiceRequestDetails,FfiConverterTypeBolt12Offer,FfiConverterTypeBolt12OfferBlindedPath,FfiConverterTypeBolt12OfferDetails,FfiConverterTypeBreezSdk,FfiConverterTypeBurnIssuerTokenRequest,FfiConverterTypeBuyBitcoinRequest,FfiConverterTypeBuyBitcoinResponse,FfiConverterTypeChainApiType,FfiConverterTypeChainServiceError,FfiConverterTypeCheckLightningAddressRequest,FfiConverterTypeCheckMessageRequest,FfiConverterTypeCheckMessageResponse,FfiConverterTypeClaimDepositRequest,FfiConverterTypeClaimDepositResponse,FfiConverterTypeClaimHtlcPaymentRequest,FfiConverterTypeClaimHtlcPaymentResponse,FfiConverterTypeConfig,FfiConverterTypeConnectRequest,FfiConverterTypeConnectWithSignerRequest,FfiConverterTypeContact,FfiConverterTypeConversionDetails,FfiConverterTypeConversionEstimate,FfiConverterTypeConversionInfo,FfiConverterTypeConversionOptions,FfiConverterTypeConversionPurpose,FfiConverterTypeConversionStatus,FfiConverterTypeConversionStep,FfiConverterTypeConversionType,FfiConverterTypeCreateIssuerTokenRequest,FfiConverterTypeCredentials,FfiConverterTypeCurrencyInfo,FfiConverterTypeDepositClaimError,FfiConverterTypeDepositInfo,FfiConverterTypeEcdsaSignatureBytes,FfiConverterTypeExternalAggregateFrostRequest,FfiConverterTypeExternalEncryptedSecret,FfiConverterTypeExternalFrostCommitments,FfiConverterTypeExternalFrostSignature,FfiConverterTypeExternalFrostSignatureShare,FfiConverterTypeExternalIdentifier,FfiConverterTypeExternalInputParser,FfiConverterTypeExternalScalar,FfiConverterTypeExternalSecretShare,FfiConverterTypeExternalSecretSource,FfiConverterTypeExternalSecretToSplit,FfiConverterTypeExternalSignFrostRequest,FfiConverterTypeExternalSigner,FfiConverterTypeExternalSigningCommitments,FfiConverterTypeExternalTreeNodeId,FfiConverterTypeExternalVerifiableSecretShare,FfiConverterTypeFee,FfiConverterTypeFeePolicy,FfiConverterTypeFetchConversionLimitsRequest,FfiConverterTypeFetchConversionLimitsResponse,FfiConverterTypeFiatCurrency,FfiConverterTypeFiatService,FfiConverterTypeFreezeIssuerTokenRequest,FfiConverterTypeFreezeIssuerTokenResponse,FfiConverterTypeGetInfoRequest,FfiConverterTypeGetInfoResponse,FfiConverterTypeGetPaymentRequest,FfiConverterTypeGetPaymentResponse,FfiConverterTypeGetTokensMetadataRequest,FfiConverterTypeGetTokensMetadataResponse,FfiConverterTypeHashedMessageBytes,FfiConverterTypeIdentifierCommitmentPair,FfiConverterTypeIdentifierPublicKeyPair,FfiConverterTypeIdentifierSignaturePair,FfiConverterTypeIncomingChange,FfiConverterTypeInputType,FfiConverterTypeKeySetConfig,FfiConverterTypeKeySetType,FfiConverterTypeLightningAddressDetails,FfiConverterTypeLightningAddressInfo,FfiConverterTypeListContactsRequest,FfiConverterTypeListFiatCurrenciesResponse,FfiConverterTypeListFiatRatesResponse,FfiConverterTypeListPaymentsRequest,FfiConverterTypeListPaymentsResponse,FfiConverterTypeListUnclaimedDepositsRequest,FfiConverterTypeListUnclaimedDepositsResponse,FfiConverterTypeLnurlAuthRequestDetails,FfiConverterTypeLnurlCallbackStatus,FfiConverterTypeLnurlErrorDetails,FfiConverterTypeLnurlInfo,FfiConverterTypeLnurlPayInfo,FfiConverterTypeLnurlPayRequest,FfiConverterTypeLnurlPayRequestDetails,FfiConverterTypeLnurlPayResponse,FfiConverterTypeLnurlReceiveMetadata,FfiConverterTypeLnurlWithdrawInfo,FfiConverterTypeLnurlWithdrawRequest,FfiConverterTypeLnurlWithdrawRequestDetails,FfiConverterTypeLnurlWithdrawResponse,FfiConverterTypeLocaleOverrides,FfiConverterTypeLocalizedName,FfiConverterTypeLogEntry,FfiConverterTypeMaxFee,FfiConverterTypeMessageBytes,FfiConverterTypeMessageSuccessActionData,FfiConverterTypeMintIssuerTokenRequest,FfiConverterTypeNetwork,FfiConverterTypeOnchainConfirmationSpeed,FfiConverterTypeOptimizationConfig,FfiConverterTypeOptimizationEvent,FfiConverterTypeOptimizationProgress,FfiConverterTypeOutgoingChange,FfiConverterTypePayment,FfiConverterTypePaymentDetails,FfiConverterTypePaymentDetailsFilter,FfiConverterTypePaymentMetadata,FfiConverterTypePaymentMethod,FfiConverterTypePaymentObserver,FfiConverterTypePaymentObserverError,FfiConverterTypePaymentRequestSource,FfiConverterTypePaymentStatus,FfiConverterTypePaymentType,FfiConverterTypePrepareLnurlPayRequest,FfiConverterTypePrepareLnurlPayResponse,FfiConverterTypePrepareSendPaymentRequest,FfiConverterTypePrepareSendPaymentResponse,FfiConverterTypeProvisionalPayment,FfiConverterTypeProvisionalPaymentDetails,FfiConverterTypePublicKeyBytes,FfiConverterTypeRate,FfiConverterTypeReceivePaymentMethod,FfiConverterTypeReceivePaymentRequest,FfiConverterTypeReceivePaymentResponse,FfiConverterTypeRecommendedFees,FfiConverterTypeRecord,FfiConverterTypeRecordChange,FfiConverterTypeRecordId,FfiConverterTypeRecoverableEcdsaSignatureBytes,FfiConverterTypeRefundDepositRequest,FfiConverterTypeRefundDepositResponse,FfiConverterTypeRegisterLightningAddressRequest,FfiConverterTypeRestClient,FfiConverterTypeRestResponse,FfiConverterTypeSchnorrSignatureBytes,FfiConverterTypeSdkBuilder,FfiConverterTypeSdkError,FfiConverterTypeSdkEvent,FfiConverterTypeSecretBytes,FfiConverterTypeSeed,FfiConverterTypeSendOnchainFeeQuote,FfiConverterTypeSendOnchainSpeedFeeQuote,FfiConverterTypeSendPaymentMethod,FfiConverterTypeSendPaymentOptions,FfiConverterTypeSendPaymentRequest,FfiConverterTypeSendPaymentResponse,FfiConverterTypeServiceConnectivityError,FfiConverterTypeServiceStatus,FfiConverterTypeSetLnurlMetadataItem,FfiConverterTypeSignMessageRequest,FfiConverterTypeSignMessageResponse,FfiConverterTypeSignerError,FfiConverterTypeSilentPaymentAddressDetails,FfiConverterTypeSparkAddressDetails,FfiConverterTypeSparkHtlcDetails,FfiConverterTypeSparkHtlcOptions,FfiConverterTypeSparkHtlcStatus,FfiConverterTypeSparkInvoiceDetails,FfiConverterTypeSparkInvoicePaymentDetails,FfiConverterTypeSparkStatus,FfiConverterTypeStableBalanceConfig,FfiConverterTypeStorage,FfiConverterTypeStorageError,FfiConverterTypeStorageListPaymentsRequest,FfiConverterTypeStoragePaymentDetailsFilter,FfiConverterTypeSuccessAction,FfiConverterTypeSuccessActionProcessed,FfiConverterTypeSymbol,FfiConverterTypeSyncWalletRequest,FfiConverterTypeSyncWalletResponse,FfiConverterTypeTokenBalance,FfiConverterTypeTokenIssuer,FfiConverterTypeTokenMetadata,FfiConverterTypeTokenTransactionType,FfiConverterTypeTxStatus,FfiConverterTypeUnfreezeIssuerTokenRequest,FfiConverterTypeUnfreezeIssuerTokenResponse,FfiConverterTypeUnversionedRecordChange,FfiConverterTypeUpdateContactRequest,FfiConverterTypeUpdateDepositPayload,FfiConverterTypeUpdateUserSettingsRequest,FfiConverterTypeUrlSuccessActionData,FfiConverterTypeUserSettings,FfiConverterTypeUtxo,FfiConverterTypeu128}});
|
|
3227
3332
|
//# sourceMappingURL=breez_sdk_spark.js.map
|