We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1bd71c commit 546ea34Copy full SHA for 546ea34
1 file changed
sdk/src/wallet.ts
@@ -9,8 +9,10 @@ import { bytesToHex, hexToBytes } from './utils';
9
10
// Placeholder for crypto operations
11
// In production, use @noble/ed25519 or similar
12
-declare const window: { crypto: Crypto } | undefined;
13
-const crypto = typeof window !== 'undefined' ? window.crypto : (require('crypto').webcrypto as Crypto);
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const crypto: any = typeof globalThis !== 'undefined' && (globalThis as any).crypto
14
+ ? (globalThis as any).crypto
15
+ : require('crypto').webcrypto;
16
17
/**
18
* Key pair (public/private)
0 commit comments