import { webcrypto } from 'node:crypto'; if (!globalThis.crypto) { globalThis.crypto = webcrypto as unknown as Crypto; } // Some @solana/* helpers resolve to browser builds in tests and expect a secure context. if (!Reflect.get(globalThis, 'isSecureContext')) { Reflect.set(globalThis, 'isSecureContext', true); }