Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 8x 8x 8x 8x 8x 47x | import { TonClient } from "@rsquad-test/core";
let library: typeof TonClient;
try {
library = require("./tonclient.node");
} catch (error) {
const fs = require("fs");
const os = require("os");
const path = require("path");
let addonPath = path.resolve(__dirname, "tonclient.node");
if (fs.existsSync(addonPath)) {
throw error;
}
addonPath = path.resolve(os.homedir(), "tonclient.node");
library = require(addonPath);
}
(async () => {
TonClient.loadBinaryLibrary((): Promise<any> => new Promise((res) => res(library)));
})();
export { TonClient };
|