Skip to content

Commit

Permalink
WIP: parser
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Apr 21, 2024
1 parent 7a6a0f2 commit dda107b
Show file tree
Hide file tree
Showing 2 changed files with 415 additions and 0 deletions.
28 changes: 28 additions & 0 deletions bin/inspect2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env node

"use strict";

let Fs = require("node:fs");

let Tx = require("../dashtx.js");
require("../txparser.js");

let filepath = process.argv[2];

async function main() {
let hex = Fs.readFileSync(filepath, "utf8");
hex = hex.trim();

let txInfo = Tx.parseUnknown(hex);
Tx._debugPrint(txInfo);
}

main()
.then(function () {
process.exit(0);
})
.catch(function (err) {
console.error("Fail:");
console.error(err.stack || err);
process.exit(1);
});
Loading

0 comments on commit dda107b

Please sign in to comment.