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

Get rid of js #292

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
68 changes: 0 additions & 68 deletions .github/workflows/typescript.yml

This file was deleted.

8 changes: 2 additions & 6 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
# Later rules override earlier rules.

# CICD
.github/ @Crypto2099
nix/ @Crypto2099
.github/ @Crypto2099
nix/ @Crypto2099

# Haskell components
command-line/ @paweljakubas
core/ @paweljakubas

# JavaScript interface
jsapi/ @Crypto2099
jsbits/ @Crypto2099
3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## [3.13.0] - N/A
## [4.0.0] - N/A

### Added

- Drop JavaScript support and get rid of JavaScript codebase
- `hashKey` for Shelley style
- Key derivation support for DRep, CCCold and CCHot in accordance to [CIP--105](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0105). Also supported in CLI.
- Fix field for staking scripts in AddressInfo.
Expand Down
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,26 +799,6 @@ $ echo "addr1gqtnpvdhqrtpd4g424fcaq7k0ufuzyadt7djygf8qdyzevuph3wczvf2dwyx5u" | d
}
```

## NPM Package

There is an experimental NPM module for JavaScript and TypeScript
available, which works in both NodeJS and the browser.

Here is a code sample showing how it can be used:

```javascript
var cardanoAddresses = require('cardano-addresses')
var addr = 'addr1gqtnpvdhqrtpd4g424fcaq7k0ufuzyadt7djygf8qdyzevuph3wczvf2dwyx5u'

cardanoAddresses.inspectAddress(addr)
.then(info => console.log(info)
```

- [NPM Package](https://www.npmjs.com/package/cardano-addresses)
- [API Documentation](https://IntersectMBO.github.io/cardano-addresses/typescript/)
- [Web Demo](https://IntersectMBO.github.io/cardano-addresses/demo/)
- [Development Info](./jsapi/README.md)

## Contributing

Pull requests are welcome.
Expand Down
39 changes: 9 additions & 30 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,22 @@ index-state:
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them

repository ghcjs-overlay
url: https://input-output-hk.github.io/hackage-overlay-ghcjs/
secure: True
root-keys:
3838d0dfa046bb3d16de9ae0823dab1dd937ee336f9bcaa87c85b36443aee7f6
92e8a83a0df4f99ff0372b6dcdb008c52971d1d53b1df621630f5a650fbf1f0a
d5f108840fa2addca04caa82bc4c60ce41df7c0d3133baf6716b05a4dce11b6c
key-threshold: 3

if os(ghcjs)
extra-packages: ghci

constraints:
digest == 0.0.1.2
, entropy == 0.4.1.7
if impl(ghc>=9.8)
allow-newer: *:template-haskell, *:base, *:deepseq, *:ghc-prim, *:time

if impl(ghc<9)
constraints:
text < 2.0
, filepath == 1.4.2.1
else
allow-newer: *:*

active-repositories: hackage.haskell.org, cardano-haskell-packages, ghcjs-overlay:override
else
if impl(ghc>=9.8)
allow-newer: *:template-haskell, *:base, *:deepseq, *:ghc-prim, *:time

active-repositories: hackage.haskell.org, cardano-haskell-packages
active-repositories: hackage.haskell.org, cardano-haskell-packages

packages:
command-line/cardano-addresses-cli.cabal
core/cardano-addresses.cabal
jsapi/cardano-addresses-jsapi.cabal

-- Make sure `hsc2hs` is available for building the `zlib` package
-- when cross compiling for windows. The conditional dependency on
-- `zlib` in `digest` means `zlib` and its dependencies (like `hsc2hs`)
-- are not needed for building the linux.
extra-packages: hsc2hs

constraints:
ghcjs-base >=0.2.0.3
, optparse-applicative >= 0.18.1.0

tests: True
Expand Down
3 changes: 0 additions & 3 deletions command-line/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ module Main where

import Prelude

import Cardano.Address.Compat
( ghcjsBuildSupport )
import Main.Utf8
( withUtf8 )

import qualified Command as CLI

main :: IO ()
main = do
ghcjsBuildSupport
withUtf8 (CLI.setup >> CLI.parse >>= CLI.run)
3 changes: 0 additions & 3 deletions command-line/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module Main where

import Prelude

import Cardano.Address.Compat
( ghcjsBuildSupport )
import Main.Utf8
( withUtf8 )
import Test.Hspec.Runner
Expand Down Expand Up @@ -35,7 +33,6 @@ initialize = do

main :: IO ()
main = do
ghcjsBuildSupport
#ifdef mingw32_HOST_OS
initialize
#endif
Expand Down
5 changes: 0 additions & 5 deletions core/cardano-addresses.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ flag release
library
exposed-modules:
Cardano.Address
Cardano.Address.Compat
Cardano.Address.Derivation
Cardano.Address.Internal
Cardano.Address.Script
Expand Down Expand Up @@ -71,9 +70,6 @@ library
, unordered-containers
if flag(release)
ghc-options: -Werror
if impl(ghcjs) || os(ghcjs)
build-depends:
cardano-addresses-jsbits
default-language: Haskell2010

test-suite unit
Expand Down Expand Up @@ -122,4 +118,3 @@ test-suite unit
if flag(release)
ghc-options: -Werror
default-language: Haskell2010

29 changes: 0 additions & 29 deletions core/lib/Cardano/Address/Compat.hs

This file was deleted.

3 changes: 0 additions & 3 deletions core/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ module Main where

import Prelude

import Cardano.Address.Compat
( ghcjsBuildSupport )
import Test.Hspec.Runner
( defaultConfig, hspecWith )

import qualified AutoDiscover

main :: IO ()
main = do
ghcjsBuildSupport
hspecWith defaultConfig AutoDiscover.spec
Loading
Loading