@haex-space/vault-sdk 2.7.2 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client-DX1-dzQj.d.mts → client-CwFSZE1Q.d.mts} +1 -25
- package/dist/{client-DTWWB8gD.d.ts → client-Dn1Z_ppg.d.ts} +1 -25
- package/dist/index.d.mts +22 -23
- package/dist/index.d.ts +22 -23
- package/dist/index.js +48 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -119
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -25
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -25
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +1 -1
- package/dist/runtime/nuxt.plugin.client.d.ts +1 -1
- package/dist/runtime/nuxt.plugin.client.js +1 -25
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +1 -25
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +1 -25
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +1 -25
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +1 -25
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +1 -25
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -962,26 +962,17 @@ declare class LocalSendAPI {
|
|
|
962
962
|
cancelSend(sessionId: string): Promise<void>;
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
declare const SpaceRoles: {
|
|
966
|
-
readonly OWNER: "owner";
|
|
967
|
-
readonly ADMIN: "admin";
|
|
968
|
-
readonly MEMBER: "member";
|
|
969
|
-
readonly READER: "reader";
|
|
970
|
-
};
|
|
971
|
-
type SpaceRole = (typeof SpaceRoles)[keyof typeof SpaceRoles];
|
|
972
965
|
interface SharedSpace {
|
|
973
966
|
id: string;
|
|
974
967
|
ownerId: string;
|
|
975
968
|
encryptedName: string;
|
|
976
969
|
nameNonce: string;
|
|
977
970
|
currentKeyGeneration: number;
|
|
978
|
-
role: SpaceRole;
|
|
979
971
|
createdAt: string;
|
|
980
972
|
}
|
|
981
973
|
interface SpaceMemberInfo {
|
|
982
974
|
publicKey: string;
|
|
983
975
|
label: string;
|
|
984
|
-
role: SpaceRole;
|
|
985
976
|
invitedBy: string | null;
|
|
986
977
|
joinedAt: string;
|
|
987
978
|
}
|
|
@@ -1001,12 +992,10 @@ interface SpaceInvite {
|
|
|
1001
992
|
keyNonce: string;
|
|
1002
993
|
ephemeralPublicKey: string;
|
|
1003
994
|
generation: number;
|
|
1004
|
-
role: SpaceRole;
|
|
1005
995
|
}
|
|
1006
996
|
interface SpaceAccessTokenInfo {
|
|
1007
997
|
id: string;
|
|
1008
998
|
publicKey: string;
|
|
1009
|
-
role: SpaceRole;
|
|
1010
999
|
label: string | null;
|
|
1011
1000
|
revoked: boolean;
|
|
1012
1001
|
createdAt: string;
|
|
@@ -1019,7 +1008,6 @@ interface SpaceAccessTokenInfo {
|
|
|
1019
1008
|
interface DecryptedSpace {
|
|
1020
1009
|
id: string;
|
|
1021
1010
|
name: string;
|
|
1022
|
-
role: SpaceRole;
|
|
1023
1011
|
serverUrl: string;
|
|
1024
1012
|
createdAt: string;
|
|
1025
1013
|
}
|
|
@@ -1116,18 +1104,6 @@ declare class SpacesAPI {
|
|
|
1116
1104
|
* Returns spaces with decrypted names (decryption happens vault-side).
|
|
1117
1105
|
*/
|
|
1118
1106
|
listSpacesAsync(): Promise<DecryptedSpace[]>;
|
|
1119
|
-
/**
|
|
1120
|
-
* Create a new shared space.
|
|
1121
|
-
* @param name - Human-readable space name
|
|
1122
|
-
* @param serverUrl - The sync server URL to create the space on
|
|
1123
|
-
* @returns The created space with decrypted name
|
|
1124
|
-
*/
|
|
1125
|
-
createSpaceAsync(name: string, serverUrl: string): Promise<DecryptedSpace>;
|
|
1126
|
-
/**
|
|
1127
|
-
* List available sync backends that can host shared spaces.
|
|
1128
|
-
* @returns Array of backend info with server URLs
|
|
1129
|
-
*/
|
|
1130
|
-
listSyncBackendsAsync(): Promise<SyncBackendInfo[]>;
|
|
1131
1107
|
}
|
|
1132
1108
|
|
|
1133
1109
|
interface ShellCreateOptions {
|
|
@@ -1288,4 +1264,4 @@ declare class HaexVaultSdk {
|
|
|
1288
1264
|
private log;
|
|
1289
1265
|
}
|
|
1290
1266
|
|
|
1291
|
-
export { type
|
|
1267
|
+
export { type SpaceKeyGrantInfo as $, type AuthorizedClient as A, type BlockedClient as B, type RequestedExtension as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type SelectFileOptions as G, HaexVaultSdk as H, type SelectFolderOptions as I, type ServerInfo as J, KnownPath as K, LOCALSEND_EVENTS as L, type ServerStatus as M, type SessionAuthorization as N, type SharedSpace as O, type PendingAuthorization as P, ShellAPI as Q, RemoteStorageAPI as R, StorageAPI as S, type ShellCreateOptions as T, type UpdateBackendRequest as U, type ShellCreateResponse as V, type ShellExitEvent as W, type ShellOutputEvent as X, type SpaceAccessTokenInfo as Y, type SpaceAssignment as Z, type SpaceInvite as _, type DecryptedSpace as a, type SpaceMemberInfo as a0, SpacesAPI as a1, type SyncBackendInfo as a2, type TransferDirection as a3, type TransferProgress as a4, type TransferState as a5, WebAPI as a6, canExternalClientSendRequests as a7, isExternalClientConnected as a8, type Device as b, type DeviceInfo as c, type DeviceType as d, type DirEntry as e, type ExternalConnection as f, ExternalConnectionErrorCode as g, ExternalConnectionState as h, type ExternalRequest as i, type ExternalRequestEvent as j, type ExternalRequestHandler as k, type ExternalRequestPayload as l, type ExternalResponse as m, FilesystemAPI as n, type KnownPaths as o, LocalSendAPI as p, type LocalSendEvent as q, type FileInfo as r, type LocalSendSettings as s, type PendingTransfer as t, PermissionsAPI as u, type AddBackendRequest as v, type S3Config as w, type S3PublicConfig as x, type StorageBackendInfo as y, type StorageObjectInfo as z };
|
|
@@ -962,26 +962,17 @@ declare class LocalSendAPI {
|
|
|
962
962
|
cancelSend(sessionId: string): Promise<void>;
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
declare const SpaceRoles: {
|
|
966
|
-
readonly OWNER: "owner";
|
|
967
|
-
readonly ADMIN: "admin";
|
|
968
|
-
readonly MEMBER: "member";
|
|
969
|
-
readonly READER: "reader";
|
|
970
|
-
};
|
|
971
|
-
type SpaceRole = (typeof SpaceRoles)[keyof typeof SpaceRoles];
|
|
972
965
|
interface SharedSpace {
|
|
973
966
|
id: string;
|
|
974
967
|
ownerId: string;
|
|
975
968
|
encryptedName: string;
|
|
976
969
|
nameNonce: string;
|
|
977
970
|
currentKeyGeneration: number;
|
|
978
|
-
role: SpaceRole;
|
|
979
971
|
createdAt: string;
|
|
980
972
|
}
|
|
981
973
|
interface SpaceMemberInfo {
|
|
982
974
|
publicKey: string;
|
|
983
975
|
label: string;
|
|
984
|
-
role: SpaceRole;
|
|
985
976
|
invitedBy: string | null;
|
|
986
977
|
joinedAt: string;
|
|
987
978
|
}
|
|
@@ -1001,12 +992,10 @@ interface SpaceInvite {
|
|
|
1001
992
|
keyNonce: string;
|
|
1002
993
|
ephemeralPublicKey: string;
|
|
1003
994
|
generation: number;
|
|
1004
|
-
role: SpaceRole;
|
|
1005
995
|
}
|
|
1006
996
|
interface SpaceAccessTokenInfo {
|
|
1007
997
|
id: string;
|
|
1008
998
|
publicKey: string;
|
|
1009
|
-
role: SpaceRole;
|
|
1010
999
|
label: string | null;
|
|
1011
1000
|
revoked: boolean;
|
|
1012
1001
|
createdAt: string;
|
|
@@ -1019,7 +1008,6 @@ interface SpaceAccessTokenInfo {
|
|
|
1019
1008
|
interface DecryptedSpace {
|
|
1020
1009
|
id: string;
|
|
1021
1010
|
name: string;
|
|
1022
|
-
role: SpaceRole;
|
|
1023
1011
|
serverUrl: string;
|
|
1024
1012
|
createdAt: string;
|
|
1025
1013
|
}
|
|
@@ -1116,18 +1104,6 @@ declare class SpacesAPI {
|
|
|
1116
1104
|
* Returns spaces with decrypted names (decryption happens vault-side).
|
|
1117
1105
|
*/
|
|
1118
1106
|
listSpacesAsync(): Promise<DecryptedSpace[]>;
|
|
1119
|
-
/**
|
|
1120
|
-
* Create a new shared space.
|
|
1121
|
-
* @param name - Human-readable space name
|
|
1122
|
-
* @param serverUrl - The sync server URL to create the space on
|
|
1123
|
-
* @returns The created space with decrypted name
|
|
1124
|
-
*/
|
|
1125
|
-
createSpaceAsync(name: string, serverUrl: string): Promise<DecryptedSpace>;
|
|
1126
|
-
/**
|
|
1127
|
-
* List available sync backends that can host shared spaces.
|
|
1128
|
-
* @returns Array of backend info with server URLs
|
|
1129
|
-
*/
|
|
1130
|
-
listSyncBackendsAsync(): Promise<SyncBackendInfo[]>;
|
|
1131
1107
|
}
|
|
1132
1108
|
|
|
1133
1109
|
interface ShellCreateOptions {
|
|
@@ -1288,4 +1264,4 @@ declare class HaexVaultSdk {
|
|
|
1288
1264
|
private log;
|
|
1289
1265
|
}
|
|
1290
1266
|
|
|
1291
|
-
export { type
|
|
1267
|
+
export { type SpaceKeyGrantInfo as $, type AuthorizedClient as A, type BlockedClient as B, type RequestedExtension as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type SelectFileOptions as G, HaexVaultSdk as H, type SelectFolderOptions as I, type ServerInfo as J, KnownPath as K, LOCALSEND_EVENTS as L, type ServerStatus as M, type SessionAuthorization as N, type SharedSpace as O, type PendingAuthorization as P, ShellAPI as Q, RemoteStorageAPI as R, StorageAPI as S, type ShellCreateOptions as T, type UpdateBackendRequest as U, type ShellCreateResponse as V, type ShellExitEvent as W, type ShellOutputEvent as X, type SpaceAccessTokenInfo as Y, type SpaceAssignment as Z, type SpaceInvite as _, type DecryptedSpace as a, type SpaceMemberInfo as a0, SpacesAPI as a1, type SyncBackendInfo as a2, type TransferDirection as a3, type TransferProgress as a4, type TransferState as a5, WebAPI as a6, canExternalClientSendRequests as a7, isExternalClientConnected as a8, type Device as b, type DeviceInfo as c, type DeviceType as d, type DirEntry as e, type ExternalConnection as f, ExternalConnectionErrorCode as g, ExternalConnectionState as h, type ExternalRequest as i, type ExternalRequestEvent as j, type ExternalRequestHandler as k, type ExternalRequestPayload as l, type ExternalResponse as m, FilesystemAPI as n, type KnownPaths as o, LocalSendAPI as p, type LocalSendEvent as q, type FileInfo as r, type LocalSendSettings as s, type PendingTransfer as t, PermissionsAPI as u, type AddBackendRequest as v, type S3Config as w, type S3PublicConfig as x, type StorageBackendInfo as y, type StorageObjectInfo as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-CwFSZE1Q.mjs';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, a as DecryptedSpace, b as Device, c as DeviceInfo, d as DeviceType, e as DirEntry, E as ExternalAuthDecision, f as ExternalConnection, g as ExternalConnectionErrorCode, h as ExternalConnectionState, i as ExternalRequest, j as ExternalRequestEvent, k as ExternalRequestHandler, l as ExternalRequestPayload, m as ExternalResponse, F as FileStat, n as FilesystemAPI, K as KnownPath, o as KnownPaths, L as LOCALSEND_EVENTS, p as LocalSendAPI, q as LocalSendEvent, r as LocalSendFileInfo, s as LocalSendSettings, P as PendingAuthorization, t as PendingTransfer, u as PermissionsAPI, v as RemoteAddBackendRequest, w as RemoteS3Config, x as RemoteS3PublicConfig, R as RemoteStorageAPI, y as RemoteStorageBackendInfo, z as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, C as RequestedExtension, G as SelectFileOptions, I as SelectFolderOptions, J as ServerInfo, M as ServerStatus, N as SessionAuthorization, O as SharedSpace, Q as ShellAPI, T as ShellCreateOptions, V as ShellCreateResponse, W as ShellExitEvent, X as ShellOutputEvent, Y as SpaceAccessTokenInfo, Z as SpaceAssignment, _ as SpaceInvite, $ as SpaceKeyGrantInfo, a0 as SpaceMemberInfo, a1 as SpacesAPI, a2 as SyncBackendInfo, a3 as TransferDirection, a4 as TransferProgress, a5 as TransferState, a6 as WebAPI, a7 as canExternalClientSendRequests, a8 as isExternalClientConnected } from './client-CwFSZE1Q.mjs';
|
|
3
3
|
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-DmCSegdY.mjs';
|
|
4
4
|
export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, a as ExtensionInfo, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, I as IdentityClaim, B as ManifestI18nEntry, G as PermissionDeniedError, J as PermissionErrorBase, K as PermissionErrorCode, L as PermissionPromptError, P as PermissionResponse, N as PermissionStatus, O as SHELL_EVENTS, Q as SearchQuery, R as SearchRequestEvent, S as SearchResult, T as ShellEvent, U as SyncTablesUpdatedEvent, V as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, X as getTableName, Y as isPermissionDeniedError, Z as isPermissionError, _ as isPermissionPromptError } from './types-DmCSegdY.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
@@ -88,7 +88,6 @@ declare function installPolyfills(): void;
|
|
|
88
88
|
* Types for communicating with the haex-sync-server authentication endpoints.
|
|
89
89
|
* Used by haex-vault and extensions that need to interact with the sync server.
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
91
|
/**
|
|
93
92
|
* S3-compatible storage configuration provided by the sync server.
|
|
94
93
|
*
|
|
@@ -202,7 +201,7 @@ interface CreateSpaceRequest {
|
|
|
202
201
|
interface InviteMemberRequest {
|
|
203
202
|
publicKey: string;
|
|
204
203
|
label: string;
|
|
205
|
-
|
|
204
|
+
capability: string;
|
|
206
205
|
keyGrant: {
|
|
207
206
|
encryptedSpaceKey: string;
|
|
208
207
|
keyNonce: string;
|
|
@@ -814,21 +813,19 @@ declare function decryptCrdtData<T = object>(encryptedData: string, nonce: strin
|
|
|
814
813
|
declare function arrayBufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
|
|
815
814
|
declare function base64ToArrayBuffer(base64: string): Uint8Array<ArrayBuffer>;
|
|
816
815
|
|
|
817
|
-
declare const SIGNING_ALGO:
|
|
818
|
-
|
|
819
|
-
namedCurve: string;
|
|
820
|
-
};
|
|
821
|
-
declare const KEY_AGREEMENT_ALGO: {
|
|
822
|
-
name: string;
|
|
823
|
-
namedCurve: string;
|
|
824
|
-
};
|
|
816
|
+
declare const SIGNING_ALGO: Algorithm;
|
|
817
|
+
declare const KEY_AGREEMENT_ALGO: Algorithm;
|
|
825
818
|
interface UserKeypair {
|
|
826
|
-
|
|
827
|
-
|
|
819
|
+
signingPublicKey: CryptoKey;
|
|
820
|
+
signingPrivateKey: CryptoKey;
|
|
821
|
+
agreementPublicKey: CryptoKey;
|
|
822
|
+
agreementPrivateKey: CryptoKey;
|
|
828
823
|
}
|
|
829
824
|
interface ExportedUserKeypair {
|
|
830
|
-
|
|
831
|
-
|
|
825
|
+
signingPublicKey: string;
|
|
826
|
+
signingPrivateKey: string;
|
|
827
|
+
agreementPublicKey: string;
|
|
828
|
+
agreementPrivateKey: string;
|
|
832
829
|
}
|
|
833
830
|
declare function generateUserKeypairAsync(): Promise<UserKeypair>;
|
|
834
831
|
declare function exportUserKeypairAsync(keypair: UserKeypair): Promise<ExportedUserKeypair>;
|
|
@@ -848,26 +845,28 @@ declare function base58btcDecode(str: string): Uint8Array;
|
|
|
848
845
|
/**
|
|
849
846
|
* Convert a Base64-encoded SPKI public key to a `did:key` identifier.
|
|
850
847
|
*
|
|
851
|
-
* @param publicKeyBase64 - Base64-encoded SPKI public key (
|
|
852
|
-
* @returns DID string, e.g. `did:key:
|
|
848
|
+
* @param publicKeyBase64 - Base64-encoded SPKI public key (Ed25519)
|
|
849
|
+
* @returns DID string, e.g. `did:key:z6Mk...`
|
|
853
850
|
*/
|
|
854
851
|
declare function publicKeyToDidKeyAsync(publicKeyBase64: string): Promise<string>;
|
|
855
852
|
/**
|
|
856
853
|
* Extract a Base64-encoded SPKI public key from a `did:key` identifier.
|
|
857
854
|
*
|
|
858
|
-
* @param did - DID string, e.g. `did:key:
|
|
855
|
+
* @param did - DID string, e.g. `did:key:z6Mk...`
|
|
859
856
|
* @returns Base64-encoded SPKI public key
|
|
860
857
|
*/
|
|
861
858
|
declare function didKeyToPublicKeyAsync(did: string): Promise<string>;
|
|
862
859
|
/**
|
|
863
860
|
* Generate a fresh identity keypair and return it with its did:key.
|
|
864
861
|
*
|
|
865
|
-
* @returns { did,
|
|
862
|
+
* @returns { did, signingPublicKey, signingPrivateKey, agreementPublicKey, agreementPrivateKey }
|
|
866
863
|
*/
|
|
867
864
|
declare function generateIdentityAsync(): Promise<{
|
|
868
865
|
did: string;
|
|
869
|
-
|
|
870
|
-
|
|
866
|
+
signingPublicKey: string;
|
|
867
|
+
signingPrivateKey: string;
|
|
868
|
+
agreementPublicKey: string;
|
|
869
|
+
agreementPrivateKey: string;
|
|
871
870
|
}>;
|
|
872
871
|
|
|
873
872
|
interface SealedData {
|
|
@@ -1007,4 +1006,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1007
1006
|
|
|
1008
1007
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1009
1008
|
|
|
1010
|
-
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, type PasskeyKeyPair, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand,
|
|
1009
|
+
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, type PasskeyKeyPair, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, hexToBytes, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, sortObjectKeysRecursively, unwrapKey, verifyClaimPresentationAsync, verifyExtensionSignature, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-Dn1Z_ppg.js';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, D as DatabaseAPI, a as DecryptedSpace, b as Device, c as DeviceInfo, d as DeviceType, e as DirEntry, E as ExternalAuthDecision, f as ExternalConnection, g as ExternalConnectionErrorCode, h as ExternalConnectionState, i as ExternalRequest, j as ExternalRequestEvent, k as ExternalRequestHandler, l as ExternalRequestPayload, m as ExternalResponse, F as FileStat, n as FilesystemAPI, K as KnownPath, o as KnownPaths, L as LOCALSEND_EVENTS, p as LocalSendAPI, q as LocalSendEvent, r as LocalSendFileInfo, s as LocalSendSettings, P as PendingAuthorization, t as PendingTransfer, u as PermissionsAPI, v as RemoteAddBackendRequest, w as RemoteS3Config, x as RemoteS3PublicConfig, R as RemoteStorageAPI, y as RemoteStorageBackendInfo, z as RemoteStorageObjectInfo, U as RemoteUpdateBackendRequest, C as RequestedExtension, G as SelectFileOptions, I as SelectFolderOptions, J as ServerInfo, M as ServerStatus, N as SessionAuthorization, O as SharedSpace, Q as ShellAPI, T as ShellCreateOptions, V as ShellCreateResponse, W as ShellExitEvent, X as ShellOutputEvent, Y as SpaceAccessTokenInfo, Z as SpaceAssignment, _ as SpaceInvite, $ as SpaceKeyGrantInfo, a0 as SpaceMemberInfo, a1 as SpacesAPI, a2 as SyncBackendInfo, a3 as TransferDirection, a4 as TransferProgress, a5 as TransferState, a6 as WebAPI, a7 as canExternalClientSendRequests, a8 as isExternalClientConnected } from './client-Dn1Z_ppg.js';
|
|
3
3
|
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-DmCSegdY.js';
|
|
4
4
|
export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, a as ExtensionInfo, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, I as IdentityClaim, B as ManifestI18nEntry, G as PermissionDeniedError, J as PermissionErrorBase, K as PermissionErrorCode, L as PermissionPromptError, P as PermissionResponse, N as PermissionStatus, O as SHELL_EVENTS, Q as SearchQuery, R as SearchRequestEvent, S as SearchResult, T as ShellEvent, U as SyncTablesUpdatedEvent, V as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, X as getTableName, Y as isPermissionDeniedError, Z as isPermissionError, _ as isPermissionPromptError } from './types-DmCSegdY.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
@@ -88,7 +88,6 @@ declare function installPolyfills(): void;
|
|
|
88
88
|
* Types for communicating with the haex-sync-server authentication endpoints.
|
|
89
89
|
* Used by haex-vault and extensions that need to interact with the sync server.
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
91
|
/**
|
|
93
92
|
* S3-compatible storage configuration provided by the sync server.
|
|
94
93
|
*
|
|
@@ -202,7 +201,7 @@ interface CreateSpaceRequest {
|
|
|
202
201
|
interface InviteMemberRequest {
|
|
203
202
|
publicKey: string;
|
|
204
203
|
label: string;
|
|
205
|
-
|
|
204
|
+
capability: string;
|
|
206
205
|
keyGrant: {
|
|
207
206
|
encryptedSpaceKey: string;
|
|
208
207
|
keyNonce: string;
|
|
@@ -814,21 +813,19 @@ declare function decryptCrdtData<T = object>(encryptedData: string, nonce: strin
|
|
|
814
813
|
declare function arrayBufferToBase64(buffer: ArrayBuffer | Uint8Array): string;
|
|
815
814
|
declare function base64ToArrayBuffer(base64: string): Uint8Array<ArrayBuffer>;
|
|
816
815
|
|
|
817
|
-
declare const SIGNING_ALGO:
|
|
818
|
-
|
|
819
|
-
namedCurve: string;
|
|
820
|
-
};
|
|
821
|
-
declare const KEY_AGREEMENT_ALGO: {
|
|
822
|
-
name: string;
|
|
823
|
-
namedCurve: string;
|
|
824
|
-
};
|
|
816
|
+
declare const SIGNING_ALGO: Algorithm;
|
|
817
|
+
declare const KEY_AGREEMENT_ALGO: Algorithm;
|
|
825
818
|
interface UserKeypair {
|
|
826
|
-
|
|
827
|
-
|
|
819
|
+
signingPublicKey: CryptoKey;
|
|
820
|
+
signingPrivateKey: CryptoKey;
|
|
821
|
+
agreementPublicKey: CryptoKey;
|
|
822
|
+
agreementPrivateKey: CryptoKey;
|
|
828
823
|
}
|
|
829
824
|
interface ExportedUserKeypair {
|
|
830
|
-
|
|
831
|
-
|
|
825
|
+
signingPublicKey: string;
|
|
826
|
+
signingPrivateKey: string;
|
|
827
|
+
agreementPublicKey: string;
|
|
828
|
+
agreementPrivateKey: string;
|
|
832
829
|
}
|
|
833
830
|
declare function generateUserKeypairAsync(): Promise<UserKeypair>;
|
|
834
831
|
declare function exportUserKeypairAsync(keypair: UserKeypair): Promise<ExportedUserKeypair>;
|
|
@@ -848,26 +845,28 @@ declare function base58btcDecode(str: string): Uint8Array;
|
|
|
848
845
|
/**
|
|
849
846
|
* Convert a Base64-encoded SPKI public key to a `did:key` identifier.
|
|
850
847
|
*
|
|
851
|
-
* @param publicKeyBase64 - Base64-encoded SPKI public key (
|
|
852
|
-
* @returns DID string, e.g. `did:key:
|
|
848
|
+
* @param publicKeyBase64 - Base64-encoded SPKI public key (Ed25519)
|
|
849
|
+
* @returns DID string, e.g. `did:key:z6Mk...`
|
|
853
850
|
*/
|
|
854
851
|
declare function publicKeyToDidKeyAsync(publicKeyBase64: string): Promise<string>;
|
|
855
852
|
/**
|
|
856
853
|
* Extract a Base64-encoded SPKI public key from a `did:key` identifier.
|
|
857
854
|
*
|
|
858
|
-
* @param did - DID string, e.g. `did:key:
|
|
855
|
+
* @param did - DID string, e.g. `did:key:z6Mk...`
|
|
859
856
|
* @returns Base64-encoded SPKI public key
|
|
860
857
|
*/
|
|
861
858
|
declare function didKeyToPublicKeyAsync(did: string): Promise<string>;
|
|
862
859
|
/**
|
|
863
860
|
* Generate a fresh identity keypair and return it with its did:key.
|
|
864
861
|
*
|
|
865
|
-
* @returns { did,
|
|
862
|
+
* @returns { did, signingPublicKey, signingPrivateKey, agreementPublicKey, agreementPrivateKey }
|
|
866
863
|
*/
|
|
867
864
|
declare function generateIdentityAsync(): Promise<{
|
|
868
865
|
did: string;
|
|
869
|
-
|
|
870
|
-
|
|
866
|
+
signingPublicKey: string;
|
|
867
|
+
signingPrivateKey: string;
|
|
868
|
+
agreementPublicKey: string;
|
|
869
|
+
agreementPrivateKey: string;
|
|
871
870
|
}>;
|
|
872
871
|
|
|
873
872
|
interface SealedData {
|
|
@@ -1007,4 +1006,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1007
1006
|
|
|
1008
1007
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1009
1008
|
|
|
1010
|
-
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, type PasskeyKeyPair, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand,
|
|
1009
|
+
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, type PasskeyKeyPair, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, type VerifyResult, type ZipFileEntry, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, hexToBytes, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, sortObjectKeysRecursively, unwrapKey, verifyClaimPresentationAsync, verifyExtensionSignature, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|