@haex-space/vault-sdk 2.5.117 → 2.5.119
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-DSvkG_lC.d.mts → client-CJTSbNLI.d.mts} +1 -1
- package/dist/{client-CA59HZfa.d.ts → client-E86CS0KK.d.ts} +1 -1
- package/dist/index.d.mts +43 -5
- package/dist/index.d.ts +43 -5
- package/dist/index.js +727 -487
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +716 -479
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +66 -28
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +66 -28
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +66 -28
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +66 -28
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-neLTvZJ_.d.mts → types-TFcm6hpl.d.mts} +19 -1
- package/dist/{types-neLTvZJ_.d.ts → types-TFcm6hpl.d.ts} +19 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +66 -28
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +66 -28
- package/dist/vue.mjs.map +1 -1
- package/package.json +3 -2
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
2
|
-
import { E as ExtensionManifest } from './types-
|
|
2
|
+
import { E as ExtensionManifest } from './types-TFcm6hpl.mjs';
|
|
3
3
|
|
|
4
4
|
interface ReadManifestOptions {
|
|
5
5
|
/** Root directory of the project */
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.js';
|
|
2
|
-
import { E as ExtensionManifest } from './types-
|
|
2
|
+
import { E as ExtensionManifest } from './types-TFcm6hpl.js';
|
|
3
3
|
|
|
4
4
|
interface ReadManifestOptions {
|
|
5
5
|
/** Root directory of the project */
|
package/dist/react.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-CJTSbNLI.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
|
-
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-
|
|
3
|
+
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-TFcm6hpl.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* React hook for HaexVault SDK
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-E86CS0KK.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
|
-
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-
|
|
3
|
+
import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-TFcm6hpl.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* React hook for HaexVault SDK
|
package/dist/react.js
CHANGED
|
@@ -3,7 +3,48 @@
|
|
|
3
3
|
var react = require('react');
|
|
4
4
|
var sqliteProxy = require('drizzle-orm/sqlite-proxy');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/crypto/vaultKey.ts
|
|
12
|
+
function arrayBufferToBase64(buffer) {
|
|
13
|
+
const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
|
|
14
|
+
if (typeof Buffer !== "undefined") {
|
|
15
|
+
return Buffer.from(bytes).toString("base64");
|
|
16
|
+
}
|
|
17
|
+
let binary = "";
|
|
18
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
19
|
+
const byte = bytes[i];
|
|
20
|
+
if (byte !== void 0) {
|
|
21
|
+
binary += String.fromCharCode(byte);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return btoa(binary);
|
|
25
|
+
}
|
|
26
|
+
function base64ToArrayBuffer(base64) {
|
|
27
|
+
if (typeof Buffer !== "undefined") {
|
|
28
|
+
return new Uint8Array(Buffer.from(base64, "base64"));
|
|
29
|
+
}
|
|
30
|
+
const binary = atob(base64);
|
|
31
|
+
const bytes = new Uint8Array(binary.length);
|
|
32
|
+
for (let i = 0; i < binary.length; i++) {
|
|
33
|
+
bytes[i] = binary.charCodeAt(i);
|
|
34
|
+
}
|
|
35
|
+
return bytes;
|
|
36
|
+
}
|
|
37
|
+
var init_vaultKey = __esm({
|
|
38
|
+
"src/crypto/vaultKey.ts"() {
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// src/crypto/userKeypair.ts
|
|
43
|
+
var init_userKeypair = __esm({
|
|
44
|
+
"src/crypto/userKeypair.ts"() {
|
|
45
|
+
init_vaultKey();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
7
48
|
|
|
8
49
|
// src/polyfills/localStorage.ts
|
|
9
50
|
function installLocalStoragePolyfill() {
|
|
@@ -689,34 +730,8 @@ var DatabaseAPI = class {
|
|
|
689
730
|
}
|
|
690
731
|
};
|
|
691
732
|
|
|
692
|
-
// src/crypto/vaultKey.ts
|
|
693
|
-
function arrayBufferToBase64(buffer) {
|
|
694
|
-
const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
|
|
695
|
-
if (typeof Buffer !== "undefined") {
|
|
696
|
-
return Buffer.from(bytes).toString("base64");
|
|
697
|
-
}
|
|
698
|
-
let binary = "";
|
|
699
|
-
for (let i = 0; i < bytes.length; i++) {
|
|
700
|
-
const byte = bytes[i];
|
|
701
|
-
if (byte !== void 0) {
|
|
702
|
-
binary += String.fromCharCode(byte);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
return btoa(binary);
|
|
706
|
-
}
|
|
707
|
-
function base64ToArrayBuffer(base64) {
|
|
708
|
-
if (typeof Buffer !== "undefined") {
|
|
709
|
-
return new Uint8Array(Buffer.from(base64, "base64"));
|
|
710
|
-
}
|
|
711
|
-
const binary = atob(base64);
|
|
712
|
-
const bytes = new Uint8Array(binary.length);
|
|
713
|
-
for (let i = 0; i < binary.length; i++) {
|
|
714
|
-
bytes[i] = binary.charCodeAt(i);
|
|
715
|
-
}
|
|
716
|
-
return bytes;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
733
|
// src/api/filesystem.ts
|
|
734
|
+
init_vaultKey();
|
|
720
735
|
var FilesystemAPI = class {
|
|
721
736
|
constructor(client) {
|
|
722
737
|
this.client = client;
|
|
@@ -1102,6 +1117,7 @@ var PermissionsAPI = class {
|
|
|
1102
1117
|
};
|
|
1103
1118
|
|
|
1104
1119
|
// src/api/remoteStorage.ts
|
|
1120
|
+
init_vaultKey();
|
|
1105
1121
|
var RemoteStorageAPI = class {
|
|
1106
1122
|
constructor(client) {
|
|
1107
1123
|
this.client = client;
|
|
@@ -2400,6 +2416,28 @@ var HaexVaultSdk = class {
|
|
|
2400
2416
|
}
|
|
2401
2417
|
};
|
|
2402
2418
|
|
|
2419
|
+
// src/index.ts
|
|
2420
|
+
init_vaultKey();
|
|
2421
|
+
init_userKeypair();
|
|
2422
|
+
|
|
2423
|
+
// src/crypto/didKey.ts
|
|
2424
|
+
init_userKeypair();
|
|
2425
|
+
init_vaultKey();
|
|
2426
|
+
|
|
2427
|
+
// src/crypto/spaceKey.ts
|
|
2428
|
+
init_userKeypair();
|
|
2429
|
+
init_vaultKey();
|
|
2430
|
+
|
|
2431
|
+
// src/crypto/claims.ts
|
|
2432
|
+
init_userKeypair();
|
|
2433
|
+
|
|
2434
|
+
// src/crypto/recordSigning.ts
|
|
2435
|
+
init_userKeypair();
|
|
2436
|
+
init_vaultKey();
|
|
2437
|
+
|
|
2438
|
+
// src/crypto/passkey.ts
|
|
2439
|
+
init_vaultKey();
|
|
2440
|
+
|
|
2403
2441
|
// src/index.ts
|
|
2404
2442
|
function createHaexVaultSdk(config = {}) {
|
|
2405
2443
|
return new HaexVaultSdk(config);
|