@hackerhouse/xpub-scan 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +8 -0
- package/CONTRIBUTING.md +130 -0
- package/LICENSE +23 -0
- package/README.md +215 -0
- package/__tests__/checkAddresses/checkBitcoinAddressesNegative.test.ts +75 -0
- package/__tests__/checkAddresses/checkBitcoinAddressesPositive.test.ts +87 -0
- package/__tests__/checkAddresses/checkDogeAddressesPositive.test.ts +43 -0
- package/__tests__/checkAddresses/checkLitecoinAddressesNegative.test.ts +75 -0
- package/__tests__/checkAddresses/checkLitecoinAddressesPositive.test.ts +87 -0
- package/__tests__/checkModels/address.test.ts +183 -0
- package/__tests__/checkModels/fakeRawTransactions.json +182 -0
- package/__tests__/deriveAddresses/deriveBitcoinAddresses.test.ts +207 -0
- package/__tests__/deriveAddresses/deriveBitcoinCashAddresses.test copy.ts +79 -0
- package/__tests__/deriveAddresses/deriveDogecoinAddresses.test.ts +43 -0
- package/__tests__/deriveAddresses/deriveEthereumAddresses.test.ts +26 -0
- package/__tests__/deriveAddresses/deriveLitecoinAddresses.test.ts +110 -0
- package/__tests__/helpers.test.ts +274 -0
- package/__tests__/test-utils.ts +3 -0
- package/babel.config.js +6 -0
- package/jest.config.ts +5 -0
- package/ledgerhq-xpub-scan-1.0.4.tgz +0 -0
- package/lib/actions/checkAddress.d.ts +29 -0
- package/lib/actions/checkAddress.js +122 -0
- package/lib/actions/checkBalance.d.ts +20 -0
- package/lib/actions/checkBalance.js +300 -0
- package/lib/actions/deriveAddresses.d.ts +17 -0
- package/lib/actions/deriveAddresses.js +239 -0
- package/lib/actions/processTransactions.d.ts +29 -0
- package/lib/actions/processTransactions.js +289 -0
- package/lib/actions/saveAnalysis.d.ts +2 -0
- package/lib/actions/saveAnalysis.js +800 -0
- package/lib/actions/scanner.d.ts +15 -0
- package/lib/actions/scanner.js +152 -0
- package/lib/api/customProvider.d.ts +19 -0
- package/lib/api/customProvider.js +434 -0
- package/lib/api/defaultProvider.d.ts +23 -0
- package/lib/api/defaultProvider.js +275 -0
- package/lib/comparison/compareOperations.d.ts +13 -0
- package/lib/comparison/compareOperations.js +500 -0
- package/lib/comparison/diffs.d.ts +18 -0
- package/lib/comparison/diffs.js +70 -0
- package/lib/configuration/currencies.d.ts +55 -0
- package/lib/configuration/currencies.js +72 -0
- package/lib/configuration/settings.d.ts +51 -0
- package/lib/configuration/settings.js +113 -0
- package/lib/display.d.ts +12 -0
- package/lib/display.js +251 -0
- package/lib/helpers.d.ts +27 -0
- package/lib/helpers.js +255 -0
- package/lib/input/args.d.ts +6 -0
- package/lib/input/args.js +129 -0
- package/lib/input/check.d.ts +6 -0
- package/lib/input/check.js +217 -0
- package/lib/input/importOperations.d.ts +11 -0
- package/lib/input/importOperations.js +406 -0
- package/lib/models/address.d.ts +40 -0
- package/lib/models/address.js +101 -0
- package/lib/models/comparison.d.ts +8 -0
- package/lib/models/comparison.js +6 -0
- package/lib/models/currency.d.ts +11 -0
- package/lib/models/currency.js +6 -0
- package/lib/models/operation.d.ts +33 -0
- package/lib/models/operation.js +80 -0
- package/lib/models/ownAddresses.d.ts +11 -0
- package/lib/models/ownAddresses.js +31 -0
- package/lib/models/scanLimits.d.ts +7 -0
- package/lib/models/scanLimits.js +6 -0
- package/lib/models/stats.d.ts +7 -0
- package/lib/models/stats.js +6 -0
- package/lib/models/transaction.d.ts +10 -0
- package/lib/models/transaction.js +13 -0
- package/lib/scan.d.ts +2 -0
- package/lib/scan.js +31 -0
- package/lib/templates/logos.base64.d.ts +2 -0
- package/lib/templates/logos.base64.js +9 -0
- package/lib/templates/report.html.d.ts +1 -0
- package/lib/templates/report.html.js +393 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types.d.ts +55 -0
- package/lib/types.js +2 -0
- package/npm-shrinkwrap.json +12323 -0
- package/package.json +81 -0
- package/sonar-project.properties +15 -0
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hackerhouse/xpub-scan",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Master public key analysis tool",
|
|
5
|
+
"main": "./lib/scan.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"xpub-scan": "./lib/scan.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "npm cache clean --force && rm -rf lib/",
|
|
11
|
+
"build": "tsc && chmod +x ./lib/scan.js",
|
|
12
|
+
"test": "jest",
|
|
13
|
+
"sonarqube": "jest --collect-coverage --testResultsProcessor jest-sonar-reporter",
|
|
14
|
+
"lint": "eslint .",
|
|
15
|
+
"ts:check": "tsc --noEmit",
|
|
16
|
+
"prettier": "prettier --write .",
|
|
17
|
+
"ci": "npm run prettier && npm run ts:check && npm test",
|
|
18
|
+
"check:dep": "npm i && check-outdated --ignore-packages chalk,jest && npm audit --audit-level=low && npm shrinkwrap",
|
|
19
|
+
"regression": "npm run build && python3 .github/workflows/regression_tests/check.py",
|
|
20
|
+
"dev:test": "npm run clean && npm check:dep && npm run prettier && npm run ci && npm i && tsc -p .",
|
|
21
|
+
"dev:test:all": "npm run clean && npm run check:dep && npm run prettier && npm run ci && npm i && tsc -p . && npm run regression"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/sbounmy/xpub-scan.git"
|
|
26
|
+
},
|
|
27
|
+
"author": "Stephane Bounmy",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/sbounmy/xpub-scan/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/sbounmy/xpub-scan#readme",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@types/bchaddrjs": "0.4.0",
|
|
35
|
+
"@types/bitcore-lib-cash": "8.23.5",
|
|
36
|
+
"@types/html-minifier": "4.0.2",
|
|
37
|
+
"@types/node": "20.2.5",
|
|
38
|
+
"@types/object-hash": "3.0.2",
|
|
39
|
+
"@types/yargs": "17.0.24",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "5.59.9",
|
|
41
|
+
"@typescript-eslint/parser": "5.59.9",
|
|
42
|
+
"axios": "1.4.0",
|
|
43
|
+
"bchaddrjs": "0.5.2",
|
|
44
|
+
"bignumber.js": "9.1.1",
|
|
45
|
+
"bip32": "4.0.0",
|
|
46
|
+
"bitcoinjs-lib": "6.1.2",
|
|
47
|
+
"bitcore-lib-cash": "10.0.5",
|
|
48
|
+
"bs58check": "3.0.1",
|
|
49
|
+
"chalk": "4.1.2",
|
|
50
|
+
"check-outdated": "2.11.0",
|
|
51
|
+
"coininfo": "5.2.1",
|
|
52
|
+
"create-hmac": "1.1.7",
|
|
53
|
+
"date-fns": "2.30.0",
|
|
54
|
+
"dotenv": "16.1.4",
|
|
55
|
+
"eslint": "8.42.0",
|
|
56
|
+
"ethereumjs-wallet": "1.0.2",
|
|
57
|
+
"html-minifier": "4.0.0",
|
|
58
|
+
"jest": "29.3.1",
|
|
59
|
+
"object-hash": "3.0.0",
|
|
60
|
+
"prettier": "2.8.8",
|
|
61
|
+
"secp256k1": "5.0.0",
|
|
62
|
+
"tiny-secp256k1": "2.2.2",
|
|
63
|
+
"ts-node": "10.9.1",
|
|
64
|
+
"typescript": "5.1.3",
|
|
65
|
+
"yargs": "17.7.2"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@babel/core": "7.22.1",
|
|
69
|
+
"@babel/preset-env": "7.22.4",
|
|
70
|
+
"@babel/preset-typescript": "7.21.5",
|
|
71
|
+
"@types/bs58check": "2.1.0",
|
|
72
|
+
"@types/create-hmac": "1.1.0",
|
|
73
|
+
"@types/jest": "29.5.2",
|
|
74
|
+
"jest-sonar-reporter": "2.0.0"
|
|
75
|
+
},
|
|
76
|
+
"jestSonar": {
|
|
77
|
+
"reportPath": "coverage",
|
|
78
|
+
"reportFile": "test-reporter.xml",
|
|
79
|
+
"indent": 4
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# must be unique in a given SonarQube instance
|
|
2
|
+
sonar.projectKey=LedgerHQ_xpub-scan
|
|
3
|
+
sonar.organization=ledger
|
|
4
|
+
|
|
5
|
+
sonar.scm.disabled=true
|
|
6
|
+
|
|
7
|
+
sonar.sources=src
|
|
8
|
+
sonar.tests=src
|
|
9
|
+
sonar.exclusions=coverage/**
|
|
10
|
+
|
|
11
|
+
sonar.sourceEncoding=UTF-8
|
|
12
|
+
|
|
13
|
+
sonar.test.inclusions=src/**/*.spec.js,src/**/*.spec.jsx,src/**/*.test.js,src/**/*.test.jsx
|
|
14
|
+
|
|
15
|
+
sonar.javascript.lcov.reportPaths=coverage/lcov.info
|