diff --git a/.changeset/chilled-coats-heal.md b/.changeset/chilled-coats-heal.md new file mode 100644 index 0000000..34beb7f --- /dev/null +++ b/.changeset/chilled-coats-heal.md @@ -0,0 +1,5 @@ +--- +"xpub-scanner": patch +--- + +Fix diff --git a/src/index.ts b/src/index.ts index c353562..2565728 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,21 @@ import { getArgs } from "./input/args"; import { Scanner } from "./actions/scanner"; -import { ScanResult } from "./types"; +import { ScanResult, ScannerArguments } from "./types"; + +// process.on("SIGINT", handleSignal); +// process.on("SIGTERM", handleSignal); + +export const hello = () => "Hellox world!"; + +export async function getScanResults(xpub: string) { + const args: ScannerArguments = { + itemToScan: xpub, + balanceOnly: false, + }; + + const scanResult: ScanResult = await new Scanner(args).scan(); + return scanResult; +} // async function scan() { // const args = getArgs(); // get CLI args (if any) @@ -20,12 +35,3 @@ import { ScanResult } from "./types"; // process.on("SIGINT", handleSignal); // process.on("SIGTERM", handleSignal); - -export const hello = () => console.log("Hellox world!"); - -export async function getScanResults(xpub: string) { - const args = getArgs(); // get CLI args (if any) - args.itemToScan = xpub; - const scanResult: ScanResult = await new Scanner(args).scan(); - return scanResult; -}