Not working for me
sh3ll4rpw opened this issue · comments
I'm running the example code in README
npm run test
> balance-crypto@0.2.15 test
> node --loader ts-node/esm --experimental-specifier-resolution=node node_modules/uvu/bin.js
(node:19362) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19362) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(node:19362) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
test/test.js
Total: 0
Passed: 0
Skipped: 0
Duration: 0.96ms
file:///home/debian/node_modules/balance-crypto/dist/index.js:5171
throw new Error(`Invalid address "${addr}" for ${coin}`);
^
Error: Invalid address "3PxedDftWBXujWtr7TbWQSiYTsZJoMD8K5" for BTC
at balance (file:///home/debian/node_modules/balance-crypto/dist/index.js:5171:15)
at file:///home/debian/node_modules/balance-crypto/test/test.js:4:1
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async Module.run (file:///home/debian/node_modules/balance-crypto/node_modules/uvu/run/index.mjs:9:3)
at async /home/debian/node_modules/balance-crypto/node_modules/uvu/bin.js:26:5
Node.js v18.19.0
I also tried ETH and added an valid API. It said API invalid. Code broken?
Hi, I don't maintain this project anymore. I don't recommend using balance-crypto and instead import only the libraries for the coins you need.
For ETH I'd use viem's getBalance for instance