@lucid-evolution/utils 0.1.14 → 0.1.15

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.
package/dist/index.cjs CHANGED
@@ -960,7 +960,7 @@ function assetsToValue(assets) {
960
960
  const assetsValue = CML.MapAssetNameToCoin.new();
961
961
  for (const unit of policyUnits) {
962
962
  assetsValue.insert(
963
- CML.AssetName.from_str((0, import_core_utils4.toText)(unit.slice(56))),
963
+ CML.AssetName.from_bytes((0, import_core_utils4.fromHex)(unit.slice(56))),
964
964
  BigInt(assets[unit])
965
965
  );
966
966
  }
package/dist/index.js CHANGED
@@ -845,7 +845,7 @@ function slotToUnixTime(network, slot) {
845
845
  }
846
846
 
847
847
  // src/value.ts
848
- import { fromText, toText } from "@lucid-evolution/core-utils";
848
+ import { fromHex as fromHex4, fromText } from "@lucid-evolution/core-utils";
849
849
  function valueToAssets(value) {
850
850
  const assets = {};
851
851
  assets["lovelace"] = value.coin();
@@ -880,7 +880,7 @@ function assetsToValue(assets) {
880
880
  const assetsValue = CML.MapAssetNameToCoin.new();
881
881
  for (const unit of policyUnits) {
882
882
  assetsValue.insert(
883
- CML.AssetName.from_str(toText(unit.slice(56))),
883
+ CML.AssetName.from_bytes(fromHex4(unit.slice(56))),
884
884
  BigInt(assets[unit])
885
885
  );
886
886
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-evolution/utils",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",