Skip to content
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 46 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
cf34a32
feat: rename crypto files to .ts
dmbsk Dec 17, 2021
e076414
feat: setup karma for TS
dmbsk Dec 17, 2021
46a91ef
ref: change require to import, change to default export
dmbsk Dec 21, 2021
551fd14
feat: validators related types
dmbsk Dec 21, 2021
5aeb433
feat: type all validators
dmbsk Dec 21, 2021
a1b2dd1
feat: type utils
dmbsk Dec 21, 2021
e4f01c4
feat: add more hash function types
dmbsk Dec 27, 2021
119482e
fix: improve btc typing
dmbsk Dec 27, 2021
540b442
ref: karma and ts config
dmbsk Dec 27, 2021
479a66f
feat: basic rollup setup
dmbsk Jan 6, 2022
ba5bacf
ref: remove biginteger.js use bignumber.js instead
dmbsk Jan 6, 2022
57a8f8b
ref: remove ts expect errors
dmbsk Jan 6, 2022
034974e
ref: remove base58 and move to base58-js
dmbsk Jan 6, 2022
905a40d
fix: change how we test in browser POC
dmbsk Jan 8, 2022
623253d
feat: migrate most of utils to npm packages
dmbsk Jan 11, 2022
5b9c309
feat: webpack karma config
dmbsk Jan 11, 2022
4871454
fix: uncomment one test
dmbsk Jan 12, 2022
2b31219
feat: replace blake256, use bech32 in segwit
dmbsk Jan 12, 2022
bb20d2e
style: use spread instead of picking
dmbsk Jan 12, 2022
6a087ca
feat: eslint
dmbsk Jan 12, 2022
332c69e
fix: run chrome headless
dmbsk Jan 12, 2022
c5ae421
fix: cleanup commented code
dmbsk Jan 13, 2022
fdb1974
fix: replace base58_to_binary with bs58
dmbsk Jan 24, 2022
9c88394
chore: remove base58js, add bs58 types
dmbsk Jan 24, 2022
536f361
chore: sort vscode settings
dmbsk Jan 24, 2022
4741d6d
feat: add more types
dmbsk Jan 24, 2022
5c5737b
ref: target imports
dmbsk Jan 28, 2022
e766ea7
ref: simplified running test scenarios
dmbsk Jan 28, 2022
ee24e3d
feat: update deps
dmbsk Jan 28, 2022
f84cb55
feat: remove iota and monero
dmbsk Feb 2, 2022
c8b5593
ref: simpler building process
dmbsk Feb 2, 2022
61122cb
chore: package json cleanup
dmbsk Feb 2, 2022
5dea8cb
fix(wid): fix browser context tests
dmbsk Feb 3, 2022
7adc547
chore: cleanup
dmbsk Feb 3, 2022
fc769ec
ref: bitcoin cash validator
dmbsk Feb 3, 2022
0c93f41
chore: update bitcoincash deps
dmbsk Feb 3, 2022
40640b0
fix: uncomment tests
dmbsk Feb 3, 2022
f1ea4e2
docs: improve js doc
dmbsk Feb 3, 2022
20388df
feat: add uglify
dmbsk Feb 4, 2022
3f59501
feat: remove stx
dmbsk Feb 11, 2022
50109c9
feat: remove bindings from build
dmbsk Feb 11, 2022
01f6d55
test: remove unused tests
dmbsk Feb 21, 2022
c930d56
chore: update package author
dmbsk Feb 21, 2022
e23589b
style: change " to '
dmbsk Feb 21, 2022
c4593c2
fix: building builtins warning
dmbsk Mar 7, 2022
286bc45
fix: remove unused file
dmbsk Mar 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true

[*]
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
Expand Down
43 changes: 43 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
ignorePatterns:
- '*.d.ts'
- 'dist'
- "rollup.config.ts"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "rollup.config.ts"
- '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:
Copy link

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

Copy link

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

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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# .idea
.idea

