multichain-address-validator 0.8.0 → 0.8.2

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.
Files changed (79) hide show
  1. package/README.md +0 -1
  2. package/dist/cjs/chain-validators.js +2 -0
  3. package/dist/esm/chain-validators.js +2 -0
  4. package/package.json +17 -12
  5. package/.editorconfig +0 -10
  6. package/.travis.yml +0 -11
  7. package/.vscode/launch.json +0 -23
  8. package/index.html +0 -12
  9. package/package-lock.json +0 -1705
  10. package/src/chain-validators.ts +0 -183
  11. package/src/crypto/base32.ts +0 -66
  12. package/src/crypto/base58.ts +0 -46
  13. package/src/crypto/bech32.js +0 -132
  14. package/src/crypto/biginteger.js +0 -1426
  15. package/src/crypto/blake256.js +0 -188
  16. package/src/crypto/blake2b.js +0 -276
  17. package/src/crypto/cnBase58.js +0 -226
  18. package/src/crypto/segwit_addr.js +0 -118
  19. package/src/crypto/utils.ts +0 -133
  20. package/src/helpers.ts +0 -13
  21. package/src/index.ts +0 -28
  22. package/src/types.ts +0 -19
  23. package/src/validators/algorand_validator.ts +0 -28
  24. package/src/validators/base58_validator.ts +0 -32
  25. package/src/validators/bch_validator.ts +0 -66
  26. package/src/validators/bip173_validator.ts +0 -19
  27. package/src/validators/bitcoin_validator.ts +0 -93
  28. package/src/validators/bittensor_validator.ts +0 -8
  29. package/src/validators/cardano_validator.ts +0 -50
  30. package/src/validators/eos_validator.ts +0 -13
  31. package/src/validators/ethereum_validator.ts +0 -37
  32. package/src/validators/hedera_validator.ts +0 -10
  33. package/src/validators/index.ts +0 -20
  34. package/src/validators/monero_validator.ts +0 -72
  35. package/src/validators/move_validator.ts +0 -11
  36. package/src/validators/nano_validator.ts +0 -32
  37. package/src/validators/nem_validator.ts +0 -18
  38. package/src/validators/polkadot_validator.ts +0 -7
  39. package/src/validators/ripple_validator.ts +0 -44
  40. package/src/validators/sia_validator.ts +0 -33
  41. package/src/validators/solana_validator.ts +0 -21
  42. package/src/validators/ss58_validator.ts +0 -80
  43. package/src/validators/tezos_validator.ts +0 -36
  44. package/src/validators/tron_validator.ts +0 -59
  45. package/src/validators/xlm_validator.ts +0 -54
  46. package/src/validators/zcash_validator.ts +0 -57
  47. package/test/addresses/addresses.ts +0 -63
  48. package/test/addresses/algorand.json +0 -6
  49. package/test/addresses/aptos.json +0 -6
  50. package/test/addresses/bch-testnet.json +0 -4
  51. package/test/addresses/bch.json +0 -7
  52. package/test/addresses/bittensor.json +0 -27
  53. package/test/addresses/btc-testnet.json +0 -14
  54. package/test/addresses/btc.json +0 -18
  55. package/test/addresses/cardano.json +0 -8
  56. package/test/addresses/doge-testnet.json +0 -3
  57. package/test/addresses/doge.json +0 -7
  58. package/test/addresses/eos.json +0 -6
  59. package/test/addresses/evm.json +0 -20
  60. package/test/addresses/hbar.json +0 -11
  61. package/test/addresses/ltc-testnet.json +0 -10
  62. package/test/addresses/ltc.json +0 -9
  63. package/test/addresses/monero-testnet.json +0 -5
  64. package/test/addresses/monero.json +0 -7
  65. package/test/addresses/nano.json +0 -12
  66. package/test/addresses/nem.json +0 -4
  67. package/test/addresses/polkadot.json +0 -8
  68. package/test/addresses/ripple.json +0 -20
  69. package/test/addresses/sia.json +0 -5
  70. package/test/addresses/solana.json +0 -12
  71. package/test/addresses/sui.json +0 -6
  72. package/test/addresses/tezos.json +0 -9
  73. package/test/addresses/tron.json +0 -6
  74. package/test/addresses/xlm.json +0 -21
  75. package/test/addresses/zcash.json +0 -8
  76. package/test/multichain-address-validator.test.ts +0 -242
  77. package/tsconfig.cjs.json +0 -7
  78. package/tsconfig.esm.json +0 -7
  79. package/tsconfig.json +0 -24
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # multichain address validator
2
2
  Simple blockchain address validator for validating Bitcoin and other blockchain addresses **Node.js and browser**.
