@breeztech/breez-sdk-spark-react-native 0.13.10-dev → 0.13.12-dev1
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 +1246 -98
- 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 +388 -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 +388 -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 +101 -0
- package/src/generated/breez_sdk_spark.ts +1093 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type UniffiByteArray, type UniffiRustArcPtr, type UnsafeMutableRawPointer, FfiConverterObject, FfiConverterObjectWithCallbacks, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from 'uniffi-bindgen-react-native';
|
|
1
|
+
import { type FfiConverter, type UniffiByteArray, type UniffiRustArcPtr, type UnsafeMutableRawPointer, FfiConverterObject, FfiConverterObjectWithCallbacks, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from 'uniffi-bindgen-react-native';
|
|
2
2
|
/**
|
|
3
3
|
* Connects to the Spark network using the provided configuration and mnemonic.
|
|
4
4
|
*
|
|
@@ -59,6 +59,36 @@ export declare function getSparkStatus(asyncOpts_?: {
|
|
|
59
59
|
signal: AbortSignal;
|
|
60
60
|
}): Promise<SparkStatus>;
|
|
61
61
|
export declare function initLogging(logDir: string | undefined, appLogger: Logger | undefined, logFilter: string | undefined): void;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a new shareable [`ConnectionManager`].
|
|
64
|
+
*
|
|
65
|
+
* `connections_per_operator` controls per-operator connection pooling:
|
|
66
|
+
* `None` keeps a single connection per operator (suitable for almost every
|
|
67
|
+
* deployment); `Some(n)` opens `n` connections per operator and balances
|
|
68
|
+
* requests across them.
|
|
69
|
+
*/
|
|
70
|
+
export declare function newConnectionManager(connectionsPerOperator: /*u32*/ number | undefined): ConnectionManagerInterface;
|
|
71
|
+
/**
|
|
72
|
+
* Constructs a shareable REST-based [`BitcoinChainService`].
|
|
73
|
+
*
|
|
74
|
+
* Pass the returned `Arc` to multiple [`SdkBuilder`](crate::SdkBuilder)s via
|
|
75
|
+
* [`SdkBuilder::with_chain_service`](crate::SdkBuilder::with_chain_service)
|
|
76
|
+
* to reuse a single underlying HTTP client (and its connection pool) across
|
|
77
|
+
* SDK instances. All SDKs sharing the service must use the same `network`.
|
|
78
|
+
*
|
|
79
|
+
* For one-off, non-shared use, prefer
|
|
80
|
+
* [`SdkBuilder::with_rest_chain_service`](crate::SdkBuilder::with_rest_chain_service).
|
|
81
|
+
*/
|
|
82
|
+
export declare function newRestChainService(url: string, network: Network, apiType: ChainApiType, credentials: Credentials | undefined): BitcoinChainService;
|
|
83
|
+
/**
|
|
84
|
+
* Construct a new shared SSP connection manager.
|
|
85
|
+
*
|
|
86
|
+
* Pass the returned `Arc<SspConnectionManager>` to
|
|
87
|
+
* [`SdkBuilder::with_ssp_connection_manager`](crate::SdkBuilder::with_ssp_connection_manager)
|
|
88
|
+
* when building each SDK instance that should share the underlying HTTP
|
|
89
|
+
* connection pool.
|
|
90
|
+
*/
|
|
91
|
+
export declare function newSspConnectionManager(userAgent: string | undefined): SspConnectionManagerInterface;
|
|
62
92
|
/**
|
|
63
93
|
* Trait for event listeners
|
|
64
94
|
*/
|
|
@@ -3907,6 +3937,32 @@ export declare const SendPaymentResponse: Readonly<{
|
|
|
3907
3937
|
*/
|
|
3908
3938
|
defaults: () => Partial<SendPaymentResponse>;
|
|
3909
3939
|
}>;
|
|
3940
|
+
/**
|
|
3941
|
+
* Cached authentication session for a single backend service identity.
|
|
3942
|
+
*/
|
|
3943
|
+
export type Session = {
|
|
3944
|
+
token: string;
|
|
3945
|
+
expiration: bigint;
|
|
3946
|
+
};
|
|
3947
|
+
/**
|
|
3948
|
+
* Generated factory for {@link Session} record objects.
|
|
3949
|
+
*/
|
|
3950
|
+
export declare const Session: Readonly<{
|
|
3951
|
+
/**
|
|
3952
|
+
* Create a frozen instance of {@link Session}, with defaults specified
|
|
3953
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
3954
|
+
*/
|
|
3955
|
+
create: (partial: Partial<Session> & Required<Omit<Session, never>>) => Session;
|
|
3956
|
+
/**
|
|
3957
|
+
* Create a frozen instance of {@link Session}, with defaults specified
|
|
3958
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
3959
|
+
*/
|
|
3960
|
+
new: (partial: Partial<Session> & Required<Omit<Session, never>>) => Session;
|
|
3961
|
+
/**
|
|
3962
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
3963
|
+
*/
|
|
3964
|
+
defaults: () => Partial<Session>;
|
|
3965
|
+
}>;
|
|
3910
3966
|
export type SetLnurlMetadataItem = {
|
|
3911
3967
|
paymentHash: string;
|
|
3912
3968
|
senderComment: string | undefined;
|
|
@@ -4941,6 +4997,11 @@ export declare const Webhook: Readonly<{
|
|
|
4941
4997
|
*/
|
|
4942
4998
|
defaults: () => Partial<Webhook>;
|
|
4943
4999
|
}>;
|
|
5000
|
+
/**
|
|
5001
|
+
* Typealias from the type name used in the UDL file to the builtin type. This
|
|
5002
|
+
* is needed because the UDL type name is used in function/method signatures.
|
|
5003
|
+
*/
|
|
5004
|
+
export type PublicKey = string;
|
|
4944
5005
|
/**
|
|
4945
5006
|
* Typealias from the type name used in the UDL file to the custom type. This
|
|
4946
5007
|
* is needed because the UDL type name is used in function/method signatures.
|
|
@@ -11772,6 +11833,139 @@ export declare enum ServiceStatus {
|
|
|
11772
11833
|
*/
|
|
11773
11834
|
Major = 4
|
|
11774
11835
|
}
|
|
11836
|
+
export declare enum SessionManagerError_Tags {
|
|
11837
|
+
NotFound = "NotFound",
|
|
11838
|
+
Generic = "Generic"
|
|
11839
|
+
}
|
|
11840
|
+
export declare const SessionManagerError: Readonly<{
|
|
11841
|
+
instanceOf: (obj: any) => obj is SessionManagerError;
|
|
11842
|
+
NotFound: {
|
|
11843
|
+
new (): {
|
|
11844
|
+
readonly tag: SessionManagerError_Tags.NotFound;
|
|
11845
|
+
/**
|
|
11846
|
+
* @private
|
|
11847
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11848
|
+
*/
|
|
11849
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11850
|
+
name: string;
|
|
11851
|
+
message: string;
|
|
11852
|
+
stack?: string;
|
|
11853
|
+
cause?: unknown;
|
|
11854
|
+
};
|
|
11855
|
+
"new"(): {
|
|
11856
|
+
readonly tag: SessionManagerError_Tags.NotFound;
|
|
11857
|
+
/**
|
|
11858
|
+
* @private
|
|
11859
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11860
|
+
*/
|
|
11861
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11862
|
+
name: string;
|
|
11863
|
+
message: string;
|
|
11864
|
+
stack?: string;
|
|
11865
|
+
cause?: unknown;
|
|
11866
|
+
};
|
|
11867
|
+
instanceOf(obj: any): obj is {
|
|
11868
|
+
readonly tag: SessionManagerError_Tags.NotFound;
|
|
11869
|
+
/**
|
|
11870
|
+
* @private
|
|
11871
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11872
|
+
*/
|
|
11873
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11874
|
+
name: string;
|
|
11875
|
+
message: string;
|
|
11876
|
+
stack?: string;
|
|
11877
|
+
cause?: unknown;
|
|
11878
|
+
};
|
|
11879
|
+
hasInner(obj: any): obj is {
|
|
11880
|
+
readonly tag: SessionManagerError_Tags.NotFound;
|
|
11881
|
+
/**
|
|
11882
|
+
* @private
|
|
11883
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11884
|
+
*/
|
|
11885
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11886
|
+
name: string;
|
|
11887
|
+
message: string;
|
|
11888
|
+
stack?: string;
|
|
11889
|
+
cause?: unknown;
|
|
11890
|
+
};
|
|
11891
|
+
isError(error: unknown): error is Error;
|
|
11892
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
11893
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
11894
|
+
stackTraceLimit: number;
|
|
11895
|
+
};
|
|
11896
|
+
Generic: {
|
|
11897
|
+
new (v0: string): {
|
|
11898
|
+
readonly tag: SessionManagerError_Tags.Generic;
|
|
11899
|
+
readonly inner: Readonly<[string]>;
|
|
11900
|
+
/**
|
|
11901
|
+
* @private
|
|
11902
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11903
|
+
*/
|
|
11904
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11905
|
+
name: string;
|
|
11906
|
+
message: string;
|
|
11907
|
+
stack?: string;
|
|
11908
|
+
cause?: unknown;
|
|
11909
|
+
};
|
|
11910
|
+
"new"(v0: string): {
|
|
11911
|
+
readonly tag: SessionManagerError_Tags.Generic;
|
|
11912
|
+
readonly inner: Readonly<[string]>;
|
|
11913
|
+
/**
|
|
11914
|
+
* @private
|
|
11915
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11916
|
+
*/
|
|
11917
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11918
|
+
name: string;
|
|
11919
|
+
message: string;
|
|
11920
|
+
stack?: string;
|
|
11921
|
+
cause?: unknown;
|
|
11922
|
+
};
|
|
11923
|
+
instanceOf(obj: any): obj is {
|
|
11924
|
+
readonly tag: SessionManagerError_Tags.Generic;
|
|
11925
|
+
readonly inner: Readonly<[string]>;
|
|
11926
|
+
/**
|
|
11927
|
+
* @private
|
|
11928
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11929
|
+
*/
|
|
11930
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11931
|
+
name: string;
|
|
11932
|
+
message: string;
|
|
11933
|
+
stack?: string;
|
|
11934
|
+
cause?: unknown;
|
|
11935
|
+
};
|
|
11936
|
+
hasInner(obj: any): obj is {
|
|
11937
|
+
readonly tag: SessionManagerError_Tags.Generic;
|
|
11938
|
+
readonly inner: Readonly<[string]>;
|
|
11939
|
+
/**
|
|
11940
|
+
* @private
|
|
11941
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11942
|
+
*/
|
|
11943
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11944
|
+
name: string;
|
|
11945
|
+
message: string;
|
|
11946
|
+
stack?: string;
|
|
11947
|
+
cause?: unknown;
|
|
11948
|
+
};
|
|
11949
|
+
getInner(obj: {
|
|
11950
|
+
readonly tag: SessionManagerError_Tags.Generic;
|
|
11951
|
+
readonly inner: Readonly<[string]>;
|
|
11952
|
+
/**
|
|
11953
|
+
* @private
|
|
11954
|
+
* This field is private and should not be used, use `tag` instead.
|
|
11955
|
+
*/
|
|
11956
|
+
readonly [uniffiTypeNameSymbol]: "SessionManagerError";
|
|
11957
|
+
name: string;
|
|
11958
|
+
message: string;
|
|
11959
|
+
stack?: string;
|
|
11960
|
+
cause?: unknown;
|
|
11961
|
+
}): Readonly<[string]>;
|
|
11962
|
+
isError(error: unknown): error is Error;
|
|
11963
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
11964
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
11965
|
+
stackTraceLimit: number;
|
|
11966
|
+
};
|
|
11967
|
+
}>;
|
|
11968
|
+
export type SessionManagerError = InstanceType<(typeof SessionManagerError)[keyof Omit<typeof SessionManagerError, 'instanceOf'>]>;
|
|
11775
11969
|
export declare enum SignerError_Tags {
|
|
11776
11970
|
KeyDerivation = "KeyDerivation",
|
|
11777
11971
|
Signing = "Signing",
|
|
@@ -14189,6 +14383,45 @@ export declare class BreezSdk extends UniffiAbstractObject implements BreezSdkIn
|
|
|
14189
14383
|
uniffiDestroy(): void;
|
|
14190
14384
|
static instanceOf(obj: any): obj is BreezSdk;
|
|
14191
14385
|
}
|
|
14386
|
+
/**
|
|
14387
|
+
* A shareable manager for gRPC connections to the Spark operators.
|
|
14388
|
+
*
|
|
14389
|
+
* Construct one via [`new_connection_manager`] and pass the same `Arc` to
|
|
14390
|
+
* multiple [`SdkBuilder`](crate::SdkBuilder)s via
|
|
14391
|
+
* [`SdkBuilder::with_connection_manager`](crate::SdkBuilder::with_connection_manager).
|
|
14392
|
+
* Connections close when the last `Arc<ConnectionManager>` is dropped;
|
|
14393
|
+
* [`BreezSdk::disconnect`](crate::BreezSdk::disconnect) does not affect them.
|
|
14394
|
+
*
|
|
14395
|
+
* All SDK instances sharing a `ConnectionManager` must be configured for the
|
|
14396
|
+
* same network and operator pool. The TLS settings and user agent of the
|
|
14397
|
+
* first SDK to connect to a given operator are reused for everyone afterwards.
|
|
14398
|
+
*/
|
|
14399
|
+
export interface ConnectionManagerInterface {
|
|
14400
|
+
}
|
|
14401
|
+
/**
|
|
14402
|
+
* A shareable manager for gRPC connections to the Spark operators.
|
|
14403
|
+
*
|
|
14404
|
+
* Construct one via [`new_connection_manager`] and pass the same `Arc` to
|
|
14405
|
+
* multiple [`SdkBuilder`](crate::SdkBuilder)s via
|
|
14406
|
+
* [`SdkBuilder::with_connection_manager`](crate::SdkBuilder::with_connection_manager).
|
|
14407
|
+
* Connections close when the last `Arc<ConnectionManager>` is dropped;
|
|
14408
|
+
* [`BreezSdk::disconnect`](crate::BreezSdk::disconnect) does not affect them.
|
|
14409
|
+
*
|
|
14410
|
+
* All SDK instances sharing a `ConnectionManager` must be configured for the
|
|
14411
|
+
* same network and operator pool. The TLS settings and user agent of the
|
|
14412
|
+
* first SDK to connect to a given operator are reused for everyone afterwards.
|
|
14413
|
+
*/
|
|
14414
|
+
export declare class ConnectionManager extends UniffiAbstractObject implements ConnectionManagerInterface {
|
|
14415
|
+
readonly [uniffiTypeNameSymbol] = "ConnectionManager";
|
|
14416
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
14417
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
14418
|
+
private constructor();
|
|
14419
|
+
/**
|
|
14420
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
14421
|
+
*/
|
|
14422
|
+
uniffiDestroy(): void;
|
|
14423
|
+
static instanceOf(obj: any): obj is ConnectionManager;
|
|
14424
|
+
}
|
|
14192
14425
|
/**
|
|
14193
14426
|
* External signer trait that can be implemented by users and passed to the SDK.
|
|
14194
14427
|
*
|
|
@@ -15186,6 +15419,14 @@ export interface SdkBuilderInterface {
|
|
|
15186
15419
|
withChainService(chainService: BitcoinChainService, asyncOpts_?: {
|
|
15187
15420
|
signal: AbortSignal;
|
|
15188
15421
|
}): Promise<void>;
|
|
15422
|
+
/**
|
|
15423
|
+
* Sets a shared connection manager to be reused across SDK instances.
|
|
15424
|
+
* Arguments:
|
|
15425
|
+
* - `connection_manager`: The shared connection manager.
|
|
15426
|
+
*/
|
|
15427
|
+
withConnectionManager(connectionManager: ConnectionManagerInterface, asyncOpts_?: {
|
|
15428
|
+
signal: AbortSignal;
|
|
15429
|
+
}): Promise<void>;
|
|
15189
15430
|
/**
|
|
15190
15431
|
* Sets the root storage directory to initialize the default storage with.
|
|
15191
15432
|
* This initializes both storage and real-time sync storage with the
|
|
@@ -15233,6 +15474,24 @@ export interface SdkBuilderInterface {
|
|
|
15233
15474
|
withRestChainService(url: string, apiType: ChainApiType, credentials: Credentials | undefined, asyncOpts_?: {
|
|
15234
15475
|
signal: AbortSignal;
|
|
15235
15476
|
}): Promise<void>;
|
|
15477
|
+
/**
|
|
15478
|
+
* Sets a custom session manager used to persist authentication sessions.
|
|
15479
|
+
*
|
|
15480
|
+
* Provide a shared, persistent implementation (e.g. backed by `PostgreSQL`
|
|
15481
|
+
* or Redis) to let multiple SDK instances share authentication state and
|
|
15482
|
+
* bootstrap quickly. If not set, an in-memory session manager is used.
|
|
15483
|
+
*/
|
|
15484
|
+
withSessionManager(sessionManager: SessionManager, asyncOpts_?: {
|
|
15485
|
+
signal: AbortSignal;
|
|
15486
|
+
}): Promise<void>;
|
|
15487
|
+
/**
|
|
15488
|
+
* Sets a shared SSP connection manager to be reused across SDK instances.
|
|
15489
|
+
* Arguments:
|
|
15490
|
+
* - `manager`: The shared SSP connection manager.
|
|
15491
|
+
*/
|
|
15492
|
+
withSspConnectionManager(manager: SspConnectionManagerInterface, asyncOpts_?: {
|
|
15493
|
+
signal: AbortSignal;
|
|
15494
|
+
}): Promise<void>;
|
|
15236
15495
|
/**
|
|
15237
15496
|
* Sets the storage implementation to be used by the SDK.
|
|
15238
15497
|
* Arguments:
|
|
@@ -15270,6 +15529,14 @@ export declare class SdkBuilder extends UniffiAbstractObject implements SdkBuild
|
|
|
15270
15529
|
withChainService(chainService: BitcoinChainService, asyncOpts_?: {
|
|
15271
15530
|
signal: AbortSignal;
|
|
15272
15531
|
}): Promise<void>;
|
|
15532
|
+
/**
|
|
15533
|
+
* Sets a shared connection manager to be reused across SDK instances.
|
|
15534
|
+
* Arguments:
|
|
15535
|
+
* - `connection_manager`: The shared connection manager.
|
|
15536
|
+
*/
|
|
15537
|
+
withConnectionManager(connectionManager: ConnectionManagerInterface, asyncOpts_?: {
|
|
15538
|
+
signal: AbortSignal;
|
|
15539
|
+
}): Promise<void>;
|
|
15273
15540
|
/**
|
|
15274
15541
|
* Sets the root storage directory to initialize the default storage with.
|
|
15275
15542
|
* This initializes both storage and real-time sync storage with the
|
|
@@ -15317,6 +15584,24 @@ export declare class SdkBuilder extends UniffiAbstractObject implements SdkBuild
|
|
|
15317
15584
|
withRestChainService(url: string, apiType: ChainApiType, credentials: Credentials | undefined, asyncOpts_?: {
|
|
15318
15585
|
signal: AbortSignal;
|
|
15319
15586
|
}): Promise<void>;
|
|
15587
|
+
/**
|
|
15588
|
+
* Sets a custom session manager used to persist authentication sessions.
|
|
15589
|
+
*
|
|
15590
|
+
* Provide a shared, persistent implementation (e.g. backed by `PostgreSQL`
|
|
15591
|
+
* or Redis) to let multiple SDK instances share authentication state and
|
|
15592
|
+
* bootstrap quickly. If not set, an in-memory session manager is used.
|
|
15593
|
+
*/
|
|
15594
|
+
withSessionManager(sessionManager: SessionManager, asyncOpts_?: {
|
|
15595
|
+
signal: AbortSignal;
|
|
15596
|
+
}): Promise<void>;
|
|
15597
|
+
/**
|
|
15598
|
+
* Sets a shared SSP connection manager to be reused across SDK instances.
|
|
15599
|
+
* Arguments:
|
|
15600
|
+
* - `manager`: The shared SSP connection manager.
|
|
15601
|
+
*/
|
|
15602
|
+
withSspConnectionManager(manager: SspConnectionManagerInterface, asyncOpts_?: {
|
|
15603
|
+
signal: AbortSignal;
|
|
15604
|
+
}): Promise<void>;
|
|
15320
15605
|
/**
|
|
15321
15606
|
* Sets the storage implementation to be used by the SDK.
|
|
15322
15607
|
* Arguments:
|
|
@@ -15331,6 +15616,90 @@ export declare class SdkBuilder extends UniffiAbstractObject implements SdkBuild
|
|
|
15331
15616
|
uniffiDestroy(): void;
|
|
15332
15617
|
static instanceOf(obj: any): obj is SdkBuilder;
|
|
15333
15618
|
}
|
|
15619
|
+
/**
|
|
15620
|
+
* Persistent storage for authentication sessions, keyed by the service's
|
|
15621
|
+
* identity public key. Implementations should be thread-safe and may be
|
|
15622
|
+
* backed by an in-memory map (default) or a shared database for cross-pod
|
|
15623
|
+
* auth sharing.
|
|
15624
|
+
*/
|
|
15625
|
+
export interface SessionManager {
|
|
15626
|
+
getSession(serviceIdentityKey: PublicKey, asyncOpts_?: {
|
|
15627
|
+
signal: AbortSignal;
|
|
15628
|
+
}): Promise<Session>;
|
|
15629
|
+
setSession(serviceIdentityKey: PublicKey, session: Session, asyncOpts_?: {
|
|
15630
|
+
signal: AbortSignal;
|
|
15631
|
+
}): Promise<void>;
|
|
15632
|
+
}
|
|
15633
|
+
/**
|
|
15634
|
+
* Persistent storage for authentication sessions, keyed by the service's
|
|
15635
|
+
* identity public key. Implementations should be thread-safe and may be
|
|
15636
|
+
* backed by an in-memory map (default) or a shared database for cross-pod
|
|
15637
|
+
* auth sharing.
|
|
15638
|
+
*/
|
|
15639
|
+
export declare class SessionManagerImpl extends UniffiAbstractObject implements SessionManager {
|
|
15640
|
+
readonly [uniffiTypeNameSymbol] = "SessionManagerImpl";
|
|
15641
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
15642
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
15643
|
+
private constructor();
|
|
15644
|
+
getSession(serviceIdentityKey: PublicKey, asyncOpts_?: {
|
|
15645
|
+
signal: AbortSignal;
|
|
15646
|
+
}): Promise<Session>;
|
|
15647
|
+
setSession(serviceIdentityKey: PublicKey, session: Session, asyncOpts_?: {
|
|
15648
|
+
signal: AbortSignal;
|
|
15649
|
+
}): Promise<void>;
|
|
15650
|
+
/**
|
|
15651
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
15652
|
+
*/
|
|
15653
|
+
uniffiDestroy(): void;
|
|
15654
|
+
static instanceOf(obj: any): obj is SessionManagerImpl;
|
|
15655
|
+
}
|
|
15656
|
+
/**
|
|
15657
|
+
* A shared HTTP transport for SSP GraphQL traffic.
|
|
15658
|
+
*
|
|
15659
|
+
* All SDK instances that are built with the same `SspConnectionManager` send
|
|
15660
|
+
* SSP requests over the same pooled `reqwest::Client`. This means each
|
|
15661
|
+
* process opens at most one TCP+TLS+HTTP/2 connection to the SSP regardless
|
|
15662
|
+
* of how many wallets are loaded — useful for multi-tenant servers running
|
|
15663
|
+
* many SDK instances.
|
|
15664
|
+
*
|
|
15665
|
+
* # Caveats
|
|
15666
|
+
*
|
|
15667
|
+
* - The user-agent of the first SDK to construct this manager is reused for
|
|
15668
|
+
* all subsequent instances. This is rarely a problem since SDK instances
|
|
15669
|
+
* in one process typically share a build version.
|
|
15670
|
+
* - Connections close when the last `Arc<SspConnectionManager>` is dropped.
|
|
15671
|
+
* `BreezSdk::disconnect` does not close them.
|
|
15672
|
+
*/
|
|
15673
|
+
export interface SspConnectionManagerInterface {
|
|
15674
|
+
}
|
|
15675
|
+
/**
|
|
15676
|
+
* A shared HTTP transport for SSP GraphQL traffic.
|
|
15677
|
+
*
|
|
15678
|
+
* All SDK instances that are built with the same `SspConnectionManager` send
|
|
15679
|
+
* SSP requests over the same pooled `reqwest::Client`. This means each
|
|
15680
|
+
* process opens at most one TCP+TLS+HTTP/2 connection to the SSP regardless
|
|
15681
|
+
* of how many wallets are loaded — useful for multi-tenant servers running
|
|
15682
|
+
* many SDK instances.
|
|
15683
|
+
*
|
|
15684
|
+
* # Caveats
|
|
15685
|
+
*
|
|
15686
|
+
* - The user-agent of the first SDK to construct this manager is reused for
|
|
15687
|
+
* all subsequent instances. This is rarely a problem since SDK instances
|
|
15688
|
+
* in one process typically share a build version.
|
|
15689
|
+
* - Connections close when the last `Arc<SspConnectionManager>` is dropped.
|
|
15690
|
+
* `BreezSdk::disconnect` does not close them.
|
|
15691
|
+
*/
|
|
15692
|
+
export declare class SspConnectionManager extends UniffiAbstractObject implements SspConnectionManagerInterface {
|
|
15693
|
+
readonly [uniffiTypeNameSymbol] = "SspConnectionManager";
|
|
15694
|
+
readonly [destructorGuardSymbol]: UniffiRustArcPtr;
|
|
15695
|
+
readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer;
|
|
15696
|
+
private constructor();
|
|
15697
|
+
/**
|
|
15698
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
15699
|
+
*/
|
|
15700
|
+
uniffiDestroy(): void;
|
|
15701
|
+
static instanceOf(obj: any): obj is SspConnectionManager;
|
|
15702
|
+
}
|
|
15334
15703
|
/**
|
|
15335
15704
|
* Trait for persistent storage
|
|
15336
15705
|
*/
|
|
@@ -16287,6 +16656,7 @@ declare const _default: Readonly<{
|
|
|
16287
16656
|
lift(value: UniffiByteArray): ConnectWithSignerRequest;
|
|
16288
16657
|
lower(value: ConnectWithSignerRequest): UniffiByteArray;
|
|
16289
16658
|
};
|
|
16659
|
+
FfiConverterTypeConnectionManager: FfiConverterObject<ConnectionManagerInterface>;
|
|
16290
16660
|
FfiConverterTypeContact: {
|
|
16291
16661
|
read(from: RustBuffer): Contact;
|
|
16292
16662
|
write(value: Contact, into: RustBuffer): void;
|
|
@@ -17020,6 +17390,7 @@ declare const _default: Readonly<{
|
|
|
17020
17390
|
lift(value: UniffiByteArray): ProvisionalPaymentDetails;
|
|
17021
17391
|
lower(value: ProvisionalPaymentDetails): UniffiByteArray;
|
|
17022
17392
|
};
|
|
17393
|
+
FfiConverterTypePublicKey: FfiConverter<UniffiByteArray, string>;
|
|
17023
17394
|
FfiConverterTypePublicKeyBytes: {
|
|
17024
17395
|
read(from: RustBuffer): PublicKeyBytes;
|
|
17025
17396
|
write(value: PublicKeyBytes, into: RustBuffer): void;
|
|
@@ -17225,6 +17596,21 @@ declare const _default: Readonly<{
|
|
|
17225
17596
|
lift(value: UniffiByteArray): ServiceStatus;
|
|
17226
17597
|
lower(value: ServiceStatus): UniffiByteArray;
|
|
17227
17598
|
};
|
|
17599
|
+
FfiConverterTypeSession: {
|
|
17600
|
+
read(from: RustBuffer): Session;
|
|
17601
|
+
write(value: Session, into: RustBuffer): void;
|
|
17602
|
+
allocationSize(value: Session): number;
|
|
17603
|
+
lift(value: UniffiByteArray): Session;
|
|
17604
|
+
lower(value: Session): UniffiByteArray;
|
|
17605
|
+
};
|
|
17606
|
+
FfiConverterTypeSessionManager: FfiConverterObjectWithCallbacks<SessionManager>;
|
|
17607
|
+
FfiConverterTypeSessionManagerError: {
|
|
17608
|
+
read(from: RustBuffer): SessionManagerError;
|
|
17609
|
+
write(value: SessionManagerError, into: RustBuffer): void;
|
|
17610
|
+
allocationSize(value: SessionManagerError): number;
|
|
17611
|
+
lift(value: UniffiByteArray): SessionManagerError;
|
|
17612
|
+
lower(value: SessionManagerError): UniffiByteArray;
|
|
17613
|
+
};
|
|
17228
17614
|
FfiConverterTypeSetLnurlMetadataItem: {
|
|
17229
17615
|
read(from: RustBuffer): SetLnurlMetadataItem;
|
|
17230
17616
|
write(value: SetLnurlMetadataItem, into: RustBuffer): void;
|
|
@@ -17330,6 +17716,7 @@ declare const _default: Readonly<{
|
|
|
17330
17716
|
lift(value: UniffiByteArray): SparkStatus;
|
|
17331
17717
|
lower(value: SparkStatus): UniffiByteArray;
|
|
17332
17718
|
};
|
|
17719
|
+
FfiConverterTypeSspConnectionManager: FfiConverterObject<SspConnectionManagerInterface>;
|
|
17333
17720
|
FfiConverterTypeStableBalanceActiveLabel: {
|
|
17334
17721
|
read(from: RustBuffer): StableBalanceActiveLabel;
|
|
17335
17722
|
write(value: StableBalanceActiveLabel, into: RustBuffer): void;
|