@indigo-labs/indigo-sdk 0.5.11 → 0.5.12

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.js CHANGED
@@ -7916,10 +7916,11 @@ var mkTreasuryValidatorFromSP = (params) => {
7916
7916
  var import_fp_ts20 = require("fp-ts");
7917
7917
  var import_cardano_offchain_common22 = require("@indigo-labs/cardano-offchain-common");
7918
7918
  async function findAllTreasuryUtxos(lucid, sysParams) {
7919
- return lucid.utxosAt({
7919
+ const res = await lucid.utxosAt({
7920
7920
  type: "Script",
7921
7921
  hash: sysParams.validatorHashes.treasuryHash
7922
7922
  });
7923
+ return res.filter((utxo) => utxo.datumHash == null);
7923
7924
  }
7924
7925
  async function findRandomTreasuryUtxo(lucid, sysParams) {
7925
7926
  const treasuryUtxos = await findAllTreasuryUtxos(lucid, sysParams);
@@ -7947,9 +7948,7 @@ async function findRandomTreasuryUtxoWithAsset(lucid, sysParams, asset, max_numb
7947
7948
  { hash: sysParams.validatorHashes.treasuryHash, type: "Script" },
7948
7949
  (0, import_cardano_offchain_common22.assetClassToUnit)(asset)
7949
7950
  );
7950
- const validTreasuryUtxos = treasuryUtxos.filter(
7951
- (utxo) => Object.keys(utxo.assets).length <= max_number_of_assets
7952
- );
7951
+ const validTreasuryUtxos = treasuryUtxos.filter((utxo) => Object.keys(utxo.assets).length <= max_number_of_assets).filter((utxo) => utxo.datumHash == null);
7953
7952
  return import_fp_ts20.function.pipe(
7954
7953
  import_fp_ts20.option.fromNullable((0, import_cardano_offchain_common22.getRandomElement)(validTreasuryUtxos)),
7955
7954
  import_fp_ts20.option.match(() => {
package/dist/index.mjs CHANGED
@@ -7674,10 +7674,11 @@ import {
7674
7674
  getRandomElement as getRandomElement3
7675
7675
  } from "@indigo-labs/cardano-offchain-common";
7676
7676
  async function findAllTreasuryUtxos(lucid, sysParams) {
7677
- return lucid.utxosAt({
7677
+ const res = await lucid.utxosAt({
7678
7678
  type: "Script",
7679
7679
  hash: sysParams.validatorHashes.treasuryHash
7680
7680
  });
7681
+ return res.filter((utxo) => utxo.datumHash == null);
7681
7682
  }
7682
7683
  async function findRandomTreasuryUtxo(lucid, sysParams) {
7683
7684
  const treasuryUtxos = await findAllTreasuryUtxos(lucid, sysParams);
@@ -7705,9 +7706,7 @@ async function findRandomTreasuryUtxoWithAsset(lucid, sysParams, asset, max_numb
7705
7706
  { hash: sysParams.validatorHashes.treasuryHash, type: "Script" },
7706
7707
  assetClassToUnit4(asset)
7707
7708
  );
7708
- const validTreasuryUtxos = treasuryUtxos.filter(
7709
- (utxo) => Object.keys(utxo.assets).length <= max_number_of_assets
7710
- );
7709
+ const validTreasuryUtxos = treasuryUtxos.filter((utxo) => Object.keys(utxo.assets).length <= max_number_of_assets).filter((utxo) => utxo.datumHash == null);
7711
7710
  return F18.pipe(
7712
7711
  O15.fromNullable(getRandomElement3(validTreasuryUtxos)),
7713
7712
  O15.match(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigo-labs/indigo-sdk",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "Indigo SDK for interacting with Indigo endpoints via lucid-evolution",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",