@stackable-labs/sdk-extension-react 1.25.4 → 1.26.1
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/index.js +15 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13,12 +13,25 @@ var SurfaceContext = createContext(null);
|
|
|
13
13
|
var ExtensionContext = createContext(null);
|
|
14
14
|
|
|
15
15
|
// src/rpc-client.ts
|
|
16
|
-
import { WebCrypto } from "@agnostack/verifyd";
|
|
16
|
+
import { WebCrypto } from "@agnostack/verifyd/esm";
|
|
17
17
|
|
|
18
18
|
// ../../../lib/utils-js/src/crypto.ts
|
|
19
|
+
var getCrypto = () => {
|
|
20
|
+
if (typeof globalThis !== "undefined" && globalThis.crypto) {
|
|
21
|
+
return globalThis.crypto;
|
|
22
|
+
}
|
|
23
|
+
throw new Error("Web Crypto API not available \u2014 requires Node.js 22+ or a modern browser");
|
|
24
|
+
};
|
|
25
|
+
var getSubtle = () => {
|
|
26
|
+
const crypto = getCrypto();
|
|
27
|
+
if (crypto.subtle) {
|
|
28
|
+
return crypto.subtle;
|
|
29
|
+
}
|
|
30
|
+
throw new Error("SubtleCrypto not available \u2014 requires a secure context (HTTPS) or Node.js 22+");
|
|
31
|
+
};
|
|
19
32
|
var importKeyForEncryption = (keyBase64) => {
|
|
20
33
|
const raw = Uint8Array.from(atob(keyBase64), (c) => c.charCodeAt(0));
|
|
21
|
-
return
|
|
34
|
+
return getSubtle().importKey("raw", raw, { name: "AES-GCM" }, false, ["encrypt", "decrypt"]);
|
|
22
35
|
};
|
|
23
36
|
|
|
24
37
|
// src/rpc-client.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackable-labs/sdk-extension-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@agnostack/verifyd": "
|
|
16
|
-
"@stackable-labs/sdk-extension-contracts": "1.
|
|
15
|
+
"@agnostack/verifyd": "alpha",
|
|
16
|
+
"@stackable-labs/sdk-extension-contracts": "1.26.1",
|
|
17
17
|
"@remote-dom/core": "1.x",
|
|
18
18
|
"@remote-dom/react": "1.x"
|
|
19
19
|
},
|