@agntcy/slim-bindings-linux-arm64-gnu 2.0.0-alpha.4 → 2.0.0-alpha.5
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/libslim_bindings.so +0 -0
- package/package.json +1 -1
- package/slim_bindings-ffi.d.ts +33 -1
- package/slim_bindings-ffi.js +160 -0
- package/slim_bindings.d.ts +348 -30
- package/slim_bindings.js +587 -29
package/slim_bindings.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type UniffiByteArray, type UniffiGcObject, type UniffiHandle, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from "@ubjs/core";
|
|
2
2
|
/**
|
|
3
|
-
* Create a new Service with builder pattern
|
|
3
|
+
* Create a new Service with builder pattern (native only)
|
|
4
4
|
*/
|
|
5
5
|
export declare function createService(name: string): ServiceLike;
|
|
6
6
|
/**
|
|
7
|
-
* Create a new Service with configuration
|
|
7
|
+
* Create a new Service with configuration (native only)
|
|
8
8
|
*/
|
|
9
9
|
export declare function createServiceWithConfig(name: string, config: ServiceConfig): ServiceLike;
|
|
10
10
|
/**
|
|
@@ -109,7 +109,7 @@ export declare function isInitialized(): boolean;
|
|
|
109
109
|
*/
|
|
110
110
|
export declare function newConfigFromJson(json: string): ClientConfig;
|
|
111
111
|
/**
|
|
112
|
-
* Create a new DataplaneConfig
|
|
112
|
+
* Create a new DataplaneConfig (native only)
|
|
113
113
|
*/
|
|
114
114
|
export declare function newDataplaneConfig(): DataplaneConfig;
|
|
115
115
|
/**
|
|
@@ -147,9 +147,9 @@ export declare function newServiceConfig(): ServiceConfig;
|
|
|
147
147
|
/**
|
|
148
148
|
* Create a new BindingsServiceConfig with custom values
|
|
149
149
|
*/
|
|
150
|
-
export declare function newServiceConfigWith(nodeId: string | undefined,
|
|
150
|
+
export declare function newServiceConfigWith(nodeId: string | undefined, domainName: string | undefined, dataplane: DataplaneConfig): ServiceConfig;
|
|
151
151
|
/**
|
|
152
|
-
* Create a new ServiceConfiguration
|
|
152
|
+
* Create a new ServiceConfiguration (native only)
|
|
153
153
|
*/
|
|
154
154
|
export declare function newServiceConfiguration(): ServiceConfig;
|
|
155
155
|
/**
|
|
@@ -1761,7 +1761,7 @@ export declare const ServerConfig: Readonly<{
|
|
|
1761
1761
|
defaults: () => Partial<ServerConfig>;
|
|
1762
1762
|
}>;
|
|
1763
1763
|
/**
|
|
1764
|
-
* DataPlane configuration wrapper for uniffi bindings
|
|
1764
|
+
* DataPlane configuration wrapper for uniffi bindings (native only — wraps gRPC config)
|
|
1765
1765
|
*/
|
|
1766
1766
|
export type DataplaneConfig = {
|
|
1767
1767
|
/**
|
|
@@ -1880,15 +1880,73 @@ export type MlsSettings = {
|
|
|
1880
1880
|
* 0 = disable header-integrity checks; 1–100 = percent of messages to verify after decrypt.
|
|
1881
1881
|
*/
|
|
1882
1882
|
headerIntegrityValidationPercent: number;
|
|
1883
|
+
/**
|
|
1884
|
+
* Maximum remembered control-message IDs used for replay protection.
|
|
1885
|
+
* `None` uses the SLIM core default.
|
|
1886
|
+
*/
|
|
1887
|
+
maxSeenControlMessageIdsSize?: bigint;
|
|
1883
1888
|
};
|
|
1884
1889
|
/**
|
|
1885
1890
|
* Generated factory for {@link MlsSettings} record objects.
|
|
1886
1891
|
*/
|
|
1887
1892
|
export declare const MlsSettings: Readonly<{
|
|
1888
|
-
create: (partial: Partial<MlsSettings> & Required<Omit<MlsSettings, "headerIntegrityValidationPercent">>) => MlsSettings;
|
|
1889
|
-
new: (partial: Partial<MlsSettings> & Required<Omit<MlsSettings, "headerIntegrityValidationPercent">>) => MlsSettings;
|
|
1893
|
+
create: (partial: Partial<MlsSettings> & Required<Omit<MlsSettings, "headerIntegrityValidationPercent" | "maxSeenControlMessageIdsSize">>) => MlsSettings;
|
|
1894
|
+
new: (partial: Partial<MlsSettings> & Required<Omit<MlsSettings, "headerIntegrityValidationPercent" | "maxSeenControlMessageIdsSize">>) => MlsSettings;
|
|
1890
1895
|
defaults: () => Partial<MlsSettings>;
|
|
1891
1896
|
}>;
|
|
1897
|
+
/**
|
|
1898
|
+
* Online/offline status of a session participant
|
|
1899
|
+
*/
|
|
1900
|
+
export declare enum ParticipantStatus {
|
|
1901
|
+
Online = 0,
|
|
1902
|
+
Offline = 1
|
|
1903
|
+
}
|
|
1904
|
+
/**
|
|
1905
|
+
* A participant in a session together with their current status
|
|
1906
|
+
*/
|
|
1907
|
+
export type ParticipantInfo = {
|
|
1908
|
+
name: NameLike;
|
|
1909
|
+
status: ParticipantStatus;
|
|
1910
|
+
};
|
|
1911
|
+
/**
|
|
1912
|
+
* Generated factory for {@link ParticipantInfo} record objects.
|
|
1913
|
+
*/
|
|
1914
|
+
export declare const ParticipantInfo: Readonly<{
|
|
1915
|
+
create: (partial: Partial<ParticipantInfo> & Required<Omit<ParticipantInfo, "name" | "status">>) => ParticipantInfo;
|
|
1916
|
+
new: (partial: Partial<ParticipantInfo> & Required<Omit<ParticipantInfo, "name" | "status">>) => ParticipantInfo;
|
|
1917
|
+
defaults: () => Partial<ParticipantInfo>;
|
|
1918
|
+
}>;
|
|
1919
|
+
/**
|
|
1920
|
+
* Where and how a session's MLS/state is persisted at rest.
|
|
1921
|
+
*
|
|
1922
|
+
* Persistence is opt-in and app-level: pass this to
|
|
1923
|
+
* [`Service::create_app_with_persistence`] to get a restorable app.
|
|
1924
|
+
*/
|
|
1925
|
+
export type PersistenceConfig = {
|
|
1926
|
+
/**
|
|
1927
|
+
* Directory holding the encrypted store (one file per identity).
|
|
1928
|
+
*/
|
|
1929
|
+
path: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* Passphrase protecting the store. **Set this.**
|
|
1932
|
+
*
|
|
1933
|
+
* When `Some`, a 256-bit AES key is derived from it and the store is
|
|
1934
|
+
* genuinely confidential. When `None`, the key is instead derived from the
|
|
1935
|
+
* app's **public** name: the store still detects tampering and is stable
|
|
1936
|
+
* across restarts, but it offers **no confidentiality** — anyone who can
|
|
1937
|
+
* read the database file and knows the app name can decrypt it. Only rely
|
|
1938
|
+
* on the `None` fallback when the filesystem itself is your trust boundary.
|
|
1939
|
+
*/
|
|
1940
|
+
passphrase?: string;
|
|
1941
|
+
};
|
|
1942
|
+
/**
|
|
1943
|
+
* Generated factory for {@link PersistenceConfig} record objects.
|
|
1944
|
+
*/
|
|
1945
|
+
export declare const PersistenceConfig: Readonly<{
|
|
1946
|
+
create: (partial: Partial<PersistenceConfig> & Required<Omit<PersistenceConfig, "path" | "passphrase">>) => PersistenceConfig;
|
|
1947
|
+
new: (partial: Partial<PersistenceConfig> & Required<Omit<PersistenceConfig, "path" | "passphrase">>) => PersistenceConfig;
|
|
1948
|
+
defaults: () => Partial<PersistenceConfig>;
|
|
1949
|
+
}>;
|
|
1892
1950
|
/**
|
|
1893
1951
|
* Received message containing context and payload
|
|
1894
1952
|
*/
|
|
@@ -1932,7 +1990,7 @@ export declare const RuntimeConfig: Readonly<{
|
|
|
1932
1990
|
defaults: () => Partial<RuntimeConfig>;
|
|
1933
1991
|
}>;
|
|
1934
1992
|
/**
|
|
1935
|
-
* Service configuration wrapper for uniffi bindings
|
|
1993
|
+
* Service configuration wrapper for uniffi bindings (native only — includes gRPC dataplane config)
|
|
1936
1994
|
*/
|
|
1937
1995
|
export type ServiceConfig = {
|
|
1938
1996
|
/**
|
|
@@ -1942,7 +2000,7 @@ export type ServiceConfig = {
|
|
|
1942
2000
|
/**
|
|
1943
2001
|
* Optional group name for the service
|
|
1944
2002
|
*/
|
|
1945
|
-
|
|
2003
|
+
domainName?: string;
|
|
1946
2004
|
/**
|
|
1947
2005
|
* DataPlane configuration (servers and clients)
|
|
1948
2006
|
*/
|
|
@@ -1952,8 +2010,8 @@ export type ServiceConfig = {
|
|
|
1952
2010
|
* Generated factory for {@link ServiceConfig} record objects.
|
|
1953
2011
|
*/
|
|
1954
2012
|
export declare const ServiceConfig: Readonly<{
|
|
1955
|
-
create: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, "nodeId" | "
|
|
1956
|
-
new: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, "nodeId" | "
|
|
2013
|
+
create: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, "nodeId" | "domainName" | "dataplane">>) => ServiceConfig;
|
|
2014
|
+
new: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, "nodeId" | "domainName" | "dataplane">>) => ServiceConfig;
|
|
1957
2015
|
defaults: () => Partial<ServiceConfig>;
|
|
1958
2016
|
}>;
|
|
1959
2017
|
/**
|
|
@@ -2978,6 +3036,22 @@ export declare class CompletionHandle extends UniffiAbstractObject implements Co
|
|
|
2978
3036
|
uniffiDestroy(): void;
|
|
2979
3037
|
static instanceOf(obj_: any): obj_ is CompletionHandle;
|
|
2980
3038
|
}
|
|
3039
|
+
/**
|
|
3040
|
+
* How a session should be closed.
|
|
3041
|
+
*/
|
|
3042
|
+
export declare enum CloseMode {
|
|
3043
|
+
/**
|
|
3044
|
+
* Soft close: go offline so the session can be brought back later with
|
|
3045
|
+
* `rejoin()`. This is an in-memory group operation and does not require
|
|
3046
|
+
* persistence (though a persisted session also survives a process restart).
|
|
3047
|
+
* Not valid for point-to-point sessions.
|
|
3048
|
+
*/
|
|
3049
|
+
Soft = 0,
|
|
3050
|
+
/**
|
|
3051
|
+
* Hard close: terminate the session permanently.
|
|
3052
|
+
*/
|
|
3053
|
+
Hard = 1
|
|
3054
|
+
}
|
|
2981
3055
|
/**
|
|
2982
3056
|
* Session context for language bindings (UniFFI-compatible)
|
|
2983
3057
|
*
|
|
@@ -2985,6 +3059,54 @@ export declare class CompletionHandle extends UniffiAbstractObject implements Co
|
|
|
2985
3059
|
* Provides both synchronous (blocking) and asynchronous methods for FFI compatibility.
|
|
2986
3060
|
*/
|
|
2987
3061
|
export interface SessionLike {
|
|
3062
|
+
/**
|
|
3063
|
+
* Hard-close the session (blocking version): terminate it permanently.
|
|
3064
|
+
* For a soft, restorable close use [`Self::close_with_mode`].
|
|
3065
|
+
*/
|
|
3066
|
+
close(): CompletionHandleLike;
|
|
3067
|
+
/**
|
|
3068
|
+
* Hard-close the session and wait for completion (blocking version). See [`Self::close`].
|
|
3069
|
+
*/
|
|
3070
|
+
closeAndWait(): void;
|
|
3071
|
+
/**
|
|
3072
|
+
* Hard-close the session and wait for completion (async version). See [`Self::close`].
|
|
3073
|
+
*/
|
|
3074
|
+
closeAndWaitAsync(asyncOpts_?: {
|
|
3075
|
+
signal: AbortSignal;
|
|
3076
|
+
}): Promise<void>;
|
|
3077
|
+
/**
|
|
3078
|
+
* Hard-close the session (async version). See [`Self::close`].
|
|
3079
|
+
*/
|
|
3080
|
+
closeAsync(asyncOpts_?: {
|
|
3081
|
+
signal: AbortSignal;
|
|
3082
|
+
}): Promise<CompletionHandleLike>;
|
|
3083
|
+
/**
|
|
3084
|
+
* Close the session with an explicit [`CloseMode`] (blocking version).
|
|
3085
|
+
*
|
|
3086
|
+
* [`CloseMode::Soft`] notifies the group that this participant is going
|
|
3087
|
+
* offline so it can be brought back with `rejoin()` (an in-memory group
|
|
3088
|
+
* operation; persistence is not required). Only valid for Group sessions;
|
|
3089
|
+
* returns an error for PointToPoint sessions. [`CloseMode::Hard`] terminates
|
|
3090
|
+
* the session permanently. Returns a completion handle that resolves when
|
|
3091
|
+
* ACKs are collected or on timeout.
|
|
3092
|
+
*/
|
|
3093
|
+
closeWithMode(mode: CloseMode): CompletionHandleLike;
|
|
3094
|
+
/**
|
|
3095
|
+
* Close the session with an explicit [`CloseMode`] and wait for completion (blocking version).
|
|
3096
|
+
*/
|
|
3097
|
+
closeWithModeAndWait(mode: CloseMode): void;
|
|
3098
|
+
/**
|
|
3099
|
+
* Close the session with an explicit [`CloseMode`] and wait for completion (async version).
|
|
3100
|
+
*/
|
|
3101
|
+
closeWithModeAndWaitAsync(mode: CloseMode, asyncOpts_?: {
|
|
3102
|
+
signal: AbortSignal;
|
|
3103
|
+
}): Promise<void>;
|
|
3104
|
+
/**
|
|
3105
|
+
* Close the session with an explicit [`CloseMode`] (async version). See [`Self::close_with_mode`].
|
|
3106
|
+
*/
|
|
3107
|
+
closeWithModeAsync(mode: CloseMode, asyncOpts_?: {
|
|
3108
|
+
signal: AbortSignal;
|
|
3109
|
+
}): Promise<CompletionHandleLike>;
|
|
2988
3110
|
/**
|
|
2989
3111
|
* Get the session configuration
|
|
2990
3112
|
*/
|
|
@@ -3047,15 +3169,15 @@ export interface SessionLike {
|
|
|
3047
3169
|
*/
|
|
3048
3170
|
metadata(): Map<string, string>;
|
|
3049
3171
|
/**
|
|
3050
|
-
* Get list of participants in the session (blocking version for FFI)
|
|
3172
|
+
* Get list of participants in the session with their online/offline status (blocking version for FFI)
|
|
3051
3173
|
*/
|
|
3052
|
-
participantsList(): Array<
|
|
3174
|
+
participantsList(): Array<ParticipantInfo>;
|
|
3053
3175
|
/**
|
|
3054
|
-
* Get list of participants in the session
|
|
3176
|
+
* Get list of participants in the session with their online/offline status (async version)
|
|
3055
3177
|
*/
|
|
3056
3178
|
participantsListAsync(asyncOpts_?: {
|
|
3057
3179
|
signal: AbortSignal;
|
|
3058
|
-
}): Promise<Array<
|
|
3180
|
+
}): Promise<Array<ParticipantInfo>>;
|
|
3059
3181
|
/**
|
|
3060
3182
|
* Publish a message to the session's destination (blocking version)
|
|
3061
3183
|
*
|
|
@@ -3162,6 +3284,30 @@ export interface SessionLike {
|
|
|
3162
3284
|
publishWithParamsAsync(destination: NameLike, fanout: number, data: ArrayBuffer, connectionOut: bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3163
3285
|
signal: AbortSignal;
|
|
3164
3286
|
}): Promise<void>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Notify the group that this participant is back online (blocking version).
|
|
3289
|
+
*
|
|
3290
|
+
* Only valid for Group sessions; returns an error for PointToPoint sessions.
|
|
3291
|
+
* Returns a completion handle that resolves when ACKs/NACKs are collected.
|
|
3292
|
+
* If any participant NACKs due to an MLS epoch mismatch, the rejoin fails.
|
|
3293
|
+
*/
|
|
3294
|
+
rejoin(): CompletionHandleLike;
|
|
3295
|
+
/**
|
|
3296
|
+
* Notify the group that this participant is back online and wait for completion (blocking version).
|
|
3297
|
+
*/
|
|
3298
|
+
rejoinAndWait(): void;
|
|
3299
|
+
/**
|
|
3300
|
+
* Notify the group that this participant is back online and wait for completion (async version).
|
|
3301
|
+
*/
|
|
3302
|
+
rejoinAndWaitAsync(asyncOpts_?: {
|
|
3303
|
+
signal: AbortSignal;
|
|
3304
|
+
}): Promise<void>;
|
|
3305
|
+
/**
|
|
3306
|
+
* Notify the group that this participant is back online (async version).
|
|
3307
|
+
*/
|
|
3308
|
+
rejoinAsync(asyncOpts_?: {
|
|
3309
|
+
signal: AbortSignal;
|
|
3310
|
+
}): Promise<CompletionHandleLike>;
|
|
3165
3311
|
/**
|
|
3166
3312
|
* Remove a participant from the session (blocking version)
|
|
3167
3313
|
*
|
|
@@ -3218,6 +3364,54 @@ export declare class Session extends UniffiAbstractObject implements SessionLike
|
|
|
3218
3364
|
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3219
3365
|
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3220
3366
|
private constructor();
|
|
3367
|
+
/**
|
|
3368
|
+
* Hard-close the session (blocking version): terminate it permanently.
|
|
3369
|
+
* For a soft, restorable close use [`Self::close_with_mode`].
|
|
3370
|
+
*/
|
|
3371
|
+
close(): CompletionHandleLike;
|
|
3372
|
+
/**
|
|
3373
|
+
* Hard-close the session and wait for completion (blocking version). See [`Self::close`].
|
|
3374
|
+
*/
|
|
3375
|
+
closeAndWait(): void;
|
|
3376
|
+
/**
|
|
3377
|
+
* Hard-close the session and wait for completion (async version). See [`Self::close`].
|
|
3378
|
+
*/
|
|
3379
|
+
closeAndWaitAsync(asyncOpts_?: {
|
|
3380
|
+
signal: AbortSignal;
|
|
3381
|
+
}): Promise<void>;
|
|
3382
|
+
/**
|
|
3383
|
+
* Hard-close the session (async version). See [`Self::close`].
|
|
3384
|
+
*/
|
|
3385
|
+
closeAsync(asyncOpts_?: {
|
|
3386
|
+
signal: AbortSignal;
|
|
3387
|
+
}): Promise<CompletionHandleLike>;
|
|
3388
|
+
/**
|
|
3389
|
+
* Close the session with an explicit [`CloseMode`] (blocking version).
|
|
3390
|
+
*
|
|
3391
|
+
* [`CloseMode::Soft`] notifies the group that this participant is going
|
|
3392
|
+
* offline so it can be brought back with `rejoin()` (an in-memory group
|
|
3393
|
+
* operation; persistence is not required). Only valid for Group sessions;
|
|
3394
|
+
* returns an error for PointToPoint sessions. [`CloseMode::Hard`] terminates
|
|
3395
|
+
* the session permanently. Returns a completion handle that resolves when
|
|
3396
|
+
* ACKs are collected or on timeout.
|
|
3397
|
+
*/
|
|
3398
|
+
closeWithMode(mode: CloseMode): CompletionHandleLike;
|
|
3399
|
+
/**
|
|
3400
|
+
* Close the session with an explicit [`CloseMode`] and wait for completion (blocking version).
|
|
3401
|
+
*/
|
|
3402
|
+
closeWithModeAndWait(mode: CloseMode): void;
|
|
3403
|
+
/**
|
|
3404
|
+
* Close the session with an explicit [`CloseMode`] and wait for completion (async version).
|
|
3405
|
+
*/
|
|
3406
|
+
closeWithModeAndWaitAsync(mode: CloseMode, asyncOpts_?: {
|
|
3407
|
+
signal: AbortSignal;
|
|
3408
|
+
}): Promise<void>;
|
|
3409
|
+
/**
|
|
3410
|
+
* Close the session with an explicit [`CloseMode`] (async version). See [`Self::close_with_mode`].
|
|
3411
|
+
*/
|
|
3412
|
+
closeWithModeAsync(mode: CloseMode, asyncOpts_?: {
|
|
3413
|
+
signal: AbortSignal;
|
|
3414
|
+
}): Promise<CompletionHandleLike>;
|
|
3221
3415
|
/**
|
|
3222
3416
|
* Get the session configuration
|
|
3223
3417
|
*/
|
|
@@ -3280,15 +3474,15 @@ export declare class Session extends UniffiAbstractObject implements SessionLike
|
|
|
3280
3474
|
*/
|
|
3281
3475
|
metadata(): Map<string, string>;
|
|
3282
3476
|
/**
|
|
3283
|
-
* Get list of participants in the session (blocking version for FFI)
|
|
3477
|
+
* Get list of participants in the session with their online/offline status (blocking version for FFI)
|
|
3284
3478
|
*/
|
|
3285
|
-
participantsList(): Array<
|
|
3479
|
+
participantsList(): Array<ParticipantInfo>;
|
|
3286
3480
|
/**
|
|
3287
|
-
* Get list of participants in the session
|
|
3481
|
+
* Get list of participants in the session with their online/offline status (async version)
|
|
3288
3482
|
*/
|
|
3289
3483
|
participantsListAsync(asyncOpts_?: {
|
|
3290
3484
|
signal: AbortSignal;
|
|
3291
|
-
}): Promise<Array<
|
|
3485
|
+
}): Promise<Array<ParticipantInfo>>;
|
|
3292
3486
|
/**
|
|
3293
3487
|
* Publish a message to the session's destination (blocking version)
|
|
3294
3488
|
*
|
|
@@ -3395,6 +3589,30 @@ export declare class Session extends UniffiAbstractObject implements SessionLike
|
|
|
3395
3589
|
publishWithParamsAsync(destination: NameLike, fanout: number, data: ArrayBuffer, connectionOut: bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3396
3590
|
signal: AbortSignal;
|
|
3397
3591
|
}): Promise<void>;
|
|
3592
|
+
/**
|
|
3593
|
+
* Notify the group that this participant is back online (blocking version).
|
|
3594
|
+
*
|
|
3595
|
+
* Only valid for Group sessions; returns an error for PointToPoint sessions.
|
|
3596
|
+
* Returns a completion handle that resolves when ACKs/NACKs are collected.
|
|
3597
|
+
* If any participant NACKs due to an MLS epoch mismatch, the rejoin fails.
|
|
3598
|
+
*/
|
|
3599
|
+
rejoin(): CompletionHandleLike;
|
|
3600
|
+
/**
|
|
3601
|
+
* Notify the group that this participant is back online and wait for completion (blocking version).
|
|
3602
|
+
*/
|
|
3603
|
+
rejoinAndWait(): void;
|
|
3604
|
+
/**
|
|
3605
|
+
* Notify the group that this participant is back online and wait for completion (async version).
|
|
3606
|
+
*/
|
|
3607
|
+
rejoinAndWaitAsync(asyncOpts_?: {
|
|
3608
|
+
signal: AbortSignal;
|
|
3609
|
+
}): Promise<void>;
|
|
3610
|
+
/**
|
|
3611
|
+
* Notify the group that this participant is back online (async version).
|
|
3612
|
+
*/
|
|
3613
|
+
rejoinAsync(asyncOpts_?: {
|
|
3614
|
+
signal: AbortSignal;
|
|
3615
|
+
}): Promise<CompletionHandleLike>;
|
|
3398
3616
|
/**
|
|
3399
3617
|
* Remove a participant from the session (blocking version)
|
|
3400
3618
|
*
|
|
@@ -3878,12 +4096,16 @@ export declare enum TransportProtocol {
|
|
|
3878
4096
|
Websocket = 1
|
|
3879
4097
|
}
|
|
3880
4098
|
/**
|
|
3881
|
-
* Adapter that bridges the App API with language-bindings interface
|
|
4099
|
+
* Adapter that bridges the App API with the language-bindings interface.
|
|
4100
|
+
*
|
|
4101
|
+
* Both native and browser builds wrap the same [`slim_service::app::App`] with
|
|
4102
|
+
* the same `AuthProvider`/`AuthVerifier` type parameters; the only structural
|
|
4103
|
+
* difference is the lifecycle owner:
|
|
3882
4104
|
*
|
|
3883
|
-
*
|
|
3884
|
-
*
|
|
3885
|
-
*
|
|
3886
|
-
*
|
|
4105
|
+
* - Native keeps the owning [`slim_service::Service`] alive.
|
|
4106
|
+
* - Browser (wasm32) uses `AuthProvider::SharedSecret` identity and keeps the
|
|
4107
|
+
* WebSocket [`slim_datapath::message_processing::MessageProcessor`] alive
|
|
4108
|
+
* together with the upstream connection id.
|
|
3887
4109
|
*/
|
|
3888
4110
|
export interface AppLike {
|
|
3889
4111
|
/**
|
|
@@ -3976,6 +4198,23 @@ export interface AppLike {
|
|
|
3976
4198
|
removeRouteAsync(name: NameLike, connectionId: bigint, asyncOpts_?: {
|
|
3977
4199
|
signal: AbortSignal;
|
|
3978
4200
|
}): Promise<void>;
|
|
4201
|
+
/**
|
|
4202
|
+
* Blocking wrapper around [`App::restore_sessions_async`].
|
|
4203
|
+
*/
|
|
4204
|
+
restoreSessions(connId: bigint): Array<SessionLike>;
|
|
4205
|
+
/**
|
|
4206
|
+
* Restore the app's persisted sessions after a restart (async).
|
|
4207
|
+
*
|
|
4208
|
+
* Only meaningful for an app created with
|
|
4209
|
+
* [`crate::service::Service::create_app_with_persistence`]; returns an
|
|
4210
|
+
* empty list when persistence is disabled. `conn_id` must be the live
|
|
4211
|
+
* upstream connection to the node (the one the app subscribes over).
|
|
4212
|
+
* Each restored session rejoins its MLS group without repeating the
|
|
4213
|
+
* invite/welcome handshake.
|
|
4214
|
+
*/
|
|
4215
|
+
restoreSessionsAsync(connId: bigint, asyncOpts_?: {
|
|
4216
|
+
signal: AbortSignal;
|
|
4217
|
+
}): Promise<Array<SessionLike>>;
|
|
3979
4218
|
/**
|
|
3980
4219
|
* Set a route to a name for a specific connection (blocking version for FFI)
|
|
3981
4220
|
*/
|
|
@@ -4012,12 +4251,16 @@ export interface AppLike {
|
|
|
4012
4251
|
*/
|
|
4013
4252
|
export type AppInterface = AppLike;
|
|
4014
4253
|
/**
|
|
4015
|
-
* Adapter that bridges the App API with language-bindings interface
|
|
4254
|
+
* Adapter that bridges the App API with the language-bindings interface.
|
|
4016
4255
|
*
|
|
4017
|
-
*
|
|
4018
|
-
*
|
|
4019
|
-
*
|
|
4020
|
-
*
|
|
4256
|
+
* Both native and browser builds wrap the same [`slim_service::app::App`] with
|
|
4257
|
+
* the same `AuthProvider`/`AuthVerifier` type parameters; the only structural
|
|
4258
|
+
* difference is the lifecycle owner:
|
|
4259
|
+
*
|
|
4260
|
+
* - Native keeps the owning [`slim_service::Service`] alive.
|
|
4261
|
+
* - Browser (wasm32) uses `AuthProvider::SharedSecret` identity and keeps the
|
|
4262
|
+
* WebSocket [`slim_datapath::message_processing::MessageProcessor`] alive
|
|
4263
|
+
* together with the upstream connection id.
|
|
4021
4264
|
*/
|
|
4022
4265
|
export declare class App extends UniffiAbstractObject implements AppLike {
|
|
4023
4266
|
readonly [uniffiTypeNameSymbol] = "App";
|
|
@@ -4164,6 +4407,23 @@ export declare class App extends UniffiAbstractObject implements AppLike {
|
|
|
4164
4407
|
removeRouteAsync(name: NameLike, connectionId: bigint, asyncOpts_?: {
|
|
4165
4408
|
signal: AbortSignal;
|
|
4166
4409
|
}): Promise<void>;
|
|
4410
|
+
/**
|
|
4411
|
+
* Blocking wrapper around [`App::restore_sessions_async`].
|
|
4412
|
+
*/
|
|
4413
|
+
restoreSessions(connId: bigint): Array<SessionLike>;
|
|
4414
|
+
/**
|
|
4415
|
+
* Restore the app's persisted sessions after a restart (async).
|
|
4416
|
+
*
|
|
4417
|
+
* Only meaningful for an app created with
|
|
4418
|
+
* [`crate::service::Service::create_app_with_persistence`]; returns an
|
|
4419
|
+
* empty list when persistence is disabled. `conn_id` must be the live
|
|
4420
|
+
* upstream connection to the node (the one the app subscribes over).
|
|
4421
|
+
* Each restored session rejoins its MLS group without repeating the
|
|
4422
|
+
* invite/welcome handshake.
|
|
4423
|
+
*/
|
|
4424
|
+
restoreSessionsAsync(connId: bigint, asyncOpts_?: {
|
|
4425
|
+
signal: AbortSignal;
|
|
4426
|
+
}): Promise<Array<SessionLike>>;
|
|
4167
4427
|
/**
|
|
4168
4428
|
* Set a route to a name for a specific connection (blocking version for FFI)
|
|
4169
4429
|
*/
|
|
@@ -4287,6 +4547,21 @@ export interface ServiceLike {
|
|
|
4287
4547
|
createAppWithDirectionAsync(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, asyncOpts_?: {
|
|
4288
4548
|
signal: AbortSignal;
|
|
4289
4549
|
}): Promise<AppLike>;
|
|
4550
|
+
/**
|
|
4551
|
+
* Blocking wrapper around [`Service::create_app_with_persistence_async`].
|
|
4552
|
+
*/
|
|
4553
|
+
createAppWithPersistence(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, persistence: PersistenceConfig): AppLike;
|
|
4554
|
+
/**
|
|
4555
|
+
* Create an app with restorable MLS/session state persisted under
|
|
4556
|
+
* `persistence.path` (async).
|
|
4557
|
+
*
|
|
4558
|
+
* Mirror of [`Service::create_app_with_direction_async`] with persistence
|
|
4559
|
+
* enabled. Restore the app's sessions after a restart with
|
|
4560
|
+
* [`App::restore_sessions`].
|
|
4561
|
+
*/
|
|
4562
|
+
createAppWithPersistenceAsync(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, persistence: PersistenceConfig, asyncOpts_?: {
|
|
4563
|
+
signal: AbortSignal;
|
|
4564
|
+
}): Promise<AppLike>;
|
|
4290
4565
|
/**
|
|
4291
4566
|
* Create a new App with SharedSecret authentication (helper function)
|
|
4292
4567
|
*
|
|
@@ -4471,6 +4746,21 @@ export declare class Service extends UniffiAbstractObject implements ServiceLike
|
|
|
4471
4746
|
createAppWithDirectionAsync(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, asyncOpts_?: {
|
|
4472
4747
|
signal: AbortSignal;
|
|
4473
4748
|
}): Promise<AppLike>;
|
|
4749
|
+
/**
|
|
4750
|
+
* Blocking wrapper around [`Service::create_app_with_persistence_async`].
|
|
4751
|
+
*/
|
|
4752
|
+
createAppWithPersistence(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, persistence: PersistenceConfig): AppLike;
|
|
4753
|
+
/**
|
|
4754
|
+
* Create an app with restorable MLS/session state persisted under
|
|
4755
|
+
* `persistence.path` (async).
|
|
4756
|
+
*
|
|
4757
|
+
* Mirror of [`Service::create_app_with_direction_async`] with persistence
|
|
4758
|
+
* enabled. Restore the app's sessions after a restart with
|
|
4759
|
+
* [`App::restore_sessions`].
|
|
4760
|
+
*/
|
|
4761
|
+
createAppWithPersistenceAsync(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, persistence: PersistenceConfig, asyncOpts_?: {
|
|
4762
|
+
signal: AbortSignal;
|
|
4763
|
+
}): Promise<AppLike>;
|
|
4474
4764
|
/**
|
|
4475
4765
|
* Create a new App with SharedSecret authentication (helper function)
|
|
4476
4766
|
*
|
|
@@ -4616,6 +4906,13 @@ declare const _default: Readonly<{
|
|
|
4616
4906
|
lift(value: UniffiByteArray): ClientJwtAuth;
|
|
4617
4907
|
lower(value: ClientJwtAuth, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4618
4908
|
};
|
|
4909
|
+
FfiConverterTypeCloseMode: {
|
|
4910
|
+
read(from: RustBuffer): CloseMode;
|
|
4911
|
+
write(value: CloseMode, into: RustBuffer): void;
|
|
4912
|
+
allocationSize(value: CloseMode): number;
|
|
4913
|
+
lift(value: UniffiByteArray): CloseMode;
|
|
4914
|
+
lower(value: CloseMode, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4915
|
+
};
|
|
4619
4916
|
FfiConverterTypeCompletionHandle: FfiConverterObject<CompletionHandleLike>;
|
|
4620
4917
|
FfiConverterTypeCompressionType: {
|
|
4621
4918
|
read(from: RustBuffer): CompressionType;
|
|
@@ -4737,6 +5034,27 @@ declare const _default: Readonly<{
|
|
|
4737
5034
|
lower(value: MlsSettings, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4738
5035
|
};
|
|
4739
5036
|
FfiConverterTypeName: FfiConverterObject<NameLike>;
|
|
5037
|
+
FfiConverterTypeParticipantInfo: {
|
|
5038
|
+
read(from: RustBuffer): ParticipantInfo;
|
|
5039
|
+
write(value: ParticipantInfo, into: RustBuffer): void;
|
|
5040
|
+
allocationSize(value: ParticipantInfo): number;
|
|
5041
|
+
lift(value: UniffiByteArray): ParticipantInfo;
|
|
5042
|
+
lower(value: ParticipantInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
5043
|
+
};
|
|
5044
|
+
FfiConverterTypeParticipantStatus: {
|
|
5045
|
+
read(from: RustBuffer): ParticipantStatus;
|
|
5046
|
+
write(value: ParticipantStatus, into: RustBuffer): void;
|
|
5047
|
+
allocationSize(value: ParticipantStatus): number;
|
|
5048
|
+
lift(value: UniffiByteArray): ParticipantStatus;
|
|
5049
|
+
lower(value: ParticipantStatus, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
5050
|
+
};
|
|
5051
|
+
FfiConverterTypePersistenceConfig: {
|
|
5052
|
+
read(from: RustBuffer): PersistenceConfig;
|
|
5053
|
+
write(value: PersistenceConfig, into: RustBuffer): void;
|
|
5054
|
+
allocationSize(value: PersistenceConfig): number;
|
|
5055
|
+
lift(value: UniffiByteArray): PersistenceConfig;
|
|
5056
|
+
lower(value: PersistenceConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
5057
|
+
};
|
|
4740
5058
|
FfiConverterTypeProxyConfig: {
|
|
4741
5059
|
read(from: RustBuffer): ProxyConfig;
|
|
4742
5060
|
write(value: ProxyConfig, into: RustBuffer): void;
|