@harmoniclabs/buildooor 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -235,7 +235,9 @@ var TxBuilder = /** @class */ (function () {
235
235
  };
236
236
  TxBuilder.prototype.minimizeLovelaces = function (out) {
237
237
  var o = out instanceof cardano_ledger_ts_1.TxOut ? out : (0, txBuild_1.txBuildOutToTxOut)(out);
238
- var minLovelaces = this.getMinimumOutputLovelaces(o);
238
+ var minLovelaces = (this.getMinimumOutputLovelaces(o) +
239
+ // somehow we always underestimate a tiny bit
240
+ (BigInt(32) * BigInt(this.protocolParamters.utxoCostPerByte)));
239
241
  return new cardano_ledger_ts_1.TxOut({
240
242
  address: o.address,
241
243
  value: cardano_ledger_ts_1.Value.add(cardano_ledger_ts_1.Value.sub(o.value, cardano_ledger_ts_1.Value.lovelaces(o.value.lovelaces)), cardano_ledger_ts_1.Value.lovelaces(minLovelaces)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harmoniclabs/buildooor",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "Cardano transaction builder in typescript",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "@harmoniclabs/bip32_ed25519": "^0.1.3",
52
52
  "@harmoniclabs/bytestring": "^1.0.0",
53
53
  "@harmoniclabs/cardano-costmodels-ts": "^1.3.0",
54
- "@harmoniclabs/cardano-ledger-ts": "^0.4.0-dev10",
54
+ "@harmoniclabs/cardano-ledger-ts": "^0.4.0-dev11",
55
55
  "@harmoniclabs/cbor": "^1.6.6",
56
56
  "@harmoniclabs/pair": "^1.0.0",
57
57
  "@harmoniclabs/plutus-data": "^1.2.6",