@indigo-labs/indigo-sdk 0.5.11 → 0.5.13
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -4
- package/dist/index.mjs +3 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3970,7 +3970,7 @@ declare function mkOneShotPolicy(params: OneShotParams): MintingPolicy;
|
|
|
3970
3970
|
declare function oneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<[TxBuilder, PolicyId]>;
|
|
3971
3971
|
declare function runOneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<PolicyId>;
|
|
3972
3972
|
|
|
3973
|
-
declare function leverageCdpWithRob(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, allRobs: [UTxO, RobDatum][], pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
|
|
3973
|
+
declare function leverageCdpWithRob(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, treasuryOref: OutRef | undefined, sysParams: SystemParams, lucid: LucidEvolution, allRobs: [UTxO, RobDatum][], pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
|
|
3974
3974
|
|
|
3975
3975
|
declare const OnChainDecimalSchema: TSchema.Struct<{
|
|
3976
3976
|
getOnChainInt: TSchema.Integer;
|
|
@@ -4725,7 +4725,7 @@ declare function pickValidSatisfiableOrders(lucid: LucidEvolution, orders: Parse
|
|
|
4725
4725
|
|
|
4726
4726
|
declare function createStableswapOrder(iasset: string, collateralAsset: AssetClass, amount: bigint, minting: boolean, poolDatum: StableswapPoolContent, params: SystemParams, lucid: LucidEvolution, destinationAddress?: Address, destinationInlineDatum?: Core.Data.Data, maxExecutionFee?: bigint, additionalLovelaces?: bigint, maxFeeRatio?: Rational): Promise<TxBuilder>;
|
|
4727
4727
|
declare function cancelStableswapOrder(stableswapOrderOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
|
|
4728
|
-
declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, psmProcessingConfig?: PSMProcessingConfig): Promise<TxBuilder>;
|
|
4728
|
+
declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef | undefined, sysParams: SystemParams, lucid: LucidEvolution, psmProcessingConfig?: PSMProcessingConfig): Promise<TxBuilder>;
|
|
4729
4729
|
declare function updateStableswapPoolFees(stableswapPoolOutRef: OutRef, stableswapFeeOutRef: OutRef, newMintingFeeRatio: Rational | null, newRedemptionFeeRatio: Rational | null, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
|
|
4730
4730
|
|
|
4731
4731
|
declare const StableswapParamsSchema: _lucid_evolution_lucid.TObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -3970,7 +3970,7 @@ declare function mkOneShotPolicy(params: OneShotParams): MintingPolicy;
|
|
|
3970
3970
|
declare function oneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<[TxBuilder, PolicyId]>;
|
|
3971
3971
|
declare function runOneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<PolicyId>;
|
|
3972
3972
|
|
|
3973
|
-
declare function leverageCdpWithRob(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, allRobs: [UTxO, RobDatum][], pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
|
|
3973
|
+
declare function leverageCdpWithRob(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, treasuryOref: OutRef | undefined, sysParams: SystemParams, lucid: LucidEvolution, allRobs: [UTxO, RobDatum][], pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
|
|
3974
3974
|
|
|
3975
3975
|
declare const OnChainDecimalSchema: TSchema.Struct<{
|
|
3976
3976
|
getOnChainInt: TSchema.Integer;
|
|
@@ -4725,7 +4725,7 @@ declare function pickValidSatisfiableOrders(lucid: LucidEvolution, orders: Parse
|
|
|
4725
4725
|
|
|
4726
4726
|
declare function createStableswapOrder(iasset: string, collateralAsset: AssetClass, amount: bigint, minting: boolean, poolDatum: StableswapPoolContent, params: SystemParams, lucid: LucidEvolution, destinationAddress?: Address, destinationInlineDatum?: Core.Data.Data, maxExecutionFee?: bigint, additionalLovelaces?: bigint, maxFeeRatio?: Rational): Promise<TxBuilder>;
|
|
4727
4727
|
declare function cancelStableswapOrder(stableswapOrderOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
|
|
4728
|
-
declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, psmProcessingConfig?: PSMProcessingConfig): Promise<TxBuilder>;
|
|
4728
|
+
declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef | undefined, sysParams: SystemParams, lucid: LucidEvolution, psmProcessingConfig?: PSMProcessingConfig): Promise<TxBuilder>;
|
|
4729
4729
|
declare function updateStableswapPoolFees(stableswapPoolOutRef: OutRef, stableswapFeeOutRef: OutRef, newMintingFeeRatio: Rational | null, newRedemptionFeeRatio: Rational | null, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
|
|
4730
4730
|
|
|
4731
4731
|
declare const StableswapParamsSchema: _lucid_evolution_lucid.TObject<{
|
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
|
-
|
|
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
|
-
|
|
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(() => {
|