@breeztech/breez-sdk-spark-react-native 0.13.11-dev1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/generated/breez_sdk_spark.cpp +1244 -100
- package/cpp/generated/breez_sdk_spark.hpp +88 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +152 -3
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +151 -2
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +33 -0
- 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 +390 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +33 -0
- 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 +390 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/generated/breez_sdk_spark-ffi.ts +100 -0
- package/src/generated/breez_sdk_spark.ts +1112 -0
|
@@ -37,6 +37,7 @@ import nativeModule, {
|
|
|
37
37
|
type UniffiVTableCallbackInterfacePasskeyPrfProvider,
|
|
38
38
|
type UniffiVTableCallbackInterfacePaymentObserver,
|
|
39
39
|
type UniffiVTableCallbackInterfaceRestClient,
|
|
40
|
+
type UniffiVTableCallbackInterfaceSessionManager,
|
|
40
41
|
type UniffiVTableCallbackInterfaceStorage,
|
|
41
42
|
} from './breez_sdk_spark-ffi';
|
|
42
43
|
import {
|
|
@@ -305,6 +306,103 @@ export function initLogging(
|
|
|
305
306
|
/*liftString:*/ FfiConverterString.lift
|
|
306
307
|
);
|
|
307
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* Creates a new shareable [`ConnectionManager`].
|
|
311
|
+
*
|
|
312
|
+
* `connections_per_operator` controls per-operator connection pooling:
|
|
313
|
+
* `None` keeps a single connection per operator (suitable for almost every
|
|
314
|
+
* deployment); `Some(n)` opens `n` connections per operator and balances
|
|
315
|
+
* requests across them.
|
|
316
|
+
*/
|
|
317
|
+
export function newConnectionManager(
|
|
318
|
+
connectionsPerOperator: /*u32*/ number | undefined
|
|
319
|
+
): ConnectionManagerInterface {
|
|
320
|
+
return FfiConverterTypeConnectionManager.lift(
|
|
321
|
+
uniffiCaller.rustCall(
|
|
322
|
+
/*caller:*/ (callStatus) => {
|
|
323
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_func_new_connection_manager(
|
|
324
|
+
FfiConverterOptionalUInt32.lower(connectionsPerOperator),
|
|
325
|
+
callStatus
|
|
326
|
+
);
|
|
327
|
+
},
|
|
328
|
+
/*liftString:*/ FfiConverterString.lift
|
|
329
|
+
)
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Constructs a shareable REST-based [`BitcoinChainService`].
|
|
334
|
+
*
|
|
335
|
+
* Pass the returned `Arc` to multiple [`SdkBuilder`](crate::SdkBuilder)s via
|
|
336
|
+
* [`SdkBuilder::with_chain_service`](crate::SdkBuilder::with_chain_service)
|
|
337
|
+
* to reuse a single underlying HTTP client (and its connection pool) across
|
|
338
|
+
* SDK instances. All SDKs sharing the service must use the same `network`.
|
|
339
|
+
*
|
|
340
|
+
* For one-off, non-shared use, prefer
|
|
341
|
+
* [`SdkBuilder::with_rest_chain_service`](crate::SdkBuilder::with_rest_chain_service).
|
|
342
|
+
*/
|
|
343
|
+
export async function newRestChainService(
|
|
344
|
+
url: string,
|
|
345
|
+
network: Network,
|
|
346
|
+
apiType: ChainApiType,
|
|
347
|
+
credentials: Credentials | undefined,
|
|
348
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
349
|
+
): Promise<BitcoinChainService> {
|
|
350
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
351
|
+
try {
|
|
352
|
+
return await uniffiRustCallAsync(
|
|
353
|
+
/*rustCaller:*/ uniffiCaller,
|
|
354
|
+
/*rustFutureFunc:*/ () => {
|
|
355
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_func_new_rest_chain_service(
|
|
356
|
+
FfiConverterString.lower(url),
|
|
357
|
+
FfiConverterTypeNetwork.lower(network),
|
|
358
|
+
FfiConverterTypeChainApiType.lower(apiType),
|
|
359
|
+
FfiConverterOptionalTypeCredentials.lower(credentials)
|
|
360
|
+
);
|
|
361
|
+
},
|
|
362
|
+
/*pollFunc:*/ nativeModule()
|
|
363
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_pointer,
|
|
364
|
+
/*cancelFunc:*/ nativeModule()
|
|
365
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_pointer,
|
|
366
|
+
/*completeFunc:*/ nativeModule()
|
|
367
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_pointer,
|
|
368
|
+
/*freeFunc:*/ nativeModule()
|
|
369
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_pointer,
|
|
370
|
+
/*liftFunc:*/ FfiConverterTypeBitcoinChainService.lift.bind(
|
|
371
|
+
FfiConverterTypeBitcoinChainService
|
|
372
|
+
),
|
|
373
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
374
|
+
/*asyncOpts:*/ asyncOpts_
|
|
375
|
+
);
|
|
376
|
+
} catch (__error: any) {
|
|
377
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
378
|
+
__error.stack = __stack;
|
|
379
|
+
}
|
|
380
|
+
throw __error;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Construct a new shared SSP connection manager.
|
|
385
|
+
*
|
|
386
|
+
* Pass the returned `Arc<SspConnectionManager>` to
|
|
387
|
+
* [`SdkBuilder::with_ssp_connection_manager`](crate::SdkBuilder::with_ssp_connection_manager)
|
|
388
|
+
* when building each SDK instance that should share the underlying HTTP
|
|
389
|
+
* connection pool.
|
|
390
|
+
*/
|
|
391
|
+
export function newSspConnectionManager(
|
|
392
|
+
userAgent: string | undefined
|
|
393
|
+
): SspConnectionManagerInterface {
|
|
394
|
+
return FfiConverterTypeSspConnectionManager.lift(
|
|
395
|
+
uniffiCaller.rustCall(
|
|
396
|
+
/*caller:*/ (callStatus) => {
|
|
397
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_func_new_ssp_connection_manager(
|
|
398
|
+
FfiConverterOptionalString.lower(userAgent),
|
|
399
|
+
callStatus
|
|
400
|
+
);
|
|
401
|
+
},
|
|
402
|
+
/*liftString:*/ FfiConverterString.lift
|
|
403
|
+
)
|
|
404
|
+
);
|
|
405
|
+
}
|
|
308
406
|
|
|
309
407
|
/**
|
|
310
408
|
* Trait for event listeners
|
|
@@ -9358,6 +9456,65 @@ const FfiConverterTypeSendPaymentResponse = (() => {
|
|
|
9358
9456
|
return new FFIConverter();
|
|
9359
9457
|
})();
|
|
9360
9458
|
|
|
9459
|
+
/**
|
|
9460
|
+
* Cached authentication session for a single backend service identity.
|
|
9461
|
+
*/
|
|
9462
|
+
export type Session = {
|
|
9463
|
+
token: string;
|
|
9464
|
+
expiration: /*u64*/ bigint;
|
|
9465
|
+
};
|
|
9466
|
+
|
|
9467
|
+
/**
|
|
9468
|
+
* Generated factory for {@link Session} record objects.
|
|
9469
|
+
*/
|
|
9470
|
+
export const Session = (() => {
|
|
9471
|
+
const defaults = () => ({});
|
|
9472
|
+
const create = (() => {
|
|
9473
|
+
return uniffiCreateRecord<Session, ReturnType<typeof defaults>>(defaults);
|
|
9474
|
+
})();
|
|
9475
|
+
return Object.freeze({
|
|
9476
|
+
/**
|
|
9477
|
+
* Create a frozen instance of {@link Session}, with defaults specified
|
|
9478
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
9479
|
+
*/
|
|
9480
|
+
create,
|
|
9481
|
+
|
|
9482
|
+
/**
|
|
9483
|
+
* Create a frozen instance of {@link Session}, with defaults specified
|
|
9484
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
9485
|
+
*/
|
|
9486
|
+
new: create,
|
|
9487
|
+
|
|
9488
|
+
/**
|
|
9489
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
9490
|
+
*/
|
|
9491
|
+
defaults: () => Object.freeze(defaults()) as Partial<Session>,
|
|
9492
|
+
});
|
|
9493
|
+
})();
|
|
9494
|
+
|
|
9495
|
+
const FfiConverterTypeSession = (() => {
|
|
9496
|
+
type TypeName = Session;
|
|
9497
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
9498
|
+
read(from: RustBuffer): TypeName {
|
|
9499
|
+
return {
|
|
9500
|
+
token: FfiConverterString.read(from),
|
|
9501
|
+
expiration: FfiConverterUInt64.read(from),
|
|
9502
|
+
};
|
|
9503
|
+
}
|
|
9504
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
9505
|
+
FfiConverterString.write(value.token, into);
|
|
9506
|
+
FfiConverterUInt64.write(value.expiration, into);
|
|
9507
|
+
}
|
|
9508
|
+
allocationSize(value: TypeName): number {
|
|
9509
|
+
return (
|
|
9510
|
+
FfiConverterString.allocationSize(value.token) +
|
|
9511
|
+
FfiConverterUInt64.allocationSize(value.expiration)
|
|
9512
|
+
);
|
|
9513
|
+
}
|
|
9514
|
+
}
|
|
9515
|
+
return new FFIConverter();
|
|
9516
|
+
})();
|
|
9517
|
+
|
|
9361
9518
|
export type SetLnurlMetadataItem = {
|
|
9362
9519
|
paymentHash: string;
|
|
9363
9520
|
senderComment: string | undefined;
|
|
@@ -11728,6 +11885,14 @@ const stringConverter = {
|
|
|
11728
11885
|
};
|
|
11729
11886
|
const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
|
|
11730
11887
|
|
|
11888
|
+
/**
|
|
11889
|
+
* Typealias from the type name used in the UDL file to the builtin type. This
|
|
11890
|
+
* is needed because the UDL type name is used in function/method signatures.
|
|
11891
|
+
*/
|
|
11892
|
+
export type PublicKey = string;
|
|
11893
|
+
// FfiConverter for PublicKey, a type alias for string.
|
|
11894
|
+
const FfiConverterTypePublicKey = FfiConverterString;
|
|
11895
|
+
|
|
11731
11896
|
/**
|
|
11732
11897
|
* Typealias from the type name used in the UDL file to the custom type. This
|
|
11733
11898
|
* is needed because the UDL type name is used in function/method signatures.
|
|
@@ -20528,6 +20693,146 @@ const FfiConverterTypeServiceStatus = (() => {
|
|
|
20528
20693
|
return new FFIConverter();
|
|
20529
20694
|
})();
|
|
20530
20695
|
|
|
20696
|
+
// Error type: SessionManagerError
|
|
20697
|
+
|
|
20698
|
+
// Enum: SessionManagerError
|
|
20699
|
+
export enum SessionManagerError_Tags {
|
|
20700
|
+
NotFound = 'NotFound',
|
|
20701
|
+
Generic = 'Generic',
|
|
20702
|
+
}
|
|
20703
|
+
export const SessionManagerError = (() => {
|
|
20704
|
+
type NotFound__interface = {
|
|
20705
|
+
tag: SessionManagerError_Tags.NotFound;
|
|
20706
|
+
};
|
|
20707
|
+
|
|
20708
|
+
class NotFound_ extends UniffiError implements NotFound__interface {
|
|
20709
|
+
/**
|
|
20710
|
+
* @private
|
|
20711
|
+
* This field is private and should not be used, use `tag` instead.
|
|
20712
|
+
*/
|
|
20713
|
+
readonly [uniffiTypeNameSymbol] = 'SessionManagerError';
|
|
20714
|
+
readonly tag = SessionManagerError_Tags.NotFound;
|
|
20715
|
+
constructor() {
|
|
20716
|
+
super('SessionManagerError', 'NotFound');
|
|
20717
|
+
}
|
|
20718
|
+
|
|
20719
|
+
static new(): NotFound_ {
|
|
20720
|
+
return new NotFound_();
|
|
20721
|
+
}
|
|
20722
|
+
|
|
20723
|
+
static instanceOf(obj: any): obj is NotFound_ {
|
|
20724
|
+
return obj.tag === SessionManagerError_Tags.NotFound;
|
|
20725
|
+
}
|
|
20726
|
+
|
|
20727
|
+
static hasInner(obj: any): obj is NotFound_ {
|
|
20728
|
+
return false;
|
|
20729
|
+
}
|
|
20730
|
+
}
|
|
20731
|
+
|
|
20732
|
+
type Generic__interface = {
|
|
20733
|
+
tag: SessionManagerError_Tags.Generic;
|
|
20734
|
+
inner: Readonly<[string]>;
|
|
20735
|
+
};
|
|
20736
|
+
|
|
20737
|
+
class Generic_ extends UniffiError implements Generic__interface {
|
|
20738
|
+
/**
|
|
20739
|
+
* @private
|
|
20740
|
+
* This field is private and should not be used, use `tag` instead.
|
|
20741
|
+
*/
|
|
20742
|
+
readonly [uniffiTypeNameSymbol] = 'SessionManagerError';
|
|
20743
|
+
readonly tag = SessionManagerError_Tags.Generic;
|
|
20744
|
+
readonly inner: Readonly<[string]>;
|
|
20745
|
+
constructor(v0: string) {
|
|
20746
|
+
super('SessionManagerError', 'Generic');
|
|
20747
|
+
this.inner = Object.freeze([v0]);
|
|
20748
|
+
}
|
|
20749
|
+
|
|
20750
|
+
static new(v0: string): Generic_ {
|
|
20751
|
+
return new Generic_(v0);
|
|
20752
|
+
}
|
|
20753
|
+
|
|
20754
|
+
static instanceOf(obj: any): obj is Generic_ {
|
|
20755
|
+
return obj.tag === SessionManagerError_Tags.Generic;
|
|
20756
|
+
}
|
|
20757
|
+
|
|
20758
|
+
static hasInner(obj: any): obj is Generic_ {
|
|
20759
|
+
return Generic_.instanceOf(obj);
|
|
20760
|
+
}
|
|
20761
|
+
|
|
20762
|
+
static getInner(obj: Generic_): Readonly<[string]> {
|
|
20763
|
+
return obj.inner;
|
|
20764
|
+
}
|
|
20765
|
+
}
|
|
20766
|
+
|
|
20767
|
+
function instanceOf(obj: any): obj is SessionManagerError {
|
|
20768
|
+
return obj[uniffiTypeNameSymbol] === 'SessionManagerError';
|
|
20769
|
+
}
|
|
20770
|
+
|
|
20771
|
+
return Object.freeze({
|
|
20772
|
+
instanceOf,
|
|
20773
|
+
NotFound: NotFound_,
|
|
20774
|
+
Generic: Generic_,
|
|
20775
|
+
});
|
|
20776
|
+
})();
|
|
20777
|
+
|
|
20778
|
+
export type SessionManagerError = InstanceType<
|
|
20779
|
+
(typeof SessionManagerError)[keyof Omit<
|
|
20780
|
+
typeof SessionManagerError,
|
|
20781
|
+
'instanceOf'
|
|
20782
|
+
>]
|
|
20783
|
+
>;
|
|
20784
|
+
|
|
20785
|
+
// FfiConverter for enum SessionManagerError
|
|
20786
|
+
const FfiConverterTypeSessionManagerError = (() => {
|
|
20787
|
+
const ordinalConverter = FfiConverterInt32;
|
|
20788
|
+
type TypeName = SessionManagerError;
|
|
20789
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
20790
|
+
read(from: RustBuffer): TypeName {
|
|
20791
|
+
switch (ordinalConverter.read(from)) {
|
|
20792
|
+
case 1:
|
|
20793
|
+
return new SessionManagerError.NotFound();
|
|
20794
|
+
case 2:
|
|
20795
|
+
return new SessionManagerError.Generic(FfiConverterString.read(from));
|
|
20796
|
+
default:
|
|
20797
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
20798
|
+
}
|
|
20799
|
+
}
|
|
20800
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
20801
|
+
switch (value.tag) {
|
|
20802
|
+
case SessionManagerError_Tags.NotFound: {
|
|
20803
|
+
ordinalConverter.write(1, into);
|
|
20804
|
+
return;
|
|
20805
|
+
}
|
|
20806
|
+
case SessionManagerError_Tags.Generic: {
|
|
20807
|
+
ordinalConverter.write(2, into);
|
|
20808
|
+
const inner = value.inner;
|
|
20809
|
+
FfiConverterString.write(inner[0], into);
|
|
20810
|
+
return;
|
|
20811
|
+
}
|
|
20812
|
+
default:
|
|
20813
|
+
// Throwing from here means that SessionManagerError_Tags hasn't matched an ordinal.
|
|
20814
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
20815
|
+
}
|
|
20816
|
+
}
|
|
20817
|
+
allocationSize(value: TypeName): number {
|
|
20818
|
+
switch (value.tag) {
|
|
20819
|
+
case SessionManagerError_Tags.NotFound: {
|
|
20820
|
+
return ordinalConverter.allocationSize(1);
|
|
20821
|
+
}
|
|
20822
|
+
case SessionManagerError_Tags.Generic: {
|
|
20823
|
+
const inner = value.inner;
|
|
20824
|
+
let size = ordinalConverter.allocationSize(2);
|
|
20825
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
20826
|
+
return size;
|
|
20827
|
+
}
|
|
20828
|
+
default:
|
|
20829
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
20830
|
+
}
|
|
20831
|
+
}
|
|
20832
|
+
}
|
|
20833
|
+
return new FFIConverter();
|
|
20834
|
+
})();
|
|
20835
|
+
|
|
20531
20836
|
// Error type: SignerError
|
|
20532
20837
|
|
|
20533
20838
|
// Enum: SignerError
|
|
@@ -25483,6 +25788,136 @@ const FfiConverterTypeBreezSdk = new FfiConverterObject(
|
|
|
25483
25788
|
uniffiTypeBreezSdkObjectFactory
|
|
25484
25789
|
);
|
|
25485
25790
|
|
|
25791
|
+
/**
|
|
25792
|
+
* A shareable manager for gRPC connections to the Spark operators.
|
|
25793
|
+
*
|
|
25794
|
+
* Construct one via [`new_connection_manager`] and pass the same `Arc` to
|
|
25795
|
+
* multiple [`SdkBuilder`](crate::SdkBuilder)s via
|
|
25796
|
+
* [`SdkBuilder::with_connection_manager`](crate::SdkBuilder::with_connection_manager).
|
|
25797
|
+
* Connections close when the last `Arc<ConnectionManager>` is dropped;
|
|
25798
|
+
* [`BreezSdk::disconnect`](crate::BreezSdk::disconnect) does not affect them.
|
|
25799
|
+
*
|
|
25800
|
+
* All SDK instances sharing a `ConnectionManager` must be configured for the
|
|
25801
|
+
* same network and operator pool. The TLS settings and user agent of the
|
|
25802
|
+
* first SDK to connect to a given operator are reused for everyone afterwards.
|
|
25803
|
+
*/
|
|
25804
|
+
export interface ConnectionManagerInterface {}
|
|
25805
|
+
|
|
25806
|
+
/**
|
|
25807
|
+
* A shareable manager for gRPC connections to the Spark operators.
|
|
25808
|
+
*
|
|
25809
|
+
* Construct one via [`new_connection_manager`] and pass the same `Arc` to
|
|
25810
|
+
* multiple [`SdkBuilder`](crate::SdkBuilder)s via
|
|
25811
|
+
* [`SdkBuilder::with_connection_manager`](crate::SdkBuilder::with_connection_manager).
|
|
25812
|
+
* Connections close when the last `Arc<ConnectionManager>` is dropped;
|
|
25813
|
+
* [`BreezSdk::disconnect`](crate::BreezSdk::disconnect) does not affect them.
|
|
25814
|
+
*
|
|
25815
|
+
* All SDK instances sharing a `ConnectionManager` must be configured for the
|
|
25816
|
+
* same network and operator pool. The TLS settings and user agent of the
|
|
25817
|
+
* first SDK to connect to a given operator are reused for everyone afterwards.
|
|
25818
|
+
*/
|
|
25819
|
+
export class ConnectionManager
|
|
25820
|
+
extends UniffiAbstractObject
|
|
25821
|
+
implements ConnectionManagerInterface
|
|
25822
|
+
{
|
|
25823
|
+
readonly [uniffiTypeNameSymbol] = 'ConnectionManager';
|
|
25824
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
25825
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
25826
|
+
// No primary constructor declared for this class.
|
|
25827
|
+
private constructor(pointer: UnsafeMutableRawPointer) {
|
|
25828
|
+
super();
|
|
25829
|
+
this[pointerLiteralSymbol] = pointer;
|
|
25830
|
+
this[destructorGuardSymbol] =
|
|
25831
|
+
uniffiTypeConnectionManagerObjectFactory.bless(pointer);
|
|
25832
|
+
}
|
|
25833
|
+
|
|
25834
|
+
/**
|
|
25835
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
25836
|
+
*/
|
|
25837
|
+
uniffiDestroy(): void {
|
|
25838
|
+
const ptr = (this as any)[destructorGuardSymbol];
|
|
25839
|
+
if (ptr !== undefined) {
|
|
25840
|
+
const pointer = uniffiTypeConnectionManagerObjectFactory.pointer(this);
|
|
25841
|
+
uniffiTypeConnectionManagerObjectFactory.freePointer(pointer);
|
|
25842
|
+
uniffiTypeConnectionManagerObjectFactory.unbless(ptr);
|
|
25843
|
+
delete (this as any)[destructorGuardSymbol];
|
|
25844
|
+
}
|
|
25845
|
+
}
|
|
25846
|
+
|
|
25847
|
+
static instanceOf(obj: any): obj is ConnectionManager {
|
|
25848
|
+
return uniffiTypeConnectionManagerObjectFactory.isConcreteType(obj);
|
|
25849
|
+
}
|
|
25850
|
+
}
|
|
25851
|
+
|
|
25852
|
+
const uniffiTypeConnectionManagerObjectFactory: UniffiObjectFactory<ConnectionManagerInterface> =
|
|
25853
|
+
(() => {
|
|
25854
|
+
return {
|
|
25855
|
+
create(pointer: UnsafeMutableRawPointer): ConnectionManagerInterface {
|
|
25856
|
+
const instance = Object.create(ConnectionManager.prototype);
|
|
25857
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
25858
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
25859
|
+
instance[uniffiTypeNameSymbol] = 'ConnectionManager';
|
|
25860
|
+
return instance;
|
|
25861
|
+
},
|
|
25862
|
+
|
|
25863
|
+
bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
|
|
25864
|
+
return uniffiCaller.rustCall(
|
|
25865
|
+
/*caller:*/ (status) =>
|
|
25866
|
+
nativeModule().ubrn_uniffi_internal_fn_method_connectionmanager_ffi__bless_pointer(
|
|
25867
|
+
p,
|
|
25868
|
+
status
|
|
25869
|
+
),
|
|
25870
|
+
/*liftString:*/ FfiConverterString.lift
|
|
25871
|
+
);
|
|
25872
|
+
},
|
|
25873
|
+
|
|
25874
|
+
unbless(ptr: UniffiRustArcPtr) {
|
|
25875
|
+
ptr.markDestroyed();
|
|
25876
|
+
},
|
|
25877
|
+
|
|
25878
|
+
pointer(obj: ConnectionManagerInterface): UnsafeMutableRawPointer {
|
|
25879
|
+
if ((obj as any)[destructorGuardSymbol] === undefined) {
|
|
25880
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
25881
|
+
}
|
|
25882
|
+
return (obj as any)[pointerLiteralSymbol];
|
|
25883
|
+
},
|
|
25884
|
+
|
|
25885
|
+
clonePointer(obj: ConnectionManagerInterface): UnsafeMutableRawPointer {
|
|
25886
|
+
const pointer = this.pointer(obj);
|
|
25887
|
+
return uniffiCaller.rustCall(
|
|
25888
|
+
/*caller:*/ (callStatus) =>
|
|
25889
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_connectionmanager(
|
|
25890
|
+
pointer,
|
|
25891
|
+
callStatus
|
|
25892
|
+
),
|
|
25893
|
+
/*liftString:*/ FfiConverterString.lift
|
|
25894
|
+
);
|
|
25895
|
+
},
|
|
25896
|
+
|
|
25897
|
+
freePointer(pointer: UnsafeMutableRawPointer): void {
|
|
25898
|
+
uniffiCaller.rustCall(
|
|
25899
|
+
/*caller:*/ (callStatus) =>
|
|
25900
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_connectionmanager(
|
|
25901
|
+
pointer,
|
|
25902
|
+
callStatus
|
|
25903
|
+
),
|
|
25904
|
+
/*liftString:*/ FfiConverterString.lift
|
|
25905
|
+
);
|
|
25906
|
+
},
|
|
25907
|
+
|
|
25908
|
+
isConcreteType(obj: any): obj is ConnectionManagerInterface {
|
|
25909
|
+
return (
|
|
25910
|
+
obj[destructorGuardSymbol] &&
|
|
25911
|
+
obj[uniffiTypeNameSymbol] === 'ConnectionManager'
|
|
25912
|
+
);
|
|
25913
|
+
},
|
|
25914
|
+
};
|
|
25915
|
+
})();
|
|
25916
|
+
// FfiConverter for ConnectionManagerInterface
|
|
25917
|
+
const FfiConverterTypeConnectionManager = new FfiConverterObject(
|
|
25918
|
+
uniffiTypeConnectionManagerObjectFactory
|
|
25919
|
+
);
|
|
25920
|
+
|
|
25486
25921
|
/**
|
|
25487
25922
|
* External signer trait that can be implemented by users and passed to the SDK.
|
|
25488
25923
|
*
|
|
@@ -29669,6 +30104,15 @@ export interface SdkBuilderInterface {
|
|
|
29669
30104
|
chainService: BitcoinChainService,
|
|
29670
30105
|
asyncOpts_?: { signal: AbortSignal }
|
|
29671
30106
|
): Promise<void>;
|
|
30107
|
+
/**
|
|
30108
|
+
* Sets a shared connection manager to be reused across SDK instances.
|
|
30109
|
+
* Arguments:
|
|
30110
|
+
* - `connection_manager`: The shared connection manager.
|
|
30111
|
+
*/
|
|
30112
|
+
withConnectionManager(
|
|
30113
|
+
connectionManager: ConnectionManagerInterface,
|
|
30114
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30115
|
+
): Promise<void>;
|
|
29672
30116
|
/**
|
|
29673
30117
|
* Sets the root storage directory to initialize the default storage with.
|
|
29674
30118
|
* This initializes both storage and real-time sync storage with the
|
|
@@ -29724,6 +30168,26 @@ export interface SdkBuilderInterface {
|
|
|
29724
30168
|
credentials: Credentials | undefined,
|
|
29725
30169
|
asyncOpts_?: { signal: AbortSignal }
|
|
29726
30170
|
): Promise<void>;
|
|
30171
|
+
/**
|
|
30172
|
+
* Sets a custom session manager used to persist authentication sessions.
|
|
30173
|
+
*
|
|
30174
|
+
* Provide a shared, persistent implementation (e.g. backed by `PostgreSQL`
|
|
30175
|
+
* or Redis) to let multiple SDK instances share authentication state and
|
|
30176
|
+
* bootstrap quickly. If not set, an in-memory session manager is used.
|
|
30177
|
+
*/
|
|
30178
|
+
withSessionManager(
|
|
30179
|
+
sessionManager: SessionManager,
|
|
30180
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30181
|
+
): Promise<void>;
|
|
30182
|
+
/**
|
|
30183
|
+
* Sets a shared SSP connection manager to be reused across SDK instances.
|
|
30184
|
+
* Arguments:
|
|
30185
|
+
* - `manager`: The shared SSP connection manager.
|
|
30186
|
+
*/
|
|
30187
|
+
withSspConnectionManager(
|
|
30188
|
+
manager: SspConnectionManagerInterface,
|
|
30189
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30190
|
+
): Promise<void>;
|
|
29727
30191
|
/**
|
|
29728
30192
|
* Sets the storage implementation to be used by the SDK.
|
|
29729
30193
|
* Arguments:
|
|
@@ -29847,6 +30311,45 @@ export class SdkBuilder
|
|
|
29847
30311
|
}
|
|
29848
30312
|
}
|
|
29849
30313
|
|
|
30314
|
+
/**
|
|
30315
|
+
* Sets a shared connection manager to be reused across SDK instances.
|
|
30316
|
+
* Arguments:
|
|
30317
|
+
* - `connection_manager`: The shared connection manager.
|
|
30318
|
+
*/
|
|
30319
|
+
public async withConnectionManager(
|
|
30320
|
+
connectionManager: ConnectionManagerInterface,
|
|
30321
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30322
|
+
): Promise<void> {
|
|
30323
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
30324
|
+
try {
|
|
30325
|
+
return await uniffiRustCallAsync(
|
|
30326
|
+
/*rustCaller:*/ uniffiCaller,
|
|
30327
|
+
/*rustFutureFunc:*/ () => {
|
|
30328
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_connection_manager(
|
|
30329
|
+
uniffiTypeSdkBuilderObjectFactory.clonePointer(this),
|
|
30330
|
+
FfiConverterTypeConnectionManager.lower(connectionManager)
|
|
30331
|
+
);
|
|
30332
|
+
},
|
|
30333
|
+
/*pollFunc:*/ nativeModule()
|
|
30334
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
|
|
30335
|
+
/*cancelFunc:*/ nativeModule()
|
|
30336
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
|
|
30337
|
+
/*completeFunc:*/ nativeModule()
|
|
30338
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
|
|
30339
|
+
/*freeFunc:*/ nativeModule()
|
|
30340
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_void,
|
|
30341
|
+
/*liftFunc:*/ (_v) => {},
|
|
30342
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
30343
|
+
/*asyncOpts:*/ asyncOpts_
|
|
30344
|
+
);
|
|
30345
|
+
} catch (__error: any) {
|
|
30346
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
30347
|
+
__error.stack = __stack;
|
|
30348
|
+
}
|
|
30349
|
+
throw __error;
|
|
30350
|
+
}
|
|
30351
|
+
}
|
|
30352
|
+
|
|
29850
30353
|
/**
|
|
29851
30354
|
* Sets the root storage directory to initialize the default storage with.
|
|
29852
30355
|
* This initializes both storage and real-time sync storage with the
|
|
@@ -30084,6 +30587,86 @@ export class SdkBuilder
|
|
|
30084
30587
|
}
|
|
30085
30588
|
}
|
|
30086
30589
|
|
|
30590
|
+
/**
|
|
30591
|
+
* Sets a custom session manager used to persist authentication sessions.
|
|
30592
|
+
*
|
|
30593
|
+
* Provide a shared, persistent implementation (e.g. backed by `PostgreSQL`
|
|
30594
|
+
* or Redis) to let multiple SDK instances share authentication state and
|
|
30595
|
+
* bootstrap quickly. If not set, an in-memory session manager is used.
|
|
30596
|
+
*/
|
|
30597
|
+
public async withSessionManager(
|
|
30598
|
+
sessionManager: SessionManager,
|
|
30599
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30600
|
+
): Promise<void> {
|
|
30601
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
30602
|
+
try {
|
|
30603
|
+
return await uniffiRustCallAsync(
|
|
30604
|
+
/*rustCaller:*/ uniffiCaller,
|
|
30605
|
+
/*rustFutureFunc:*/ () => {
|
|
30606
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_manager(
|
|
30607
|
+
uniffiTypeSdkBuilderObjectFactory.clonePointer(this),
|
|
30608
|
+
FfiConverterTypeSessionManager.lower(sessionManager)
|
|
30609
|
+
);
|
|
30610
|
+
},
|
|
30611
|
+
/*pollFunc:*/ nativeModule()
|
|
30612
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
|
|
30613
|
+
/*cancelFunc:*/ nativeModule()
|
|
30614
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
|
|
30615
|
+
/*completeFunc:*/ nativeModule()
|
|
30616
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
|
|
30617
|
+
/*freeFunc:*/ nativeModule()
|
|
30618
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_void,
|
|
30619
|
+
/*liftFunc:*/ (_v) => {},
|
|
30620
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
30621
|
+
/*asyncOpts:*/ asyncOpts_
|
|
30622
|
+
);
|
|
30623
|
+
} catch (__error: any) {
|
|
30624
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
30625
|
+
__error.stack = __stack;
|
|
30626
|
+
}
|
|
30627
|
+
throw __error;
|
|
30628
|
+
}
|
|
30629
|
+
}
|
|
30630
|
+
|
|
30631
|
+
/**
|
|
30632
|
+
* Sets a shared SSP connection manager to be reused across SDK instances.
|
|
30633
|
+
* Arguments:
|
|
30634
|
+
* - `manager`: The shared SSP connection manager.
|
|
30635
|
+
*/
|
|
30636
|
+
public async withSspConnectionManager(
|
|
30637
|
+
manager: SspConnectionManagerInterface,
|
|
30638
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30639
|
+
): Promise<void> {
|
|
30640
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
30641
|
+
try {
|
|
30642
|
+
return await uniffiRustCallAsync(
|
|
30643
|
+
/*rustCaller:*/ uniffiCaller,
|
|
30644
|
+
/*rustFutureFunc:*/ () => {
|
|
30645
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_ssp_connection_manager(
|
|
30646
|
+
uniffiTypeSdkBuilderObjectFactory.clonePointer(this),
|
|
30647
|
+
FfiConverterTypeSspConnectionManager.lower(manager)
|
|
30648
|
+
);
|
|
30649
|
+
},
|
|
30650
|
+
/*pollFunc:*/ nativeModule()
|
|
30651
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
|
|
30652
|
+
/*cancelFunc:*/ nativeModule()
|
|
30653
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
|
|
30654
|
+
/*completeFunc:*/ nativeModule()
|
|
30655
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
|
|
30656
|
+
/*freeFunc:*/ nativeModule()
|
|
30657
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_void,
|
|
30658
|
+
/*liftFunc:*/ (_v) => {},
|
|
30659
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
30660
|
+
/*asyncOpts:*/ asyncOpts_
|
|
30661
|
+
);
|
|
30662
|
+
} catch (__error: any) {
|
|
30663
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
30664
|
+
__error.stack = __stack;
|
|
30665
|
+
}
|
|
30666
|
+
throw __error;
|
|
30667
|
+
}
|
|
30668
|
+
}
|
|
30669
|
+
|
|
30087
30670
|
/**
|
|
30088
30671
|
* Sets the storage implementation to be used by the SDK.
|
|
30089
30672
|
* Arguments:
|
|
@@ -30210,6 +30793,464 @@ const FfiConverterTypeSdkBuilder = new FfiConverterObject(
|
|
|
30210
30793
|
uniffiTypeSdkBuilderObjectFactory
|
|
30211
30794
|
);
|
|
30212
30795
|
|
|
30796
|
+
/**
|
|
30797
|
+
* Persistent storage for authentication sessions, keyed by the service's
|
|
30798
|
+
* identity public key. Implementations should be thread-safe and may be
|
|
30799
|
+
* backed by an in-memory map (default) or a shared database for cross-pod
|
|
30800
|
+
* auth sharing.
|
|
30801
|
+
*/
|
|
30802
|
+
export interface SessionManager {
|
|
30803
|
+
getSession(
|
|
30804
|
+
serviceIdentityKey: PublicKey,
|
|
30805
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30806
|
+
): /*throws*/ Promise<Session>;
|
|
30807
|
+
setSession(
|
|
30808
|
+
serviceIdentityKey: PublicKey,
|
|
30809
|
+
session: Session,
|
|
30810
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30811
|
+
): /*throws*/ Promise<void>;
|
|
30812
|
+
}
|
|
30813
|
+
|
|
30814
|
+
/**
|
|
30815
|
+
* Persistent storage for authentication sessions, keyed by the service's
|
|
30816
|
+
* identity public key. Implementations should be thread-safe and may be
|
|
30817
|
+
* backed by an in-memory map (default) or a shared database for cross-pod
|
|
30818
|
+
* auth sharing.
|
|
30819
|
+
*/
|
|
30820
|
+
export class SessionManagerImpl
|
|
30821
|
+
extends UniffiAbstractObject
|
|
30822
|
+
implements SessionManager
|
|
30823
|
+
{
|
|
30824
|
+
readonly [uniffiTypeNameSymbol] = 'SessionManagerImpl';
|
|
30825
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
30826
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
30827
|
+
// No primary constructor declared for this class.
|
|
30828
|
+
private constructor(pointer: UnsafeMutableRawPointer) {
|
|
30829
|
+
super();
|
|
30830
|
+
this[pointerLiteralSymbol] = pointer;
|
|
30831
|
+
this[destructorGuardSymbol] =
|
|
30832
|
+
uniffiTypeSessionManagerImplObjectFactory.bless(pointer);
|
|
30833
|
+
}
|
|
30834
|
+
|
|
30835
|
+
public async getSession(
|
|
30836
|
+
serviceIdentityKey: PublicKey,
|
|
30837
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30838
|
+
): Promise<Session> /*throws*/ {
|
|
30839
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
30840
|
+
try {
|
|
30841
|
+
return await uniffiRustCallAsync(
|
|
30842
|
+
/*rustCaller:*/ uniffiCaller,
|
|
30843
|
+
/*rustFutureFunc:*/ () => {
|
|
30844
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sessionmanager_get_session(
|
|
30845
|
+
uniffiTypeSessionManagerImplObjectFactory.clonePointer(this),
|
|
30846
|
+
FfiConverterTypePublicKey.lower(serviceIdentityKey)
|
|
30847
|
+
);
|
|
30848
|
+
},
|
|
30849
|
+
/*pollFunc:*/ nativeModule()
|
|
30850
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
30851
|
+
/*cancelFunc:*/ nativeModule()
|
|
30852
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer,
|
|
30853
|
+
/*completeFunc:*/ nativeModule()
|
|
30854
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
30855
|
+
/*freeFunc:*/ nativeModule()
|
|
30856
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
30857
|
+
/*liftFunc:*/ FfiConverterTypeSession.lift.bind(
|
|
30858
|
+
FfiConverterTypeSession
|
|
30859
|
+
),
|
|
30860
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
30861
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
30862
|
+
/*errorHandler:*/ FfiConverterTypeSessionManagerError.lift.bind(
|
|
30863
|
+
FfiConverterTypeSessionManagerError
|
|
30864
|
+
)
|
|
30865
|
+
);
|
|
30866
|
+
} catch (__error: any) {
|
|
30867
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
30868
|
+
__error.stack = __stack;
|
|
30869
|
+
}
|
|
30870
|
+
throw __error;
|
|
30871
|
+
}
|
|
30872
|
+
}
|
|
30873
|
+
|
|
30874
|
+
public async setSession(
|
|
30875
|
+
serviceIdentityKey: PublicKey,
|
|
30876
|
+
session: Session,
|
|
30877
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
30878
|
+
): Promise<void> /*throws*/ {
|
|
30879
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
30880
|
+
try {
|
|
30881
|
+
return await uniffiRustCallAsync(
|
|
30882
|
+
/*rustCaller:*/ uniffiCaller,
|
|
30883
|
+
/*rustFutureFunc:*/ () => {
|
|
30884
|
+
return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_sessionmanager_set_session(
|
|
30885
|
+
uniffiTypeSessionManagerImplObjectFactory.clonePointer(this),
|
|
30886
|
+
FfiConverterTypePublicKey.lower(serviceIdentityKey),
|
|
30887
|
+
FfiConverterTypeSession.lower(session)
|
|
30888
|
+
);
|
|
30889
|
+
},
|
|
30890
|
+
/*pollFunc:*/ nativeModule()
|
|
30891
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_poll_void,
|
|
30892
|
+
/*cancelFunc:*/ nativeModule()
|
|
30893
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_cancel_void,
|
|
30894
|
+
/*completeFunc:*/ nativeModule()
|
|
30895
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_complete_void,
|
|
30896
|
+
/*freeFunc:*/ nativeModule()
|
|
30897
|
+
.ubrn_ffi_breez_sdk_spark_rust_future_free_void,
|
|
30898
|
+
/*liftFunc:*/ (_v) => {},
|
|
30899
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
30900
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
30901
|
+
/*errorHandler:*/ FfiConverterTypeSessionManagerError.lift.bind(
|
|
30902
|
+
FfiConverterTypeSessionManagerError
|
|
30903
|
+
)
|
|
30904
|
+
);
|
|
30905
|
+
} catch (__error: any) {
|
|
30906
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
30907
|
+
__error.stack = __stack;
|
|
30908
|
+
}
|
|
30909
|
+
throw __error;
|
|
30910
|
+
}
|
|
30911
|
+
}
|
|
30912
|
+
|
|
30913
|
+
/**
|
|
30914
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
30915
|
+
*/
|
|
30916
|
+
uniffiDestroy(): void {
|
|
30917
|
+
const ptr = (this as any)[destructorGuardSymbol];
|
|
30918
|
+
if (ptr !== undefined) {
|
|
30919
|
+
const pointer = uniffiTypeSessionManagerImplObjectFactory.pointer(this);
|
|
30920
|
+
uniffiTypeSessionManagerImplObjectFactory.freePointer(pointer);
|
|
30921
|
+
uniffiTypeSessionManagerImplObjectFactory.unbless(ptr);
|
|
30922
|
+
delete (this as any)[destructorGuardSymbol];
|
|
30923
|
+
}
|
|
30924
|
+
}
|
|
30925
|
+
|
|
30926
|
+
static instanceOf(obj: any): obj is SessionManagerImpl {
|
|
30927
|
+
return uniffiTypeSessionManagerImplObjectFactory.isConcreteType(obj);
|
|
30928
|
+
}
|
|
30929
|
+
}
|
|
30930
|
+
|
|
30931
|
+
const uniffiTypeSessionManagerImplObjectFactory: UniffiObjectFactory<SessionManager> =
|
|
30932
|
+
(() => {
|
|
30933
|
+
return {
|
|
30934
|
+
create(pointer: UnsafeMutableRawPointer): SessionManager {
|
|
30935
|
+
const instance = Object.create(SessionManagerImpl.prototype);
|
|
30936
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
30937
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
30938
|
+
instance[uniffiTypeNameSymbol] = 'SessionManagerImpl';
|
|
30939
|
+
return instance;
|
|
30940
|
+
},
|
|
30941
|
+
|
|
30942
|
+
bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
|
|
30943
|
+
return uniffiCaller.rustCall(
|
|
30944
|
+
/*caller:*/ (status) =>
|
|
30945
|
+
nativeModule().ubrn_uniffi_internal_fn_method_sessionmanager_ffi__bless_pointer(
|
|
30946
|
+
p,
|
|
30947
|
+
status
|
|
30948
|
+
),
|
|
30949
|
+
/*liftString:*/ FfiConverterString.lift
|
|
30950
|
+
);
|
|
30951
|
+
},
|
|
30952
|
+
|
|
30953
|
+
unbless(ptr: UniffiRustArcPtr) {
|
|
30954
|
+
ptr.markDestroyed();
|
|
30955
|
+
},
|
|
30956
|
+
|
|
30957
|
+
pointer(obj: SessionManager): UnsafeMutableRawPointer {
|
|
30958
|
+
if ((obj as any)[destructorGuardSymbol] === undefined) {
|
|
30959
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
30960
|
+
}
|
|
30961
|
+
return (obj as any)[pointerLiteralSymbol];
|
|
30962
|
+
},
|
|
30963
|
+
|
|
30964
|
+
clonePointer(obj: SessionManager): UnsafeMutableRawPointer {
|
|
30965
|
+
const pointer = this.pointer(obj);
|
|
30966
|
+
return uniffiCaller.rustCall(
|
|
30967
|
+
/*caller:*/ (callStatus) =>
|
|
30968
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_sessionmanager(
|
|
30969
|
+
pointer,
|
|
30970
|
+
callStatus
|
|
30971
|
+
),
|
|
30972
|
+
/*liftString:*/ FfiConverterString.lift
|
|
30973
|
+
);
|
|
30974
|
+
},
|
|
30975
|
+
|
|
30976
|
+
freePointer(pointer: UnsafeMutableRawPointer): void {
|
|
30977
|
+
uniffiCaller.rustCall(
|
|
30978
|
+
/*caller:*/ (callStatus) =>
|
|
30979
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_sessionmanager(
|
|
30980
|
+
pointer,
|
|
30981
|
+
callStatus
|
|
30982
|
+
),
|
|
30983
|
+
/*liftString:*/ FfiConverterString.lift
|
|
30984
|
+
);
|
|
30985
|
+
},
|
|
30986
|
+
|
|
30987
|
+
isConcreteType(obj: any): obj is SessionManager {
|
|
30988
|
+
return (
|
|
30989
|
+
obj[destructorGuardSymbol] &&
|
|
30990
|
+
obj[uniffiTypeNameSymbol] === 'SessionManagerImpl'
|
|
30991
|
+
);
|
|
30992
|
+
},
|
|
30993
|
+
};
|
|
30994
|
+
})();
|
|
30995
|
+
// FfiConverter for SessionManager
|
|
30996
|
+
const FfiConverterTypeSessionManager = new FfiConverterObjectWithCallbacks(
|
|
30997
|
+
uniffiTypeSessionManagerImplObjectFactory
|
|
30998
|
+
);
|
|
30999
|
+
|
|
31000
|
+
// Add a vtavble for the callbacks that go in SessionManager.
|
|
31001
|
+
|
|
31002
|
+
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
31003
|
+
const uniffiCallbackInterfaceSessionManager: {
|
|
31004
|
+
vtable: UniffiVTableCallbackInterfaceSessionManager;
|
|
31005
|
+
register: () => void;
|
|
31006
|
+
} = {
|
|
31007
|
+
// Create the VTable using a series of closures.
|
|
31008
|
+
// ts automatically converts these into C callback functions.
|
|
31009
|
+
vtable: {
|
|
31010
|
+
getSession: (
|
|
31011
|
+
uniffiHandle: bigint,
|
|
31012
|
+
serviceIdentityKey: Uint8Array,
|
|
31013
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
|
|
31014
|
+
uniffiCallbackData: bigint
|
|
31015
|
+
) => {
|
|
31016
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<Session> => {
|
|
31017
|
+
const jsCallback = FfiConverterTypeSessionManager.lift(uniffiHandle);
|
|
31018
|
+
return await jsCallback.getSession(
|
|
31019
|
+
FfiConverterTypePublicKey.lift(serviceIdentityKey),
|
|
31020
|
+
{ signal }
|
|
31021
|
+
);
|
|
31022
|
+
};
|
|
31023
|
+
const uniffiHandleSuccess = (returnValue: Session) => {
|
|
31024
|
+
uniffiFutureCallback.call(
|
|
31025
|
+
uniffiFutureCallback,
|
|
31026
|
+
uniffiCallbackData,
|
|
31027
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
31028
|
+
returnValue: FfiConverterTypeSession.lower(returnValue),
|
|
31029
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
31030
|
+
}
|
|
31031
|
+
);
|
|
31032
|
+
};
|
|
31033
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
31034
|
+
uniffiFutureCallback.call(
|
|
31035
|
+
uniffiFutureCallback,
|
|
31036
|
+
uniffiCallbackData,
|
|
31037
|
+
/* UniffiForeignFutureStructRustBuffer */ {
|
|
31038
|
+
returnValue: /*empty*/ new Uint8Array(0),
|
|
31039
|
+
// TODO create callstatus with error.
|
|
31040
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
31041
|
+
}
|
|
31042
|
+
);
|
|
31043
|
+
};
|
|
31044
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
31045
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
31046
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
31047
|
+
/*handleError:*/ uniffiHandleError,
|
|
31048
|
+
/*isErrorType:*/ SessionManagerError.instanceOf,
|
|
31049
|
+
/*lowerError:*/ FfiConverterTypeSessionManagerError.lower.bind(
|
|
31050
|
+
FfiConverterTypeSessionManagerError
|
|
31051
|
+
),
|
|
31052
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
31053
|
+
);
|
|
31054
|
+
return uniffiForeignFuture;
|
|
31055
|
+
},
|
|
31056
|
+
setSession: (
|
|
31057
|
+
uniffiHandle: bigint,
|
|
31058
|
+
serviceIdentityKey: Uint8Array,
|
|
31059
|
+
session: Uint8Array,
|
|
31060
|
+
uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
|
|
31061
|
+
uniffiCallbackData: bigint
|
|
31062
|
+
) => {
|
|
31063
|
+
const uniffiMakeCall = async (signal: AbortSignal): Promise<void> => {
|
|
31064
|
+
const jsCallback = FfiConverterTypeSessionManager.lift(uniffiHandle);
|
|
31065
|
+
return await jsCallback.setSession(
|
|
31066
|
+
FfiConverterTypePublicKey.lift(serviceIdentityKey),
|
|
31067
|
+
FfiConverterTypeSession.lift(session),
|
|
31068
|
+
{ signal }
|
|
31069
|
+
);
|
|
31070
|
+
};
|
|
31071
|
+
const uniffiHandleSuccess = (returnValue: void) => {
|
|
31072
|
+
uniffiFutureCallback.call(
|
|
31073
|
+
uniffiFutureCallback,
|
|
31074
|
+
uniffiCallbackData,
|
|
31075
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
31076
|
+
callStatus: uniffiCaller.createCallStatus(),
|
|
31077
|
+
}
|
|
31078
|
+
);
|
|
31079
|
+
};
|
|
31080
|
+
const uniffiHandleError = (code: number, errorBuf: UniffiByteArray) => {
|
|
31081
|
+
uniffiFutureCallback.call(
|
|
31082
|
+
uniffiFutureCallback,
|
|
31083
|
+
uniffiCallbackData,
|
|
31084
|
+
/* UniffiForeignFutureStructVoid */ {
|
|
31085
|
+
// TODO create callstatus with error.
|
|
31086
|
+
callStatus: uniffiCaller.createErrorStatus(code, errorBuf),
|
|
31087
|
+
}
|
|
31088
|
+
);
|
|
31089
|
+
};
|
|
31090
|
+
const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
|
|
31091
|
+
/*makeCall:*/ uniffiMakeCall,
|
|
31092
|
+
/*handleSuccess:*/ uniffiHandleSuccess,
|
|
31093
|
+
/*handleError:*/ uniffiHandleError,
|
|
31094
|
+
/*isErrorType:*/ SessionManagerError.instanceOf,
|
|
31095
|
+
/*lowerError:*/ FfiConverterTypeSessionManagerError.lower.bind(
|
|
31096
|
+
FfiConverterTypeSessionManagerError
|
|
31097
|
+
),
|
|
31098
|
+
/*lowerString:*/ FfiConverterString.lower
|
|
31099
|
+
);
|
|
31100
|
+
return uniffiForeignFuture;
|
|
31101
|
+
},
|
|
31102
|
+
uniffiFree: (uniffiHandle: UniffiHandle): void => {
|
|
31103
|
+
// SessionManager: this will throw a stale handle error if the handle isn't found.
|
|
31104
|
+
FfiConverterTypeSessionManager.drop(uniffiHandle);
|
|
31105
|
+
},
|
|
31106
|
+
},
|
|
31107
|
+
register: () => {
|
|
31108
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_sessionmanager(
|
|
31109
|
+
uniffiCallbackInterfaceSessionManager.vtable
|
|
31110
|
+
);
|
|
31111
|
+
},
|
|
31112
|
+
};
|
|
31113
|
+
|
|
31114
|
+
/**
|
|
31115
|
+
* A shared HTTP transport for SSP GraphQL traffic.
|
|
31116
|
+
*
|
|
31117
|
+
* All SDK instances that are built with the same `SspConnectionManager` send
|
|
31118
|
+
* SSP requests over the same pooled `reqwest::Client`. This means each
|
|
31119
|
+
* process opens at most one TCP+TLS+HTTP/2 connection to the SSP regardless
|
|
31120
|
+
* of how many wallets are loaded — useful for multi-tenant servers running
|
|
31121
|
+
* many SDK instances.
|
|
31122
|
+
*
|
|
31123
|
+
* # Caveats
|
|
31124
|
+
*
|
|
31125
|
+
* - The user-agent of the first SDK to construct this manager is reused for
|
|
31126
|
+
* all subsequent instances. This is rarely a problem since SDK instances
|
|
31127
|
+
* in one process typically share a build version.
|
|
31128
|
+
* - Connections close when the last `Arc<SspConnectionManager>` is dropped.
|
|
31129
|
+
* `BreezSdk::disconnect` does not close them.
|
|
31130
|
+
*/
|
|
31131
|
+
export interface SspConnectionManagerInterface {}
|
|
31132
|
+
|
|
31133
|
+
/**
|
|
31134
|
+
* A shared HTTP transport for SSP GraphQL traffic.
|
|
31135
|
+
*
|
|
31136
|
+
* All SDK instances that are built with the same `SspConnectionManager` send
|
|
31137
|
+
* SSP requests over the same pooled `reqwest::Client`. This means each
|
|
31138
|
+
* process opens at most one TCP+TLS+HTTP/2 connection to the SSP regardless
|
|
31139
|
+
* of how many wallets are loaded — useful for multi-tenant servers running
|
|
31140
|
+
* many SDK instances.
|
|
31141
|
+
*
|
|
31142
|
+
* # Caveats
|
|
31143
|
+
*
|
|
31144
|
+
* - The user-agent of the first SDK to construct this manager is reused for
|
|
31145
|
+
* all subsequent instances. This is rarely a problem since SDK instances
|
|
31146
|
+
* in one process typically share a build version.
|
|
31147
|
+
* - Connections close when the last `Arc<SspConnectionManager>` is dropped.
|
|
31148
|
+
* `BreezSdk::disconnect` does not close them.
|
|
31149
|
+
*/
|
|
31150
|
+
export class SspConnectionManager
|
|
31151
|
+
extends UniffiAbstractObject
|
|
31152
|
+
implements SspConnectionManagerInterface
|
|
31153
|
+
{
|
|
31154
|
+
readonly [uniffiTypeNameSymbol] = 'SspConnectionManager';
|
|
31155
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
31156
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
31157
|
+
// No primary constructor declared for this class.
|
|
31158
|
+
private constructor(pointer: UnsafeMutableRawPointer) {
|
|
31159
|
+
super();
|
|
31160
|
+
this[pointerLiteralSymbol] = pointer;
|
|
31161
|
+
this[destructorGuardSymbol] =
|
|
31162
|
+
uniffiTypeSspConnectionManagerObjectFactory.bless(pointer);
|
|
31163
|
+
}
|
|
31164
|
+
|
|
31165
|
+
/**
|
|
31166
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
31167
|
+
*/
|
|
31168
|
+
uniffiDestroy(): void {
|
|
31169
|
+
const ptr = (this as any)[destructorGuardSymbol];
|
|
31170
|
+
if (ptr !== undefined) {
|
|
31171
|
+
const pointer = uniffiTypeSspConnectionManagerObjectFactory.pointer(this);
|
|
31172
|
+
uniffiTypeSspConnectionManagerObjectFactory.freePointer(pointer);
|
|
31173
|
+
uniffiTypeSspConnectionManagerObjectFactory.unbless(ptr);
|
|
31174
|
+
delete (this as any)[destructorGuardSymbol];
|
|
31175
|
+
}
|
|
31176
|
+
}
|
|
31177
|
+
|
|
31178
|
+
static instanceOf(obj: any): obj is SspConnectionManager {
|
|
31179
|
+
return uniffiTypeSspConnectionManagerObjectFactory.isConcreteType(obj);
|
|
31180
|
+
}
|
|
31181
|
+
}
|
|
31182
|
+
|
|
31183
|
+
const uniffiTypeSspConnectionManagerObjectFactory: UniffiObjectFactory<SspConnectionManagerInterface> =
|
|
31184
|
+
(() => {
|
|
31185
|
+
return {
|
|
31186
|
+
create(pointer: UnsafeMutableRawPointer): SspConnectionManagerInterface {
|
|
31187
|
+
const instance = Object.create(SspConnectionManager.prototype);
|
|
31188
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
31189
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
31190
|
+
instance[uniffiTypeNameSymbol] = 'SspConnectionManager';
|
|
31191
|
+
return instance;
|
|
31192
|
+
},
|
|
31193
|
+
|
|
31194
|
+
bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr {
|
|
31195
|
+
return uniffiCaller.rustCall(
|
|
31196
|
+
/*caller:*/ (status) =>
|
|
31197
|
+
nativeModule().ubrn_uniffi_internal_fn_method_sspconnectionmanager_ffi__bless_pointer(
|
|
31198
|
+
p,
|
|
31199
|
+
status
|
|
31200
|
+
),
|
|
31201
|
+
/*liftString:*/ FfiConverterString.lift
|
|
31202
|
+
);
|
|
31203
|
+
},
|
|
31204
|
+
|
|
31205
|
+
unbless(ptr: UniffiRustArcPtr) {
|
|
31206
|
+
ptr.markDestroyed();
|
|
31207
|
+
},
|
|
31208
|
+
|
|
31209
|
+
pointer(obj: SspConnectionManagerInterface): UnsafeMutableRawPointer {
|
|
31210
|
+
if ((obj as any)[destructorGuardSymbol] === undefined) {
|
|
31211
|
+
throw new UniffiInternalError.UnexpectedNullPointer();
|
|
31212
|
+
}
|
|
31213
|
+
return (obj as any)[pointerLiteralSymbol];
|
|
31214
|
+
},
|
|
31215
|
+
|
|
31216
|
+
clonePointer(
|
|
31217
|
+
obj: SspConnectionManagerInterface
|
|
31218
|
+
): UnsafeMutableRawPointer {
|
|
31219
|
+
const pointer = this.pointer(obj);
|
|
31220
|
+
return uniffiCaller.rustCall(
|
|
31221
|
+
/*caller:*/ (callStatus) =>
|
|
31222
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_clone_sspconnectionmanager(
|
|
31223
|
+
pointer,
|
|
31224
|
+
callStatus
|
|
31225
|
+
),
|
|
31226
|
+
/*liftString:*/ FfiConverterString.lift
|
|
31227
|
+
);
|
|
31228
|
+
},
|
|
31229
|
+
|
|
31230
|
+
freePointer(pointer: UnsafeMutableRawPointer): void {
|
|
31231
|
+
uniffiCaller.rustCall(
|
|
31232
|
+
/*caller:*/ (callStatus) =>
|
|
31233
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_fn_free_sspconnectionmanager(
|
|
31234
|
+
pointer,
|
|
31235
|
+
callStatus
|
|
31236
|
+
),
|
|
31237
|
+
/*liftString:*/ FfiConverterString.lift
|
|
31238
|
+
);
|
|
31239
|
+
},
|
|
31240
|
+
|
|
31241
|
+
isConcreteType(obj: any): obj is SspConnectionManagerInterface {
|
|
31242
|
+
return (
|
|
31243
|
+
obj[destructorGuardSymbol] &&
|
|
31244
|
+
obj[uniffiTypeNameSymbol] === 'SspConnectionManager'
|
|
31245
|
+
);
|
|
31246
|
+
},
|
|
31247
|
+
};
|
|
31248
|
+
})();
|
|
31249
|
+
// FfiConverter for SspConnectionManagerInterface
|
|
31250
|
+
const FfiConverterTypeSspConnectionManager = new FfiConverterObject(
|
|
31251
|
+
uniffiTypeSspConnectionManagerObjectFactory
|
|
31252
|
+
);
|
|
31253
|
+
|
|
30213
31254
|
/**
|
|
30214
31255
|
* Trait for persistent storage
|
|
30215
31256
|
*/
|
|
@@ -34065,6 +35106,30 @@ function uniffiEnsureInitialized() {
|
|
|
34065
35106
|
'uniffi_breez_sdk_spark_checksum_func_init_logging'
|
|
34066
35107
|
);
|
|
34067
35108
|
}
|
|
35109
|
+
if (
|
|
35110
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_new_connection_manager() !==
|
|
35111
|
+
25164
|
|
35112
|
+
) {
|
|
35113
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35114
|
+
'uniffi_breez_sdk_spark_checksum_func_new_connection_manager'
|
|
35115
|
+
);
|
|
35116
|
+
}
|
|
35117
|
+
if (
|
|
35118
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_new_rest_chain_service() !==
|
|
35119
|
+
23177
|
|
35120
|
+
) {
|
|
35121
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35122
|
+
'uniffi_breez_sdk_spark_checksum_func_new_rest_chain_service'
|
|
35123
|
+
);
|
|
35124
|
+
}
|
|
35125
|
+
if (
|
|
35126
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_func_new_ssp_connection_manager() !==
|
|
35127
|
+
15222
|
|
35128
|
+
) {
|
|
35129
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35130
|
+
'uniffi_breez_sdk_spark_checksum_func_new_ssp_connection_manager'
|
|
35131
|
+
);
|
|
35132
|
+
}
|
|
34068
35133
|
if (
|
|
34069
35134
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos() !==
|
|
34070
35135
|
20959
|
|
@@ -34729,6 +35794,14 @@ function uniffiEnsureInitialized() {
|
|
|
34729
35794
|
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service'
|
|
34730
35795
|
);
|
|
34731
35796
|
}
|
|
35797
|
+
if (
|
|
35798
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_connection_manager() !==
|
|
35799
|
+
51797
|
|
35800
|
+
) {
|
|
35801
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35802
|
+
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_connection_manager'
|
|
35803
|
+
);
|
|
35804
|
+
}
|
|
34732
35805
|
if (
|
|
34733
35806
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_default_storage() !==
|
|
34734
35807
|
14543
|
|
@@ -34777,6 +35850,22 @@ function uniffiEnsureInitialized() {
|
|
|
34777
35850
|
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service'
|
|
34778
35851
|
);
|
|
34779
35852
|
}
|
|
35853
|
+
if (
|
|
35854
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_manager() !==
|
|
35855
|
+
64189
|
|
35856
|
+
) {
|
|
35857
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35858
|
+
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_manager'
|
|
35859
|
+
);
|
|
35860
|
+
}
|
|
35861
|
+
if (
|
|
35862
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_ssp_connection_manager() !==
|
|
35863
|
+
65505
|
|
35864
|
+
) {
|
|
35865
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35866
|
+
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_ssp_connection_manager'
|
|
35867
|
+
);
|
|
35868
|
+
}
|
|
34780
35869
|
if (
|
|
34781
35870
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage() !==
|
|
34782
35871
|
59400
|
|
@@ -34785,6 +35874,22 @@ function uniffiEnsureInitialized() {
|
|
|
34785
35874
|
'uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage'
|
|
34786
35875
|
);
|
|
34787
35876
|
}
|
|
35877
|
+
if (
|
|
35878
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sessionmanager_get_session() !==
|
|
35879
|
+
64481
|
|
35880
|
+
) {
|
|
35881
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35882
|
+
'uniffi_breez_sdk_spark_checksum_method_sessionmanager_get_session'
|
|
35883
|
+
);
|
|
35884
|
+
}
|
|
35885
|
+
if (
|
|
35886
|
+
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_sessionmanager_set_session() !==
|
|
35887
|
+
55262
|
|
35888
|
+
) {
|
|
35889
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
35890
|
+
'uniffi_breez_sdk_spark_checksum_method_sessionmanager_set_session'
|
|
35891
|
+
);
|
|
35892
|
+
}
|
|
34788
35893
|
if (
|
|
34789
35894
|
nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item() !==
|
|
34790
35895
|
6883
|
|
@@ -35098,6 +36203,7 @@ function uniffiEnsureInitialized() {
|
|
|
35098
36203
|
uniffiCallbackInterfacePasskeyPrfProvider.register();
|
|
35099
36204
|
uniffiCallbackInterfacePaymentObserver.register();
|
|
35100
36205
|
uniffiCallbackInterfaceRestClient.register();
|
|
36206
|
+
uniffiCallbackInterfaceSessionManager.register();
|
|
35101
36207
|
uniffiCallbackInterfaceStorage.register();
|
|
35102
36208
|
}
|
|
35103
36209
|
|
|
@@ -35142,6 +36248,7 @@ export default Object.freeze({
|
|
|
35142
36248
|
FfiConverterTypeConfig,
|
|
35143
36249
|
FfiConverterTypeConnectRequest,
|
|
35144
36250
|
FfiConverterTypeConnectWithSignerRequest,
|
|
36251
|
+
FfiConverterTypeConnectionManager,
|
|
35145
36252
|
FfiConverterTypeContact,
|
|
35146
36253
|
FfiConverterTypeConversionDetails,
|
|
35147
36254
|
FfiConverterTypeConversionEstimate,
|
|
@@ -35251,6 +36358,7 @@ export default Object.freeze({
|
|
|
35251
36358
|
FfiConverterTypePrepareSendPaymentResponse,
|
|
35252
36359
|
FfiConverterTypeProvisionalPayment,
|
|
35253
36360
|
FfiConverterTypeProvisionalPaymentDetails,
|
|
36361
|
+
FfiConverterTypePublicKey,
|
|
35254
36362
|
FfiConverterTypePublicKeyBytes,
|
|
35255
36363
|
FfiConverterTypeRate,
|
|
35256
36364
|
FfiConverterTypeReceivePaymentMethod,
|
|
@@ -35282,6 +36390,9 @@ export default Object.freeze({
|
|
|
35282
36390
|
FfiConverterTypeSendPaymentResponse,
|
|
35283
36391
|
FfiConverterTypeServiceConnectivityError,
|
|
35284
36392
|
FfiConverterTypeServiceStatus,
|
|
36393
|
+
FfiConverterTypeSession,
|
|
36394
|
+
FfiConverterTypeSessionManager,
|
|
36395
|
+
FfiConverterTypeSessionManagerError,
|
|
35285
36396
|
FfiConverterTypeSetLnurlMetadataItem,
|
|
35286
36397
|
FfiConverterTypeSignMessageRequest,
|
|
35287
36398
|
FfiConverterTypeSignMessageResponse,
|
|
@@ -35297,6 +36408,7 @@ export default Object.freeze({
|
|
|
35297
36408
|
FfiConverterTypeSparkSigningOperator,
|
|
35298
36409
|
FfiConverterTypeSparkSspConfig,
|
|
35299
36410
|
FfiConverterTypeSparkStatus,
|
|
36411
|
+
FfiConverterTypeSspConnectionManager,
|
|
35300
36412
|
FfiConverterTypeStableBalanceActiveLabel,
|
|
35301
36413
|
FfiConverterTypeStableBalanceConfig,
|
|
35302
36414
|
FfiConverterTypeStableBalanceToken,
|