forked from Swyftx/crypto-address-validator
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate to ts #1
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
cf34a32
feat: rename crypto files to .ts
dmbsk e076414
feat: setup karma for TS
dmbsk 46a91ef
ref: change require to import, change to default export
dmbsk 551fd14
feat: validators related types
dmbsk 5aeb433
feat: type all validators
dmbsk a1b2dd1
feat: type utils
dmbsk e4f01c4
feat: add more hash function types
dmbsk 119482e
fix: improve btc typing
dmbsk 540b442
ref: karma and ts config
dmbsk 479a66f
feat: basic rollup setup
dmbsk ba5bacf
ref: remove biginteger.js use bignumber.js instead
dmbsk 57a8f8b
ref: remove ts expect errors
dmbsk 034974e
ref: remove base58 and move to base58-js
dmbsk 905a40d
fix: change how we test in browser POC
dmbsk 623253d
feat: migrate most of utils to npm packages
dmbsk 5b9c309
feat: webpack karma config
dmbsk 4871454
fix: uncomment one test
dmbsk 2b31219
feat: replace blake256, use bech32 in segwit
dmbsk bb20d2e
style: use spread instead of picking
dmbsk 6a087ca
feat: eslint
dmbsk 332c69e
fix: run chrome headless
dmbsk c5ae421
fix: cleanup commented code
dmbsk fdb1974
fix: replace base58_to_binary with bs58
dmbsk 9c88394
chore: remove base58js, add bs58 types
dmbsk 536f361
chore: sort vscode settings
dmbsk 4741d6d
feat: add more types
dmbsk 5c5737b
ref: target imports
dmbsk e766ea7
ref: simplified running test scenarios
dmbsk ee24e3d
feat: update deps
dmbsk f84cb55
feat: remove iota and monero
dmbsk c8b5593
ref: simpler building process
dmbsk 61122cb
chore: package json cleanup
dmbsk 5dea8cb
fix(wid): fix browser context tests
dmbsk 7adc547
chore: cleanup
dmbsk fc769ec
ref: bitcoin cash validator
dmbsk 0c93f41
chore: update bitcoincash deps
dmbsk 40640b0
fix: uncomment tests
dmbsk f1ea4e2
docs: improve js doc
dmbsk 20388df
feat: add uglify
dmbsk 3f59501
feat: remove stx
dmbsk 50109c9
feat: remove bindings from build
dmbsk 01f6d55
test: remove unused tests
dmbsk c930d56
chore: update package author
dmbsk e23589b
style: change " to '
dmbsk c4593c2
fix: building builtins warning
dmbsk 286bc45
fix: remove unused file
dmbsk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
ignorePatterns: | ||
- '*.d.ts' | ||
- 'dist' | ||
- 'rollup.config.ts' | ||
|
||
env: | ||
browser: true | ||
|
||
extends: | ||
- plugin:prettier/recommended | ||
|
||
parser: '@typescript-eslint/parser' | ||
|
||
parserOptions: | ||
project: './tsconfig.json' | ||
sourceType: module | ||
|
||
settings: | ||
import/internal-regex: ^@ramp-instant/ | ||
|
||
plugins: | ||
- eslint-plugin-import | ||
- simple-import-sort | ||
- eslint-plugin-prettier | ||
|
||
rules: | ||
arrow-parens: | ||
- off | ||
- always | ||
comma-dangle: 0 | ||
no-empty: error | ||
import/no-extraneous-dependencies: error | ||
no-restricted-imports: | ||
- error | ||
- patterns: | ||
- '../*' # forbid parent-relative imports | ||
|
||
simple-import-sort/imports: | ||
- error | ||
- groups: # see https://github.com/lydell/eslint-plugin-simple-import-sort#custom-grouping | ||
- ["^@?\\w"] # regular npm packages | ||
- ["^\\."] # sibling files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,6 @@ typings/ | |
|
||
# .idea | ||
.idea | ||
|
||
# dist | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,251 @@ | ||
{ | ||
"cSpell.words": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I would suggest to sort these words alphabetically ;D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorted |
||
"0x", | ||
"Aave", | ||
"ada", | ||
"address" | ||
"AdEx", | ||
"adx", | ||
"ae", | ||
"aelf", | ||
"Aeternity", | ||
"algo", | ||
"Algorand", | ||
"altcoin", | ||
"ant", | ||
"Aragon", | ||
"Ardor", | ||
"ardr", | ||
"atom", | ||
"aud", | ||
"Augur", | ||
"aur", | ||
"AuroraCoin", | ||
"Australian Dollars", | ||
"Bancor", | ||
"Bankex", | ||
"BasicAttentionToken", | ||
"bat", | ||
"bcc", | ||
"bcd", | ||
"bch", | ||
"BeaverCoin", | ||
"BinanceCoin", | ||
"bio", | ||
"BioCoin", | ||
"Bitcoin Diamond", | ||
"Bitcoin", | ||
"bitcoincash" | ||
"BitcoinCash", | ||
"BitcoinGold", | ||
"BitcoinPrivate", | ||
"BitcoinZ", | ||
"Bitquence", | ||
"Bitshares", | ||
"BitTorrent", | ||
"bkx", | ||
"Blockstack", | ||
"bnb", | ||
"bnt", | ||
"bqx", | ||
"browser", | ||
"btc", | ||
"btcp", | ||
"btcz", | ||
"btg", | ||
"bts", | ||
"btt", | ||
"bvc", | ||
"Callisto", | ||
"Cardano", | ||
"Chainlink", | ||
"Civic", | ||
"clo", | ||
"Cosmos", | ||
"cvc", | ||
"dash", | ||
"dcr", | ||
"Decentraland", | ||
"Decred", | ||
"dent", | ||
"dgb", | ||
"DigiByte", | ||
"District0x", | ||
"dnt", | ||
"doge", | ||
"DogeCoin", | ||
"ELF", | ||
"eng", | ||
"Enigma", | ||
"enj", | ||
"Enjin Coin", | ||
"eos", | ||
"etc", | ||
"eth", | ||
"Ethereum", | ||
"EthereumClassic", | ||
"EtherZero", | ||
"ethos", | ||
"etz", | ||
"exp", | ||
"Expanse", | ||
"frc", | ||
"FreiCoin", | ||
"fun", | ||
"FunFair", | ||
"game", | ||
"GameCredits", | ||
"GarliCoin", | ||
"gas", | ||
"gno", | ||
"Gnosis", | ||
"gnt", | ||
"Golem", | ||
"grlc", | ||
"gup", | ||
"hbar", | ||
"Hedera Hashgraph", | ||
"Holo", | ||
"Horizen", | ||
"HOT", | ||
"hush", | ||
"ICON", | ||
"icx", | ||
"iExec RLC", | ||
"Internet of Services", | ||
"IOST", | ||
"iota", | ||
"javascript", | ||
"kmd", | ||
"Komodo", | ||
"lend", | ||
"link", | ||
"Lisk", | ||
"LiteCoin", | ||
"lsk", | ||
"ltc", | ||
"MANA", | ||
"Matchpool", | ||
"mco", | ||
"mec", | ||
"MegaCoin", | ||
"Melon", | ||
"Metal", | ||
"mln", | ||
"mona", | ||
"Monacao", | ||
"MonaCoin", | ||
"Monero", | ||
"mtl", | ||
"NameCoin", | ||
"nano", | ||
"NEM", | ||
"neo", | ||
"NeoGas", | ||
"Nexus", | ||
"nmc", | ||
"nmr", | ||
"nodejs", | ||
"npxs", | ||
"Numeraire", | ||
"nxs", | ||
"ocn", | ||
"Odyssey", | ||
"omg", | ||
"OmiseGO", | ||
"ong", | ||
"ont", | ||
"Ontology Gas", | ||
"Ontology", | ||
"pax", | ||
"Paxos Standard Token", | ||
"pay", | ||
"PeerCoin", | ||
"pivx", | ||
"poly", | ||
"Polymath", | ||
"Populous", | ||
"PowerLedger", | ||
"powr", | ||
"ppc", | ||
"ppt", | ||
"PrimeCoin", | ||
"ProtoShares", | ||
"pts", | ||
"Pundi X", | ||
"qtum", | ||
"RaiBlocks", | ||
"Ravencoin", | ||
"rcn", | ||
"rep", | ||
"RipioCreditNetwork", | ||
"Ripple", | ||
"rlc", | ||
"rvn", | ||
"salt", | ||
"sc", | ||
"segwit", | ||
"Siacoin", | ||
"slr", | ||
"sng", | ||
"SnowGem", | ||
"snt", | ||
"SolarCoin", | ||
"Status", | ||
"steem", | ||
"Stellar Lumens", | ||
"storj", | ||
"storm", | ||
"strat", | ||
"Stratis", | ||
"stx", | ||
"sub", | ||
"Substratum", | ||
"Swarm City", | ||
"swt", | ||
"sys", | ||
"Syscoin", | ||
"TenX", | ||
"Tether", | ||
"Tezos", | ||
"theta", | ||
"Tron", | ||
"TrueUSD", | ||
"trx", | ||
"tusd", | ||
"USD Coin", | ||
"usdc", | ||
"usdt", | ||
"VeChain", | ||
"Verge", | ||
"VertCoin", | ||
"vet", | ||
"vib", | ||
"Viberate", | ||
"vot", | ||
"VoteCoin", | ||
"vtc", | ||
"wallet", | ||
"WaltonChain", | ||
"waves", | ||
"wings", | ||
"wtc", | ||
"xem", | ||
"xlm", | ||
"xmr", | ||
"xpm", | ||
"xrb", | ||
"xrp", | ||
"XTZ", | ||
"xvg", | ||
"ZCash", | ||
"zcl", | ||
"ZClassic", | ||
"zec", | ||
"zen", | ||
"ZenCash", | ||
"zil", | ||
"Zilliqa", | ||
"zrx", | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I fan of single quotes I would recommend you to use single quotes for imports, strings etc :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ramp-instant uses single quotes mostly