@konemono/nostr-login 1.9.12 → 1.9.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konemono/nostr-login",
3
- "version": "1.9.12",
3
+ "version": "1.9.13",
4
4
  "description": "",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -4,6 +4,13 @@ import { EventEmitter } from 'tseep';
4
4
  import { Nip46Request, Nip46Response, PendingRequest, Nip46ClientOptions } from './types';
5
5
  import { getEventHash, getSignature } from 'nostr-tools';
6
6
 
7
+ // Ensure crypto.subtle is available
8
+ if (typeof globalThis.crypto === 'undefined' || !globalThis.crypto.subtle) {
9
+ if (typeof globalThis.crypto !== 'undefined' && (globalThis.crypto as any).webcrypto) {
10
+ (globalThis.crypto as any).subtle = (globalThis.crypto as any).webcrypto.subtle;
11
+ }
12
+ }
13
+
7
14
  export class Nip46Client extends EventEmitter {
8
15
  private pool: SimplePool;
9
16
  private localPrivateKey: string;