dani69654 / evm_scan_wallets

A script to generate random 12 words mnemonic and checking balances
19 stars 17 forks source link

hi, i have riscontred this is error #1

Closed antonios988 closed 3 years ago

antonios988 commented 4 years ago

throw new ERR_INVALID_ARG_TYPE( ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Promise at Hmac.update (internal/crypto/hash.js:84:11) at Function.HDKey.fromMasterSeed (/home/crypto/Scrivania/Script_GenerateMnem_Check_Balance-main/node_modules/hdkey/lib/hdkey.js:181:54) at findBalance (/home/crypto/Scrivania/Script_GenerateMnem_Check_Balance-main/gen.js:30:26) at generateMnemonic (/home/crypto/Scrivania/Script_GenerateMnem_Check_Balance-main/gen.js:26:3) at getWordsFromFile (/home/crypto/Scrivania/Script_GenerateMnem_Check_Balance-main/gen.js:13:73) at Object. (/home/crypto/Scrivania/Script_GenerateMnem_Check_Balance-main/gen.js:55:1) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'ERR_INVALID_ARG_TYPE'

dani69654 commented 4 years ago

Hey @antonios988 Did it get stuck while running or it did not start at all?

antonios988 commented 4 years ago

npm.txt dont start. this is my npm lib

dani69654 commented 4 years ago

Try the following:

cd to project dir npm install

node Generate_Addresses_From_Seed.js

antonios988 commented 4 years ago

same problem

dani69654 commented 4 years ago

Can I see the file path you're passing in line 10?

antonios988 commented 4 years ago

yes all step done

antonios988 commented 4 years ago

require('fs').readFileSync('C:/Users/Antonio/Desktop/Script_GenerateMnem_Check_Balance-main/word.txt', 'utf-8').split(/\r

dani69654 commented 4 years ago

what's your node version?

type node -v and give me the result

dani69654 commented 4 years ago

I am setting up a new Linux machine to check there if I am missing something.

antonios988 commented 4 years ago

i have tried 12.19.0 and 14.13.1

antonios988 commented 4 years ago

any news?

dani69654 commented 4 years ago

Install node v10.21.0. https://nodejs.org/dist/v10.21.0/
Let me know

antonios988 commented 4 years ago

some error

Words successfully imported. internal/crypto/hash.js:58 throw new ERR_INVALID_ARG_TYPE('data', ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView. Received type object at Hmac.update (internal/crypto/hash.js:58:11) at Function.HDKey.fromMasterSeed (C:\Users\Antonio\Desktop\script\node_modules\ethereum-cryptography\vendor\hdkey-without-crypto.js:188:58) at Function.EthereumHDKey.fromMasterSeed (C:\Users\Antonio\Desktop\script\node_modules\ethereumjs-wallet\hdkey.js:20:26) at findBalance (C:\Users\Antonio\Desktop\script\gen.js:30:26) at generateMnemonic (C:\Users\Antonio\Desktop\script\gen.js:26:3) at getWordsFromFile (C:\Users\Antonio\Desktop\script\gen.js:13:73) at Object. (C:\Users\Antonio\Desktop\script\gen.js:55:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

antonios988 commented 4 years ago

?

dani69654 commented 3 years ago

I totally forgot about this issue sorry. Fix it by changing line 30 to const hdwallet = hdkey.fromMasterSeed(bip39.mnemonicToSeedSync(_mnemonic));