@fireproof/core 0.20.0-dev-preview-54 → 0.20.0-dev-preview-57

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/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { Logger, Future, URI, CryptoRuntime, ResolveOnce, Result, ResolveSeq, CTCryptoKey, CoerceURI, LRUSet, Env, EnvFactoryOpts, runtimeFn } from '@adviser/cement';
1
+ import { Logger, Future, URI, CryptoRuntime, ResolveOnce, Result, ResolveSeq, CTCryptoKey, CoerceURI, Promisable, LRUSet, Env, EnvFactoryOpts, MatchResult, runtimeFn } from '@adviser/cement';
2
2
  import { EventLink } from '@fireproof/vendor/@web3-storage/pail/clock/api';
3
3
  import { Operation } from '@fireproof/vendor/@web3-storage/pail/crdt/api';
4
4
  import { Version, Block as Block$1, UnknownLink, CID, ByteView, ArrayBufferView, Link, MultihashHasher, BlockView } from 'multiformats';
@@ -6,6 +6,10 @@ import { BlockFetcher as BlockFetcher$1 } from '@fireproof/vendor/@web3-storage/
6
6
  import { EventBlock } from '@fireproof/vendor/@web3-storage/pail/clock';
7
7
  import { ProllyNode as ProllyNode$1 } from 'prolly-trees/db-index';
8
8
  import { Block as Block$2 } from 'multiformats/block';
9
+ import * as jose from 'jose';
10
+ import { JWTPayload, JWTVerifyResult } from 'jose';
11
+ import { GenerateKeyPairOptions } from 'jose/key/generate/keypair';
12
+ import { SuperThis as SuperThis$1 } from '@fireproof/core';
9
13
 
10
14
  type BlockFetcher = BlockFetcher$1;
