Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
moreei committed Oct 26, 2023
1 parent 003ff51 commit 7dc2e4c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-coats-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"xpub-scanner": patch
---

Fix
26 changes: 16 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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;
}

0 comments on commit 7dc2e4c

Please sign in to comment.