merkle_tree for ofac data

This commit is contained in:
ashpect
2024-06-27 08:34:41 +05:30
parent 3ea05325bd
commit a95f2f4a29
2 changed files with 14 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
import * as fs from 'fs';
import { buildPassTree} from '../../../common/src/utils/passportTree'
async function passport() {
const passports = JSON.parse(fs.readFileSync("../common/ofacdata/passport.json") as unknown as string)
const tree = buildPassTree(passports);
const serializedTree = tree.nodes.map(layer => layer.map(node => node.toString()));
fs.writeFileSync("outputs/passport_tree.json", JSON.stringify(serializedTree));
console.log("passport_tree.json written and copied in common/pubkeys!")
}
passport()