11
15
  interface CarTransactionOpts {
@@ -806,32 +810,6 @@ type DbMetaEventBlock = EventBlock<DbMetaBinary>;
806
810
  type CarClockLink = Link<DbMetaEventBlock, number, number, Version>;
807
811
  type CarClockHead = CarClockLink[];
808
812
 
809
- interface SerdeGatewayInstances {
810
- readonly gateway: SerdeGateway;
811
- }
812
- interface GatewayReady extends SerdeGatewayInstances {
813
- readonly url: URI;
814
- }
815
- declare function getStartedGateway(ctx: SerdeGatewayCtx, url: URI): Promise<Result<GatewayReady>>;
816
- declare function ensureStoreEnDeFile(ende?: Partial<StoreEnDeFile>): StoreEnDeFile;
817
- declare function toStoreRuntime(sthis: SuperThis, endeOpts?: Partial<StoreEnDeFile>): StoreRuntime;
818
-
819
- interface GatewayOpts {
820
- readonly gateway: Gateway;
821
- }
822
- type GetResult = Result<Uint8Array, NotFoundError | Error>;
823
- interface Gateway {
824
- buildUrl(baseUrl: URI, key: string, sthis: SuperThis): Promise<Result<URI>>;
825
- start(baseUrl: URI, sthis: SuperThis): Promise<Result<URI>>;
826
- close(baseUrl: URI, sthis: SuperThis): Promise<VoidResult>;
827
- destroy(baseUrl: URI, sthis: SuperThis): Promise<VoidResult>;
828
- put(url: URI, body: Uint8Array, sthis: SuperThis): Promise<VoidResult>;
829
- get(url: URI, sthis: SuperThis): Promise<GetResult>;
830
- delete(url: URI, sthis: SuperThis): Promise<VoidResult>;
831
- subscribe?(url: URI, callback: (meta: Uint8Array) => void, sthis: SuperThis): Promise<UnsubscribeResult>;
832
- getPlain(url: URI, key: string, sthis: SuperThis): Promise<Result<Uint8Array>>;
833
- }
834
-
835
813
  declare class PassThroughGateway implements SerdeGatewayInterceptor {
836
814
  buildUrl(ctx: SerdeGatewayCtx, url: URI, key: string): Promise<Result<SerdeGatewayBuildUrlReturn>>;
837
815
  start(ctx: SerdeGatewayCtx, url: URI): Promise<Result<SerdeGatewayStartReturn>>;
@@ -857,6 +835,28 @@ declare class InterceptorGateway implements SerdeGateway {
857
835
  getPlain(ctx: SerdeGatewayCtx, url: URI, key: string): Promise<Result<Uint8Array>>;
858
836
  }
859
837
 
838
+ declare function getInterceptableGateway(ctx: SerdeGatewayCtx, url: URI, opt: {
839
+ gatewayInterceptor?: SerdeGatewayInterceptor;
840
+ }): Promise<Result<InterceptorGateway>>;
841
+ declare function ensureStoreEnDeFile(ende?: Partial<StoreEnDeFile>): StoreEnDeFile;
842
+ declare function toStoreRuntime(sthis: SuperThis, endeOpts?: Partial<StoreEnDeFile>): StoreRuntime;
843
+
844
+ interface GatewayOpts {
845
+ readonly gateway: Gateway;
846
+ }
847
+ type GetResult = Result<Uint8Array, NotFoundError | Error>;
848
+ interface Gateway {
849
+ buildUrl(baseUrl: URI, key: string, sthis: SuperThis): Promise<Result<URI>>;
850
+ start(baseUrl: URI, sthis: SuperThis): Promise<Result<URI>>;
851
+ close(baseUrl: URI, sthis: SuperThis): Promise<VoidResult>;
852
+ destroy(baseUrl: URI, sthis: SuperThis): Promise<VoidResult>;
853
+ put(url: URI, body: Uint8Array, sthis: SuperThis): Promise<VoidResult>;
854
+ get(url: URI, sthis: SuperThis): Promise<GetResult>;
855
+ delete(url: URI, sthis: SuperThis): Promise<VoidResult>;
856
+ subscribe?(url: URI, callback: (meta: Uint8Array) => void, sthis: SuperThis): Promise<UnsubscribeResult>;
857
+ getPlain(url: URI, key: string, sthis: SuperThis): Promise<Result<Uint8Array>>;
858
+ }
859
+
860
860
  declare function createDbMetaEvent(sthis: SuperThis, dbMeta: DbMeta, parents: CarClockHead): Promise<DbMetaEvent>;
861
861
 
862
862
  interface SerdeGatewayFactoryItem {
@@ -891,6 +891,21 @@ declare class AttachedRemotesImpl implements AttachedStores {
891
891
  attach(attached: Attachable): Promise<Attached>;
892
892
  }
893
893
 
894
+ type URIMapper = (uri: URI) => Promisable<URI>;
895
+ declare class URIInterceptor extends PassThroughGateway {
896
+ #private;
897
+ static withMapper(mapper: URIMapper): URIInterceptor;
898
+ addMapper(mapper: URIMapper): URIInterceptor;
899
+ buildUrl(ctx: SerdeGatewayCtx, url: URI, key: string): Promise<Result<SerdeGatewayBuildUrlReturn>>;
900
+ start(ctx: SerdeGatewayCtx, url: URI): Promise<Result<SerdeGatewayStartReturn>>;
901
+ close(ctx: SerdeGatewayCtx, url: URI): Promise<Result<SerdeGatewayCloseReturn>>;
902
+ delete(ctx: SerdeGatewayCtx, url: URI): Promise<Result<SerdeGatewayDeleteReturn>>;
903
+ destroy(ctx: SerdeGatewayCtx, url: URI): Promise<Result<SerdeGatewayDestroyReturn>>;
904
+ put<T>(ctx: SerdeGatewayCtx, url: URI, body: FPEnvelope<T>): Promise<Result<SerdeGatewayPutReturn<T>>>;
905
+ get<S>(ctx: SerdeGatewayCtx, url: URI): Promise<Result<SerdeGatewayGetReturn<S>>>;
906
+ subscribe(ctx: SerdeGatewayCtx, url: URI, callback: (meta: FPEnvelopeMeta) => Promise<void>): Promise<Result<SerdeGatewaySubscribeReturn>>;
907
+ }
908
+
894
909
  declare class Loader implements Loadable {
895
910
  readonly ebOpts: BlockstoreRuntime;
896
911
  readonly logger: Logger;
@@ -931,165 +946,168 @@ declare class Loader implements Loadable {
931
946
 
932
947
  declare function parseCarFile<T>(reader: CarCacheItem, logger: Logger): Promise<CarHeader<T>>;
933
948
 
934
- type index$5_ActiveStore = ActiveStore;
935
- type index$5_AnyAnyBlock = AnyAnyBlock;
936
- type index$5_AnyAnyLink = AnyAnyLink;
937
- type index$5_AnyBlock = AnyBlock;
938
- type index$5_AnyDecodedBlock = AnyDecodedBlock;
939
- type index$5_AnyLink = AnyLink;
940
- type index$5_AnyLinkFn = AnyLinkFn;
941
- type index$5_AttachedRemotesImpl = AttachedRemotesImpl;
942
- declare const index$5_AttachedRemotesImpl: typeof AttachedRemotesImpl;
943
- type index$5_AttachedStores = AttachedStores;
944
- type index$5_BaseActiveStore = BaseActiveStore;
945
- declare const index$5_BaseActiveStore: typeof BaseActiveStore;
946
- type index$5_BaseAttachedStores = BaseAttachedStores;
947
- type index$5_BaseBlockstoreImpl = BaseBlockstoreImpl;
948
- declare const index$5_BaseBlockstoreImpl: typeof BaseBlockstoreImpl;
949
- type index$5_BaseStore = BaseStore;
950
- type index$5_BlockFetcher = BlockFetcher;
951
- type index$5_BlockstoreOpts = BlockstoreOpts;
952
- type index$5_BlockstoreParams = BlockstoreParams;
953
- type index$5_BlockstoreRuntime = BlockstoreRuntime;
954
- type index$5_BytesAndKeyWithIv = BytesAndKeyWithIv;
955
- type index$5_CIDActiveStore = CIDActiveStore;
956
- type index$5_CIDBlock = CIDBlock;
957
- declare const index$5_Car2FPMsg: typeof Car2FPMsg;
958
- type index$5_CarActiveStore = CarActiveStore;
959
- declare const index$5_CarActiveStore: typeof CarActiveStore;
960
- type index$5_CarAttachedStores = CarAttachedStores;
961
- type index$5_CarCacheItem = CarCacheItem;
962
- type index$5_CarClockHead = CarClockHead;
963
- type index$5_CarClockLink = CarClockLink;
964
- type index$5_CarGroup = CarGroup;
965
- type index$5_CarHeader<T> = CarHeader<T>;
966
- type index$5_CarLog = CarLog;
967
- declare const index$5_CarLog: typeof CarLog;
968
- type index$5_CarMakeable = CarMakeable;
969
- type index$5_CarStore = CarStore;
970
- type index$5_CarTransactionImpl = CarTransactionImpl;
971
- declare const index$5_CarTransactionImpl: typeof CarTransactionImpl;
972
- type index$5_CarTransactionOpts = CarTransactionOpts;
973
- type index$5_CodecOpts = CodecOpts;
974
- type index$5_CommitOpts = CommitOpts;
975
- type index$5_CompactFetcher = CompactFetcher;
976
- type index$5_CompactFn = CompactFn;
977
- type index$5_CompactionFetcher = CompactionFetcher;
978
- declare const index$5_CompactionFetcher: typeof CompactionFetcher;
979
- type index$5_Connection = Connection;
980
- type index$5_CryptoAction = CryptoAction;
981
- type index$5_DataAndMetaAndWalStore = DataAndMetaAndWalStore;
982
- type index$5_DataAndMetaStore = DataAndMetaStore;
983
- type index$5_DataSaveOpts = DataSaveOpts;
984
- type index$5_DbMeta = DbMeta;
985
- type index$5_DbMetaBinary = DbMetaBinary;
986
- type index$5_DbMetaEvent = DbMetaEvent;
987
- type index$5_DbMetaEventBlock = DbMetaEventBlock;
988
- declare const index$5_DbMetaEventEqual: typeof DbMetaEventEqual;
989
- declare const index$5_DbMetaEventsEqual: typeof DbMetaEventsEqual;
990
- type index$5_EncryptedBlock = EncryptedBlock;
991
- type index$5_EncryptedBlockstore = EncryptedBlockstore;
992
- declare const index$5_EncryptedBlockstore: typeof EncryptedBlockstore;
993
- type index$5_FPEnvelope<T> = FPEnvelope<T>;
994
- type index$5_FPEnvelopeCar = FPEnvelopeCar;
995
- type index$5_FPEnvelopeFile = FPEnvelopeFile;
996
- type index$5_FPEnvelopeMeta = FPEnvelopeMeta;
997
- type index$5_FPEnvelopeType = FPEnvelopeType;
998
- declare const index$5_FPEnvelopeTypes: typeof FPEnvelopeTypes;
999
- type index$5_FPEnvelopeWAL = FPEnvelopeWAL;
1000
- type index$5_FPWALCarsOps = FPWALCarsOps;
1001
- declare const index$5_File2FPMsg: typeof File2FPMsg;
1002
- type index$5_FileActiveStore = FileActiveStore;
1003
- declare const index$5_FileActiveStore: typeof FileActiveStore;
1004
- type index$5_FileAttachedStores = FileAttachedStores;
1005
- type index$5_FileStore = FileStore;
1006
- type index$5_FroozenCarLog = FroozenCarLog;
1007
- type index$5_Gateway = Gateway;
1008
- type index$5_GatewayOpts = GatewayOpts;
1009
- type index$5_GetResult = GetResult;
1010
- type index$5_InterceptorGateway = InterceptorGateway;
1011
- declare const index$5_InterceptorGateway: typeof InterceptorGateway;
1012
- type index$5_IvAndKeyAndBytes = IvAndKeyAndBytes;
1013
- type index$5_IvKeyIdData = IvKeyIdData;
1014
- type index$5_KeyMaterial = KeyMaterial;
1015
- type index$5_KeyUpsertResult = KeyUpsertResult;
1016
- type index$5_KeyWithFingerPrint = KeyWithFingerPrint;
1017
- type index$5_KeysByFingerprint = KeysByFingerprint;
1018
- type index$5_LoadHandler = LoadHandler;
1019
- type index$5_Loadable = Loadable;
1020
- type index$5_Loader = Loader;
1021
- declare const index$5_Loader: typeof Loader;
1022
- type index$5_LocalActiveStore = LocalActiveStore;
1023
- type index$5_LocalDataAndMetaAndWalStore = LocalDataAndMetaAndWalStore;
1024
- type index$5_MetaActiveStore = MetaActiveStore;
1025
- declare const index$5_MetaActiveStore: typeof MetaActiveStore;
1026
- type index$5_MetaAttachedStores = MetaAttachedStores;
1027
- type index$5_MetaStore = MetaStore;
1028
- type index$5_PassThroughGateway = PassThroughGateway;
1029
- declare const index$5_PassThroughGateway: typeof PassThroughGateway;
1030
- type index$5_RefBlockstore = RefBlockstore;
1031
- type index$5_RefLoadable = RefLoadable;
1032
- type index$5_SerdeGateway = SerdeGateway;
1033
- type index$5_SerdeGatewayBuildUrlOp = SerdeGatewayBuildUrlOp;
1034
- type index$5_SerdeGatewayBuildUrlReturn = SerdeGatewayBuildUrlReturn;
1035
- type index$5_SerdeGatewayCloseOp = SerdeGatewayCloseOp;
1036
- type index$5_SerdeGatewayCloseReturn = SerdeGatewayCloseReturn;
1037
- type index$5_SerdeGatewayCtx = SerdeGatewayCtx;
1038
- type index$5_SerdeGatewayDeleteOp = SerdeGatewayDeleteOp;
1039
- type index$5_SerdeGatewayDeleteReturn = SerdeGatewayDeleteReturn;
1040
- type index$5_SerdeGatewayDestroyOp = SerdeGatewayDestroyOp;
1041
- type index$5_SerdeGatewayDestroyReturn = SerdeGatewayDestroyReturn;
1042
- type index$5_SerdeGatewayFactoryItem = SerdeGatewayFactoryItem;
1043
- type index$5_SerdeGatewayGetOp = SerdeGatewayGetOp;
1044
- type index$5_SerdeGatewayGetReturn<S> = SerdeGatewayGetReturn<S>;
1045
- type index$5_SerdeGatewayInterceptor = SerdeGatewayInterceptor;
1046
- type index$5_SerdeGatewayOpts = SerdeGatewayOpts;
1047
- type index$5_SerdeGatewayPutOp<T> = SerdeGatewayPutOp<T>;
1048
- type index$5_SerdeGatewayPutReturn<T> = SerdeGatewayPutReturn<T>;
1049
- type index$5_SerdeGatewayReturn<O, T> = SerdeGatewayReturn<O, T>;
1050
- type index$5_SerdeGatewayStartOp = SerdeGatewayStartOp;
1051
- type index$5_SerdeGatewayStartReturn = SerdeGatewayStartReturn;
1052
- type index$5_SerdeGatewaySubscribeOp = SerdeGatewaySubscribeOp;
1053
- type index$5_SerdeGatewaySubscribeReturn = SerdeGatewaySubscribeReturn;
1054
- type index$5_SerdeGetResult<S> = SerdeGetResult<S>;
1055
- type index$5_SerdeOrGatewayFactoryItem = SerdeOrGatewayFactoryItem;
1056
- type index$5_StoreEnDeFile = StoreEnDeFile;
1057
- type index$5_StoreFactory = StoreFactory;
1058
- type index$5_StoreFactoryItem = StoreFactoryItem;
1059
- type index$5_StoreRuntime = StoreRuntime;
1060
- type index$5_StoreRuntimeUrls = StoreRuntimeUrls;
1061
- type index$5_StoreURIRuntime = StoreURIRuntime;
1062
- type index$5_StoreURIs = StoreURIs;
1063
- type index$5_StoreUrls = StoreUrls;
1064
- type index$5_StoreUrlsOpts = StoreUrlsOpts;
1065
- type index$5_TaskManager = TaskManager;
1066
- declare const index$5_TaskManager: typeof TaskManager;
1067
- type index$5_TaskManagerParams = TaskManagerParams;
1068
- type index$5_TransactionMeta = TransactionMeta;
1069
- type index$5_TransactionWrapper<M extends TransactionMeta> = TransactionWrapper<M>;
1070
- type index$5_UnsubscribeResult = UnsubscribeResult;
1071
- type index$5_UrlAndInterceptor = UrlAndInterceptor;
1072
- type index$5_VoidResult = VoidResult;
1073
- type index$5_WALActiveStore = WALActiveStore;
1074
- declare const index$5_WALActiveStore: typeof WALActiveStore;
1075
- type index$5_WALAttachedStores = WALAttachedStores;
1076
- type index$5_WALState = WALState;
1077
- type index$5_WALStore = WALStore;
1078
- type index$5_WriteableDataAndMetaAndWalStore = WriteableDataAndMetaAndWalStore;
1079
- type index$5_WriteableDataAndMetaStore = WriteableDataAndMetaStore;
1080
- declare const index$5_createAttachedStores: typeof createAttachedStores;
1081
- declare const index$5_createDbMetaEvent: typeof createDbMetaEvent;
1082
- declare const index$5_defaultGatewayFactoryItem: typeof defaultGatewayFactoryItem;
1083
- declare const index$5_ensureStoreEnDeFile: typeof ensureStoreEnDeFile;
1084
- declare const index$5_getDefaultURI: typeof getDefaultURI;
1085
- declare const index$5_getGatewayFactoryItem: typeof getGatewayFactoryItem;
1086
- declare const index$5_getStartedGateway: typeof getStartedGateway;
1087
- declare const index$5_parseCarFile: typeof parseCarFile;
1088
- declare const index$5_registerStoreProtocol: typeof registerStoreProtocol;
1089
- declare const index$5_toCIDBlock: typeof toCIDBlock;
1090
- declare const index$5_toStoreRuntime: typeof toStoreRuntime;
1091
- declare namespace index$5 {
1092
- export { type index$5_ActiveStore as ActiveStore, type index$5_AnyAnyBlock as AnyAnyBlock, type index$5_AnyAnyLink as AnyAnyLink, type index$5_AnyBlock as AnyBlock, type index$5_AnyDecodedBlock as AnyDecodedBlock, type index$5_AnyLink as AnyLink, type index$5_AnyLinkFn as AnyLinkFn, index$5_AttachedRemotesImpl as AttachedRemotesImpl, type index$5_AttachedStores as AttachedStores, index$5_BaseActiveStore as BaseActiveStore, type index$5_BaseAttachedStores as BaseAttachedStores, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, type index$5_BlockFetcher as BlockFetcher, type index$5_BlockstoreOpts as BlockstoreOpts, type index$5_BlockstoreParams as BlockstoreParams, type index$5_BlockstoreRuntime as BlockstoreRuntime, type index$5_BytesAndKeyWithIv as BytesAndKeyWithIv, type index$5_CIDActiveStore as CIDActiveStore, type index$5_CIDBlock as CIDBlock, index$5_Car2FPMsg as Car2FPMsg, index$5_CarActiveStore as CarActiveStore, type index$5_CarAttachedStores as CarAttachedStores, type index$5_CarCacheItem as CarCacheItem, type index$5_CarClockHead as CarClockHead, type index$5_CarClockLink as CarClockLink, type index$5_CarGroup as CarGroup, type index$5_CarHeader as CarHeader, index$5_CarLog as CarLog, type index$5_CarMakeable as CarMakeable, type index$5_CarStore as CarStore, index$5_CarTransactionImpl as CarTransactionImpl, type index$5_CarTransactionOpts as CarTransactionOpts, type index$5_CodecOpts as CodecOpts, type index$5_CommitOpts as CommitOpts, type index$5_CompactFetcher as CompactFetcher, type index$5_CompactFn as CompactFn, index$5_CompactionFetcher as CompactionFetcher, type index$5_Connection as Connection, type index$5_CryptoAction as CryptoAction, type index$5_DataAndMetaAndWalStore as DataAndMetaAndWalStore, type index$5_DataAndMetaStore as DataAndMetaStore, type index$5_DataSaveOpts as DataSaveOpts, type index$5_DbMeta as DbMeta, type index$5_DbMetaBinary as DbMetaBinary, type index$5_DbMetaEvent as DbMetaEvent, type index$5_DbMetaEventBlock as DbMetaEventBlock, index$5_DbMetaEventEqual as DbMetaEventEqual, index$5_DbMetaEventsEqual as DbMetaEventsEqual, type index$5_EncryptedBlock as EncryptedBlock, index$5_EncryptedBlockstore as EncryptedBlockstore, type index$5_FPEnvelope as FPEnvelope, type index$5_FPEnvelopeCar as FPEnvelopeCar, type index$5_FPEnvelopeFile as FPEnvelopeFile, type index$5_FPEnvelopeMeta as FPEnvelopeMeta, type index$5_FPEnvelopeType as FPEnvelopeType, index$5_FPEnvelopeTypes as FPEnvelopeTypes, type index$5_FPEnvelopeWAL as FPEnvelopeWAL, type index$5_FPWALCarsOps as FPWALCarsOps, index$5_File2FPMsg as File2FPMsg, index$5_FileActiveStore as FileActiveStore, type index$5_FileAttachedStores as FileAttachedStores, type index$5_FileStore as FileStore, type index$5_FroozenCarLog as FroozenCarLog, type index$5_Gateway as Gateway, type index$5_GatewayOpts as GatewayOpts, type index$5_GetResult as GetResult, index$5_InterceptorGateway as InterceptorGateway, type index$5_IvAndKeyAndBytes as IvAndKeyAndBytes, type index$5_IvKeyIdData as IvKeyIdData, type index$5_KeyMaterial as KeyMaterial, type index$5_KeyUpsertResult as KeyUpsertResult, type index$5_KeyWithFingerPrint as KeyWithFingerPrint, type index$5_KeysByFingerprint as KeysByFingerprint, type index$5_LoadHandler as LoadHandler, type index$5_Loadable as Loadable, index$5_Loader as Loader, type index$5_LocalActiveStore as LocalActiveStore, type index$5_LocalDataAndMetaAndWalStore as LocalDataAndMetaAndWalStore, index$5_MetaActiveStore as MetaActiveStore, type index$5_MetaAttachedStores as MetaAttachedStores, type index$5_MetaStore as MetaStore, index$5_PassThroughGateway as PassThroughGateway, type index$5_RefBlockstore as RefBlockstore, type index$5_RefLoadable as RefLoadable, type index$5_SerdeGateway as SerdeGateway, type index$5_SerdeGatewayBuildUrlOp as SerdeGatewayBuildUrlOp, type index$5_SerdeGatewayBuildUrlReturn as SerdeGatewayBuildUrlReturn, type index$5_SerdeGatewayCloseOp as SerdeGatewayCloseOp, type index$5_SerdeGatewayCloseReturn as SerdeGatewayCloseReturn, type index$5_SerdeGatewayCtx as SerdeGatewayCtx, type index$5_SerdeGatewayDeleteOp as SerdeGatewayDeleteOp, type index$5_SerdeGatewayDeleteReturn as SerdeGatewayDeleteReturn, type index$5_SerdeGatewayDestroyOp as SerdeGatewayDestroyOp, type index$5_SerdeGatewayDestroyReturn as SerdeGatewayDestroyReturn, type index$5_SerdeGatewayFactoryItem as SerdeGatewayFactoryItem, type index$5_SerdeGatewayGetOp as SerdeGatewayGetOp, type index$5_SerdeGatewayGetReturn as SerdeGatewayGetReturn, type index$5_SerdeGatewayInterceptor as SerdeGatewayInterceptor, type index$5_SerdeGatewayOpts as SerdeGatewayOpts, type index$5_SerdeGatewayPutOp as SerdeGatewayPutOp, type index$5_SerdeGatewayPutReturn as SerdeGatewayPutReturn, type index$5_SerdeGatewayReturn as SerdeGatewayReturn, type index$5_SerdeGatewayStartOp as SerdeGatewayStartOp, type index$5_SerdeGatewayStartReturn as SerdeGatewayStartReturn, type index$5_SerdeGatewaySubscribeOp as SerdeGatewaySubscribeOp, type index$5_SerdeGatewaySubscribeReturn as SerdeGatewaySubscribeReturn, type index$5_SerdeGetResult as SerdeGetResult, type index$5_SerdeOrGatewayFactoryItem as SerdeOrGatewayFactoryItem, type index$5_StoreEnDeFile as StoreEnDeFile, type index$5_StoreFactory as StoreFactory, type index$5_StoreFactoryItem as StoreFactoryItem, type index$5_StoreRuntime as StoreRuntime, type index$5_StoreRuntimeUrls as StoreRuntimeUrls, type index$5_StoreURIRuntime as StoreURIRuntime, type index$5_StoreURIs as StoreURIs, type index$5_StoreUrls as StoreUrls, type index$5_StoreUrlsOpts as StoreUrlsOpts, index$5_TaskManager as TaskManager, type index$5_TaskManagerParams as TaskManagerParams, type index$5_TransactionMeta as TransactionMeta, type index$5_TransactionWrapper as TransactionWrapper, type index$5_UnsubscribeResult as UnsubscribeResult, type index$5_UrlAndInterceptor as UrlAndInterceptor, type index$5_VoidResult as VoidResult, index$5_WALActiveStore as WALActiveStore, type index$5_WALAttachedStores as WALAttachedStores, type index$5_WALState as WALState, type index$5_WALStore as WALStore, type index$5_WriteableDataAndMetaAndWalStore as WriteableDataAndMetaAndWalStore, type index$5_WriteableDataAndMetaStore as WriteableDataAndMetaStore, index$5_createAttachedStores as createAttachedStores, index$5_createDbMetaEvent as createDbMetaEvent, index$5_defaultGatewayFactoryItem as defaultGatewayFactoryItem, index$5_ensureStoreEnDeFile as ensureStoreEnDeFile, index$5_getDefaultURI as getDefaultURI, index$5_getGatewayFactoryItem as getGatewayFactoryItem, index$5_getStartedGateway as getStartedGateway, index$5_parseCarFile as parseCarFile, index$5_registerStoreProtocol as registerStoreProtocol, index$5_toCIDBlock as toCIDBlock, index$5_toStoreRuntime as toStoreRuntime };
949
+ type index$8_ActiveStore = ActiveStore;
950
+ type index$8_AnyAnyBlock = AnyAnyBlock;
951
+ type index$8_AnyAnyLink = AnyAnyLink;
952
+ type index$8_AnyBlock = AnyBlock;
953
+ type index$8_AnyDecodedBlock = AnyDecodedBlock;
954
+ type index$8_AnyLink = AnyLink;
955
+ type index$8_AnyLinkFn = AnyLinkFn;
956
+ type index$8_AttachedRemotesImpl = AttachedRemotesImpl;
957
+ declare const index$8_AttachedRemotesImpl: typeof AttachedRemotesImpl;
958
+ type index$8_AttachedStores = AttachedStores;
959
+ type index$8_BaseActiveStore = BaseActiveStore;
960
+ declare const index$8_BaseActiveStore: typeof BaseActiveStore;
961
+ type index$8_BaseAttachedStores = BaseAttachedStores;
962
+ type index$8_BaseBlockstoreImpl = BaseBlockstoreImpl;
963
+ declare const index$8_BaseBlockstoreImpl: typeof BaseBlockstoreImpl;
964
+ type index$8_BaseStore = BaseStore;
965
+ type index$8_BlockFetcher = BlockFetcher;
966
+ type index$8_BlockstoreOpts = BlockstoreOpts;
967
+ type index$8_BlockstoreParams = BlockstoreParams;
968
+ type index$8_BlockstoreRuntime = BlockstoreRuntime;
969
+ type index$8_BytesAndKeyWithIv = BytesAndKeyWithIv;
970
+ type index$8_CIDActiveStore = CIDActiveStore;
971
+ type index$8_CIDBlock = CIDBlock;
972
+ declare const index$8_Car2FPMsg: typeof Car2FPMsg;
973
+ type index$8_CarActiveStore = CarActiveStore;
974
+ declare const index$8_CarActiveStore: typeof CarActiveStore;
975
+ type index$8_CarAttachedStores = CarAttachedStores;
976
+ type index$8_CarCacheItem = CarCacheItem;
977
+ type index$8_CarClockHead = CarClockHead;
978
+ type index$8_CarClockLink = CarClockLink;
979
+ type index$8_CarGroup = CarGroup;
980
+ type index$8_CarHeader<T> = CarHeader<T>;
981
+ type index$8_CarLog = CarLog;
982
+ declare const index$8_CarLog: typeof CarLog;
983
+ type index$8_CarMakeable = CarMakeable;
984
+ type index$8_CarStore = CarStore;
985
+ type index$8_CarTransactionImpl = CarTransactionImpl;
986
+ declare const index$8_CarTransactionImpl: typeof CarTransactionImpl;
987
+ type index$8_CarTransactionOpts = CarTransactionOpts;
988
+ type index$8_CodecOpts = CodecOpts;
989
+ type index$8_CommitOpts = CommitOpts;
990
+ type index$8_CompactFetcher = CompactFetcher;
991
+ type index$8_CompactFn = CompactFn;
992
+ type index$8_CompactionFetcher = CompactionFetcher;
993
+ declare const index$8_CompactionFetcher: typeof CompactionFetcher;
994
+ type index$8_Connection = Connection;
995
+ type index$8_CryptoAction = CryptoAction;
996
+ type index$8_DataAndMetaAndWalStore = DataAndMetaAndWalStore;
997
+ type index$8_DataAndMetaStore = DataAndMetaStore;
998
+ type index$8_DataSaveOpts = DataSaveOpts;
999
+ type index$8_DbMeta = DbMeta;
1000
+ type index$8_DbMetaBinary = DbMetaBinary;
1001
+ type index$8_DbMetaEvent = DbMetaEvent;
1002
+ type index$8_DbMetaEventBlock = DbMetaEventBlock;
1003
+ declare const index$8_DbMetaEventEqual: typeof DbMetaEventEqual;
1004
+ declare const index$8_DbMetaEventsEqual: typeof DbMetaEventsEqual;
1005
+ type index$8_EncryptedBlock = EncryptedBlock;
1006
+ type index$8_EncryptedBlockstore = EncryptedBlockstore;
1007
+ declare const index$8_EncryptedBlockstore: typeof EncryptedBlockstore;
1008
+ type index$8_FPEnvelope<T> = FPEnvelope<T>;
1009
+ type index$8_FPEnvelopeCar = FPEnvelopeCar;
1010
+ type index$8_FPEnvelopeFile = FPEnvelopeFile;
1011
+ type index$8_FPEnvelopeMeta = FPEnvelopeMeta;
1012
+ type index$8_FPEnvelopeType = FPEnvelopeType;
1013
+ declare const index$8_FPEnvelopeTypes: typeof FPEnvelopeTypes;
1014
+ type index$8_FPEnvelopeWAL = FPEnvelopeWAL;
1015
+ type index$8_FPWALCarsOps = FPWALCarsOps;
1016
+ declare const index$8_File2FPMsg: typeof File2FPMsg;
1017
+ type index$8_FileActiveStore = FileActiveStore;
1018
+ declare const index$8_FileActiveStore: typeof FileActiveStore;
1019
+ type index$8_FileAttachedStores = FileAttachedStores;
1020
+ type index$8_FileStore = FileStore;
1021
+ type index$8_FroozenCarLog = FroozenCarLog;
1022
+ type index$8_Gateway = Gateway;
1023
+ type index$8_GatewayOpts = GatewayOpts;
1024
+ type index$8_GetResult = GetResult;
1025
+ type index$8_InterceptorGateway = InterceptorGateway;
1026
+ declare const index$8_InterceptorGateway: typeof InterceptorGateway;
1027
+ type index$8_IvAndKeyAndBytes = IvAndKeyAndBytes;
1028
+ type index$8_IvKeyIdData = IvKeyIdData;
1029
+ type index$8_KeyMaterial = KeyMaterial;
1030
+ type index$8_KeyUpsertResult = KeyUpsertResult;
1031
+ type index$8_KeyWithFingerPrint = KeyWithFingerPrint;
1032
+ type index$8_KeysByFingerprint = KeysByFingerprint;
1033
+ type index$8_LoadHandler = LoadHandler;
1034
+ type index$8_Loadable = Loadable;
1035
+ type index$8_Loader = Loader;
1036
+ declare const index$8_Loader: typeof Loader;
1037
+ type index$8_LocalActiveStore = LocalActiveStore;
1038
+ type index$8_LocalDataAndMetaAndWalStore = LocalDataAndMetaAndWalStore;
1039
+ type index$8_MetaActiveStore = MetaActiveStore;
1040
+ declare const index$8_MetaActiveStore: typeof MetaActiveStore;
1041
+ type index$8_MetaAttachedStores = MetaAttachedStores;
1042
+ type index$8_MetaStore = MetaStore;
1043
+ type index$8_PassThroughGateway = PassThroughGateway;
1044
+ declare const index$8_PassThroughGateway: typeof PassThroughGateway;
1045
+ type index$8_RefBlockstore = RefBlockstore;
1046
+ type index$8_RefLoadable = RefLoadable;
1047
+ type index$8_SerdeGateway = SerdeGateway;
1048
+ type index$8_SerdeGatewayBuildUrlOp = SerdeGatewayBuildUrlOp;
1049
+ type index$8_SerdeGatewayBuildUrlReturn = SerdeGatewayBuildUrlReturn;
1050
+ type index$8_SerdeGatewayCloseOp = SerdeGatewayCloseOp;
1051
+ type index$8_SerdeGatewayCloseReturn = SerdeGatewayCloseReturn;
1052
+ type index$8_SerdeGatewayCtx = SerdeGatewayCtx;
1053
+ type index$8_SerdeGatewayDeleteOp = SerdeGatewayDeleteOp;
1054
+ type index$8_SerdeGatewayDeleteReturn = SerdeGatewayDeleteReturn;
1055
+ type index$8_SerdeGatewayDestroyOp = SerdeGatewayDestroyOp;
1056
+ type index$8_SerdeGatewayDestroyReturn = SerdeGatewayDestroyReturn;
1057
+ type index$8_SerdeGatewayFactoryItem = SerdeGatewayFactoryItem;
1058
+ type index$8_SerdeGatewayGetOp = SerdeGatewayGetOp;
1059
+ type index$8_SerdeGatewayGetReturn<S> = SerdeGatewayGetReturn<S>;
1060
+ type index$8_SerdeGatewayInterceptor = SerdeGatewayInterceptor;
1061
+ type index$8_SerdeGatewayOpts = SerdeGatewayOpts;
1062
+ type index$8_SerdeGatewayPutOp<T> = SerdeGatewayPutOp<T>;
1063
+ type index$8_SerdeGatewayPutReturn<T> = SerdeGatewayPutReturn<T>;
1064
+ type index$8_SerdeGatewayReturn<O, T> = SerdeGatewayReturn<O, T>;
1065
+ type index$8_SerdeGatewayStartOp = SerdeGatewayStartOp;
1066
+ type index$8_SerdeGatewayStartReturn = SerdeGatewayStartReturn;
1067
+ type index$8_SerdeGatewaySubscribeOp = SerdeGatewaySubscribeOp;
1068
+ type index$8_SerdeGatewaySubscribeReturn = SerdeGatewaySubscribeReturn;
1069
+ type index$8_SerdeGetResult<S> = SerdeGetResult<S>;
1070
+ type index$8_SerdeOrGatewayFactoryItem = SerdeOrGatewayFactoryItem;
1071
+ type index$8_StoreEnDeFile = StoreEnDeFile;
1072
+ type index$8_StoreFactory = StoreFactory;
1073
+ type index$8_StoreFactoryItem = StoreFactoryItem;
1074
+ type index$8_StoreRuntime = StoreRuntime;
1075
+ type index$8_StoreRuntimeUrls = StoreRuntimeUrls;
1076
+ type index$8_StoreURIRuntime = StoreURIRuntime;
1077
+ type index$8_StoreURIs = StoreURIs;
1078
+ type index$8_StoreUrls = StoreUrls;
1079
+ type index$8_StoreUrlsOpts = StoreUrlsOpts;
1080
+ type index$8_TaskManager = TaskManager;
1081
+ declare const index$8_TaskManager: typeof TaskManager;
1082
+ type index$8_TaskManagerParams = TaskManagerParams;
1083
+ type index$8_TransactionMeta = TransactionMeta;
1084
+ type index$8_TransactionWrapper<M extends TransactionMeta> = TransactionWrapper<M>;
1085
+ type index$8_URIInterceptor = URIInterceptor;
1086
+ declare const index$8_URIInterceptor: typeof URIInterceptor;
1087
+ type index$8_URIMapper = URIMapper;
1088
+ type index$8_UnsubscribeResult = UnsubscribeResult;
1089
+ type index$8_UrlAndInterceptor = UrlAndInterceptor;
1090
+ type index$8_VoidResult = VoidResult;
1091
+ type index$8_WALActiveStore = WALActiveStore;
1092
+ declare const index$8_WALActiveStore: typeof WALActiveStore;
1093
+ type index$8_WALAttachedStores = WALAttachedStores;
1094
+ type index$8_WALState = WALState;
1095
+ type index$8_WALStore = WALStore;
1096
+ type index$8_WriteableDataAndMetaAndWalStore = WriteableDataAndMetaAndWalStore;
1097
+ type index$8_WriteableDataAndMetaStore = WriteableDataAndMetaStore;
1098
+ declare const index$8_createAttachedStores: typeof createAttachedStores;
1099
+ declare const index$8_createDbMetaEvent: typeof createDbMetaEvent;
1100
+ declare const index$8_defaultGatewayFactoryItem: typeof defaultGatewayFactoryItem;
1101
+ declare const index$8_ensureStoreEnDeFile: typeof ensureStoreEnDeFile;
1102
+ declare const index$8_getDefaultURI: typeof getDefaultURI;
1103
+ declare const index$8_getGatewayFactoryItem: typeof getGatewayFactoryItem;
1104
+ declare const index$8_getInterceptableGateway: typeof getInterceptableGateway;
1105
+ declare const index$8_parseCarFile: typeof parseCarFile;
1106
+ declare const index$8_registerStoreProtocol: typeof registerStoreProtocol;
1107
+ declare const index$8_toCIDBlock: typeof toCIDBlock;
1108
+ declare const index$8_toStoreRuntime: typeof toStoreRuntime;
1109
+ declare namespace index$8 {
1110
+ export { type index$8_ActiveStore as ActiveStore, type index$8_AnyAnyBlock as AnyAnyBlock, type index$8_AnyAnyLink as AnyAnyLink, type index$8_AnyBlock as AnyBlock, type index$8_AnyDecodedBlock as AnyDecodedBlock, type index$8_AnyLink as AnyLink, type index$8_AnyLinkFn as AnyLinkFn, index$8_AttachedRemotesImpl as AttachedRemotesImpl, type index$8_AttachedStores as AttachedStores, index$8_BaseActiveStore as BaseActiveStore, type index$8_BaseAttachedStores as BaseAttachedStores, index$8_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$8_BaseStore as BaseStore, type index$8_BlockFetcher as BlockFetcher, type index$8_BlockstoreOpts as BlockstoreOpts, type index$8_BlockstoreParams as BlockstoreParams, type index$8_BlockstoreRuntime as BlockstoreRuntime, type index$8_BytesAndKeyWithIv as BytesAndKeyWithIv, type index$8_CIDActiveStore as CIDActiveStore, type index$8_CIDBlock as CIDBlock, index$8_Car2FPMsg as Car2FPMsg, index$8_CarActiveStore as CarActiveStore, type index$8_CarAttachedStores as CarAttachedStores, type index$8_CarCacheItem as CarCacheItem, type index$8_CarClockHead as CarClockHead, type index$8_CarClockLink as CarClockLink, type index$8_CarGroup as CarGroup, type index$8_CarHeader as CarHeader, index$8_CarLog as CarLog, type index$8_CarMakeable as CarMakeable, type index$8_CarStore as CarStore, index$8_CarTransactionImpl as CarTransactionImpl, type index$8_CarTransactionOpts as CarTransactionOpts, type index$8_CodecOpts as CodecOpts, type index$8_CommitOpts as CommitOpts, type index$8_CompactFetcher as CompactFetcher, type index$8_CompactFn as CompactFn, index$8_CompactionFetcher as CompactionFetcher, type index$8_Connection as Connection, type index$8_CryptoAction as CryptoAction, type index$8_DataAndMetaAndWalStore as DataAndMetaAndWalStore, type index$8_DataAndMetaStore as DataAndMetaStore, type index$8_DataSaveOpts as DataSaveOpts, type index$8_DbMeta as DbMeta, type index$8_DbMetaBinary as DbMetaBinary, type index$8_DbMetaEvent as DbMetaEvent, type index$8_DbMetaEventBlock as DbMetaEventBlock, index$8_DbMetaEventEqual as DbMetaEventEqual, index$8_DbMetaEventsEqual as DbMetaEventsEqual, type index$8_EncryptedBlock as EncryptedBlock, index$8_EncryptedBlockstore as EncryptedBlockstore, type index$8_FPEnvelope as FPEnvelope, type index$8_FPEnvelopeCar as FPEnvelopeCar, type index$8_FPEnvelopeFile as FPEnvelopeFile, type index$8_FPEnvelopeMeta as FPEnvelopeMeta, type index$8_FPEnvelopeType as FPEnvelopeType, index$8_FPEnvelopeTypes as FPEnvelopeTypes, type index$8_FPEnvelopeWAL as FPEnvelopeWAL, type index$8_FPWALCarsOps as FPWALCarsOps, index$8_File2FPMsg as File2FPMsg, index$8_FileActiveStore as FileActiveStore, type index$8_FileAttachedStores as FileAttachedStores, type index$8_FileStore as FileStore, type index$8_FroozenCarLog as FroozenCarLog, type index$8_Gateway as Gateway, type index$8_GatewayOpts as GatewayOpts, type index$8_GetResult as GetResult, index$8_InterceptorGateway as InterceptorGateway, type index$8_IvAndKeyAndBytes as IvAndKeyAndBytes, type index$8_IvKeyIdData as IvKeyIdData, type index$8_KeyMaterial as KeyMaterial, type index$8_KeyUpsertResult as KeyUpsertResult, type index$8_KeyWithFingerPrint as KeyWithFingerPrint, type index$8_KeysByFingerprint as KeysByFingerprint, type index$8_LoadHandler as LoadHandler, type index$8_Loadable as Loadable, index$8_Loader as Loader, type index$8_LocalActiveStore as LocalActiveStore, type index$8_LocalDataAndMetaAndWalStore as LocalDataAndMetaAndWalStore, index$8_MetaActiveStore as MetaActiveStore, type index$8_MetaAttachedStores as MetaAttachedStores, type index$8_MetaStore as MetaStore, index$8_PassThroughGateway as PassThroughGateway, type index$8_RefBlockstore as RefBlockstore, type index$8_RefLoadable as RefLoadable, type index$8_SerdeGateway as SerdeGateway, type index$8_SerdeGatewayBuildUrlOp as SerdeGatewayBuildUrlOp, type index$8_SerdeGatewayBuildUrlReturn as SerdeGatewayBuildUrlReturn, type index$8_SerdeGatewayCloseOp as SerdeGatewayCloseOp, type index$8_SerdeGatewayCloseReturn as SerdeGatewayCloseReturn, type index$8_SerdeGatewayCtx as SerdeGatewayCtx, type index$8_SerdeGatewayDeleteOp as SerdeGatewayDeleteOp, type index$8_SerdeGatewayDeleteReturn as SerdeGatewayDeleteReturn, type index$8_SerdeGatewayDestroyOp as SerdeGatewayDestroyOp, type index$8_SerdeGatewayDestroyReturn as SerdeGatewayDestroyReturn, type index$8_SerdeGatewayFactoryItem as SerdeGatewayFactoryItem, type index$8_SerdeGatewayGetOp as SerdeGatewayGetOp, type index$8_SerdeGatewayGetReturn as SerdeGatewayGetReturn, type index$8_SerdeGatewayInterceptor as SerdeGatewayInterceptor, type index$8_SerdeGatewayOpts as SerdeGatewayOpts, type index$8_SerdeGatewayPutOp as SerdeGatewayPutOp, type index$8_SerdeGatewayPutReturn as SerdeGatewayPutReturn, type index$8_SerdeGatewayReturn as SerdeGatewayReturn, type index$8_SerdeGatewayStartOp as SerdeGatewayStartOp, type index$8_SerdeGatewayStartReturn as SerdeGatewayStartReturn, type index$8_SerdeGatewaySubscribeOp as SerdeGatewaySubscribeOp, type index$8_SerdeGatewaySubscribeReturn as SerdeGatewaySubscribeReturn, type index$8_SerdeGetResult as SerdeGetResult, type index$8_SerdeOrGatewayFactoryItem as SerdeOrGatewayFactoryItem, type index$8_StoreEnDeFile as StoreEnDeFile, type index$8_StoreFactory as StoreFactory, type index$8_StoreFactoryItem as StoreFactoryItem, type index$8_StoreRuntime as StoreRuntime, type index$8_StoreRuntimeUrls as StoreRuntimeUrls, type index$8_StoreURIRuntime as StoreURIRuntime, type index$8_StoreURIs as StoreURIs, type index$8_StoreUrls as StoreUrls, type index$8_StoreUrlsOpts as StoreUrlsOpts, index$8_TaskManager as TaskManager, type index$8_TaskManagerParams as TaskManagerParams, type index$8_TransactionMeta as TransactionMeta, type index$8_TransactionWrapper as TransactionWrapper, index$8_URIInterceptor as URIInterceptor, type index$8_URIMapper as URIMapper, type index$8_UnsubscribeResult as UnsubscribeResult, type index$8_UrlAndInterceptor as UrlAndInterceptor, type index$8_VoidResult as VoidResult, index$8_WALActiveStore as WALActiveStore, type index$8_WALAttachedStores as WALAttachedStores, type index$8_WALState as WALState, type index$8_WALStore as WALStore, type index$8_WriteableDataAndMetaAndWalStore as WriteableDataAndMetaAndWalStore, type index$8_WriteableDataAndMetaStore as WriteableDataAndMetaStore, index$8_createAttachedStores as createAttachedStores, index$8_createDbMetaEvent as createDbMetaEvent, index$8_defaultGatewayFactoryItem as defaultGatewayFactoryItem, index$8_ensureStoreEnDeFile as ensureStoreEnDeFile, index$8_getDefaultURI as getDefaultURI, index$8_getGatewayFactoryItem as getGatewayFactoryItem, index$8_getInterceptableGateway as getInterceptableGateway, index$8_parseCarFile as parseCarFile, index$8_registerStoreProtocol as registerStoreProtocol, index$8_toCIDBlock as toCIDBlock, index$8_toStoreRuntime as toStoreRuntime };
1093
1111
  }
1094
1112
 
1095
1113
  interface WriteQueueParams {
@@ -1131,7 +1149,7 @@ interface ProllyNode<K extends IndexKeyType, T extends DocFragment> extends Prol
1131
1149
  readonly block: Promise<Block$1>;
1132
1150
  }
1133
1151
 
1134
- declare function index$4<K extends IndexKeyType = string, T extends DocTypes = NonNullable<unknown>, R extends DocFragment = T>(refDb: HasLogger & HasSuperThis & (HasCRDT | RefLedger), name: string, mapFn?: MapFn<T>, meta?: IdxMeta): Index<K, T, R>;
1152
+ declare function index$7<K extends IndexKeyType = string, T extends DocTypes = NonNullable<unknown>, R extends DocFragment = T>(refDb: HasLogger & HasSuperThis & (HasCRDT | RefLedger), name: string, mapFn?: MapFn<T>, meta?: IdxMeta): Index<K, T, R>;
1135
1153
  declare class Index<K extends IndexKeyType, T extends DocTypes, R extends DocFragment = T> {
1136
1154
  readonly blockstore: BaseBlockstore;
1137
1155
  readonly crdt: CRDT;
@@ -1154,6 +1172,7 @@ declare class Index<K extends IndexKeyType, T extends DocTypes, R extends DocFra
1154
1172
  }
1155
1173
 
1156
1174
  type Falsy = false | null | undefined;
1175
+ type Unreg = () => void;
1157
1176
  declare function isFalsy(value: unknown): value is Falsy;
1158
1177
  declare const PARAM: {
1159
1178
  SUFFIX: string;
@@ -1400,13 +1419,13 @@ interface CRDTEntry {
1400
1419
  readonly cid: string;
1401
1420
  }
1402
1421
  type VoidFn = () => void;
1403
- type UnReg = () => void;
1422
+ type UnReg$1 = () => void;
1404
1423
  interface CRDTClock {
1405
1424
  readonly head: ClockHead;
1406
- onTock(fn: VoidFn): UnReg;
1407
- onTick(fn: (updates: DocUpdate<DocTypes>[]) => void): UnReg;
1425
+ onTock(fn: VoidFn): UnReg$1;
1426
+ onTick(fn: (updates: DocUpdate<DocTypes>[]) => void): UnReg$1;
1408
1427
  applyHead(newHead: ClockHead, prevHead: ClockHead, updates?: DocUpdate<DocTypes>[]): Promise<void>;
1409
- onZoom(fn: VoidFn): UnReg;
1428
+ onZoom(fn: VoidFn): UnReg$1;
1410
1429
  close(): Promise<void>;
1411
1430
  ready(): Promise<void>;
1412
1431
  }
@@ -1524,6 +1543,7 @@ interface Database extends ReadyCloseDestroy, HasLogger, HasSuperThis {
1524
1543
  put<T extends DocTypes>(doc: DocSet<T>): Promise<DocResponse>;
1525
1544
  bulk<T extends DocTypes>(docs: DocSet<T>[]): Promise<BulkResponse>;
1526
1545
  del(id: string): Promise<DocResponse>;
1546
+ remove(id: string): Promise<DocResponse>;
1527
1547
  changes<T extends DocTypes>(since?: ClockHead, opts?: ChangesOptions): Promise<ChangesResponse<T>>;
1528
1548
  allDocs<T extends DocTypes>(opts?: AllDocsQueryOpts): Promise<AllDocsResponse<T>>;
1529
1549
  allDocuments<T extends DocTypes>(): Promise<{
@@ -1635,6 +1655,7 @@ declare class DatabaseImpl implements Database {
1635
1655
  put<T extends DocTypes>(doc: DocSet<T>): Promise<DocResponse>;
1636
1656
  bulk<T extends DocTypes>(docs: DocSet<T>[]): Promise<BulkResponse>;
1637
1657
  del(id: string): Promise<DocResponse>;
1658
+ remove(id: string): Promise<DocResponse>;
1638
1659
  changes<T extends DocTypes>(since?: ClockHead, opts?: ChangesOptions): Promise<ChangesResponse<T>>;
1639
1660
  allDocs<T extends DocTypes>(opts?: AllDocsQueryOpts): Promise<AllDocsResponse<T>>;
1640
1661
  allDocuments<T extends DocTypes>(): Promise<{
@@ -1775,9 +1796,361 @@ declare namespace block {
1775
1796
  export { type block_AsyncDecodeInput as AsyncDecodeInput, type block_AsyncEncodeInput as AsyncEncodeInput, block_Block as Block, type block_DecodeInput as DecodeInput, type block_EncodeInput as EncodeInput, block_create as create, block_createUnsafe as createUnsafe, block_decode as decode, block_encode as encode };
1776
1797
  }
1777
1798
 
1778
- declare const index$3_block: typeof block;
1779
- declare namespace index$3 {
1780
- export { index$3_block as block, codecInterface as codec };
1799
+ declare const index$6_block: typeof block;
1800
+ declare namespace index$6 {
1801
+ export { index$6_block as block, codecInterface as codec };
1802
+ }
1803
+
1804
+ interface ReqGetData extends ReqSignedUrl {
1805
+ readonly type: "reqGetData";
1806
+ }
1807
+ declare function buildReqGetData(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqGetData;
1808
+ declare function MsgIsReqGetData(msg: MsgBase): msg is ReqGetData;
1809
+ interface ResGetData extends ResSignedUrl {
1810
+ readonly type: "resGetData";
1811
+ }
1812
+ declare function MsgIsResGetData(msg: MsgBase): msg is ResGetData;
1813
+ interface CalculatePreSignedUrl {
1814
+ calculatePreSignedUrl(ctx: MsgTypesCtx, p: PreSignedMsg): Promise<Result<URI>>;
1815
+ }
1816
+ declare function buildResGetData(msgCtx: MsgTypesCtx, req: MsgWithConnAuth<ReqGetData>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResGetData>>;
1817
+ interface ReqPutData extends ReqSignedUrl {
1818
+ readonly type: "reqPutData";
1819
+ }
1820
+ declare function MsgIsReqPutData(msg: MsgBase): msg is ReqPutData;
1821
+ declare function buildReqPutData(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqPutData;
1822
+ interface ResPutData extends ResSignedUrl {
1823
+ readonly type: "resPutData";
1824
+ }
1825
+ declare function MsgIsResPutData(msg: MsgBase): msg is ResPutData;
1826
+ declare function buildResPutData(msgCtx: MsgTypesCtx, req: MsgWithConnAuth<ReqPutData>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResPutData>>;
1827
+ interface ReqDelData extends ReqSignedUrl {
1828
+ readonly type: "reqDelData";
1829
+ }
1830
+ declare function MsgIsReqDelData(msg: MsgBase): msg is ReqDelData;
1831
+ declare function buildReqDelData(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqDelData;
1832
+ interface ResDelData extends ResSignedUrl {
1833
+ readonly type: "resDelData";
1834
+ }
1835
+ declare function MsgIsResDelData(msg: MsgBase): msg is ResDelData;
1836
+ declare function buildResDelData(msgCtx: MsgTypesCtx, req: MsgWithConnAuth<ReqDelData>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResDelData>>;
1837
+
1838
+ declare const VERSION = "FP-MSG-1.0";
1839
+ interface BaseTokenParam {
1840
+ readonly alg: string;
1841
+ readonly issuer: string;
1842
+ readonly audience: string;
1843
+ readonly validFor: number;
1844
+ }
1845
+ interface FPCloudClaim extends JWTPayload {
1846
+ readonly userId: string;
1847
+ readonly tenants: {
1848
+ readonly id: string;
1849
+ readonly role: string;
1850
+ }[];
1851
+ readonly ledgers: {
1852
+ readonly id: string;
1853
+ readonly role: string;
1854
+ readonly right: string;
1855
+ }[];
1856
+ }
1857
+ type TokenForParam = FPCloudClaim & Partial<BaseTokenParam>;
1858
+ type MsgWithError<T extends MsgBase> = T | ErrorMsg;
1859
+ interface PreSignedMsg extends MsgWithTenantLedger<MsgWithConnAuth> {
1860
+ readonly methodParams: MethodSignedUrlParam;
1861
+ readonly params: SignedUrlParam;
1862
+ }
1863
+ interface RequestOpts {
1864
+ readonly waitFor: (msg: MsgBase) => boolean;
1865
+ readonly pollInterval?: number;
1866
+ readonly timeout?: number;
1867
+ }
1868
+ interface EnDeCoder {
1869
+ encode<T>(node: T): Uint8Array;
1870
+ decode<T>(data: Uint8Array): T;
1871
+ }
1872
+ interface WaitForTid {
1873
+ readonly tid: string;
1874
+ readonly future: Future<MsgBase>;
1875
+ readonly timeout?: number;
1876
+ readonly waitFor: (msg: MsgBase) => boolean;
1877
+ }
1878
+ interface NextId {
1879
+ readonly nextId: SuperThis$1["nextId"];
1880
+ }
1881
+ interface AuthType {
1882
+ readonly type: "ucan" | "error" | "fp-cloud-jwk" | "fp-cloud";
1883
+ }
1884
+ declare function isAuthTypeFPCloudJWK(a: AuthType): a is FPJWKCloudAuthType;
1885
+ declare function isAuthTypeFPCloud(a: AuthType): a is FPCloudAuthType;
1886
+ interface UCanAuth extends AuthType {
1887
+ readonly type: "ucan";
1888
+ readonly params: {
1889
+ readonly tbd: string;
1890
+ };
1891
+ }
1892
+ interface FPJWKCloudAuthType extends AuthType {
1893
+ readonly type: "fp-cloud-jwk";
1894
+ readonly params: {
1895
+ readonly jwk: string;
1896
+ };
1897
+ }
1898
+ interface FPCloudAuthType extends AuthType {
1899
+ readonly type: "fp-cloud";
1900
+ readonly params: {
1901
+ readonly claim: TokenForParam;
1902
+ readonly jwk: string;
1903
+ };
1904
+ }
1905
+ type AuthFactory = (tp?: Partial<TokenForParam>) => Promise<Result<AuthType>>;
1906
+ interface TenantLedger {
1907
+ readonly tenant: string;
1908
+ readonly ledger: string;
1909
+ }
1910
+ declare function keyTenantLedger(t: TenantLedger): string;
1911
+ interface QSId {
1912
+ readonly reqId: string;
1913
+ readonly resId: string;
1914
+ }
1915
+ declare function qsidEqual(a: QSId, b: QSId): boolean;
1916
+ declare function qsidKey(qsid: QSId): string;
1917
+ interface MsgBase {
1918
+ readonly tid: string;
1919
+ readonly type: string;
1920
+ readonly version: string;
1921
+ readonly auth: AuthType;
1922
+ }
1923
+ declare function MsgIsTid(msg: MsgBase, tid: string): boolean;
1924
+ type MsgWithConn<T extends MsgBase = MsgBase> = T & {
1925
+ readonly conn: QSId;
1926
+ };
1927
+ type MsgWithConnAuth<T extends MsgBase = MsgBase> = MsgWithConn<T> & {
1928
+ readonly auth: AuthType;
1929
+ };
1930
+ type MsgWithTenantLedger<T extends MsgWithConnAuth> = T & {
1931
+ readonly tenant: TenantLedger;
1932
+ };
1933
+ interface ErrorMsg extends MsgBase {
1934
+ readonly type: "error";
1935
+ readonly src: unknown;
1936
+ readonly message: string;
1937
+ readonly body?: string;
1938
+ readonly stack?: string[];
1939
+ }
1940
+ declare function MsgIsError(rq: MsgBase): rq is ErrorMsg;
1941
+ declare function MsgIsQSError(rq: ReqRes<MsgBase, MsgBase>): rq is ReqRes<ErrorMsg, ErrorMsg>;
1942
+ type HttpMethods = "GET" | "PUT" | "DELETE";
1943
+ type FPStoreTypes = "meta" | "car" | "wal" | "file";
1944
+ declare function coerceFPStoreTypes(s?: string): FPStoreTypes;
1945
+ type ProtocolCapabilities = "reqRes" | "stream";
1946
+ declare function isProtocolCapabilities(s: string): s is ProtocolCapabilities;
1947
+ interface Gestalt {
1948
+ readonly storeTypes: FPStoreTypes[];
1949
+ readonly id: string;
1950
+ readonly protocolCapabilities: ProtocolCapabilities[];
1951
+ readonly httpEndpoints: string[];
1952
+ readonly wsEndpoints: string[];
1953
+ readonly encodings: ("JSON" | "CBOR")[];
1954
+ readonly auth: AuthType[];
1955
+ readonly requiresAuth: boolean;
1956
+ readonly data?: {
1957
+ readonly inband: boolean;
1958
+ readonly outband: boolean;
1959
+ };
1960
+ readonly meta?: {
1961
+ readonly inband: true;
1962
+ readonly outband: boolean;
1963
+ };
1964
+ readonly wal?: {
1965
+ readonly inband: boolean;
1966
+ readonly outband: boolean;
1967
+ };
1968
+ readonly reqTypes: string[];
1969
+ readonly resTypes: string[];
1970
+ readonly eventTypes: string[];
1971
+ }
1972
+ interface MsgerParams {
1973
+ readonly mime: string;
1974
+ readonly auth?: AuthType;
1975
+ readonly hasPersistent?: boolean;
1976
+ readonly protocolCapabilities?: ProtocolCapabilities[];
1977
+ readonly timeout: number;
1978
+ }
1979
+ type GestaltParam = Partial<Gestalt> & {
1980
+ readonly id: string;
1981
+ };
1982
+ declare function defaultGestalt(msgP: MsgerParams, gestalt: GestaltParam): Gestalt;
1983
+ interface ReqChat extends MsgWithConn {
1984
+ readonly type: "reqChat";
1985
+ readonly message: string;
1986
+ readonly targets: QSId[];
1987
+ }
1988
+ interface ResChat extends MsgWithConn {
1989
+ readonly type: "resChat";
1990
+ readonly message: string;
1991
+ readonly targets: QSId[];
1992
+ }
1993
+ declare function buildReqChat(sthis: NextId, auth: AuthType, conn: QSId, message: string, targets?: QSId[]): ReqChat;
1994
+ declare function buildResChat(req: ReqChat, conn?: QSId, message?: string, targets?: QSId[], auth?: AuthType): ResChat;
1995
+ declare function MsgIsReqChat(msg: MsgBase): msg is ReqChat;
1996
+ declare function MsgIsResChat(msg: MsgBase): msg is ResChat;
1997
+ interface ReqGestalt extends MsgBase {
1998
+ readonly type: "reqGestalt";
1999
+ readonly gestalt: Gestalt;
2000
+ readonly publish?: boolean;
2001
+ }
2002
+ declare function MsgIsReqGestalt(msg: MsgBase): msg is ReqGestalt;
2003
+ declare function buildReqGestalt(sthis: NextId, auth: AuthType, gestalt: Gestalt, publish?: boolean): ReqGestalt;
2004
+ interface ConnInfo {
2005
+ readonly connIds: string[];
2006
+ }
2007
+ interface ResGestalt extends MsgBase {
2008
+ readonly type: "resGestalt";
2009
+ readonly gestalt: Gestalt;
2010
+ }
2011
+ declare function buildResGestalt(req: ReqGestalt, gestalt: Gestalt, auth: AuthType): ResGestalt | ErrorMsg;
2012
+ declare function MsgIsResGestalt(msg: MsgBase): msg is ResGestalt;
2013
+ interface ReqOpenConnection {
2014
+ readonly reqId?: string;
2015
+ readonly resId?: string;
2016
+ }
2017
+ interface ReqOpenConn {
2018
+ readonly reqId: string;
2019
+ readonly resId?: string;
2020
+ }
2021
+ interface ReqOpen extends MsgBase {
2022
+ readonly type: "reqOpen";
2023
+ readonly conn: ReqOpenConn;
2024
+ }
2025
+ declare function buildReqOpen(sthis: NextId, auth: AuthType, conn: ReqOpenConnection): ReqOpen;
2026
+ declare function MsgIsReqOpen(imsg: MsgBase): imsg is MsgWithConn<ReqOpen>;
2027
+ interface ResOpen extends MsgBase {
2028
+ readonly type: "resOpen";
2029
+ readonly conn: QSId;
2030
+ }
2031
+ declare function MsgIsWithConn<T extends MsgBase>(msg: T): msg is MsgWithConn<T>;
2032
+ declare function MsgIsWithConnAuth<T extends MsgBase>(msg: T): msg is MsgWithConnAuth<T>;
2033
+ declare function MsgIsConnected<T extends MsgBase>(msg: T, qsid: QSId): msg is MsgWithConn<T>;
2034
+ declare function buildResOpen(sthis: NextId, req: ReqOpen, resStreamId?: string): ResOpen;
2035
+ declare function MsgIsResOpen(msg: MsgBase): msg is ResOpen;
2036
+ interface ReqClose extends MsgWithConn {
2037
+ readonly type: "reqClose";
2038
+ }
2039
+ declare function MsgIsReqClose(msg: MsgBase): msg is ReqClose;
2040
+ interface ResClose extends MsgWithConn {
2041
+ readonly type: "resClose";
2042
+ }
2043
+ declare function MsgIsResClose(msg: MsgBase): msg is ResClose;
2044
+ declare function buildResClose(req: ReqClose, conn: QSId): ResClose;
2045
+ declare function buildReqClose(sthis: NextId, auth: AuthType, conn: QSId): ReqClose;
2046
+ interface SignedUrlParam {
2047
+ readonly path?: string;
2048
+ readonly key: string;
2049
+ readonly expires?: number;
2050
+ readonly index?: string;
2051
+ }
2052
+ interface MethodSignedUrlParam {
2053
+ readonly method: HttpMethods;
2054
+ readonly store: FPStoreTypes;
2055
+ }
2056
+ interface ReqSignedUrlParam {
2057
+ readonly auth: AuthType;
2058
+ readonly methodParam: MethodSignedUrlParam;
2059
+ readonly params: SignedUrlParam;
2060
+ }
2061
+ interface UpdateReqRes<Q extends MsgBase, S extends MsgBase> {
2062
+ req: Q;
2063
+ res: S;
2064
+ }
2065
+ type ReqRes<Q extends MsgBase, S extends MsgBase> = Readonly<UpdateReqRes<Q, S>>;
2066
+ declare function buildErrorMsg(msgCtx: {
2067
+ readonly logger: Logger;
2068
+ readonly sthis: SuperThis$1;
2069
+ }, base: Partial<MsgBase & {
2070
+ ref?: unknown;
2071
+ }>, error: Error, body?: string, stack?: string[]): ErrorMsg;
2072
+ declare function MsgIsTenantLedger<T extends MsgBase>(msg: T): msg is MsgWithTenantLedger<MsgWithConnAuth<T>>;
2073
+ interface ReqSignedUrl extends ReqSignedUrlWithoutMethodParams {
2074
+ readonly methodParams: MethodSignedUrlParam;
2075
+ }
2076
+ interface ReqSignedUrlWithoutMethodParams extends MsgWithTenantLedger<MsgWithConnAuth> {
2077
+ readonly params: SignedUrlParam;
2078
+ }
2079
+ interface GwCtx {
2080
+ readonly tid?: string;
2081
+ readonly conn: QSId;
2082
+ readonly tenant: TenantLedger;
2083
+ }
2084
+ interface GwCtxConn {
2085
+ readonly tid?: string;
2086
+ readonly conn: QSId;
2087
+ readonly tenant: TenantLedger;
2088
+ }
2089
+ declare function buildReqSignedUrl<T extends ReqSignedUrl>(sthis: NextId, type: string, rparam: ReqSignedUrlParam, gwCtx: GwCtx): T;
2090
+ interface ResSignedUrl extends MsgWithTenantLedger<MsgWithConn> {
2091
+ readonly methodParams: MethodSignedUrlParam;
2092
+ readonly params: SignedUrlParam;
2093
+ readonly signedUrl: string;
2094
+ }
2095
+ interface ResOptionalSignedUrl extends MsgWithTenantLedger<MsgWithConn> {
2096
+ readonly params: SignedUrlParam;
2097
+ readonly methodParams: MethodSignedUrlParam;
2098
+ readonly signedUrl?: string;
2099
+ }
2100
+ interface MsgTypesCtx {
2101
+ readonly sthis: SuperThis$1;
2102
+ readonly logger: Logger;
2103
+ }
2104
+ interface MsgTypesCtxSync {
2105
+ readonly sthis: SuperThis$1;
2106
+ readonly logger: Logger;
2107
+ readonly auth: AuthType;
2108
+ }
2109
+ declare function resAuth(msg: MsgBase): Promise<AuthType>;
2110
+ declare function buildRes<Q extends MsgWithTenantLedger<MsgWithConn<ReqSignedUrlWithoutMethodParams>>, S extends ResSignedUrl>(methodParams: MethodSignedUrlParam, type: string, msgCtx: MsgTypesCtx, req: Q, ctx: CalculatePreSignedUrl): Promise<MsgWithError<S>>;
2111
+
2112
+ declare const envKeyDefaults: {
2113
+ SECRET: string;
2114
+ PUBLIC: string;
2115
+ };
2116
+ interface SessionTokenServiceParam extends Partial<BaseTokenParam> {
2117
+ readonly token: string;
2118
+ }
2119
+ interface SessionTokenServiceFromEnvParam extends Partial<BaseTokenParam> {
2120
+ readonly privateEnvKey?: string;
2121
+ readonly publicEnvKey?: string;
2122
+ }
2123
+ declare function jwk2env(jwk: CryptoKey, sthis?: SuperThis): Promise<string>;
2124
+ declare function env2jwk(env: string, alg: string, sthis?: SuperThis): Promise<CryptoKey>;
2125
+ interface KeysResult {
2126
+ readonly material: CryptoKeyPair;
2127
+ readonly strings: {
2128
+ readonly publicKey: string;
2129
+ readonly privateKey: string;
2130
+ };
2131
+ }
2132
+ declare class SessionTokenService {
2133
+ #private;
2134
+ static generateKeyPair(alg?: string, options?: GenerateKeyPairOptions, generateKeyPairFN?: (alg: string, options: GenerateKeyPairOptions) => Promise<jose.GenerateKeyPairResult>): Promise<KeysResult>;
2135
+ static createFromEnv(sp?: SessionTokenServiceFromEnvParam, sthis?: SuperThis): Promise<SessionTokenService>;
2136
+ static create(stsparam: SessionTokenServiceParam, sthis?: SuperThis): Promise<SessionTokenService>;
2137
+ private constructor();
2138
+ get validFor(): number;
2139
+ get alg(): string;
2140
+ get isssuer(): string;
2141
+ get audience(): string;
2142
+ validate(token: string): Promise<Result<JWTVerifyResult<FPCloudClaim>>>;
2143
+ tokenFor(p: TokenForParam): Promise<string>;
2144
+ }
2145
+
2146
+ type index$5_KeysResult = KeysResult;
2147
+ type index$5_SessionTokenService = SessionTokenService;
2148
+ declare const index$5_SessionTokenService: typeof SessionTokenService;
2149
+ declare const index$5_env2jwk: typeof env2jwk;
2150
+ declare const index$5_envKeyDefaults: typeof envKeyDefaults;
2151
+ declare const index$5_jwk2env: typeof jwk2env;
2152
+ declare namespace index$5 {
2153
+ export { type index$5_KeysResult as KeysResult, index$5_SessionTokenService as SessionTokenService, index$5_env2jwk as env2jwk, index$5_envKeyDefaults as envKeyDefaults, index$5_jwk2env as jwk2env };
1781
2154
  }
1782
2155
 
1783
2156
  interface KeyBagCtx {
@@ -1797,11 +2170,11 @@ declare class KeyBagProviderFile implements KeyBagProvider {
1797
2170
 
1798
2171
  declare function sysFileSystemFactory(uri: URI): Promise<SysFileSystem>;
1799
2172
 
1800
- type index$2_KeyBagProviderFile = KeyBagProviderFile;
1801
- declare const index$2_KeyBagProviderFile: typeof KeyBagProviderFile;
1802
- declare const index$2_sysFileSystemFactory: typeof sysFileSystemFactory;
1803
- declare namespace index$2 {
1804
- export { index$2_KeyBagProviderFile as KeyBagProviderFile, index$2_sysFileSystemFactory as sysFileSystemFactory };
2173
+ type index$4_KeyBagProviderFile = KeyBagProviderFile;
2174
+ declare const index$4_KeyBagProviderFile: typeof KeyBagProviderFile;
2175
+ declare const index$4_sysFileSystemFactory: typeof sysFileSystemFactory;
2176
+ declare namespace index$4 {
2177
+ export { index$4_KeyBagProviderFile as KeyBagProviderFile, index$4_sysFileSystemFactory as sysFileSystemFactory };
1805
2178
  }
1806
2179
 
1807
2180
  declare class MemoryGateway implements Gateway {
@@ -1818,10 +2191,133 @@ declare class MemoryGateway implements Gateway {
1818
2191
  getPlain(url: URI, key: string): Promise<Result<Uint8Array>>;
1819
2192
  }
1820
2193
 
1821
- type gateway_MemoryGateway = MemoryGateway;
1822
- declare const gateway_MemoryGateway: typeof MemoryGateway;
2194
+ type gateway$1_MemoryGateway = MemoryGateway;
2195
+ declare const gateway$1_MemoryGateway: typeof MemoryGateway;
2196
+ declare namespace gateway$1 {
2197
+ export { gateway$1_MemoryGateway as MemoryGateway };
2198
+ }
2199
+
2200
+ declare function selectRandom<T>(arr: T[]): T;
2201
+ declare function timeout<T>(ms: number, promise: Promise<T>): Promise<T>;
2202
+ type OnMsgFn<T extends MsgBase = MsgBase> = (msg: MsgWithError<T>) => void;
2203
+ type UnReg = () => void;
2204
+ interface ExchangedGestalt {
2205
+ readonly my: Gestalt;
2206
+ readonly remote: Gestalt;
2207
+ }
2208
+ type OnErrorFn = (msg: Partial<MsgBase>, err: Error) => Partial<MsgBase>;
2209
+ interface ActiveStream<S extends MsgBase, Q extends MsgBase> {
2210
+ readonly id: string;
2211
+ readonly bind: {
2212
+ readonly msg: Q;
2213
+ readonly opts: RequestOpts;
2214
+ };
2215
+ timeout?: unknown;
2216
+ controller?: ReadableStreamDefaultController<MsgWithError<S>>;
2217
+ }
2218
+ interface MsgRawConnection<T extends MsgBase = MsgBase> {
2219
+ readonly sthis: SuperThis;
2220
+ readonly exchangedGestalt: ExchangedGestalt;
2221
+ readonly activeBinds: Map<string, ActiveStream<T, MsgBase>>;
2222
+ bind<S extends T, Q extends T>(req: Q, opts: RequestOpts): ReadableStream<MsgWithError<S>>;
2223
+ request<S extends T, Q extends T>(req: Q, opts: RequestOpts): Promise<MsgWithError<S>>;
2224
+ send<S extends T, Q extends T>(msg: Q): Promise<MsgWithError<S>>;
2225
+ start(): Promise<Result<void>>;
2226
+ close(o: T): Promise<Result<void>>;
2227
+ onMsg(msg: OnMsgFn<T>): UnReg;
2228
+ }
2229
+ declare function jsonEnDe(sthis: SuperThis): EnDeCoder;
2230
+ type MsgerParamsWithEnDe = MsgerParams & {
2231
+ readonly ende: EnDeCoder;
2232
+ };
2233
+ declare function defaultMsgParams(sthis: SuperThis, igs: Partial<MsgerParamsWithEnDe>): MsgerParamsWithEnDe;
2234
+ interface OpenParams {
2235
+ readonly timeout: number;
2236
+ }
2237
+ declare function applyStart(prC: Promise<Result<MsgRawConnection>>): Promise<Result<MsgRawConnection>>;
2238
+ declare function authTypeFromUri(logger: Logger, curi: CoerceURI): Promise<Result<FPJWKCloudAuthType>>;
2239
+ declare class MsgConnected {
2240
+ static connect(auth: AuthType, mrc: Result<MsgRawConnection> | MsgRawConnection, conn?: Partial<QSId>): Promise<Result<MsgConnected>>;
2241
+ readonly sthis: SuperThis;
2242
+ readonly conn: QSId;
2243
+ readonly raw: MsgRawConnection;
2244
+ readonly exchangedGestalt: ExchangedGestalt;
2245
+ readonly activeBinds: Map<string, ActiveStream<MsgWithConnAuth, MsgBase>>;
2246
+ readonly id: string;
2247
+ private constructor();
2248
+ attachAuth(auth: AuthFactory): MsgConnectedAuth;
2249
+ }
2250
+ declare class MsgConnectedAuth implements MsgRawConnection<MsgWithConnAuth> {
2251
+ readonly sthis: SuperThis;
2252
+ readonly conn: QSId;
2253
+ readonly raw: MsgRawConnection;
2254
+ readonly exchangedGestalt: ExchangedGestalt;
2255
+ readonly activeBinds: Map<string, ActiveStream<MsgWithConnAuth, MsgBase>>;
2256
+ readonly id: string;
2257
+ readonly authFactory: AuthFactory;
2258
+ constructor(conn: MsgConnected, authFactory: AuthFactory);
2259
+ bind<S extends MsgWithConnAuth, Q extends MsgWithConnAuth>(req: Q, opts: RequestOpts): ReadableStream<MsgWithError<S>>;
2260
+ authType(): Promise<Result<AuthType>>;
2261
+ msgConnAuth(): Promise<Result<MsgWithConnAuth>>;
2262
+ request<S extends MsgWithConnAuth, Q extends MsgWithConnAuth>(req: Q, opts: RequestOpts): Promise<MsgWithError<S>>;
2263
+ send<S extends MsgWithConnAuth, Q extends MsgWithConnAuth>(msg: Q): Promise<MsgWithError<S>>;
2264
+ start(): Promise<Result<void>>;
2265
+ close(t: MsgWithConnAuth): Promise<Result<void>>;
2266
+ onMsg(msgFn: OnMsgFn<MsgWithConnAuth>): UnReg;
2267
+ }
2268
+ declare class Msger {
2269
+ static openHttp(sthis: SuperThis, urls: URI[], msgP: MsgerParamsWithEnDe, exGestalt: ExchangedGestalt): Promise<Result<MsgRawConnection>>;
2270
+ static openWS(sthis: SuperThis, url: URI, msgP: MsgerParamsWithEnDe, exGestalt: ExchangedGestalt): Promise<Result<MsgRawConnection>>;
2271
+ static open(sthis: SuperThis, auth: AuthType, curl: CoerceURI, imsgP?: Partial<MsgerParamsWithEnDe>): Promise<Result<MsgRawConnection>>;
2272
+ static connect(sthis: SuperThis, auth: AuthType, curl: CoerceURI, imsgP?: Partial<MsgerParamsWithEnDe>, conn?: Partial<QSId>): Promise<Result<MsgConnected>>;
2273
+ private constructor();
2274
+ }
2275
+
2276
+ type ConnectedSerdeGatewayCtx = SerdeGatewayCtx & {
2277
+ conn: AuthedConnection;
2278
+ };
2279
+ interface StoreTypeGateway {
2280
+ get: <S>(ctx: ConnectedSerdeGatewayCtx, url: URI) => Promise<SerdeGetResult<S>>;
2281
+ put: <T>(ctx: ConnectedSerdeGatewayCtx, url: URI, body: FPEnvelope<T>) => Promise<VoidResult>;
2282
+ delete: (ctx: ConnectedSerdeGatewayCtx, url: URI) => Promise<VoidResult>;
2283
+ }
2284
+ interface ConnectionItem {
2285
+ readonly uri: URI;
2286
+ readonly matchRes: MatchResult;
2287
+ readonly connection: ResolveOnce<Result<MsgConnected>>;
2288
+ readonly trackPuts: Set<string>;
2289
+ }
2290
+ interface AuthedConnection {
2291
+ readonly conn: Result<MsgConnectedAuth>;
2292
+ readonly citem: ConnectionItem;
2293
+ }
2294
+ declare class FireproofCloudGateway implements SerdeGateway {
2295
+ #private;
2296
+ readonly logger: Logger;
2297
+ readonly sthis: SuperThis;
2298
+ constructor(sthis: SuperThis);
2299
+ buildUrl(ctx: SerdeGatewayCtx, baseUrl: URI, key: string): Promise<Result<URI>>;
2300
+ start(ctx: SerdeGatewayCtx, uri: URI): Promise<Result<URI>>;
2301
+ get<S>(ctx: SerdeGatewayCtx, uri: URI): Promise<SerdeGetResult<S>>;
2302
+ put<T>(ctx: SerdeGatewayCtx, uri: URI, body: FPEnvelope<T>): Promise<VoidResult>;
2303
+ delete(ctx: SerdeGatewayCtx, uri: URI): Promise<VoidResult>;
2304
+ close(ctx: SerdeGatewayCtx, uri: URI): Promise<VoidResult>;
2305
+ getCloudConnection(uri: URI): Promise<Result<MsgConnectedAuth>>;
2306
+ getCloudConnectionItem(uri: URI): Promise<AuthedConnection>;
2307
+ subscribe(ctx: SerdeGatewayCtx, url: URI, callback: (meta: FPEnvelopeMeta) => Promise<void>): Promise<UnsubscribeResult>;
2308
+ destroy(ctx: SerdeGatewayCtx, uri: URI): Promise<VoidResult>;
2309
+ getPlain(): Promise<Result<Uint8Array>>;
2310
+ }
2311
+ declare function registerFireproofCloudStoreProtocol(protocol?: string): () => void;
2312
+ declare function toCloud(url: CoerceURI): Attachable;
2313
+
2314
+ type gateway_FireproofCloudGateway = FireproofCloudGateway;
2315
+ declare const gateway_FireproofCloudGateway: typeof FireproofCloudGateway;
2316
+ type gateway_StoreTypeGateway = StoreTypeGateway;
2317
+ declare const gateway_registerFireproofCloudStoreProtocol: typeof registerFireproofCloudStoreProtocol;
2318
+ declare const gateway_toCloud: typeof toCloud;
1823
2319
  declare namespace gateway {
1824
- export { gateway_MemoryGateway as MemoryGateway };
2320
+ export { gateway_FireproofCloudGateway as FireproofCloudGateway, type gateway_StoreTypeGateway as StoreTypeGateway, gateway_registerFireproofCloudStoreProtocol as registerFireproofCloudStoreProtocol, gateway_toCloud as toCloud };
1825
2321
  }
1826
2322
 
1827
2323
  declare class DefSerdeGateway implements SerdeGateway {
@@ -1839,61 +2335,405 @@ declare class DefSerdeGateway implements SerdeGateway {
1839
2335
  getPlain({ loader: { sthis } }: SerdeGatewayCtx, iurl: URI, key: string): Promise<Result<Uint8Array<ArrayBufferLike>, Error>>;
1840
2336
  }
1841
2337
 
1842
- type index$1_CARDecodeEnvelope = CARDecodeEnvelope;
1843
- type index$1_CAREncodeEnvelope = CAREncodeEnvelope;
1844
- type index$1_DefSerdeGateway = DefSerdeGateway;
1845
- declare const index$1_DefSerdeGateway: typeof DefSerdeGateway;
1846
- type index$1_FILEDecodeEnvelope = FILEDecodeEnvelope;
1847
- type index$1_FILEEncodeEnvelope = FILEEncodeEnvelope;
1848
- type index$1_FPDecoder = FPDecoder;
1849
- type index$1_FPEncoder = FPEncoder;
1850
- type index$1_METADecodeEnvelope = METADecodeEnvelope;
1851
- type index$1_METAEncodeEnvelope = METAEncodeEnvelope;
1852
- type index$1_SerializedMeta = SerializedMeta;
1853
- type index$1_SerializedWAL = SerializedWAL;
1854
- type index$1_WALDecodeEnvelope = WALDecodeEnvelope;
1855
- type index$1_WALEncodeEnvelope = WALEncodeEnvelope;
1856
- declare const index$1_dbMetaEvent2Serialized: typeof dbMetaEvent2Serialized;
1857
- declare const index$1_decode2DbMetaEvents: typeof decode2DbMetaEvents;
1858
- declare const index$1_fpDeserialize: typeof fpDeserialize;
1859
- declare const index$1_fpSerialize: typeof fpSerialize;
1860
- declare namespace index$1 {
1861
- export { type index$1_CARDecodeEnvelope as CARDecodeEnvelope, type index$1_CAREncodeEnvelope as CAREncodeEnvelope, index$1_DefSerdeGateway as DefSerdeGateway, type index$1_FILEDecodeEnvelope as FILEDecodeEnvelope, type index$1_FILEEncodeEnvelope as FILEEncodeEnvelope, type index$1_FPDecoder as FPDecoder, type index$1_FPEncoder as FPEncoder, type index$1_METADecodeEnvelope as METADecodeEnvelope, type index$1_METAEncodeEnvelope as METAEncodeEnvelope, type index$1_SerializedMeta as SerializedMeta, type index$1_SerializedWAL as SerializedWAL, type index$1_WALDecodeEnvelope as WALDecodeEnvelope, type index$1_WALEncodeEnvelope as WALEncodeEnvelope, index$1_dbMetaEvent2Serialized as dbMetaEvent2Serialized, index$1_decode2DbMetaEvents as decode2DbMetaEvents, index$2 as file, index$1_fpDeserialize as fpDeserialize, index$1_fpSerialize as fpSerialize, gateway as memory };
2338
+ type index$3_CARDecodeEnvelope = CARDecodeEnvelope;
2339
+ type index$3_CAREncodeEnvelope = CAREncodeEnvelope;
2340
+ type index$3_DefSerdeGateway = DefSerdeGateway;
2341
+ declare const index$3_DefSerdeGateway: typeof DefSerdeGateway;
2342
+ type index$3_FILEDecodeEnvelope = FILEDecodeEnvelope;
2343
+ type index$3_FILEEncodeEnvelope = FILEEncodeEnvelope;
2344
+ type index$3_FPDecoder = FPDecoder;
2345
+ type index$3_FPEncoder = FPEncoder;
2346
+ type index$3_METADecodeEnvelope = METADecodeEnvelope;
2347
+ type index$3_METAEncodeEnvelope = METAEncodeEnvelope;
2348
+ type index$3_SerializedMeta = SerializedMeta;
2349
+ type index$3_SerializedWAL = SerializedWAL;
2350
+ type index$3_WALDecodeEnvelope = WALDecodeEnvelope;
2351
+ type index$3_WALEncodeEnvelope = WALEncodeEnvelope;
2352
+ declare const index$3_dbMetaEvent2Serialized: typeof dbMetaEvent2Serialized;
2353
+ declare const index$3_decode2DbMetaEvents: typeof decode2DbMetaEvents;
2354
+ declare const index$3_fpDeserialize: typeof fpDeserialize;
2355
+ declare const index$3_fpSerialize: typeof fpSerialize;
2356
+ declare namespace index$3 {
2357
+ export { type index$3_CARDecodeEnvelope as CARDecodeEnvelope, type index$3_CAREncodeEnvelope as CAREncodeEnvelope, index$3_DefSerdeGateway as DefSerdeGateway, type index$3_FILEDecodeEnvelope as FILEDecodeEnvelope, type index$3_FILEEncodeEnvelope as FILEEncodeEnvelope, type index$3_FPDecoder as FPDecoder, type index$3_FPEncoder as FPEncoder, type index$3_METADecodeEnvelope as METADecodeEnvelope, type index$3_METAEncodeEnvelope as METAEncodeEnvelope, type index$3_SerializedMeta as SerializedMeta, type index$3_SerializedWAL as SerializedWAL, type index$3_WALDecodeEnvelope as WALDecodeEnvelope, type index$3_WALEncodeEnvelope as WALEncodeEnvelope, gateway as cloud, index$3_dbMetaEvent2Serialized as dbMetaEvent2Serialized, index$3_decode2DbMetaEvents as decode2DbMetaEvents, index$4 as file, index$3_fpDeserialize as fpDeserialize, index$3_fpSerialize as fpSerialize, gateway$1 as memory };
2358
+ }
2359
+
2360
+ type V1SerializedMetaKey = SerializedMeta & {
2361
+ readonly key?: string | string[];
2362
+ readonly keys?: string[];
2363
+ };
2364
+ interface V2SerializedMetaKey {
2365
+ readonly metas: SerializedMeta[];
2366
+ readonly keys: string[];
2367
+ }
2368
+ declare function V2SerializedMetaKeyExtractKey(ctx: SerdeGatewayCtx, v2: V2SerializedMetaKey): Promise<Result<SerializedMeta[]>>;
2369
+ declare function decodeAsToSerializedMeta(ctx: SerdeGatewayCtx, raw: Uint8Array): Promise<Result<V2SerializedMetaKey>>;
2370
+ declare function addKeyToDbMetaDecoder(ctx: SerdeGatewayCtx & {
2371
+ readonly lastDecodedMetas?: V2SerializedMetaKey[];
2372
+ }): SerdeGatewayCtx & {
2373
+ lastDecodedMetas: V2SerializedMetaKey[];
2374
+ };
2375
+ declare function encodeAsV1SerializedMetaKey(ctx: SerdeGatewayCtx, payload: SerializedMeta[]): Promise<Result<V1SerializedMetaKey[]>>;
2376
+ declare function encodeAsV2SerializedMetaKey(ctx: SerdeGatewayCtx, payload: SerializedMeta[]): Promise<Result<V2SerializedMetaKey>>;
2377
+ declare function addKeyToDbMetaEncoder(ctx: SerdeGatewayCtx, version: "v1" | "v2"): SerdeGatewayCtx;
2378
+ declare class AddKeyToDbMetaGateway implements SerdeGateway {
2379
+ private readonly sdGw;
2380
+ readonly version: "v1" | "v2";
2381
+ constructor(gw: Gateway, version: "v1" | "v2");
2382
+ buildUrl(ctx: SerdeGatewayCtx, baseUrl: URI, key: string): Promise<Result<URI>>;
2383
+ start(ctx: SerdeGatewayCtx, baseUrl: URI): Promise<Result<URI>>;
2384
+ close(ctx: SerdeGatewayCtx, baseUrl: URI): Promise<Result<void, Error>>;
2385
+ put<T>(ctx: SerdeGatewayCtx, url: URI, body: FPEnvelope<T>): Promise<Result<void, Error>>;
2386
+ get<S>(ctx: SerdeGatewayCtx, url: URI): Promise<Result<FPEnvelope<S>, Error | NotFoundError>>;
2387
+ readonly lastDecodedMetas: V2SerializedMetaKey[];
2388
+ delete(ctx: SerdeGatewayCtx, url: URI, loader?: Loadable): Promise<Result<void, Error>>;
2389
+ subscribe(ctx: SerdeGatewayCtx, url: URI, callback: (meta: FPEnvelopeMeta) => Promise<void>): Promise<Result<() => void, Error>>;
2390
+ getPlain(ctx: SerdeGatewayCtx, url: URI, key: string): Promise<Result<Uint8Array>>;
2391
+ destroy(ctx: SerdeGatewayCtx, baseUrl: URI): Promise<Result<void, Error>>;
1862
2392
  }
1863
2393
 
1864
2394
  declare const FILESTORE_VERSION = "v0.19-file";
1865
2395
 
1866
2396
  declare const INDEXEDDB_VERSION = "v0.19-indexeddb";
1867
2397
 
1868
- declare const index_FILESTORE_VERSION: typeof FILESTORE_VERSION;
1869
- declare const index_INDEXEDDB_VERSION: typeof INDEXEDDB_VERSION;
1870
- type index_KeyBackProviderFactory = KeyBackProviderFactory;
1871
- type index_KeyBag = KeyBag;
1872
- declare const index_KeyBag: typeof KeyBag;
1873
- type index_KeyBagFile = KeyBagFile;
1874
- type index_KeyBagOpts = KeyBagOpts;
1875
- type index_KeyBagProvider = KeyBagProvider;
1876
- type index_KeyBagProviderFactoryItem = KeyBagProviderFactoryItem;
1877
- type index_KeyBagRuntime = KeyBagRuntime;
1878
- type index_KeysItem = KeysItem;
1879
- type index_V1StorageKeyItem = V1StorageKeyItem;
1880
- type index_V2StorageKeyItem = V2StorageKeyItem;
1881
- declare const index_defaultKeyBagOpts: typeof defaultKeyBagOpts;
1882
- declare const index_defaultKeyBagUrl: typeof defaultKeyBagUrl;
1883
- declare const index_files: typeof files;
1884
- declare const index_getFileName: typeof getFileName;
1885
- declare const index_getKeyBag: typeof getKeyBag;
1886
- declare const index_getPath: typeof getPath;
1887
- type index_keysByFingerprint = keysByFingerprint;
1888
- declare const index_keysByFingerprint: typeof keysByFingerprint;
1889
- declare const index_registerKeyBagProviderFactory: typeof registerKeyBagProviderFactory;
1890
- declare const index_runtimeFn: typeof runtimeFn;
1891
- declare const index_toKeyWithFingerPrint: typeof toKeyWithFingerPrint;
2398
+ type index$2_AddKeyToDbMetaGateway = AddKeyToDbMetaGateway;
2399
+ declare const index$2_AddKeyToDbMetaGateway: typeof AddKeyToDbMetaGateway;
2400
+ declare const index$2_FILESTORE_VERSION: typeof FILESTORE_VERSION;
2401
+ declare const index$2_INDEXEDDB_VERSION: typeof INDEXEDDB_VERSION;
2402
+ type index$2_KeyBackProviderFactory = KeyBackProviderFactory;
2403
+ type index$2_KeyBag = KeyBag;
2404
+ declare const index$2_KeyBag: typeof KeyBag;
2405
+ type index$2_KeyBagFile = KeyBagFile;
2406
+ type index$2_KeyBagOpts = KeyBagOpts;
2407
+ type index$2_KeyBagProvider = KeyBagProvider;
2408
+ type index$2_KeyBagProviderFactoryItem = KeyBagProviderFactoryItem;
2409
+ type index$2_KeyBagRuntime = KeyBagRuntime;
2410
+ type index$2_KeysItem = KeysItem;
2411
+ type index$2_V1StorageKeyItem = V1StorageKeyItem;
2412
+ type index$2_V2SerializedMetaKey = V2SerializedMetaKey;
2413
+ declare const index$2_V2SerializedMetaKeyExtractKey: typeof V2SerializedMetaKeyExtractKey;
2414
+ type index$2_V2StorageKeyItem = V2StorageKeyItem;
2415
+ declare const index$2_addKeyToDbMetaDecoder: typeof addKeyToDbMetaDecoder;
2416
+ declare const index$2_addKeyToDbMetaEncoder: typeof addKeyToDbMetaEncoder;
2417
+ declare const index$2_decodeAsToSerializedMeta: typeof decodeAsToSerializedMeta;
2418
+ declare const index$2_defaultKeyBagOpts: typeof defaultKeyBagOpts;
2419
+ declare const index$2_defaultKeyBagUrl: typeof defaultKeyBagUrl;
2420
+ declare const index$2_encodeAsV1SerializedMetaKey: typeof encodeAsV1SerializedMetaKey;
2421
+ declare const index$2_encodeAsV2SerializedMetaKey: typeof encodeAsV2SerializedMetaKey;
2422
+ declare const index$2_files: typeof files;
2423
+ declare const index$2_getFileName: typeof getFileName;
2424
+ declare const index$2_getKeyBag: typeof getKeyBag;
2425
+ declare const index$2_getPath: typeof getPath;
2426
+ type index$2_keysByFingerprint = keysByFingerprint;
2427
+ declare const index$2_keysByFingerprint: typeof keysByFingerprint;
2428
+ declare const index$2_registerKeyBagProviderFactory: typeof registerKeyBagProviderFactory;
2429
+ declare const index$2_runtimeFn: typeof runtimeFn;
2430
+ declare const index$2_toKeyWithFingerPrint: typeof toKeyWithFingerPrint;
2431
+ declare namespace index$2 {
2432
+ export { index$2_AddKeyToDbMetaGateway as AddKeyToDbMetaGateway, index$2_FILESTORE_VERSION as FILESTORE_VERSION, index$2_INDEXEDDB_VERSION as INDEXEDDB_VERSION, type index$2_KeyBackProviderFactory as KeyBackProviderFactory, index$2_KeyBag as KeyBag, type index$2_KeyBagFile as KeyBagFile, type index$2_KeyBagOpts as KeyBagOpts, type index$2_KeyBagProvider as KeyBagProvider, type index$2_KeyBagProviderFactoryItem as KeyBagProviderFactoryItem, type index$2_KeyBagRuntime as KeyBagRuntime, type index$2_KeysItem as KeysItem, type index$2_V1StorageKeyItem as V1StorageKeyItem, type index$2_V2SerializedMetaKey as V2SerializedMetaKey, index$2_V2SerializedMetaKeyExtractKey as V2SerializedMetaKeyExtractKey, type index$2_V2StorageKeyItem as V2StorageKeyItem, index$2_addKeyToDbMetaDecoder as addKeyToDbMetaDecoder, index$2_addKeyToDbMetaEncoder as addKeyToDbMetaEncoder, index$2_decodeAsToSerializedMeta as decodeAsToSerializedMeta, index$2_defaultKeyBagOpts as defaultKeyBagOpts, index$2_defaultKeyBagUrl as defaultKeyBagUrl, index$2_encodeAsV1SerializedMetaKey as encodeAsV1SerializedMetaKey, index$2_encodeAsV2SerializedMetaKey as encodeAsV2SerializedMetaKey, index$2_files as files, index$2_getFileName as getFileName, index$2_getKeyBag as getKeyBag, index$2_getPath as getPath, index$3 as gw, keyBag as kb, keyedCrypto as kc, index$2_keysByFingerprint as keysByFingerprint, index$6 as mf, index$2_registerKeyBagProviderFactory as registerKeyBagProviderFactory, index$2_runtimeFn as runtimeFn, index$5 as sts, index$2_toKeyWithFingerPrint as toKeyWithFingerPrint };
2433
+ }
2434
+
2435
+ declare class MsgRawConnectionBase {
2436
+ readonly sthis: SuperThis;
2437
+ readonly exchangedGestalt: ExchangedGestalt;
2438
+ constructor(sthis: SuperThis, exGestalt: ExchangedGestalt);
2439
+ readonly onErrorFns: Map<string, OnErrorFn>;
2440
+ onError(fn: OnErrorFn): UnReg;
2441
+ buildErrorMsg(msgCtx: {
2442
+ readonly logger: Logger;
2443
+ readonly sthis: SuperThis;
2444
+ }, msg: Partial<MsgBase>, err: Error): ErrorMsg;
2445
+ }
2446
+
2447
+ declare class HttpConnection extends MsgRawConnectionBase implements MsgRawConnection {
2448
+ #private;
2449
+ readonly logger: Logger;
2450
+ readonly msgP: MsgerParamsWithEnDe;
2451
+ readonly baseURIs: {
2452
+ in: URI;
2453
+ cleaned: URI;
2454
+ }[];
2455
+ constructor(sthis: SuperThis, uris: URI[], msgP: MsgerParamsWithEnDe, exGestalt: ExchangedGestalt);
2456
+ send<S extends MsgBase, Q extends MsgBase>(_msg: Q): Promise<MsgWithError<S>>;
2457
+ start(): Promise<Result<void>>;
2458
+ close(): Promise<Result<void>>;
2459
+ toMsg<S extends MsgBase>(msg: MsgWithError<S>): MsgWithError<S>;
2460
+ onMsg(fn: OnMsgFn): UnReg;
2461
+ readonly activeBinds: Map<string, ActiveStream<MsgBase, MsgBase>>;
2462
+ bind<Q extends MsgBase, S extends MsgBase>(req: Q, opts: RequestOpts): ReadableStream<MsgWithError<S>>;
2463
+ request<Q extends MsgBase, S extends MsgBase>(req: Q, _opts: RequestOpts): Promise<MsgWithError<S>>;
2464
+ }
2465
+
2466
+ interface ReqPutMeta extends MsgWithTenantLedger<MsgWithConnAuth> {
2467
+ readonly type: "reqPutMeta";
2468
+ readonly methodParams: MethodSignedUrlParam;
2469
+ readonly params: SignedUrlParam;
2470
+ readonly meta: V2SerializedMetaKey;
2471
+ }
2472
+ interface ResPutMeta extends MsgWithTenantLedger<MsgWithConnAuth>, ResSignedUrl {
2473
+ readonly type: "resPutMeta";
2474
+ readonly meta: V2SerializedMetaKey;
2475
+ }
2476
+ declare function buildReqPutMeta(sthis: NextId, auth: AuthType, signedUrlParams: SignedUrlParam, meta: V2SerializedMetaKey, gwCtx: GwCtx): ReqPutMeta;
2477
+ declare function MsgIsReqPutMeta(msg: MsgBase): msg is ReqPutMeta;
2478
+ declare function buildResPutMeta(_msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqPutMeta>>, meta: V2SerializedMetaKey, signedUrl: string): ResPutMeta;
2479
+ declare function MsgIsResPutMeta(qs: MsgBase): qs is ResPutMeta;
2480
+ interface BindGetMeta extends MsgWithTenantLedger<MsgWithConnAuth> {
2481
+ readonly type: "bindGetMeta";
2482
+ readonly params: SignedUrlParam;
2483
+ }
2484
+ declare function MsgIsBindGetMeta(msg: MsgBase): msg is BindGetMeta;
2485
+ interface EventGetMeta extends MsgWithTenantLedger<MsgWithConnAuth>, ResSignedUrl {
2486
+ readonly type: "eventGetMeta";
2487
+ readonly meta: V2SerializedMetaKey;
2488
+ }
2489
+ declare function buildBindGetMeta(sthis: NextId, auth: AuthType, params: SignedUrlParam, gwCtx: GwCtx): BindGetMeta;
2490
+ declare function buildEventGetMeta(_msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<BindGetMeta>>, meta: V2SerializedMetaKey, gwCtx: GwCtx, signedUrl: string): EventGetMeta;
2491
+ declare function MsgIsEventGetMeta(qs: MsgBase): qs is EventGetMeta;
2492
+ interface ReqDelMeta extends MsgWithTenantLedger<MsgWithConnAuth> {
2493
+ readonly type: "reqDelMeta";
2494
+ readonly params: SignedUrlParam;
2495
+ readonly meta?: V2SerializedMetaKey;
2496
+ }
2497
+ declare function buildReqDelMeta(sthis: NextId, auth: AuthType, params: SignedUrlParam, gwCtx: GwCtx, meta?: V2SerializedMetaKey): ReqDelMeta;
2498
+ declare function MsgIsReqDelMeta(msg: MsgBase): msg is ReqDelMeta;
2499
+ interface ResDelMeta extends MsgWithTenantLedger<MsgWithConnAuth>, ResOptionalSignedUrl {
2500
+ readonly type: "resDelMeta";
2501
+ }
2502
+ declare function buildResDelMeta(req: MsgWithTenantLedger<MsgWithConnAuth<ReqDelMeta>>, params: SignedUrlParam, signedUrl?: string): ResDelMeta;
2503
+ declare function MsgIsResDelMeta(qs: MsgBase): qs is ResDelMeta;
2504
+
2505
+ interface ReqGetWAL extends ReqSignedUrl {
2506
+ readonly type: "reqGetWAL";
2507
+ }
2508
+ declare function MsgIsReqGetWAL(msg: MsgBase): msg is ReqGetWAL;
2509
+ declare function buildReqGetWAL(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqGetWAL;
2510
+ interface ResGetWAL extends ResSignedUrl {
2511
+ readonly type: "resGetWAL";
2512
+ }
2513
+ declare function MsgIsResGetWAL(msg: MsgBase): msg is ResGetWAL;
2514
+ declare function buildResGetWAL(msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqGetWAL>>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResGetWAL>>;
2515
+ interface ReqPutWAL extends Omit<ReqSignedUrl, "type"> {
2516
+ readonly type: "reqPutWAL";
2517
+ }
2518
+ declare function MsgIsReqPutWAL(msg: MsgBase): msg is ReqPutWAL;
2519
+ declare function buildReqPutWAL(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqPutWAL;
2520
+ interface ResPutWAL extends Omit<ResSignedUrl, "type"> {
2521
+ readonly type: "resPutWAL";
2522
+ }
2523
+ declare function MsgIsResPutWAL(msg: MsgBase): msg is ResPutWAL;
2524
+ declare function buildResPutWAL(msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqPutWAL>>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResPutWAL>>;
2525
+ interface ReqDelWAL extends Omit<ReqSignedUrl, "type"> {
2526
+ readonly type: "reqDelWAL";
2527
+ }
2528
+ declare function MsgIsReqDelWAL(msg: MsgBase): msg is ReqDelWAL;
2529
+ declare function buildReqDelWAL(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqDelWAL;
2530
+ interface ResDelWAL extends Omit<ResSignedUrl, "type"> {
2531
+ readonly type: "resDelWAL";
2532
+ }
2533
+ declare function MsgIsResDelWAL(msg: MsgBase): msg is ResDelWAL;
2534
+ declare function buildResDelWAL(msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqDelWAL>>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResDelWAL>>;
2535
+
2536
+ interface WSReqOpen {
2537
+ readonly reqOpen: ReqOpen;
2538
+ readonly ws: WebSocket;
2539
+ }
2540
+ declare class WSConnection extends MsgRawConnectionBase implements MsgRawConnection {
2541
+ #private;
2542
+ readonly logger: Logger;
2543
+ readonly msgP: MsgerParamsWithEnDe;
2544
+ readonly ws: WebSocket;
2545
+ readonly waitForTid: Map<string, WaitForTid>;
2546
+ opened: boolean;
2547
+ readonly id: string;
2548
+ constructor(sthis: SuperThis, ws: WebSocket, msgP: MsgerParamsWithEnDe, exGestalt: ExchangedGestalt);
2549
+ start(): Promise<Result<void>>;
2550
+ close(): Promise<Result<void>>;
2551
+ toMsg<S extends MsgBase>(msg: MsgWithError<S>): MsgWithError<S>;
2552
+ send<Q extends MsgBase, S extends MsgBase>(msg: Q): Promise<S>;
2553
+ onMsg<S extends MsgBase>(fn: OnMsgFn<S>): UnReg;
2554
+ onClose(fn: UnReg): UnReg;
2555
+ readonly activeBinds: Map<string, ActiveStream<MsgBase, MsgBase>>;
2556
+ bind<Q extends MsgBase, S extends MsgBase>(req: Q, opts: RequestOpts): ReadableStream<MsgWithError<S>>;
2557
+ request<Q extends MsgBase, S extends MsgBase>(req: Q, opts: RequestOpts): Promise<MsgWithError<S>>;
2558
+ }
2559
+
2560
+ type index$1_ActiveStream<S extends MsgBase, Q extends MsgBase> = ActiveStream<S, Q>;
2561
+ type index$1_AuthFactory = AuthFactory;
2562
+ type index$1_AuthType = AuthType;
2563
+ type index$1_BaseTokenParam = BaseTokenParam;
2564
+ type index$1_BindGetMeta = BindGetMeta;
2565
+ type index$1_CalculatePreSignedUrl = CalculatePreSignedUrl;
2566
+ type index$1_ConnInfo = ConnInfo;
2567
+ type index$1_EnDeCoder = EnDeCoder;
2568
+ type index$1_ErrorMsg = ErrorMsg;
2569
+ type index$1_EventGetMeta = EventGetMeta;
2570
+ type index$1_ExchangedGestalt = ExchangedGestalt;
2571
+ type index$1_FPCloudAuthType = FPCloudAuthType;
2572
+ type index$1_FPCloudClaim = FPCloudClaim;
2573
+ type index$1_FPJWKCloudAuthType = FPJWKCloudAuthType;
2574
+ type index$1_FPStoreTypes = FPStoreTypes;
2575
+ type index$1_Gestalt = Gestalt;
2576
+ type index$1_GestaltParam = GestaltParam;
2577
+ type index$1_GwCtx = GwCtx;
2578
+ type index$1_GwCtxConn = GwCtxConn;
2579
+ type index$1_HttpConnection = HttpConnection;
2580
+ declare const index$1_HttpConnection: typeof HttpConnection;
2581
+ type index$1_HttpMethods = HttpMethods;
2582
+ type index$1_MethodSignedUrlParam = MethodSignedUrlParam;
2583
+ type index$1_MsgBase = MsgBase;
2584
+ type index$1_MsgConnected = MsgConnected;
2585
+ declare const index$1_MsgConnected: typeof MsgConnected;
2586
+ type index$1_MsgConnectedAuth = MsgConnectedAuth;
2587
+ declare const index$1_MsgConnectedAuth: typeof MsgConnectedAuth;
2588
+ declare const index$1_MsgIsBindGetMeta: typeof MsgIsBindGetMeta;
2589
+ declare const index$1_MsgIsConnected: typeof MsgIsConnected;
2590
+ declare const index$1_MsgIsError: typeof MsgIsError;
2591
+ declare const index$1_MsgIsEventGetMeta: typeof MsgIsEventGetMeta;
2592
+ declare const index$1_MsgIsQSError: typeof MsgIsQSError;
2593
+ declare const index$1_MsgIsReqChat: typeof MsgIsReqChat;
2594
+ declare const index$1_MsgIsReqClose: typeof MsgIsReqClose;
2595
+ declare const index$1_MsgIsReqDelData: typeof MsgIsReqDelData;
2596
+ declare const index$1_MsgIsReqDelMeta: typeof MsgIsReqDelMeta;
2597
+ declare const index$1_MsgIsReqDelWAL: typeof MsgIsReqDelWAL;
2598
+ declare const index$1_MsgIsReqGestalt: typeof MsgIsReqGestalt;
2599
+ declare const index$1_MsgIsReqGetData: typeof MsgIsReqGetData;
2600
+ declare const index$1_MsgIsReqGetWAL: typeof MsgIsReqGetWAL;
2601
+ declare const index$1_MsgIsReqOpen: typeof MsgIsReqOpen;
2602
+ declare const index$1_MsgIsReqPutData: typeof MsgIsReqPutData;
2603
+ declare const index$1_MsgIsReqPutMeta: typeof MsgIsReqPutMeta;
2604
+ declare const index$1_MsgIsReqPutWAL: typeof MsgIsReqPutWAL;
2605
+ declare const index$1_MsgIsResChat: typeof MsgIsResChat;
2606
+ declare const index$1_MsgIsResClose: typeof MsgIsResClose;
2607
+ declare const index$1_MsgIsResDelData: typeof MsgIsResDelData;
2608
+ declare const index$1_MsgIsResDelMeta: typeof MsgIsResDelMeta;
2609
+ declare const index$1_MsgIsResDelWAL: typeof MsgIsResDelWAL;
2610
+ declare const index$1_MsgIsResGestalt: typeof MsgIsResGestalt;
2611
+ declare const index$1_MsgIsResGetData: typeof MsgIsResGetData;
2612
+ declare const index$1_MsgIsResGetWAL: typeof MsgIsResGetWAL;
2613
+ declare const index$1_MsgIsResOpen: typeof MsgIsResOpen;
2614
+ declare const index$1_MsgIsResPutData: typeof MsgIsResPutData;
2615
+ declare const index$1_MsgIsResPutMeta: typeof MsgIsResPutMeta;
2616
+ declare const index$1_MsgIsResPutWAL: typeof MsgIsResPutWAL;
2617
+ declare const index$1_MsgIsTenantLedger: typeof MsgIsTenantLedger;
2618
+ declare const index$1_MsgIsTid: typeof MsgIsTid;
2619
+ declare const index$1_MsgIsWithConn: typeof MsgIsWithConn;
2620
+ declare const index$1_MsgIsWithConnAuth: typeof MsgIsWithConnAuth;
2621
+ type index$1_MsgRawConnection<T extends MsgBase = MsgBase> = MsgRawConnection<T>;
2622
+ type index$1_MsgRawConnectionBase = MsgRawConnectionBase;
2623
+ declare const index$1_MsgRawConnectionBase: typeof MsgRawConnectionBase;
2624
+ type index$1_MsgTypesCtx = MsgTypesCtx;
2625
+ type index$1_MsgTypesCtxSync = MsgTypesCtxSync;
2626
+ type index$1_MsgWithConnAuth<T extends MsgBase = MsgBase> = MsgWithConnAuth<T>;
2627
+ type index$1_MsgWithError<T extends MsgBase> = MsgWithError<T>;
2628
+ type index$1_MsgWithTenantLedger<T extends MsgWithConnAuth> = MsgWithTenantLedger<T>;
2629
+ type index$1_Msger = Msger;
2630
+ declare const index$1_Msger: typeof Msger;
2631
+ type index$1_MsgerParams = MsgerParams;
2632
+ type index$1_MsgerParamsWithEnDe = MsgerParamsWithEnDe;
2633
+ type index$1_NextId = NextId;
2634
+ type index$1_OnErrorFn = OnErrorFn;
2635
+ type index$1_OnMsgFn<T extends MsgBase = MsgBase> = OnMsgFn<T>;
2636
+ type index$1_OpenParams = OpenParams;
2637
+ type index$1_PreSignedMsg = PreSignedMsg;
2638
+ type index$1_ProtocolCapabilities = ProtocolCapabilities;
2639
+ type index$1_QSId = QSId;
2640
+ type index$1_ReqChat = ReqChat;
2641
+ type index$1_ReqClose = ReqClose;
2642
+ type index$1_ReqDelData = ReqDelData;
2643
+ type index$1_ReqDelMeta = ReqDelMeta;
2644
+ type index$1_ReqDelWAL = ReqDelWAL;
2645
+ type index$1_ReqGestalt = ReqGestalt;
2646
+ type index$1_ReqGetData = ReqGetData;
2647
+ type index$1_ReqGetWAL = ReqGetWAL;
2648
+ type index$1_ReqOpen = ReqOpen;
2649
+ type index$1_ReqOpenConn = ReqOpenConn;
2650
+ type index$1_ReqOpenConnection = ReqOpenConnection;
2651
+ type index$1_ReqPutData = ReqPutData;
2652
+ type index$1_ReqPutMeta = ReqPutMeta;
2653
+ type index$1_ReqPutWAL = ReqPutWAL;
2654
+ type index$1_ReqRes<Q extends MsgBase, S extends MsgBase> = ReqRes<Q, S>;
2655
+ type index$1_ReqSignedUrl = ReqSignedUrl;
2656
+ type index$1_ReqSignedUrlParam = ReqSignedUrlParam;
2657
+ type index$1_ReqSignedUrlWithoutMethodParams = ReqSignedUrlWithoutMethodParams;
2658
+ type index$1_RequestOpts = RequestOpts;
2659
+ type index$1_ResChat = ResChat;
2660
+ type index$1_ResClose = ResClose;
2661
+ type index$1_ResDelData = ResDelData;
2662
+ type index$1_ResDelMeta = ResDelMeta;
2663
+ type index$1_ResDelWAL = ResDelWAL;
2664
+ type index$1_ResGestalt = ResGestalt;
2665
+ type index$1_ResGetData = ResGetData;
2666
+ type index$1_ResGetWAL = ResGetWAL;
2667
+ type index$1_ResOpen = ResOpen;
2668
+ type index$1_ResOptionalSignedUrl = ResOptionalSignedUrl;
2669
+ type index$1_ResPutData = ResPutData;
2670
+ type index$1_ResPutMeta = ResPutMeta;
2671
+ type index$1_ResPutWAL = ResPutWAL;
2672
+ type index$1_ResSignedUrl = ResSignedUrl;
2673
+ type index$1_SignedUrlParam = SignedUrlParam;
2674
+ type index$1_TenantLedger = TenantLedger;
2675
+ type index$1_TokenForParam = TokenForParam;
2676
+ type index$1_UCanAuth = UCanAuth;
2677
+ type index$1_UnReg = UnReg;
2678
+ type index$1_UpdateReqRes<Q extends MsgBase, S extends MsgBase> = UpdateReqRes<Q, S>;
2679
+ declare const index$1_VERSION: typeof VERSION;
2680
+ type index$1_WSConnection = WSConnection;
2681
+ declare const index$1_WSConnection: typeof WSConnection;
2682
+ type index$1_WSReqOpen = WSReqOpen;
2683
+ type index$1_WaitForTid = WaitForTid;
2684
+ declare const index$1_applyStart: typeof applyStart;
2685
+ declare const index$1_authTypeFromUri: typeof authTypeFromUri;
2686
+ declare const index$1_buildBindGetMeta: typeof buildBindGetMeta;
2687
+ declare const index$1_buildErrorMsg: typeof buildErrorMsg;
2688
+ declare const index$1_buildEventGetMeta: typeof buildEventGetMeta;
2689
+ declare const index$1_buildReqChat: typeof buildReqChat;
2690
+ declare const index$1_buildReqClose: typeof buildReqClose;
2691
+ declare const index$1_buildReqDelData: typeof buildReqDelData;
2692
+ declare const index$1_buildReqDelMeta: typeof buildReqDelMeta;
2693
+ declare const index$1_buildReqDelWAL: typeof buildReqDelWAL;
2694
+ declare const index$1_buildReqGestalt: typeof buildReqGestalt;
2695
+ declare const index$1_buildReqGetData: typeof buildReqGetData;
2696
+ declare const index$1_buildReqGetWAL: typeof buildReqGetWAL;
2697
+ declare const index$1_buildReqOpen: typeof buildReqOpen;
2698
+ declare const index$1_buildReqPutData: typeof buildReqPutData;
2699
+ declare const index$1_buildReqPutMeta: typeof buildReqPutMeta;
2700
+ declare const index$1_buildReqPutWAL: typeof buildReqPutWAL;
2701
+ declare const index$1_buildReqSignedUrl: typeof buildReqSignedUrl;
2702
+ declare const index$1_buildRes: typeof buildRes;
2703
+ declare const index$1_buildResChat: typeof buildResChat;
2704
+ declare const index$1_buildResClose: typeof buildResClose;
2705
+ declare const index$1_buildResDelData: typeof buildResDelData;
2706
+ declare const index$1_buildResDelMeta: typeof buildResDelMeta;
2707
+ declare const index$1_buildResDelWAL: typeof buildResDelWAL;
2708
+ declare const index$1_buildResGestalt: typeof buildResGestalt;
2709
+ declare const index$1_buildResGetData: typeof buildResGetData;
2710
+ declare const index$1_buildResGetWAL: typeof buildResGetWAL;
2711
+ declare const index$1_buildResOpen: typeof buildResOpen;
2712
+ declare const index$1_buildResPutData: typeof buildResPutData;
2713
+ declare const index$1_buildResPutMeta: typeof buildResPutMeta;
2714
+ declare const index$1_buildResPutWAL: typeof buildResPutWAL;
2715
+ declare const index$1_coerceFPStoreTypes: typeof coerceFPStoreTypes;
2716
+ declare const index$1_defaultGestalt: typeof defaultGestalt;
2717
+ declare const index$1_defaultMsgParams: typeof defaultMsgParams;
2718
+ declare const index$1_isAuthTypeFPCloud: typeof isAuthTypeFPCloud;
2719
+ declare const index$1_isAuthTypeFPCloudJWK: typeof isAuthTypeFPCloudJWK;
2720
+ declare const index$1_isProtocolCapabilities: typeof isProtocolCapabilities;
2721
+ declare const index$1_jsonEnDe: typeof jsonEnDe;
2722
+ declare const index$1_keyTenantLedger: typeof keyTenantLedger;
2723
+ declare const index$1_qsidEqual: typeof qsidEqual;
2724
+ declare const index$1_qsidKey: typeof qsidKey;
2725
+ declare const index$1_resAuth: typeof resAuth;
2726
+ declare const index$1_selectRandom: typeof selectRandom;
2727
+ declare const index$1_timeout: typeof timeout;
2728
+ declare namespace index$1 {
2729
+ export { type index$1_ActiveStream as ActiveStream, type index$1_AuthFactory as AuthFactory, type index$1_AuthType as AuthType, type index$1_BaseTokenParam as BaseTokenParam, type index$1_BindGetMeta as BindGetMeta, type index$1_CalculatePreSignedUrl as CalculatePreSignedUrl, type index$1_ConnInfo as ConnInfo, type index$1_EnDeCoder as EnDeCoder, type index$1_ErrorMsg as ErrorMsg, type index$1_EventGetMeta as EventGetMeta, type index$1_ExchangedGestalt as ExchangedGestalt, type index$1_FPCloudAuthType as FPCloudAuthType, type index$1_FPCloudClaim as FPCloudClaim, type index$1_FPJWKCloudAuthType as FPJWKCloudAuthType, type index$1_FPStoreTypes as FPStoreTypes, type index$1_Gestalt as Gestalt, type index$1_GestaltParam as GestaltParam, type index$1_GwCtx as GwCtx, type index$1_GwCtxConn as GwCtxConn, index$1_HttpConnection as HttpConnection, type index$1_HttpMethods as HttpMethods, type index$1_MethodSignedUrlParam as MethodSignedUrlParam, type index$1_MsgBase as MsgBase, index$1_MsgConnected as MsgConnected, index$1_MsgConnectedAuth as MsgConnectedAuth, index$1_MsgIsBindGetMeta as MsgIsBindGetMeta, index$1_MsgIsConnected as MsgIsConnected, index$1_MsgIsError as MsgIsError, index$1_MsgIsEventGetMeta as MsgIsEventGetMeta, index$1_MsgIsQSError as MsgIsQSError, index$1_MsgIsReqChat as MsgIsReqChat, index$1_MsgIsReqClose as MsgIsReqClose, index$1_MsgIsReqDelData as MsgIsReqDelData, index$1_MsgIsReqDelMeta as MsgIsReqDelMeta, index$1_MsgIsReqDelWAL as MsgIsReqDelWAL, index$1_MsgIsReqGestalt as MsgIsReqGestalt, index$1_MsgIsReqGetData as MsgIsReqGetData, index$1_MsgIsReqGetWAL as MsgIsReqGetWAL, index$1_MsgIsReqOpen as MsgIsReqOpen, index$1_MsgIsReqPutData as MsgIsReqPutData, index$1_MsgIsReqPutMeta as MsgIsReqPutMeta, index$1_MsgIsReqPutWAL as MsgIsReqPutWAL, index$1_MsgIsResChat as MsgIsResChat, index$1_MsgIsResClose as MsgIsResClose, index$1_MsgIsResDelData as MsgIsResDelData, index$1_MsgIsResDelMeta as MsgIsResDelMeta, index$1_MsgIsResDelWAL as MsgIsResDelWAL, index$1_MsgIsResGestalt as MsgIsResGestalt, index$1_MsgIsResGetData as MsgIsResGetData, index$1_MsgIsResGetWAL as MsgIsResGetWAL, index$1_MsgIsResOpen as MsgIsResOpen, index$1_MsgIsResPutData as MsgIsResPutData, index$1_MsgIsResPutMeta as MsgIsResPutMeta, index$1_MsgIsResPutWAL as MsgIsResPutWAL, index$1_MsgIsTenantLedger as MsgIsTenantLedger, index$1_MsgIsTid as MsgIsTid, index$1_MsgIsWithConn as MsgIsWithConn, index$1_MsgIsWithConnAuth as MsgIsWithConnAuth, type index$1_MsgRawConnection as MsgRawConnection, index$1_MsgRawConnectionBase as MsgRawConnectionBase, type index$1_MsgTypesCtx as MsgTypesCtx, type index$1_MsgTypesCtxSync as MsgTypesCtxSync, type index$1_MsgWithConnAuth as MsgWithConnAuth, type index$1_MsgWithError as MsgWithError, type index$1_MsgWithTenantLedger as MsgWithTenantLedger, index$1_Msger as Msger, type index$1_MsgerParams as MsgerParams, type index$1_MsgerParamsWithEnDe as MsgerParamsWithEnDe, type index$1_NextId as NextId, type index$1_OnErrorFn as OnErrorFn, type index$1_OnMsgFn as OnMsgFn, type index$1_OpenParams as OpenParams, type index$1_PreSignedMsg as PreSignedMsg, type index$1_ProtocolCapabilities as ProtocolCapabilities, type index$1_QSId as QSId, type index$1_ReqChat as ReqChat, type index$1_ReqClose as ReqClose, type index$1_ReqDelData as ReqDelData, type index$1_ReqDelMeta as ReqDelMeta, type index$1_ReqDelWAL as ReqDelWAL, type index$1_ReqGestalt as ReqGestalt, type index$1_ReqGetData as ReqGetData, type index$1_ReqGetWAL as ReqGetWAL, type index$1_ReqOpen as ReqOpen, type index$1_ReqOpenConn as ReqOpenConn, type index$1_ReqOpenConnection as ReqOpenConnection, type index$1_ReqPutData as ReqPutData, type index$1_ReqPutMeta as ReqPutMeta, type index$1_ReqPutWAL as ReqPutWAL, type index$1_ReqRes as ReqRes, type index$1_ReqSignedUrl as ReqSignedUrl, type index$1_ReqSignedUrlParam as ReqSignedUrlParam, type index$1_ReqSignedUrlWithoutMethodParams as ReqSignedUrlWithoutMethodParams, type index$1_RequestOpts as RequestOpts, type index$1_ResChat as ResChat, type index$1_ResClose as ResClose, type index$1_ResDelData as ResDelData, type index$1_ResDelMeta as ResDelMeta, type index$1_ResDelWAL as ResDelWAL, type index$1_ResGestalt as ResGestalt, type index$1_ResGetData as ResGetData, type index$1_ResGetWAL as ResGetWAL, type index$1_ResOpen as ResOpen, type index$1_ResOptionalSignedUrl as ResOptionalSignedUrl, type index$1_ResPutData as ResPutData, type index$1_ResPutMeta as ResPutMeta, type index$1_ResPutWAL as ResPutWAL, type index$1_ResSignedUrl as ResSignedUrl, type index$1_SignedUrlParam as SignedUrlParam, type index$1_TenantLedger as TenantLedger, type index$1_TokenForParam as TokenForParam, type index$1_UCanAuth as UCanAuth, type index$1_UnReg as UnReg, type index$1_UpdateReqRes as UpdateReqRes, index$1_VERSION as VERSION, index$1_WSConnection as WSConnection, type index$1_WSReqOpen as WSReqOpen, type index$1_WaitForTid as WaitForTid, index$1_applyStart as applyStart, index$1_authTypeFromUri as authTypeFromUri, index$1_buildBindGetMeta as buildBindGetMeta, index$1_buildErrorMsg as buildErrorMsg, index$1_buildEventGetMeta as buildEventGetMeta, index$1_buildReqChat as buildReqChat, index$1_buildReqClose as buildReqClose, index$1_buildReqDelData as buildReqDelData, index$1_buildReqDelMeta as buildReqDelMeta, index$1_buildReqDelWAL as buildReqDelWAL, index$1_buildReqGestalt as buildReqGestalt, index$1_buildReqGetData as buildReqGetData, index$1_buildReqGetWAL as buildReqGetWAL, index$1_buildReqOpen as buildReqOpen, index$1_buildReqPutData as buildReqPutData, index$1_buildReqPutMeta as buildReqPutMeta, index$1_buildReqPutWAL as buildReqPutWAL, index$1_buildReqSignedUrl as buildReqSignedUrl, index$1_buildRes as buildRes, index$1_buildResChat as buildResChat, index$1_buildResClose as buildResClose, index$1_buildResDelData as buildResDelData, index$1_buildResDelMeta as buildResDelMeta, index$1_buildResDelWAL as buildResDelWAL, index$1_buildResGestalt as buildResGestalt, index$1_buildResGetData as buildResGetData, index$1_buildResGetWAL as buildResGetWAL, index$1_buildResOpen as buildResOpen, index$1_buildResPutData as buildResPutData, index$1_buildResPutMeta as buildResPutMeta, index$1_buildResPutWAL as buildResPutWAL, index$1_coerceFPStoreTypes as coerceFPStoreTypes, index$1_defaultGestalt as defaultGestalt, index$1_defaultMsgParams as defaultMsgParams, index$1_isAuthTypeFPCloud as isAuthTypeFPCloud, index$1_isAuthTypeFPCloudJWK as isAuthTypeFPCloudJWK, index$1_isProtocolCapabilities as isProtocolCapabilities, index$1_jsonEnDe as jsonEnDe, index$1_keyTenantLedger as keyTenantLedger, index$1_qsidEqual as qsidEqual, index$1_qsidKey as qsidKey, index$1_resAuth as resAuth, index$1_selectRandom as selectRandom, index$1_timeout as timeout };
2730
+ }
2731
+
1892
2732
  declare namespace index {
1893
- export { index_FILESTORE_VERSION as FILESTORE_VERSION, index_INDEXEDDB_VERSION as INDEXEDDB_VERSION, type index_KeyBackProviderFactory as KeyBackProviderFactory, index_KeyBag as KeyBag, type index_KeyBagFile as KeyBagFile, type index_KeyBagOpts as KeyBagOpts, type index_KeyBagProvider as KeyBagProvider, type index_KeyBagProviderFactoryItem as KeyBagProviderFactoryItem, type index_KeyBagRuntime as KeyBagRuntime, type index_KeysItem as KeysItem, type index_V1StorageKeyItem as V1StorageKeyItem, type index_V2StorageKeyItem as V2StorageKeyItem, index_defaultKeyBagOpts as defaultKeyBagOpts, index_defaultKeyBagUrl as defaultKeyBagUrl, index_files as files, index_getFileName as getFileName, index_getKeyBag as getKeyBag, index_getPath as getPath, index$1 as gw, keyBag as kb, keyedCrypto as kc, index_keysByFingerprint as keysByFingerprint, index$3 as mf, index_registerKeyBagProviderFactory as registerKeyBagProviderFactory, index_runtimeFn as runtimeFn, index_toKeyWithFingerPrint as toKeyWithFingerPrint };
2733
+ export { index$1 as cloud };
1894
2734
  }
1895
2735
 
1896
2736
  declare const PACKAGE_VERSION: string;
1897
2737
 
1898
- export { type AllDocsQueryOpts, type AllDocsResponse, type Attachable, type Attached, type BaseBlockstore, type BulkResponse, type CRDT, type CRDTClock, type CRDTEntry, CRDTImpl, type CRDTMeta, type CarTransaction, type ChangesOptions, type ChangesResponse, type ChangesResponseRow, type ClockHead, type ClockLink, type CoerceURIandInterceptor, type ConfigOpts, DataAndMetaAndWalAndBaseStore, type Database, DatabaseImpl, type DbMeta, type DocBase, type DocFileMeta, type DocFiles, type DocFragment, type DocLiteral, type DocObject, type DocRecord, type DocResponse, type DocSet, type DocTypes, type DocUpdate, type DocValue, type DocWithId, type FPStats, type Falsy, type FileTransactionMeta, type GatewayUrls, type GatewayUrlsParam, type HasCRDT, type HasLogger, type HasSuperThis, type IdxMeta, type IdxMetaMap, Index, type IndexKey, type IndexKeyType, type IndexRow, type IndexRows, type IndexTransactionMeta, type IndexUpdate, type IndexUpdateString, type Joiner, type KeyLiteral, type Ledger, LedgerFactory, type LedgerOpts, LedgerShell, type ListenerFn, type MapFn, type MetaType, type NoUpdateListenerFn, NotFoundError, PACKAGE_VERSION, PARAM, type PARAMS, type PathOps, type PromiseToUInt8, type QueryOpts, type ReadyCloseDestroy, type RefLedger, type Store, type StoreType, type SuperThis, type SuperThisOpts, type SysFileSystem, type TextEndeCoder, type ToUInt8, UInt8ArrayEqual, type UnReg, type UnknownDoc, type UpdateListenerFn, type VoidFn, type WriteQueue, index$5 as blockstore, index$5 as bs, coerceIntoUint8, coercePromiseIntoUint8, defaultWriteQueueOpts, ensureLogger, ensureSuperLog, ensureSuperThis, ensureURIDefaults, exceptionWrapper, falsyToUndef, fireproof, getKey, getName, getStore, index$4 as index, inplaceFilter, isDatabase, isFalsy, isLedger, isNotFoundError, keyConfigOpts, makeName, onSuperThis, index as rt, index as runtime, storeType2DataMetaWal, throwFalsy, toSortedArray, toStoreURIRuntime };
2738
+ export { type AllDocsQueryOpts, type AllDocsResponse, type Attachable, type Attached, type BaseBlockstore, type BulkResponse, type CRDT, type CRDTClock, type CRDTEntry, CRDTImpl, type CRDTMeta, type CarTransaction, type ChangesOptions, type ChangesResponse, type ChangesResponseRow, type ClockHead, type ClockLink, type CoerceURIandInterceptor, type ConfigOpts, DataAndMetaAndWalAndBaseStore, type Database, DatabaseImpl, type DbMeta, type DocBase, type DocFileMeta, type DocFiles, type DocFragment, type DocLiteral, type DocObject, type DocRecord, type DocResponse, type DocSet, type DocTypes, type DocUpdate, type DocValue, type DocWithId, type FPStats, type Falsy, type FileTransactionMeta, type GatewayUrls, type GatewayUrlsParam, type HasCRDT, type HasLogger, type HasSuperThis, type IdxMeta, type IdxMetaMap, Index, type IndexKey, type IndexKeyType, type IndexRow, type IndexRows, type IndexTransactionMeta, type IndexUpdate, type IndexUpdateString, type Joiner, type KeyLiteral, type Ledger, LedgerFactory, type LedgerOpts, LedgerShell, type ListenerFn, type MapFn, type MetaType, type NoUpdateListenerFn, NotFoundError, PACKAGE_VERSION, PARAM, type PARAMS, type PathOps, type PromiseToUInt8, type QueryOpts, type ReadyCloseDestroy, type RefLedger, type Store, type StoreType, type SuperThis, type SuperThisOpts, type SysFileSystem, type TextEndeCoder, type ToUInt8, UInt8ArrayEqual, type UnReg$1 as UnReg, type UnknownDoc, type Unreg, type UpdateListenerFn, type VoidFn, type WriteQueue, index$8 as blockstore, index$8 as bs, coerceIntoUint8, coercePromiseIntoUint8, defaultWriteQueueOpts, ensureLogger, ensureSuperLog, ensureSuperThis, ensureURIDefaults, exceptionWrapper, falsyToUndef, fireproof, getKey, getName, getStore, index$7 as index, inplaceFilter, isDatabase, isFalsy, isLedger, isNotFoundError, keyConfigOpts, makeName, onSuperThis, index as protocols, index as ps, index$2 as rt, index$2 as runtime, storeType2DataMetaWal, throwFalsy, toSortedArray, toStoreURIRuntime };
1899
2739
  declare module '@fireproof/core'