Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into mitch/same-wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
klntsky committed Feb 15, 2024
2 parents db44bb2 + 2493eb5 commit 2da3f9a
Show file tree
Hide file tree
Showing 37 changed files with 178 additions and 304 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Fixed

- WebAssembly memory leaks (`csl-gc-wrapper` used to depend on unstable `wasm-bidngen` API [that got changed](https://github.com/mlabs-haskell/csl-gc-wrapper/commit/2dea38228b77f7c904aafef12eece7e5af195977)) ([#1595](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1595))

### Removed

- `ModifyTx` error: made conversion functions total and removed the need to handle it
Expand Down
80 changes: 31 additions & 49 deletions package-lock.json

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

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
"dependencies": {
"@emurgo/cardano-message-signing-browser": "1.0.1",
"@emurgo/cardano-message-signing-nodejs": "1.0.1",
"@mlabs-haskell/cardano-serialization-lib-gc-browser": "^1.0.6",
"@mlabs-haskell/cardano-serialization-lib-gc-nodejs": "^1.0.6",
"@mlabs-haskell/csl-gc-wrapper": "^1.0.1",
"@mlabs-haskell/cardano-serialization-lib-gc": "^1.0.9",
"@mlabs-haskell/json-bigint": "2.0.0",
"@noble/secp256k1": "^1.7.0",
"apply-args-browser": "0.0.1",
Expand Down
5 changes: 2 additions & 3 deletions src/Internal/ApplyArgs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* global BROWSER_RUNTIME */

let lib;
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

let apply_args;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
apply_args = await import("apply-args-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
apply_args = await import("apply-args-nodejs");
}

Expand Down
9 changes: 1 addition & 8 deletions src/Internal/BalanceTx/UtxoMinAda.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function minAdaForOutput(maybe) {
return txOutput => dataCost => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/FromBytes.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _fromBytes(helper) {
return name => bytes => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/Keys.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function freshPrivateKey() {
return lib.PrivateKey.generate_ed25519();
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/Language.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _convertLanguage(langCtors) {
return cslLang => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/NativeScript.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _convertNativeScript(handler) {
return ns => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/PlutusData.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _convertPlutusData(handle) {
return pd => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/Transaction.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

const call = property => object => object[property]();
const callMaybe = property => maybe => object => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Deserialization/UnspentOutput.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

const call = property => object => object[property]();
const callMaybe = property => maybe => object => {
Expand Down
11 changes: 1 addition & 10 deletions src/Internal/Hashing.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
/* global BROWSER_RUNTIME */

import Blake2 from "blakejs";

import SHA256 from "jssha/sha256";
import SHA3 from "jssha/sha3";

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function blake2b224Hash(bytesToHash) {
return Blake2.blake2b(bytesToHash, null, 28);
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

const setter = prop => obj => value => () => obj["set_" + prop](value);

Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/Address.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

const callClassStaticMaybe = (classname, functionname) => maybe => input => {
let ret = null;
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/AuxiliaryData.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

const setter = prop => obj => value => () => obj["set_" + prop](value);

Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/BigInt.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _BigInt_from_str(helper) {
return str => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/Hash.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function hashToBytes(hash) {
return hash.to_bytes();
Expand Down
2 changes: 0 additions & 2 deletions src/Internal/Serialization/Keys.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global BROWSER_RUNTIME */

const bytesFromKey = key => key.as_bytes();

export { bytesFromKey as bytesFromPublicKey };
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/MinFee.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _minFee(maybe) {
return tx => txFeeFixed => txFeePerByte => {
Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/NativeScript.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

const mkScript = prop => arg => lib.NativeScript[prop](arg);

Expand Down
9 changes: 1 addition & 8 deletions src/Internal/Serialization/PlutusData.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
/* global BROWSER_RUNTIME */

let lib;
if (typeof BROWSER_RUNTIME != "undefined" && BROWSER_RUNTIME) {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-browser");
} else {
lib = await import("@mlabs-haskell/cardano-serialization-lib-gc-nodejs");
}
import * as lib from "@mlabs-haskell/cardano-serialization-lib-gc";

export function _mkPlutusData_bytes(bytes) {
return lib.PlutusData.new_bytes(bytes);
Expand Down
Loading

0 comments on commit 2da3f9a

Please sign in to comment.