-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
30 lines (23 loc) · 930 Bytes
/
main.ts
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
#!/usr/bin/env node --no-warnings
import { FormatEngine } from "./format/index.js";
import { StorageEngine } from "./storage/index.js";
import { KeyringEngine } from "./keyring/index.js";
import { CryptoEngine } from "./crypto/index.js";
import { ChainEngine } from "./chain/index.js";
import { TokenEngine } from "./token/index.js";
import { HelixCLI } from "./cli/index.js";
import updateNotifier from 'update-notifier';
import packageJson from './package.json' assert {type: 'json'};
updateNotifier({pkg: packageJson}).notify();
async function main() {
// init engines
const storage = await StorageEngine.getInstance();
const crypto = new CryptoEngine();
const format = new FormatEngine();
const keyring = new KeyringEngine(storage, crypto);
const chain = new ChainEngine(storage);
const token = new TokenEngine(storage);
const cli = new HelixCLI(format, keyring, chain, token);
cli.start();
}
main();