@haex-space/vault-sdk 2.5.117 → 2.5.118

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/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
- // src/react.ts
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,25 @@ 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/recordSigning.ts
2432
+ init_userKeypair();
2433
+ init_vaultKey();
2434
+
2435
+ // src/crypto/passkey.ts
2436
+ init_vaultKey();
2437
+
2403
2438
  // src/index.ts
2404
2439
  function createHaexVaultSdk(config = {}) {
2405
2440
  return new HaexVaultSdk(config);