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

CardaxDEX CTL - testnet launch work PR #419

Merged
merged 104 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
f8b58d2
Switch Argounaut to Aeson (CurrencySymbol, ByteArray)
bladyjoker May 17, 2022
3108268
Migrate TokenName
bladyjoker May 17, 2022
9cc8b10
Added Aeson encoder for PlutusData and added tests for it
bladyjoker May 17, 2022
2acb642
make format
bladyjoker May 17, 2022
d9444f2
Make Plutus.Types.AssocMap PlutusData-compatible with PlutusTx.AssocMap
bladyjoker May 18, 2022
5265417
Matching plutus-core Data with Types.PlutusData PlutusData rep (confu…
bladyjoker May 18, 2022
7bb3b70
adjust api to work for an arbitrary hashing method from PlutusTx
MangoIV May 18, 2022
f03223f
plutus-core Map encoding issues #2
bladyjoker May 18, 2022
81373e5
plutus-core Map encoding issues #3
bladyjoker May 18, 2022
b82c08c
Merge remote-tracking branch 'upstream/master' into mangoiv/add-sha2-…
MangoIV May 18, 2022
51bc89e
add documentation for the new endpoint
MangoIV May 18, 2022
404f9e2
added frontend part of plutusHash
MangoIV May 18, 2022
7e8f874
Revert "plutus-core Map encoding issues #3"
bladyjoker May 18, 2022
88f7b1b
Revert "plutus-core Map encoding issues #2"
bladyjoker May 18, 2022
e744b5e
Revert "Matching plutus-core Data with Types.PlutusData PlutusData re…
bladyjoker May 18, 2022
d5953f0
fixes and new integrations tests for QueryM.Crypto
MangoIV May 18, 2022
9cd8095
Merge remote-tracking branch 'upstream/master' into mangoiv/add-sha2-…
MangoIV May 19, 2022
1963a82
add fixes required asked for by @ngua
MangoIV May 19, 2022
5473777
Revert "Make Plutus.Types.AssocMap PlutusData-compatible with PlutusT…
bladyjoker May 19, 2022
ccf5767
fix integration tests and return Either String instead of Maybe becau…
MangoIV May 19, 2022
2b7f562
Switch Plutus.Types.Credential to use HasPlutusSchema
bladyjoker May 19, 2022
bf14bca
Cosmetics on Plutus.Types.Credential
bladyjoker May 19, 2022
4cd11c3
Migrate Plutus.Types.Address to HasPlutusSchema
bladyjoker May 19, 2022
b6dba8a
Added a bunch of Aeson instances for plutus-ledger-api types
bladyjoker May 19, 2022
76bd3c5
Merge branch 'master' into bladyjoker/use_aeson
bladyjoker May 19, 2022
f7ceea1
spago2nix generate
bladyjoker May 19, 2022
15a6ec6
Formatting
ngua May 20, 2022
8f041fb
Merge branch 'master' into hashing
ngua May 20, 2022
433ee68
Use `unless`
ngua May 20, 2022
0095aa3
Imports
ngua May 20, 2022
a8d12e0
Merge remote-tracking branch 'plutonomicon/klntsky/use-purescript-aes…
bladyjoker May 20, 2022
391f8cb
Simplify field names
ngua May 20, 2022
a4ae6a6
Update readme
ngua May 20, 2022
ec0898a
Merge remote-tracking branch 'plutonomicon/klntsky/use-purescript-aes…
bladyjoker May 20, 2022
b1a8af6
Fix ogmios-datum-cache package path
bladyjoker May 20, 2022
c106ebb
Update ogmios-datum-cache input
bladyjoker May 20, 2022
aced50d
added fixes compatibility with Aeson-conversion PR
MangoIV May 21, 2022
ff4e9e0
Merge pull request #436 from MangoIV/hashing
bladyjoker May 23, 2022
c6a77ee
Merge remote-tracking branch 'plutonomicon/master' into bladyjoker/us…
bladyjoker May 23, 2022
37d53f8
Fix broken merge
bladyjoker May 23, 2022
f3f3d52
testing a fix for rational stuff
May 23, 2022
4271958
rational fix attempt #2
May 23, 2022
cad0bd6
broke Types.Rational to test some things
May 23, 2022
e5e5802
unbroke Types.Rational. json still not working
May 23, 2022
8babe19
maybe this will work
May 23, 2022
6ab5951
I think this fixes the Rational Aeson instance
May 23, 2022
28d6372
maybe *this* will fix it...
May 23, 2022
2083853
Fixed Aeson for Rationals and tested with purs-bridge
bladyjoker May 24, 2022
8990890
make format
bladyjoker May 24, 2022
ba5a568
synced w/ ctl master
May 24, 2022
ba6d0f8
fixed exports in QueryM resulting from merge
May 24, 2022
533232b
attempt #1 at fixing TokenName Aeson
May 24, 2022
ae94a3a
attempt #2 at fixing TokenName aeson
May 24, 2022
af85973
Restored Rings for Rational
bladyjoker May 24, 2022
3f93286
Merge branch 'bladyjoker/use_aeson' of github.com:plutonomicon/cardan…
bladyjoker May 24, 2022
9f851d3
attempt #3 at fixing TokenName aeson
May 24, 2022
4d45d4b
attempt #3.1 at fixing TokenName aeson
May 24, 2022
3d709fc
synced w/ remote
May 24, 2022
912e0ed
attempt #4 at fixing TokenName Aeson
May 24, 2022
474a11c
attempt #4.1 at fixing TokenName Aeson
May 24, 2022
cf0a3e3
attempt #4.2 at fixing TokenName aeson
May 24, 2022
9cbd298
fixed issue with hashing function
MangoIV May 24, 2022
2223390
Merge remote-tracking branch 'plutonomicon/dshuiski/testnet-addr-conv…
bladyjoker May 25, 2022
609a1bf
tried to fix the fromjson and tojson, doesn't work
MangoIV May 25, 2022
5b9cdca
merge upstream
MangoIV May 25, 2022
5ed0996
broke tokenname instance on purpose, revert
May 25, 2022
552fcce
unbroke instances
May 25, 2022
405cc39
TokenName aeson fix attempt #5
May 25, 2022
697b2c7
Restore Address lost in a merge and add a test (FAIL due to infinite …
bladyjoker May 25, 2022
4f6ae89
Merge branch 'bladyjoker/use_aeson' of github.com:plutonomicon/cardan…
bladyjoker May 25, 2022
e96a604
spago2nix generate and make format
bladyjoker May 25, 2022
a52034d
TokenName aeson fix attemp #5.1
May 25, 2022
4f743a2
TokenName aeson fix attemp #5.2
May 25, 2022
add06f9
upgraded to new purescript-aeson version
May 25, 2022
3393fa6
adding package lock stuff b/c ps-bridge tests break when I remove the…
May 25, 2022
1f50571
spago2nix generate
May 25, 2022
1ab58d8
wrote EncodeAeson/DecodeAeson instances for Datum (attempting to unb…
May 26, 2022
0fdbece
merged upstream - broken - ammend this
MangoIV May 26, 2022
24b6d7f
Merge remote-tracking branch 'upstream/dshuiski/client-side-hashing' …
MangoIV May 26, 2022
d0e2752
removed Crypto in front-and-backend
MangoIV May 26, 2022
89c25a4
Fixed ScriptHash Aeson instance, added Credential tests
bladyjoker May 26, 2022
ea9e88e
Forgot to include the module file -.-
bladyjoker May 26, 2022
08d41da
Fixed ScriptHash and ValidatorHash Aeson instances (I think)
bladyjoker May 26, 2022
73d0259
fix reindexing issue
MangoIV May 29, 2022
5e18ad6
Revert "fix reindexing issue"
MangoIV May 29, 2022
53ce888
Merge remote-tracking branch 'upstream/dshuiski/fix-rdmr-indexes' int…
MangoIV May 30, 2022
0bfde32
tried to implemented MultipleRedeemers test
MangoIV May 30, 2022
fd3b335
Merge remote-tracking branch 'plutonomicon/master' into bladyjoker/us…
bladyjoker May 31, 2022
b4f3301
Remove mint redeemer duplicates before balancing tx
errfrom Jun 1, 2022
d75bc32
Updated Credential Aeson instances
Jun 2, 2022
5da9f36
Updated Datum EncodeAeson instance
Jun 2, 2022
b7b7ece
Updated Interval EncodeAeson instance
Jun 2, 2022
9c4cc8b
Updated Value EncodeAeson instance
Jun 2, 2022
a45759c
Updated PubKeyHash EncodeAeson instance
Jun 2, 2022
d99e71f
Updated TokenName EncodeAeson instance
Jun 2, 2022
4a09fd0
Reindex mint redeemers based on policy id order
errfrom Jun 2, 2022
f5e941d
Merge remote-tracking branch 'plutonomicon/master' into bladyjoker/us…
bladyjoker Jun 3, 2022
b93d019
Switched to using emurgo/cardano-serialization-lib (fixes 0 serializa…
bladyjoker Jun 3, 2022
7e11826
Merge remote-tracking branch 'plutonomicon/master' into bladyjoker/us…
bladyjoker Jun 3, 2022
1421f8e
Merge remote-tracking branch 'plutonomicon/bladyjoker/use-emurgo-csl'…
bladyjoker Jun 3, 2022
86a0afe
Cleanup after merge
bladyjoker Jun 3, 2022
16fe556
Merge remote-tracking branch 'plutonomicon/dshuiski/fix-rdmr-indexes'…
bladyjoker Jun 3, 2022
39b53dd
ScriptLookups cleanup
bladyjoker Jun 3, 2022
152b128
Added Test.OgmiosDatumCache testing hashing and Aeson roundtrip for P…
bladyjoker Jun 6, 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
1 change: 1 addition & 0 deletions fixtures/test/ogmios-datum-cache/plutus-data-samples.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
easy-ps =
import inputs.easy-purescript-nix { pkgs = prev; };
ogmios-datum-cache =
inputs.ogmios-datum-cache.defaultPackage.${system};
inputs.ogmios-datum-cache.packages.${system}.ogmios-datum-cache;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why introduce this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure! I think it was to be explicit about which derivation we want as in my experience folks are quite lax about what goes into defaultPackage. Feel free to revert it!

ogmios = ogmios.packages.${system}."ogmios:exe:ogmios";
cardano-cli = cardano-node-exe.packages.${system}.cardano-cli;
purescriptProject = import ./nix { inherit system; pkgs = prev; };
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ngua/cardano-serialization-lib-browser": "^9.1.2",
"@ngua/cardano-serialization-lib-nodejs": "^9.1.2",
"@emurgo/cardano-serialization-lib-browser": "10.1.0",
"@emurgo/cardano-serialization-lib-nodejs": "10.1.0",
"big-integer": "1.6.51",
"blakejs": "1.2.1",
"bufferutil": "4.0.5",
Expand Down
33 changes: 33 additions & 0 deletions packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,40 @@ let additions =
]
, repo = "https://github.com/mlabs-haskell/purescript-aeson.git"
, version = "69bd18c4a9cffdebc45c55d2448740721a91854c"
},
aeson-helpers =
{ dependencies =
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Shameless plug https://github.com/mlabs-haskell/purescript-bridge/blob/master/flake.nix#L225. I'm quite proud of my Nix producitivty utils :D

[ "aff"
, "argonaut-codecs"
, "argonaut-core"
, "arrays"
, "bifunctors"
, "contravariant"
, "control"
, "effect"
, "either"
, "enums"
, "foldable-traversable"
, "foreign-object"
, "maybe"
, "newtype"
, "ordered-collections"
, "prelude"
, "profunctor"
, "psci-support"
, "quickcheck"
, "record"
, "spec"
, "spec-quickcheck"
, "transformers"
, "tuples"
, "typelevel-prelude"
]
, repo =
"https://github.com/mlabs-haskell/purescript-bridge-aeson-helpers.git"
, version = "44d0dae060cf78babd4534320192b58c16a6f45b"
}

, sequences =
{ dependencies =
[ "arrays"
Expand Down
43 changes: 37 additions & 6 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ The server executable can be built with `nix build .#cardano-trasaction-lib-serv
### GET Parameters:

- tx
- **Values**: *84a300818258205d677265fa5bb21ce6d8c7502aca70b9316d10e958611f3c6b758f65ad9599960001818258390030fb3b8539951e26f034910a5a37f22cb99d94d1d409f69ddbaea9711c12f03c1ef2e935acc35ec2e6f96c650fd3bfba3e96550504d5336100021a0002b569a0f5f6*
- **Description**: A CBOR-encoded `Tx AlonzoEra`; should be sent as a hexadecimal string
- **Values**: *84a300818258205d677265fa5bb21ce6d8c7502aca70b9316d10e958611f3c6b758f65ad9599960001818258390030fb3b8539951e26f034910a5a37f22cb99d94d1d409f69ddbaea9711c12f03c1ef2e935acc35ec2e6f96c650fd3bfba3e96550504d5336100021a0002b569a0f5f6*
- **Description**: A CBOR-encoded `Tx AlonzoEra`; should be sent as a hexadecimal string


### Response:
Expand All @@ -81,12 +81,12 @@ The server executable can be built with `nix build .#cardano-trasaction-lib-serv
### GET Parameters:

- wit-count
- **Values**: *1*
- **Description**: A natural number representing the intended number of key witnessesfor the transaction
- **Values**: *1*
- **Description**: A natural number representing the intended number of key witnessesfor the transaction

- tx
- **Values**: *84a300818258205d677265fa5bb21ce6d8c7502aca70b9316d10e958611f3c6b758f65ad9599960001818258390030fb3b8539951e26f034910a5a37f22cb99d94d1d409f69ddbaea9711c12f03c1ef2e935acc35ec2e6f96c650fd3bfba3e96550504d5336100021a0002b569a0f5f6*
- **Description**: A CBOR-encoded `Tx AlonzoEra`; should be sent as a hexadecimal string
- **Values**: *84a300818258205d677265fa5bb21ce6d8c7502aca70b9316d10e958611f3c6b758f65ad9599960001818258390030fb3b8539951e26f034910a5a37f22cb99d94d1d409f69ddbaea9711c12f03c1ef2e935acc35ec2e6f96c650fd3bfba3e96550504d5336100021a0002b569a0f5f6*
- **Description**: A CBOR-encoded `Tx AlonzoEra`; should be sent as a hexadecimal string


### Response:
Expand Down Expand Up @@ -135,3 +135,34 @@ The server executable can be built with `nix build .#cardano-trasaction-lib-serv
```javascript
"84a300818258205d677265fa5bb21ce6d8c7502aca70b9316d10e958611f3c6b758f65ad9599960001818258390030fb3b8539951e26f034910a5a37f22cb99d94d1d409f69ddbaea9711c12f03c1ef2e935acc35ec2e6f96c650fd3bfba3e96550504d5336100021a0002b569a0f5f6"
```

## POST /plutus-hash

### Request:

- Supported content types are:

- `application/json;charset=utf-8`
- `application/json`

- Request consisting of a HashMethod and the bytestring to be hashed (`application/json;charset=utf-8`, `application/json`):

```javascript
{"bytes":"666f6f","method":"blake2b_256"}
```

### Response:

- Status code 200
- Headers: []

- Supported content types are:

- `application/json;charset=utf-8`
- `application/json`

- Hash bytes are returned as hexidecimal string (`application/json;charset=utf-8`, `application/json`):

```javascript
{"hash":"b8fe9f7f6255a6fa08f668ab632a8d081ad87983c77cd274e48ce450f0b349fd","method":"blake2b_256"}
```
2 changes: 2 additions & 0 deletions server/ctl-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ common common-language
DeriveLift
DeriveTraversable
DerivingStrategies
DerivingVia
DuplicateRecordFields
ExplicitForAll
FlexibleContexts
FlexibleInstances
Expand Down
2 changes: 2 additions & 0 deletions server/src/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ type Api =
:<|> "apply-args"
:> ReqBody '[JSON] ApplyArgsRequest
:> Post '[JSON] AppliedScript
-- Making this a POST request so we can just use the @From/ToJSON@
-- instances instead of decoding in the handler
:<|> "eval-ex-units"
:> QueryParam' '[Required] "tx" Cbor
:> Get '[JSON] ExecutionUnitsMap
Expand Down
4 changes: 1 addition & 3 deletions server/src/Types.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE DerivingVia #-}

module Types (
AppM (AppM),
ServerOptions (..),
Expand Down Expand Up @@ -28,7 +26,7 @@ import Control.Exception (Exception)
import Control.Monad.Catch (MonadThrow)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Reader (MonadReader, ReaderT, asks)
import Data.Aeson (FromJSON, ToJSON (toJSON))
import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON))
import Data.Aeson qualified as Aeson
import Data.Aeson.Encoding qualified as Aeson.Encoding
import Data.Aeson.Types (withText)
Expand Down
4 changes: 2 additions & 2 deletions server/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ fixedProtocolParameters =

loadParametersFile :: IO (Either String ProtocolParameters)
loadParametersFile =
ByteString.readFile "test/ogmios.json"
>>= pure . decodeProtocolParameters
decodeProtocolParameters
<$> ByteString.readFile "test/ogmios.json"

testParser :: Spec
testParser =
Expand Down
36 changes: 36 additions & 0 deletions spago-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can edit this file as you like.
{ name = "cardano-transaction-lib"
, dependencies =
[ "aeson"
, "aeson-helpers"
, "aff"
, "aff-promise"
, "affjax"
Expand Down Expand Up @@ -39,6 +40,7 @@ You can edit this file as you like.
, "node-buffer"
, "node-fs"
, "node-fs-aff"
, "node-path"
, "nonempty"
, "ordered-collections"
, "partial"
Expand All @@ -53,6 +55,7 @@ You can edit this file as you like.
, "spec"
, "strings"
, "tailrec"
, "text-encoding"
, "these"
, "transformers"
, "tuples"
Expand Down
1 change: 0 additions & 1 deletion src/BalanceTx.purs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ import QueryM
import QueryM.Utxos (utxosAt)
import ReindexRedeemers
( ReindexErrors
, reindexSpentScriptRedeemers
, reindexSpentScriptRedeemers'
)
import Serialization.Address
Expand Down
4 changes: 1 addition & 3 deletions src/Cardano/Types/Value.purs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ import Prelude hiding (join)
import Aeson
( class DecodeAeson
, class EncodeAeson
, JsonDecodeError
( TypeMismatch
)
, JsonDecodeError(TypeMismatch)
, caseAesonObject
, encodeAeson'
, getField
Expand Down
4 changes: 3 additions & 1 deletion src/Contract/Scripts.purs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ import Data.Either (Either, hush)
import Data.Maybe (Maybe)
import Data.Newtype (class Newtype)
import Types.PlutusData (PlutusData)
import Types.Scripts (PlutusScript)
import Types.Scripts
( PlutusScript
)

-- | Apply `PlutusData` arguments to any type isomorphic to `PlutusScript`,
-- | returning an updated script with the provided arguments applied
Expand Down
4 changes: 2 additions & 2 deletions src/Deserialization/FromBytes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

var lib;
if (typeof BROWSER_RUNTIME != 'undefined' && BROWSER_RUNTIME) {
lib = require('@ngua/cardano-serialization-lib-browser');
lib = require('@emurgo/cardano-serialization-lib-browser');
} else {
lib = require('@ngua/cardano-serialization-lib-nodejs');
lib = require('@emurgo/cardano-serialization-lib-nodejs');
}

const fromBytes = name => helper => bytes => {
Expand Down
2 changes: 1 addition & 1 deletion src/Deserialization/FromBytes.purs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Serialization.Types
, TransactionWitnessSet
, VRFKeyHash
)
import Type.Prelude (Proxy(..))
import Type.Prelude (Proxy(Proxy))
import Type.Row (type (+))
import Types.ByteArray (ByteArray)

Expand Down
4 changes: 2 additions & 2 deletions src/Deserialization/NativeScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

var lib;
if (typeof BROWSER_RUNTIME != 'undefined' && BROWSER_RUNTIME) {
lib = require('@ngua/cardano-serialization-lib-browser');
lib = require('@emurgo/cardano-serialization-lib-browser');
} else {
lib = require('@ngua/cardano-serialization-lib-nodejs');
lib = require('@emurgo/cardano-serialization-lib-nodejs');
}

const getNativeScriptAs = prop => maybe => ns => {
Expand Down
4 changes: 2 additions & 2 deletions src/Deserialization/PlutusData.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* global require exports BROWSER_RUNTIME */
var lib;
if (typeof BROWSER_RUNTIME != 'undefined' && BROWSER_RUNTIME) {
lib = require('@ngua/cardano-serialization-lib-browser');
lib = require('@emurgo/cardano-serialization-lib-browser');
} else {
lib = require('@ngua/cardano-serialization-lib-nodejs');
lib = require('@emurgo/cardano-serialization-lib-nodejs');
}

const plutusDataAs = what => helper => data => {
Expand Down
4 changes: 2 additions & 2 deletions src/Deserialization/UnspentOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

var lib;
if (typeof BROWSER_RUNTIME != 'undefined' && BROWSER_RUNTIME) {
lib = require('@ngua/cardano-serialization-lib-browser');
lib = require('@emurgo/cardano-serialization-lib-browser');
} else {
lib = require('@ngua/cardano-serialization-lib-nodejs');
lib = require('@emurgo/cardano-serialization-lib-nodejs');
}

const call = property => object => object[property]();
Expand Down
4 changes: 2 additions & 2 deletions src/Deserialization/WitnessSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

var lib;
if (typeof BROWSER_RUNTIME != 'undefined' && BROWSER_RUNTIME) {
lib = require('@ngua/cardano-serialization-lib-browser');
lib = require('@emurgo/cardano-serialization-lib-browser');
} else {
lib = require('@ngua/cardano-serialization-lib-nodejs');
lib = require('@emurgo/cardano-serialization-lib-nodejs');
}

const call = property => object => object[property]();
Expand Down
4 changes: 2 additions & 2 deletions src/Hashing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const SHA3 = require('jssha/dist/sha3');

let lib;
if (typeof BROWSER_RUNTIME != 'undefined' && BROWSER_RUNTIME) {
lib = require('@ngua/cardano-serialization-lib-browser');
lib = require('@emurgo/cardano-serialization-lib-browser');
} else {
lib = require('@ngua/cardano-serialization-lib-nodejs');
lib = require('@emurgo/cardano-serialization-lib-nodejs');
}

const DIGEST_LENGTH_256 = 32;
Expand Down
Loading