refactor: HL EVM signing via sonirico/go-hyperliquid SDK

This commit is contained in:
jackyu66git
2026-05-04 16:16:21 +08:00
parent 8b8d4140f9
commit 24727e4ec4
4205 changed files with 500568 additions and 269830 deletions
+22
View File
@@ -0,0 +1,22 @@
const { dirname, resolve } = require('path');
const { readdir, stat } = require('fs');
const { promisify } = require('util');
const toStats = promisify(stat);
const toRead = promisify(readdir);
module.exports = async function (start, callback) {
let dir = resolve('.', start);
let tmp, stats = await toStats(dir);
if (!stats.isDirectory()) {
dir = dirname(dir);
}
while (true) {
tmp = await callback(dir, await toRead(dir));
if (tmp) return resolve(dir, tmp);
dir = dirname(tmp = dir);
if (tmp === dir) break;
}
}