# dist
dist
251 changes: 251 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
{
"cSpell.words": [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I would suggest to sort these words alphabetically ;D

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorted

"bitcoincash"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing comma , at the end of line

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the VSC extension so linting rules doesn't apply here

"0x",
"zrx",
"Aave",
"lend",
"AdEx",
"adx",
"aelf",
"ELF",
"Aeternity",
"ae",
"Algorand",
"algo",
"Aragon",
"ant",
"Ardor",
"ardr",
"Augur",
"rep",
"AuroraCoin",
"aur",
"Australian Dollars",
"aud",
"Bancor",
"bnt",
"Bankex",
"bkx",
"BasicAttentionToken",
"bat",
"BeaverCoin",
"bvc",
"BinanceCoin",
"bnb",
"BioCoin",
"bio",
"Bitcoin",
"btc",
"Bitcoin Diamond",
"bcd",
"BitcoinCash",
"bcc",
"bch",
"BitcoinGold",
"btg",
"BitcoinPrivate",
"btcp",
"BitcoinZ",
"btcz",
"Bitquence",
"bqx",
"Bitshares",
"bts",
"BitTorrent",
"btt",
"Blockstack",
"stx",
"Callisto",
"clo",
"Cardano",
"ada",
"Chainlink",
"link",
"Civic",
"cvc",
"Cosmos",
"atom",
"dash",
"Decentraland",
"MANA",
"Decred",
"dcr",
"dent",
"DigiByte",
"dgb",
"District0x",
"dnt",
"DogeCoin",
"doge",
"Enigma",
"eng",
"Enjin Coin",
"enj",
"eos",
"Ethereum",
"eth",
"EthereumClassic",
"etc",
"EtherZero",
"etz",
"ethos",
"Expanse",
"exp",
"FreiCoin",
"frc",
"FunFair",
"fun",
"GameCredits",
"game",
"GarliCoin",
"grlc",
"Gnosis",
"gno",
"Golem",
"gnt",
"Hedera Hashgraph",
"hbar",
"Holo",
"HOT",
"Horizen",
"zen",
"hush",
"ICON",
"icx",
"iExec RLC",
"rlc",
"Internet of Services",
"IOST",
"iota",
"Komodo",
"kmd",
"Lisk",
"lsk",
"LiteCoin",
"ltc",
"Matchpool",
"gup",
"MegaCoin",
"mec",
"Melon",
"mln",
"Metal",
"mtl",
"Monacao",
"mco",
"MonaCoin",
"mona",
"Monero",
"xmr",
"NameCoin",
"nmc",
"nano",
"NEM",
"xem",
"neo",
"NeoGas",
"gas",
"Nexus",
"nxs",
"Numeraire",
"nmr",
"Odyssey",
"ocn",
"OmiseGO",
"omg",
"Ontology",
"ont",
"Ontology Gas",
"ong",
"Paxos Standard Token",
"pax",
"PeerCoin",
"ppc",
"pivx",
"Polymath",
"poly",
"Populous",
"ppt",
"PowerLedger",
"powr",
"PrimeCoin",
"xpm",
"ProtoShares",
"pts",
"Pundi X",
"npxs",
"qtum",
"RaiBlocks",
"xrb",
"Ravencoin",
"rvn",
"RipioCreditNetwork",
"rcn",
"Ripple",
"xrp",
"salt",
"Siacoin",
"sc",
"SnowGem",
"sng",
"SolarCoin",
"slr",
"Status",
"snt",
"steem",
"Stellar Lumens",
"xlm",
"storj",
"storm",
"Stratis",
"strat",
"Substratum",
"sub",
"Swarm City",
"swt",
"Syscoin",
"sys",
"TenX",
"pay",
"Tether",
"usdt",
"Tezos",
"XTZ",
"theta",
"Tron",
"trx",
"TrueUSD",
"tusd",
"USD Coin",
"usdc",
"VeChain",
"vet",
"Verge",
"xvg",
"VertCoin",
"vtc",
"Viberate",
"vib",
"VoteCoin",
"vot",
"WaltonChain",
"wtc",
"waves",
"wings",
"ZCash",
"zec",
"ZClassic",
"zcl",
"ZenCash",
"Zilliqa",
"zil",
"segwit",
"altcoin",
"javascript",
"browser",
"nodejs",
"wallet",
"address"
]
}
11 changes: 0 additions & 11 deletions dist/test.html

This file was deleted.

Loading