lighter-ts-sdk 1.0.9 → 1.0.10

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.
@@ -30383,23 +30383,22 @@ var WasmSignerClient = class {
30383
30383
  if (!path || !fs) {
30384
30384
  return null;
30385
30385
  }
30386
- try {
30387
- const packageJsonPath = `${process.cwd()}/package.json`;
30388
- if (fs.existsSync(packageJsonPath)) {
30389
- return path.dirname(packageJsonPath);
30390
- }
30391
- } catch {
30392
- let currentDir = process.cwd();
30393
- const maxDepth = 10;
30394
- let depth = 0;
30395
- while (currentDir && depth < maxDepth) {
30396
- const packagePath = path.join(currentDir, "node_modules", "lighter-ts-sdk");
30397
- if (fs.existsSync(packagePath)) {
30398
- return packagePath;
30399
- }
30400
- currentDir = path.dirname(currentDir);
30401
- depth++;
30402
- }
30386
+ let currentDir = process.cwd();
30387
+ const maxDepth = 10;
30388
+ let depth = 0;
30389
+ while (currentDir && depth < maxDepth) {
30390
+ const packagePath = path.join(currentDir, "node_modules", "lighter-ts-sdk");
30391
+ if (fs.existsSync(packagePath)) {
30392
+ return packagePath;
30393
+ }
30394
+ currentDir = path.dirname(currentDir);
30395
+ depth++;
30396
+ }
30397
+ const cwd = process.cwd();
30398
+ const localWasmExec = path.join(cwd, "wasm", "wasm_exec.js");
30399
+ const localWasmBinary = path.join(cwd, "wasm", "lighter-signer.wasm");
30400
+ if (fs.existsSync(localWasmExec) || fs.existsSync(localWasmBinary)) {
30401
+ return cwd;
30403
30402
  }
30404
30403
  return null;
30405
30404
  }