forked from ohapov/layerzero-aptos
-
Notifications
You must be signed in to change notification settings - Fork 2
/
accs.js
33 lines (30 loc) · 888 Bytes
/
accs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import * as fs from "fs";
import * as path from "path";
import * as readline from "readline";
import * as stream from "stream";
import { once } from "events";
const __dirname = path.resolve();
export const importETHWallets = async () => {
let accs = [];
let instream = fs.createReadStream(path.join(__dirname, "./privates.txt"));
let outstream = new stream.Stream();
let rl = readline.createInterface(instream, outstream);
rl.on("line", (line) => {
accs.push(line);
});
await once(rl, "close");
return accs;
};
export const importAptosWallets = async () => {
let accs = [];
let instream = fs.createReadStream(
path.join(__dirname, "./aptos_privates.txt")
);
let outstream = new stream.Stream();
let rl = readline.createInterface(instream, outstream);
rl.on("line", (line) => {
accs.push(line);
});
await once(rl, "close");
return accs;
};