3
3
 
4
- [![Build Status](https://travis-ci.org/christsim/multicchain-address-validator.svg?branch=master)](https://travis-ci.org/christsim/multichain-address-validator)
5
4
 
6
5
  ## Installation
7
6
 
@@ -64,6 +64,8 @@ const chainValidators = {
64
64
  'BinanceSmartChain',
65
65
  'bnb',
66
66
  'bsc',
67
+ 'Xcap',
68
+ 'gas',
67
69
  'eth',
68
70
  'EthereumClassic',
69
71
  'EthereumPow',
@@ -61,6 +61,8 @@ const chainValidators = {
61
61
  'BinanceSmartChain',
62
62
  'bnb',
63
63
  'bsc',
64
+ 'Xcap',
65
+ 'gas',
64
66
  'eth',
65
67
  'EthereumClassic',
66
68
  'EthereumPow',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "multichain-address-validator",
3
3
  "description": "Multichain address validator for Bitcoin and other blockchains.",
4
- "version": "0.8.0",
4
+ "version": "0.8.2",
5
5
  "keywords": [
6
6
  "0x",
7
7
  "zrx",
@@ -344,20 +344,25 @@
344
344
  "build": "npm run clean && npm run build:esm && npm run build:cjs",
345
345
  "clean": "npx rimraf dist",
346
346
  "test": "mocha --import=tsx test/**.test.ts",
347
- "start": "npm run build && npm test"
347
+ "start": "npm run build && npm test",
348
+ "release": "node scripts/release.mjs"
348
349
  },
349
350
  "dependencies": {
350
- "@noble/hashes": "^1.4.0",
351
- "base-x": "^4.0.0",
352
- "buffer": "^6.0.3",
353
- "cbor-js": "^0.1.0",
354
- "crc": "^4.3.2",
355
- "lodash.isequal": "^4.5.0"
351
+ "@noble/hashes": "1.4.0",
352
+ "base-x": "4.0.1",
353
+ "buffer": "6.0.3",
354
+ "cbor-js": "0.1.0",
355
+ "crc": "4.3.2",
356
+ "lodash.isequal": "4.5.0"
356
357
  },
357
358
  "devDependencies": {
358
- "chai": "^4.4.1",
359
- "mocha": "^10.2.0",
360
- "tsx": "^4.16.2",
361
- "typescript": "^5.5.4"
359
+ "chai": "4.4.1",
360
+ "mocha": "11.7.5",
361
+ "tsx": "4.19.4",
362
+ "typescript": "5.5.4"
363
+ },
364
+ "overrides": {
365
+ "serialize-javascript": "7.0.5",
366
+ "diff": "8.0.3"
362
367
  }
363
368
  }
package/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- # editorconfig.org
2
- root = true
3
-
4
- [*]
5
- indent_style = space
6
- indent_size = 4
7
- end_of_line = lf
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- insert_final_newline = true
package/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- sudo: required
2
- addons:
3
- chrome: stable
4
- language: node_js
5
- node_js:
6
- - "16"
7
- - "stable"
8
- before_install:
9
- - npm install -g yarn --cache-min 999999999
10
- install:
11
- - yarn
@@ -1,23 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "Mocha Tests",
11
- "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12
- "args": [
13
- "-u",
14
- "tdd",
15
- "--timeout",
16
- "999999",
17
- "--colors",
18
- "${workspaceFolder}/test"
19
- ],
20
- "internalConsoleOptions": "openOnSessionStart"
21
- }
22
- ]
23
- }
package/index.html DELETED
@@ -1,12 +0,0 @@
1
- <html>
2
- <body>
3
- <script src="./dist/multichain-address-validator.bundle.min.js"></script>
4
- <script type="module">
5
- const valid = MCAV.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'BTC');
6
- if (valid)
7
- console.log('This is a valid address');
8
- else
9
- console.log('Address INVALID');
10
- </script>
11
- </body>
12
- </html>