@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/react.mjs CHANGED
@@ -1,7 +1,48 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  import { drizzle } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
- // src/react.ts
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __esm = (fn, res) => function __init() {
6
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
7
+ };
8
+
9
+ // src/crypto/vaultKey.ts
10
+ function arrayBufferToBase64(buffer) {
11
+ const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
12
+ if (typeof Buffer !== "undefined") {
13
+ return Buffer.from(bytes).toString("base64");
14
+ }
15
+ let binary = "";
16
+ for (let i = 0; i < bytes.length; i++) {
17
+ const byte = bytes[i];
18
+ if (byte !== void 0) {
19
+ binary += String.fromCharCode(byte);
20
+ }
21
+ }
22
+ return btoa(binary);
23
+ }
24
+ function base64ToArrayBuffer(base64) {
25
+ if (typeof Buffer !== "undefined") {
26
+ return new Uint8Array(Buffer.from(base64, "base64"));
27
+ }
28
+ const binary = atob(base64);
29
+ const bytes = new Uint8Array(binary.length);
30
+ for (let i = 0; i < binary.length; i++) {
31
+ bytes[i] = binary.charCodeAt(i);
32
+ }
33
+ return bytes;
34
+ }
35
+ var init_vaultKey = __esm({
36
+ "src/crypto/vaultKey.ts"() {
37
+ }
38
+ });
39
+
40
+ // src/crypto/userKeypair.ts
41
+ var init_userKeypair = __esm({
42
+ "src/crypto/userKeypair.ts"() {
43
+ init_vaultKey();
44
+ }
45
+ });
5
46
 
6
47
  // src/polyfills/localStorage.ts
7
48
  function installLocalStoragePolyfill() {
@@ -687,34 +728,8 @@ var DatabaseAPI = class {
687
728
  }
688
729
  };
689
730
 
690
- // src/crypto/vaultKey.ts
691
- function arrayBufferToBase64(buffer) {
692
- const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
693
- if (typeof Buffer !== "undefined") {
694
- return Buffer.from(bytes).toString("base64");
695
- }
696
- let binary = "";
697
- for (let i = 0; i < bytes.length; i++) {
698
- const byte = bytes[i];
699
- if (byte !== void 0) {
700
- binary += String.fromCharCode(byte);
701
- }
702
- }
703
- return btoa(binary);
704
- }
705
- function base64ToArrayBuffer(base64) {
706
- if (typeof Buffer !== "undefined") {
707
- return new Uint8Array(Buffer.from(base64, "base64"));
708
- }
709
- const binary = atob(base64);
710
- const bytes = new Uint8Array(binary.length);
711
- for (let i = 0; i < binary.length; i++) {
712
- bytes[i] = binary.charCodeAt(i);
713
- }
714
- return bytes;
715
- }
716
-
717
731
  // src/api/filesystem.ts
732
+ init_vaultKey();
718
733
  var FilesystemAPI = class {
719
734
  constructor(client) {
720
735
  this.client = client;
@@ -1100,6 +1115,7 @@ var PermissionsAPI = class {
1100
1115
  };
1101
1116
 
1102
1117
  // src/api/remoteStorage.ts
1118
+ init_vaultKey();
1103
1119
  var RemoteStorageAPI = class {
1104
1120
  constructor(client) {
1105
1121
  this.client = client;
@@ -2398,6 +2414,28 @@ var HaexVaultSdk = class {
2398
2414
  }
2399
2415
  };
2400
2416
 
2417
+ // src/index.ts
2418
+ init_vaultKey();
2419
+ init_userKeypair();
2420
+
2421
+ // src/crypto/didKey.ts
2422
+ init_userKeypair();
2423
+ init_vaultKey();
2424
+
2425
+ // src/crypto/spaceKey.ts
2426
+ init_userKeypair();
2427
+ init_vaultKey();
2428
+
2429
+ // src/crypto/claims.ts
2430
+ init_userKeypair();
2431
+
2432
+ // src/crypto/recordSigning.ts
2433
+ init_userKeypair();
2434
+ init_vaultKey();
2435
+
2436
+ // src/crypto/passkey.ts
2437
+ init_vaultKey();
2438
+
2401
2439
  // src/index.ts
2402
2440
  function createHaexVaultSdk(config = {}) {
2403
2441
  return new HaexVaultSdk(config);