@indigo-labs/indigo-sdk 0.2.34 → 0.2.36

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
2
- import { Data, Network, OutRef, Credential, LucidEvolution, TxBuilder, Redeemer, Datum, UTxO, SpendingValidator, MintingPolicy, ScriptHash, Address, Assets, PolicyId, Unit } from '@lucid-evolution/lucid';
2
+ import { Data, Network, OutRef, Credential, UTxO, LucidEvolution, Datum, ScriptHash, Address, Assets, TxBuilder, Redeemer, SpendingValidator, MintingPolicy, PolicyId, Unit } from '@lucid-evolution/lucid';
3
3
  import { option, ord } from 'fp-ts';
4
4
  import { Core } from '@evolution-sdk/evolution';
5
5
 
@@ -302,20 +302,48 @@ declare function fromSystemParamsAsset(asset: AssetClassSP): AssetClass;
302
302
  declare function fromSystemParamsScriptRef(ref: ScriptReference): OutRef;
303
303
  declare function fromSysParamsScriptCredential(cred: ScriptCredential): Credential;
304
304
 
305
- declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysParams: SystemParams, cdpCreatorOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
306
- declare function depositCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
307
- declare function withdrawCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
308
- declare function mintCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
309
- declare function burnCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
310
- declare function closeCdp(cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
305
+ /**
306
+ * Union type accepting either a full UTxO or just an OutRef.
307
+ * When a full UTxO is provided, no network fetch is needed.
308
+ * When only an OutRef is provided, the UTxO will be fetched via utxosByOutRef.
309
+ */
310
+ type UtxoOrOutRef = UTxO | OutRef;
311
+ /**
312
+ * Resolves a UTxOOrOutRef to a full UTxO.
313
+ * If the input is already a UTxO (has 'address' property), returns it directly.
314
+ * If the input is an OutRef, fetches the UTxO from the network.
315
+ *
316
+ * @param input - Either a full UTxO or an OutRef
317
+ * @param lucid - The LucidEvolution instance for network queries
318
+ * @param errorMsg - Custom error message if the UTxO cannot be found
319
+ * @returns The resolved UTxO
320
+ */
321
+ declare function resolveUtxo(input: UtxoOrOutRef, lucid: LucidEvolution, errorMsg?: string): Promise<UTxO>;
322
+ /**
323
+ * Returns the inline datum.
324
+ * Throws when the UTXO doesn't have an inline datum
325
+ * (i.e. in case it has hash datum or no datum).
326
+ */
327
+ declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
328
+ declare function addrDetails(lucid: LucidEvolution): Promise<[Credential, Credential | undefined]>;
329
+ declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential): Address;
330
+ declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
331
+ declare function balance(utxos: UTxO[]): Assets;
332
+
333
+ declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysParams: SystemParams, cdpCreator: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
334
+ declare function depositCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
335
+ declare function withdrawCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
336
+ declare function mintCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
337
+ declare function burnCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
338
+ declare function closeCdp(cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
311
339
  declare function redeemCdp(
312
340
  /**
313
341
  * When the goal is to redeem the maximum possible, just pass in the total minted amount of the CDP.
314
342
  * The logic will automatically cap the amount to the max.
315
343
  */
316
- attemptedRedemptionIAssetAmt: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
317
- declare function freezeCdp(cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
318
- declare function liquidateCdp(cdpOref: OutRef, stabilityPoolOref: OutRef, collectorOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
344
+ attemptedRedemptionIAssetAmt: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, treasury: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
345
+ declare function freezeCdp(cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
346
+ declare function liquidateCdp(cdp: UtxoOrOutRef, stabilityPool: UtxoOrOutRef, collector: UtxoOrOutRef, treasury: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
319
347
  declare function mergeCdps(cdpsToMergeUtxos: OutRef[], sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
320
348
 
321
349
  declare const OnChainDecimalSchema: _lucid_evolution_lucid.TObject<{
@@ -765,7 +793,7 @@ declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => Spe
765
793
  declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
766
794
  declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;
767
795
 
768
- declare function collectorFeeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collectorOref: OutRef): Promise<void>;
796
+ declare function collectorFeeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collector: UtxoOrOutRef): Promise<void>;
769
797
 
770
798
  declare const GovDatumSchema: _lucid_evolution_lucid.TObject<{
771
799
  currentProposal: _lucid_evolution_lucid.TUnsafe<bigint>;
@@ -1132,7 +1160,7 @@ declare const ProposalContent: ProposalContent;
1132
1160
  /**
1133
1161
  * Returns the new PollId.
1134
1162
  */
1135
- declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, govOref: OutRef,
1163
+ declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, gov: UtxoOrOutRef,
1136
1164
  /**
1137
1165
  * This has to be passed only in case of createAsset proposal
1138
1166
  */
@@ -1144,16 +1172,16 @@ declare function createShardsChunks(
1144
1172
  /**
1145
1173
  * This gets automatically capped to total shards count.
1146
1174
  */
1147
- chunkSize: bigint, pollManagerOref: OutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
1148
- declare function vote(voteOption: VoteOption, pollShardOref: OutRef, stakingPositionOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1149
- declare function mergeShards(pollManagerOref: OutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1150
- declare function endProposal(pollManagerOref: OutRef, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1151
- declare function executeProposal(executeOref: OutRef, govOref: OutRef, treasuryWithdrawalOref: OutRef | null, allIAssetOrefs: OutRef[] | null, modifyIAssetOref: OutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1175
+ chunkSize: bigint, pollManager: UtxoOrOutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
1176
+ declare function vote(voteOption: VoteOption, pollShard: UtxoOrOutRef, stakingPosition: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1177
+ declare function mergeShards(pollManager: UtxoOrOutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1178
+ declare function endProposal(pollManager: UtxoOrOutRef, gov: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1179
+ declare function executeProposal(execute: UtxoOrOutRef, gov: UtxoOrOutRef, treasuryWithdrawal: UtxoOrOutRef | null, allIAssetOrefs: OutRef[] | null, modifyIAsset: UtxoOrOutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1152
1180
 
1153
1181
  declare function createSpAccount(asset: string, amount: bigint, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1154
1182
  declare function adjustSpAccount(asset: string, amount: bigint, accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1155
1183
  declare function closeSpAccount(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1156
- declare function processSpRequest(asset: string, stabilityPoolUtxo: UTxO, accountUtxo: UTxO, govUtxo: UTxO, iAssetUtxo: UTxO, newSnapshotUtxo: UTxO | undefined, params: SystemParams, lucid: LucidEvolution, collectorOref: OutRef): Promise<TxBuilder>;
1184
+ declare function processSpRequest(asset: string, stabilityPoolUtxo: UTxO, accountUtxo: UTxO, govUtxo: UTxO, iAssetUtxo: UTxO, newSnapshotUtxo: UTxO | undefined, params: SystemParams, lucid: LucidEvolution, collector: UtxoOrOutRef): Promise<TxBuilder>;
1157
1185
  declare function annulRequest(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1158
1186
 
1159
1187
  declare const SPIntegerSchema: Core.TSchema.Struct<{
@@ -1559,17 +1587,17 @@ type StakingManagerOutput = {
1559
1587
  * Update the staking position locked amount. In case proposal's voting finished, unlock the amount.
1560
1588
  */
1561
1589
  declare function updateStakingLockedAmount(stakingPosLockedAmt: StakingPosLockedAmt, currentTime: bigint): StakingPosLockedAmt;
1562
- declare function findStakingManagerByOutRef(stakingManagerRef: OutRef, lucid: LucidEvolution): Promise<StakingManagerOutput>;
1590
+ declare function findStakingManagerByOutRef(stakingManager: UtxoOrOutRef, lucid: LucidEvolution): Promise<StakingManagerOutput>;
1563
1591
  declare function findStakingManager(params: SystemParams, lucid: LucidEvolution): Promise<StakingManagerOutput>;
1564
- declare function findStakingPositionByOutRef(stakingPositionRef: OutRef, lucid: LucidEvolution): Promise<StakingPositionOutput>;
1592
+ declare function findStakingPositionByOutRef(stakingPosition: UtxoOrOutRef, lucid: LucidEvolution): Promise<StakingPositionOutput>;
1565
1593
  declare const rewardSnapshotPrecision: bigint;
1566
1594
  declare function distributeReward(snapshotAda: bigint, adaReward: bigint, totalStake: bigint): bigint;
1567
1595
  declare function calculateAdaReward(currentSnapshotAda: bigint, oldSnapshotAda: bigint, existingIndyAmount: bigint): bigint;
1568
1596
 
1569
- declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1570
- declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1571
- declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1572
- declare function distributeAda(stakingManagerRef: OutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1597
+ declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManager: UtxoOrOutRef): Promise<TxBuilder>;
1598
+ declare function adjustStakingPosition(stakingPosition: UtxoOrOutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManager: UtxoOrOutRef): Promise<TxBuilder>;
1599
+ declare function closeStakingPosition(stakingPosition: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManager: UtxoOrOutRef): Promise<TxBuilder>;
1600
+ declare function distributeAda(stakingManager: UtxoOrOutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1573
1601
 
1574
1602
  declare const StakingParamsSchema: _lucid_evolution_lucid.TObject<{
1575
1603
  stakingManagerNft: _lucid_evolution_lucid.TObject<{
@@ -1609,7 +1637,7 @@ type StakingRedeemer = Data.Static<typeof StakingRedeemerSchema>;
1609
1637
  declare function serialiseStakingRedeemer(redeemer: StakingRedeemer): Redeemer;
1610
1638
  declare function castStakingParams(params: StakingParams): Data;
1611
1639
 
1612
- declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refOutRef?: OutRef): Promise<[TxBuilder, AssetClass]>;
1640
+ declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refUtxo?: UtxoOrOutRef): Promise<[TxBuilder, AssetClass]>;
1613
1641
  declare function feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;
1614
1642
 
1615
1643
  declare function mkInterestOracleValidator(params: InterestOracleParams): SpendingValidator;
@@ -1635,18 +1663,7 @@ declare function castVersionRecordTokenParams(params: VersionRecordTokenParams):
1635
1663
  declare function mkVersionRecordTokenPolicy(params: VersionRecordTokenParams): MintingPolicy;
1636
1664
  declare const mkVersionRegistryValidator: () => SpendingValidator;
1637
1665
 
1638
- declare function treasuryFeeTx(fee: bigint, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, treasuryOref: OutRef): Promise<void>;
1639
-
1640
- /**
1641
- * Returns the inline datum.
1642
- * Throws when the UTXO doesn't have an inline datum
1643
- * (i.e. in case it has hash datum or no datum).
1644
- */
1645
- declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
1646
- declare function addrDetails(lucid: LucidEvolution): Promise<[Credential, Credential | undefined]>;
1647
- declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential): Address;
1648
- declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
1649
- declare function balance(utxos: UTxO[]): Assets;
1666
+ declare function treasuryFeeTx(fee: bigint, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, treasury: UtxoOrOutRef): Promise<void>;
1650
1667
 
1651
1668
  declare const initSpSnapshot: StabilityPoolSnapshot;
1652
1669
  declare const initEpochToScaleToSumMap: () => EpochToScaleToSum;
@@ -2060,14 +2077,14 @@ declare function randomLrpsSubsetSatisfyingTargetLovelaces(iasset: string, targe
2060
2077
  maxLrpsInTx: number, randomiseFn?: (arr: [UTxO, LRPDatum][]) => [UTxO, LRPDatum][]): [UTxO, LRPDatum][];
2061
2078
 
2062
2079
  declare function openLrp(assetTokenName: string, lovelacesAmt: bigint, maxPrice: OnChainDecimal, lucid: LucidEvolution, sysParams: SystemParams, lrpStakeCredential?: Credential): Promise<TxBuilder>;
2063
- declare function cancelLrp(lrpOutRef: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2080
+ declare function cancelLrp(lrp: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2064
2081
  declare function redeemLrp(
2065
2082
  /** The tuple represents the LRP outref and the amount of iAssets to redeem against it. */
2066
- redemptionLrpsData: [OutRef, bigint][], priceOracleOutRef: OutRef, iassetOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;
2083
+ redemptionLrpsData: [OutRef, bigint][], priceOracle: UtxoOrOutRef, iasset: UtxoOrOutRef, lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;
2067
2084
  /**
2068
2085
  * Create Tx adjusting the LRP and claiming the received iAssets
2069
2086
  */
2070
- declare function adjustLrp(lucid: LucidEvolution, lrpOutRef: OutRef,
2087
+ declare function adjustLrp(lucid: LucidEvolution, lrp: UtxoOrOutRef,
2071
2088
  /**
2072
2089
  * A positive amount increases the lovelaces in the LRP,
2073
2090
  * and a negative amount takes lovelaces from the LRP.
@@ -2076,7 +2093,7 @@ lovelacesAdjustAmt: bigint, newMaxPrice: OnChainDecimal | undefined, sysParams:
2076
2093
  /**
2077
2094
  * Create Tx claiming the received iAssets.
2078
2095
  */
2079
- declare function claimLrp(lucid: LucidEvolution, lrpOutRef: OutRef, sysParams: SystemParams): Promise<TxBuilder>;
2096
+ declare function claimLrp(lucid: LucidEvolution, lrp: UtxoOrOutRef, sysParams: SystemParams): Promise<TxBuilder>;
2080
2097
 
2081
2098
  declare const mkLrpValidator: (params: LRPParams) => SpendingValidator;
2082
2099
  declare const mkLrpValidatorFromSP: (params: LrpParamsSP) => SpendingValidator;
@@ -2125,7 +2142,7 @@ declare function assetClassValueOf(assets: Assets, assetClass: AssetClass): bigi
2125
2142
  declare function negateAssets(assets: Assets): Assets;
2126
2143
  declare function isAssetsZero(assets: Assets): boolean;
2127
2144
 
2128
- declare function leverageCdpWithLrp(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef, iassetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, allLrps: [UTxO, LRPDatum][], currentSlot: number): Promise<TxBuilder>;
2145
+ declare function leverageCdpWithLrp(leverage: number, baseCollateral: bigint, priceOracle: UtxoOrOutRef, iasset: UtxoOrOutRef, cdpCreator: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, allLrps: [UTxO, LRPDatum][], currentSlot: number): Promise<TxBuilder>;
2129
2146
 
2130
2147
  /**
2131
2148
  * The following is the math related to the leverage calculations.
@@ -2227,4 +2244,4 @@ declare function calculateCollateralRatioFromLeverage(iasset: string, leverage:
2227
2244
  */
2228
2245
  declare function calculateLeverageFromCollateralRatio(iasset: string, collateralRatioPercentage: OnChainDecimal, baseCollateral: bigint, iassetPrice: OnChainDecimal, debtMintingFeePercentage: OnChainDecimal, redemptionReimbursementPercentage: OnChainDecimal, lrpParams: LrpParamsSP, allLrps: [UTxO, LRPDatum][]): number | undefined;
2229
2246
 
2230
- export { type AccountAction, type AccountContent, AccountContentSchema, ActionReturnDatum, ActionReturnDatumSchema, type AddressCredential, type AddressCredentialOrDatum, AddressD, type AddressSP, AddressSchema, type Amount, type AssetClass, type AssetClassSP, AssetClassSchema, type AuthTokenPolicies, type CDPContent, CDPContentSchema, CDPCreatorParams, type CDPCreatorParamsSP, CDPCreatorRedeemer, type CDPDatum, CDPDatumSchema, type CDPFees, CDPFeesSchema, type CDPRedeemer, type CdpParams, type CdpParamsSP, type CollectorParamsSP, CredentialD, CredentialSchema, type CurrencySymbol, type DistributionParams, type EpochToScaleToSum, EpochToScaleToSumSchema, ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type FeedInterestOracleRedeemer, FeedInterestOracleRedeemerSchema, type GovDatum, GovParams, type GovParamsSP, GovRedeemer, type IAssetContent, IAssetContentSchema, type IAssetOutput, IAssetPriceInfoSchema, type Input, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type LRPDatum, LRPDatumSchema, type LRPParams, LRPParamsSchema, type LRPRedeemer, LRPRedeemerSchema, type LrpOutput, type LrpParamsSP, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_LRP_COLLATERAL_AMT, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleAssetNft, OracleAssetNftSchema, type Output, type OutputReference, OutputReferenceSchema, PollManagerParams, type PollManagerParamsSP, PollManagerRedeemer, PollShardParams, type PollShardParamsSP, PollShardRedeemer, type PriceOracleDatum, PriceOracleDatumSchema, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PubKeyHash, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StabilityPoolSnapshot, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type SystemParams, type TokenName, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, addressFromBech32, addressToBech32, adjust, adjustLrp, adjustSpAccount, adjustStakingPosition, adjustmentHelper, annulRequest, approximateLeverageRedemptions, assetClassToUnit, assetClassValueOf, balance, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculateTotalAdaForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelLrp, castCDPCreatorParams, castCdpParams, castExecuteParams, castGovParams, castInterestOracleParams, castLrpParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimLrp, closeCdp, closeSpAccount, closeStakingPosition, collectorFeeTx, computeInterestLovelacesFor100PercentCR, createProposal, createScriptAddress, createShardsChunks, createSpAccount, depositCdp, distributeAda, distributeReward, endProposal, executeProposal, feedInterestOracle, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromSPInteger, fromSysParamsScriptCredential, fromSystemParamsAsset, fromSystemParamsScriptRef, getAccountFund, getAccountReward, getInlineDatumOrThrow, getRandomElement, getSumFromEpochToScaleToSum, initEpochToScaleToSumMap, initSpSnapshot, insertSorted, isAssetsZero, leverageCdpWithLrp, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, lovelacesAmt, lrpRedeemableLovelacesInclReimb, matchSingle, mergeCdps, mergeShards, mintCdp, mkAssetsOf, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkInterestOracleValidator, mkLovelacesOf, mkLrpValidator, mkLrpValidatorFromSP, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkSPInteger, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, negateAssets, oneShotMintTx, openCdp, openLrp, openStakingPosition, parseAccountDatum, parseCdpDatum, parseCdpDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestOracleDatum, parseLrpDatum, parseLrpDatumOrThrow, parsePriceOracleDatum, parseSnapshotEpochToScaleToSumDatum, parseStabilityPoolDatum, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, processSpRequest, randomLrpsSubsetSatisfyingTargetLovelaces, redeemCdp, redeemLrp, rewardSnapshotPrecision, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseCDPCreatorDatum, serialiseCDPCreatorRedeemer, serialiseCdpDatum, serialiseCdpRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseInterestOracleDatum, serialiseLrpDatum, serialiseLrpRedeemer, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStakingDatum, serialiseStakingRedeemer, setSumInEpochToScaleToSum, shuffle, spAdd, spDiv, spMul, spSub, startInterestOracle, summarizeActualLeverageRedemptions, toSystemParamsAsset, treasuryFeeTx, updatePoolSnapshotWithdrawalFee, updateStakingLockedAmount, vote, withdrawCdp };
2247
+ export { type AccountAction, type AccountContent, AccountContentSchema, ActionReturnDatum, ActionReturnDatumSchema, type AddressCredential, type AddressCredentialOrDatum, AddressD, type AddressSP, AddressSchema, type Amount, type AssetClass, type AssetClassSP, AssetClassSchema, type AuthTokenPolicies, type CDPContent, CDPContentSchema, CDPCreatorParams, type CDPCreatorParamsSP, CDPCreatorRedeemer, type CDPDatum, CDPDatumSchema, type CDPFees, CDPFeesSchema, type CDPRedeemer, type CdpParams, type CdpParamsSP, type CollectorParamsSP, CredentialD, CredentialSchema, type CurrencySymbol, type DistributionParams, type EpochToScaleToSum, EpochToScaleToSumSchema, ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type FeedInterestOracleRedeemer, FeedInterestOracleRedeemerSchema, type GovDatum, GovParams, type GovParamsSP, GovRedeemer, type IAssetContent, IAssetContentSchema, type IAssetOutput, IAssetPriceInfoSchema, type Input, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type LRPDatum, LRPDatumSchema, type LRPParams, LRPParamsSchema, type LRPRedeemer, LRPRedeemerSchema, type LrpOutput, type LrpParamsSP, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_LRP_COLLATERAL_AMT, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleAssetNft, OracleAssetNftSchema, type Output, type OutputReference, OutputReferenceSchema, PollManagerParams, type PollManagerParamsSP, PollManagerRedeemer, PollShardParams, type PollShardParamsSP, PollShardRedeemer, type PriceOracleDatum, PriceOracleDatumSchema, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PubKeyHash, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StabilityPoolSnapshot, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type SystemParams, type TokenName, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UtxoOrOutRef, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, addressFromBech32, addressToBech32, adjust, adjustLrp, adjustSpAccount, adjustStakingPosition, adjustmentHelper, annulRequest, approximateLeverageRedemptions, assetClassToUnit, assetClassValueOf, balance, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculateTotalAdaForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelLrp, castCDPCreatorParams, castCdpParams, castExecuteParams, castGovParams, castInterestOracleParams, castLrpParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimLrp, closeCdp, closeSpAccount, closeStakingPosition, collectorFeeTx, computeInterestLovelacesFor100PercentCR, createProposal, createScriptAddress, createShardsChunks, createSpAccount, depositCdp, distributeAda, distributeReward, endProposal, executeProposal, feedInterestOracle, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromSPInteger, fromSysParamsScriptCredential, fromSystemParamsAsset, fromSystemParamsScriptRef, getAccountFund, getAccountReward, getInlineDatumOrThrow, getRandomElement, getSumFromEpochToScaleToSum, initEpochToScaleToSumMap, initSpSnapshot, insertSorted, isAssetsZero, leverageCdpWithLrp, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, lovelacesAmt, lrpRedeemableLovelacesInclReimb, matchSingle, mergeCdps, mergeShards, mintCdp, mkAssetsOf, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkInterestOracleValidator, mkLovelacesOf, mkLrpValidator, mkLrpValidatorFromSP, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkSPInteger, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, negateAssets, oneShotMintTx, openCdp, openLrp, openStakingPosition, parseAccountDatum, parseCdpDatum, parseCdpDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestOracleDatum, parseLrpDatum, parseLrpDatumOrThrow, parsePriceOracleDatum, parseSnapshotEpochToScaleToSumDatum, parseStabilityPoolDatum, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, processSpRequest, randomLrpsSubsetSatisfyingTargetLovelaces, redeemCdp, redeemLrp, resolveUtxo, rewardSnapshotPrecision, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseCDPCreatorDatum, serialiseCDPCreatorRedeemer, serialiseCdpDatum, serialiseCdpRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseInterestOracleDatum, serialiseLrpDatum, serialiseLrpRedeemer, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStakingDatum, serialiseStakingRedeemer, setSumInEpochToScaleToSum, shuffle, spAdd, spDiv, spMul, spSub, startInterestOracle, summarizeActualLeverageRedemptions, toSystemParamsAsset, treasuryFeeTx, updatePoolSnapshotWithdrawalFee, updateStakingLockedAmount, vote, withdrawCdp };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
2
- import { Data, Network, OutRef, Credential, LucidEvolution, TxBuilder, Redeemer, Datum, UTxO, SpendingValidator, MintingPolicy, ScriptHash, Address, Assets, PolicyId, Unit } from '@lucid-evolution/lucid';
2
+ import { Data, Network, OutRef, Credential, UTxO, LucidEvolution, Datum, ScriptHash, Address, Assets, TxBuilder, Redeemer, SpendingValidator, MintingPolicy, PolicyId, Unit } from '@lucid-evolution/lucid';
3
3
  import { option, ord } from 'fp-ts';
4
4
  import { Core } from '@evolution-sdk/evolution';
5
5
 
@@ -302,20 +302,48 @@ declare function fromSystemParamsAsset(asset: AssetClassSP): AssetClass;
302
302
  declare function fromSystemParamsScriptRef(ref: ScriptReference): OutRef;
303
303
  declare function fromSysParamsScriptCredential(cred: ScriptCredential): Credential;
304
304
 
305
- declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysParams: SystemParams, cdpCreatorOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
306
- declare function depositCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
307
- declare function withdrawCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
308
- declare function mintCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
309
- declare function burnCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
310
- declare function closeCdp(cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
305
+ /**
306
+ * Union type accepting either a full UTxO or just an OutRef.
307
+ * When a full UTxO is provided, no network fetch is needed.
308
+ * When only an OutRef is provided, the UTxO will be fetched via utxosByOutRef.
309
+ */
310
+ type UtxoOrOutRef = UTxO | OutRef;
311
+ /**
312
+ * Resolves a UTxOOrOutRef to a full UTxO.
313
+ * If the input is already a UTxO (has 'address' property), returns it directly.
314
+ * If the input is an OutRef, fetches the UTxO from the network.
315
+ *
316
+ * @param input - Either a full UTxO or an OutRef
317
+ * @param lucid - The LucidEvolution instance for network queries
318
+ * @param errorMsg - Custom error message if the UTxO cannot be found
319
+ * @returns The resolved UTxO
320
+ */
321
+ declare function resolveUtxo(input: UtxoOrOutRef, lucid: LucidEvolution, errorMsg?: string): Promise<UTxO>;
322
+ /**
323
+ * Returns the inline datum.
324
+ * Throws when the UTXO doesn't have an inline datum
325
+ * (i.e. in case it has hash datum or no datum).
326
+ */
327
+ declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
328
+ declare function addrDetails(lucid: LucidEvolution): Promise<[Credential, Credential | undefined]>;
329
+ declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential): Address;
330
+ declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
331
+ declare function balance(utxos: UTxO[]): Assets;
332
+
333
+ declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysParams: SystemParams, cdpCreator: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
334
+ declare function depositCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
335
+ declare function withdrawCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
336
+ declare function mintCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
337
+ declare function burnCdp(amount: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
338
+ declare function closeCdp(cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, gov: UtxoOrOutRef, treasury: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
311
339
  declare function redeemCdp(
312
340
  /**
313
341
  * When the goal is to redeem the maximum possible, just pass in the total minted amount of the CDP.
314
342
  * The logic will automatically cap the amount to the max.
315
343
  */
316
- attemptedRedemptionIAssetAmt: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
317
- declare function freezeCdp(cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
318
- declare function liquidateCdp(cdpOref: OutRef, stabilityPoolOref: OutRef, collectorOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
344
+ attemptedRedemptionIAssetAmt: bigint, cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, treasury: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
345
+ declare function freezeCdp(cdp: UtxoOrOutRef, iasset: UtxoOrOutRef, priceOracle: UtxoOrOutRef, interestOracle: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
346
+ declare function liquidateCdp(cdp: UtxoOrOutRef, stabilityPool: UtxoOrOutRef, collector: UtxoOrOutRef, treasury: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
319
347
  declare function mergeCdps(cdpsToMergeUtxos: OutRef[], sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
320
348
 
321
349
  declare const OnChainDecimalSchema: _lucid_evolution_lucid.TObject<{
@@ -765,7 +793,7 @@ declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => Spe
765
793
  declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
766
794
  declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;
767
795
 
768
- declare function collectorFeeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collectorOref: OutRef): Promise<void>;
796
+ declare function collectorFeeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collector: UtxoOrOutRef): Promise<void>;
769
797
 
770
798
  declare const GovDatumSchema: _lucid_evolution_lucid.TObject<{
771
799
  currentProposal: _lucid_evolution_lucid.TUnsafe<bigint>;
@@ -1132,7 +1160,7 @@ declare const ProposalContent: ProposalContent;
1132
1160
  /**
1133
1161
  * Returns the new PollId.
1134
1162
  */
1135
- declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, govOref: OutRef,
1163
+ declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, gov: UtxoOrOutRef,
1136
1164
  /**
1137
1165
  * This has to be passed only in case of createAsset proposal
1138
1166
  */
@@ -1144,16 +1172,16 @@ declare function createShardsChunks(
1144
1172
  /**
1145
1173
  * This gets automatically capped to total shards count.
1146
1174
  */
1147
- chunkSize: bigint, pollManagerOref: OutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
1148
- declare function vote(voteOption: VoteOption, pollShardOref: OutRef, stakingPositionOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1149
- declare function mergeShards(pollManagerOref: OutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1150
- declare function endProposal(pollManagerOref: OutRef, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1151
- declare function executeProposal(executeOref: OutRef, govOref: OutRef, treasuryWithdrawalOref: OutRef | null, allIAssetOrefs: OutRef[] | null, modifyIAssetOref: OutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1175
+ chunkSize: bigint, pollManager: UtxoOrOutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
1176
+ declare function vote(voteOption: VoteOption, pollShard: UtxoOrOutRef, stakingPosition: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1177
+ declare function mergeShards(pollManager: UtxoOrOutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1178
+ declare function endProposal(pollManager: UtxoOrOutRef, gov: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1179
+ declare function executeProposal(execute: UtxoOrOutRef, gov: UtxoOrOutRef, treasuryWithdrawal: UtxoOrOutRef | null, allIAssetOrefs: OutRef[] | null, modifyIAsset: UtxoOrOutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1152
1180
 
1153
1181
  declare function createSpAccount(asset: string, amount: bigint, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1154
1182
  declare function adjustSpAccount(asset: string, amount: bigint, accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1155
1183
  declare function closeSpAccount(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1156
- declare function processSpRequest(asset: string, stabilityPoolUtxo: UTxO, accountUtxo: UTxO, govUtxo: UTxO, iAssetUtxo: UTxO, newSnapshotUtxo: UTxO | undefined, params: SystemParams, lucid: LucidEvolution, collectorOref: OutRef): Promise<TxBuilder>;
1184
+ declare function processSpRequest(asset: string, stabilityPoolUtxo: UTxO, accountUtxo: UTxO, govUtxo: UTxO, iAssetUtxo: UTxO, newSnapshotUtxo: UTxO | undefined, params: SystemParams, lucid: LucidEvolution, collector: UtxoOrOutRef): Promise<TxBuilder>;
1157
1185
  declare function annulRequest(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1158
1186
 
1159
1187
  declare const SPIntegerSchema: Core.TSchema.Struct<{
@@ -1559,17 +1587,17 @@ type StakingManagerOutput = {
1559
1587
  * Update the staking position locked amount. In case proposal's voting finished, unlock the amount.
1560
1588
  */
1561
1589
  declare function updateStakingLockedAmount(stakingPosLockedAmt: StakingPosLockedAmt, currentTime: bigint): StakingPosLockedAmt;
1562
- declare function findStakingManagerByOutRef(stakingManagerRef: OutRef, lucid: LucidEvolution): Promise<StakingManagerOutput>;
1590
+ declare function findStakingManagerByOutRef(stakingManager: UtxoOrOutRef, lucid: LucidEvolution): Promise<StakingManagerOutput>;
1563
1591
  declare function findStakingManager(params: SystemParams, lucid: LucidEvolution): Promise<StakingManagerOutput>;
1564
- declare function findStakingPositionByOutRef(stakingPositionRef: OutRef, lucid: LucidEvolution): Promise<StakingPositionOutput>;
1592
+ declare function findStakingPositionByOutRef(stakingPosition: UtxoOrOutRef, lucid: LucidEvolution): Promise<StakingPositionOutput>;
1565
1593
  declare const rewardSnapshotPrecision: bigint;
1566
1594
  declare function distributeReward(snapshotAda: bigint, adaReward: bigint, totalStake: bigint): bigint;
1567
1595
  declare function calculateAdaReward(currentSnapshotAda: bigint, oldSnapshotAda: bigint, existingIndyAmount: bigint): bigint;
1568
1596
 
1569
- declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1570
- declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1571
- declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1572
- declare function distributeAda(stakingManagerRef: OutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1597
+ declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManager: UtxoOrOutRef): Promise<TxBuilder>;
1598
+ declare function adjustStakingPosition(stakingPosition: UtxoOrOutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManager: UtxoOrOutRef): Promise<TxBuilder>;
1599
+ declare function closeStakingPosition(stakingPosition: UtxoOrOutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManager: UtxoOrOutRef): Promise<TxBuilder>;
1600
+ declare function distributeAda(stakingManager: UtxoOrOutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1573
1601
 
1574
1602
  declare const StakingParamsSchema: _lucid_evolution_lucid.TObject<{
1575
1603
  stakingManagerNft: _lucid_evolution_lucid.TObject<{
@@ -1609,7 +1637,7 @@ type StakingRedeemer = Data.Static<typeof StakingRedeemerSchema>;
1609
1637
  declare function serialiseStakingRedeemer(redeemer: StakingRedeemer): Redeemer;
1610
1638
  declare function castStakingParams(params: StakingParams): Data;
1611
1639
 
1612
- declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refOutRef?: OutRef): Promise<[TxBuilder, AssetClass]>;
1640
+ declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refUtxo?: UtxoOrOutRef): Promise<[TxBuilder, AssetClass]>;
1613
1641
  declare function feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;
1614
1642
 
1615
1643
  declare function mkInterestOracleValidator(params: InterestOracleParams): SpendingValidator;
@@ -1635,18 +1663,7 @@ declare function castVersionRecordTokenParams(params: VersionRecordTokenParams):
1635
1663
  declare function mkVersionRecordTokenPolicy(params: VersionRecordTokenParams): MintingPolicy;
1636
1664
  declare const mkVersionRegistryValidator: () => SpendingValidator;
1637
1665
 
1638
- declare function treasuryFeeTx(fee: bigint, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, treasuryOref: OutRef): Promise<void>;
1639
-
1640
- /**
1641
- * Returns the inline datum.
1642
- * Throws when the UTXO doesn't have an inline datum
1643
- * (i.e. in case it has hash datum or no datum).
1644
- */
1645
- declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
1646
- declare function addrDetails(lucid: LucidEvolution): Promise<[Credential, Credential | undefined]>;
1647
- declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential): Address;
1648
- declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
1649
- declare function balance(utxos: UTxO[]): Assets;
1666
+ declare function treasuryFeeTx(fee: bigint, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, treasury: UtxoOrOutRef): Promise<void>;
1650
1667
 
1651
1668
  declare const initSpSnapshot: StabilityPoolSnapshot;
1652
1669
  declare const initEpochToScaleToSumMap: () => EpochToScaleToSum;
@@ -2060,14 +2077,14 @@ declare function randomLrpsSubsetSatisfyingTargetLovelaces(iasset: string, targe
2060
2077
  maxLrpsInTx: number, randomiseFn?: (arr: [UTxO, LRPDatum][]) => [UTxO, LRPDatum][]): [UTxO, LRPDatum][];
2061
2078
 
2062
2079
  declare function openLrp(assetTokenName: string, lovelacesAmt: bigint, maxPrice: OnChainDecimal, lucid: LucidEvolution, sysParams: SystemParams, lrpStakeCredential?: Credential): Promise<TxBuilder>;
2063
- declare function cancelLrp(lrpOutRef: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2080
+ declare function cancelLrp(lrp: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2064
2081
  declare function redeemLrp(
2065
2082
  /** The tuple represents the LRP outref and the amount of iAssets to redeem against it. */
2066
- redemptionLrpsData: [OutRef, bigint][], priceOracleOutRef: OutRef, iassetOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;
2083
+ redemptionLrpsData: [OutRef, bigint][], priceOracle: UtxoOrOutRef, iasset: UtxoOrOutRef, lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;
2067
2084
  /**
2068
2085
  * Create Tx adjusting the LRP and claiming the received iAssets
2069
2086
  */
2070
- declare function adjustLrp(lucid: LucidEvolution, lrpOutRef: OutRef,
2087
+ declare function adjustLrp(lucid: LucidEvolution, lrp: UtxoOrOutRef,
2071
2088
  /**
2072
2089
  * A positive amount increases the lovelaces in the LRP,
2073
2090
  * and a negative amount takes lovelaces from the LRP.
@@ -2076,7 +2093,7 @@ lovelacesAdjustAmt: bigint, newMaxPrice: OnChainDecimal | undefined, sysParams:
2076
2093
  /**
2077
2094
  * Create Tx claiming the received iAssets.
2078
2095
  */
2079
- declare function claimLrp(lucid: LucidEvolution, lrpOutRef: OutRef, sysParams: SystemParams): Promise<TxBuilder>;
2096
+ declare function claimLrp(lucid: LucidEvolution, lrp: UtxoOrOutRef, sysParams: SystemParams): Promise<TxBuilder>;
2080
2097
 
2081
2098
  declare const mkLrpValidator: (params: LRPParams) => SpendingValidator;
2082
2099
  declare const mkLrpValidatorFromSP: (params: LrpParamsSP) => SpendingValidator;
@@ -2125,7 +2142,7 @@ declare function assetClassValueOf(assets: Assets, assetClass: AssetClass): bigi
2125
2142
  declare function negateAssets(assets: Assets): Assets;
2126
2143
  declare function isAssetsZero(assets: Assets): boolean;
2127
2144
 
2128
- declare function leverageCdpWithLrp(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef, iassetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, allLrps: [UTxO, LRPDatum][], currentSlot: number): Promise<TxBuilder>;
2145
+ declare function leverageCdpWithLrp(leverage: number, baseCollateral: bigint, priceOracle: UtxoOrOutRef, iasset: UtxoOrOutRef, cdpCreator: UtxoOrOutRef, interestOracle: UtxoOrOutRef, collector: UtxoOrOutRef, sysParams: SystemParams, lucid: LucidEvolution, allLrps: [UTxO, LRPDatum][], currentSlot: number): Promise<TxBuilder>;
2129
2146
 
2130
2147
  /**
2131
2148
  * The following is the math related to the leverage calculations.
@@ -2227,4 +2244,4 @@ declare function calculateCollateralRatioFromLeverage(iasset: string, leverage:
2227
2244
  */
2228
2245
  declare function calculateLeverageFromCollateralRatio(iasset: string, collateralRatioPercentage: OnChainDecimal, baseCollateral: bigint, iassetPrice: OnChainDecimal, debtMintingFeePercentage: OnChainDecimal, redemptionReimbursementPercentage: OnChainDecimal, lrpParams: LrpParamsSP, allLrps: [UTxO, LRPDatum][]): number | undefined;
2229
2246
 
2230
- export { type AccountAction, type AccountContent, AccountContentSchema, ActionReturnDatum, ActionReturnDatumSchema, type AddressCredential, type AddressCredentialOrDatum, AddressD, type AddressSP, AddressSchema, type Amount, type AssetClass, type AssetClassSP, AssetClassSchema, type AuthTokenPolicies, type CDPContent, CDPContentSchema, CDPCreatorParams, type CDPCreatorParamsSP, CDPCreatorRedeemer, type CDPDatum, CDPDatumSchema, type CDPFees, CDPFeesSchema, type CDPRedeemer, type CdpParams, type CdpParamsSP, type CollectorParamsSP, CredentialD, CredentialSchema, type CurrencySymbol, type DistributionParams, type EpochToScaleToSum, EpochToScaleToSumSchema, ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type FeedInterestOracleRedeemer, FeedInterestOracleRedeemerSchema, type GovDatum, GovParams, type GovParamsSP, GovRedeemer, type IAssetContent, IAssetContentSchema, type IAssetOutput, IAssetPriceInfoSchema, type Input, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type LRPDatum, LRPDatumSchema, type LRPParams, LRPParamsSchema, type LRPRedeemer, LRPRedeemerSchema, type LrpOutput, type LrpParamsSP, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_LRP_COLLATERAL_AMT, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleAssetNft, OracleAssetNftSchema, type Output, type OutputReference, OutputReferenceSchema, PollManagerParams, type PollManagerParamsSP, PollManagerRedeemer, PollShardParams, type PollShardParamsSP, PollShardRedeemer, type PriceOracleDatum, PriceOracleDatumSchema, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PubKeyHash, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StabilityPoolSnapshot, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type SystemParams, type TokenName, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, addressFromBech32, addressToBech32, adjust, adjustLrp, adjustSpAccount, adjustStakingPosition, adjustmentHelper, annulRequest, approximateLeverageRedemptions, assetClassToUnit, assetClassValueOf, balance, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculateTotalAdaForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelLrp, castCDPCreatorParams, castCdpParams, castExecuteParams, castGovParams, castInterestOracleParams, castLrpParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimLrp, closeCdp, closeSpAccount, closeStakingPosition, collectorFeeTx, computeInterestLovelacesFor100PercentCR, createProposal, createScriptAddress, createShardsChunks, createSpAccount, depositCdp, distributeAda, distributeReward, endProposal, executeProposal, feedInterestOracle, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromSPInteger, fromSysParamsScriptCredential, fromSystemParamsAsset, fromSystemParamsScriptRef, getAccountFund, getAccountReward, getInlineDatumOrThrow, getRandomElement, getSumFromEpochToScaleToSum, initEpochToScaleToSumMap, initSpSnapshot, insertSorted, isAssetsZero, leverageCdpWithLrp, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, lovelacesAmt, lrpRedeemableLovelacesInclReimb, matchSingle, mergeCdps, mergeShards, mintCdp, mkAssetsOf, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkInterestOracleValidator, mkLovelacesOf, mkLrpValidator, mkLrpValidatorFromSP, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkSPInteger, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, negateAssets, oneShotMintTx, openCdp, openLrp, openStakingPosition, parseAccountDatum, parseCdpDatum, parseCdpDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestOracleDatum, parseLrpDatum, parseLrpDatumOrThrow, parsePriceOracleDatum, parseSnapshotEpochToScaleToSumDatum, parseStabilityPoolDatum, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, processSpRequest, randomLrpsSubsetSatisfyingTargetLovelaces, redeemCdp, redeemLrp, rewardSnapshotPrecision, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseCDPCreatorDatum, serialiseCDPCreatorRedeemer, serialiseCdpDatum, serialiseCdpRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseInterestOracleDatum, serialiseLrpDatum, serialiseLrpRedeemer, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStakingDatum, serialiseStakingRedeemer, setSumInEpochToScaleToSum, shuffle, spAdd, spDiv, spMul, spSub, startInterestOracle, summarizeActualLeverageRedemptions, toSystemParamsAsset, treasuryFeeTx, updatePoolSnapshotWithdrawalFee, updateStakingLockedAmount, vote, withdrawCdp };
2247
+ export { type AccountAction, type AccountContent, AccountContentSchema, ActionReturnDatum, ActionReturnDatumSchema, type AddressCredential, type AddressCredentialOrDatum, AddressD, type AddressSP, AddressSchema, type Amount, type AssetClass, type AssetClassSP, AssetClassSchema, type AuthTokenPolicies, type CDPContent, CDPContentSchema, CDPCreatorParams, type CDPCreatorParamsSP, CDPCreatorRedeemer, type CDPDatum, CDPDatumSchema, type CDPFees, CDPFeesSchema, type CDPRedeemer, type CdpParams, type CdpParamsSP, type CollectorParamsSP, CredentialD, CredentialSchema, type CurrencySymbol, type DistributionParams, type EpochToScaleToSum, EpochToScaleToSumSchema, ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type FeedInterestOracleRedeemer, FeedInterestOracleRedeemerSchema, type GovDatum, GovParams, type GovParamsSP, GovRedeemer, type IAssetContent, IAssetContentSchema, type IAssetOutput, IAssetPriceInfoSchema, type Input, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type LRPDatum, LRPDatumSchema, type LRPParams, LRPParamsSchema, type LRPRedeemer, LRPRedeemerSchema, type LrpOutput, type LrpParamsSP, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_LRP_COLLATERAL_AMT, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleAssetNft, OracleAssetNftSchema, type Output, type OutputReference, OutputReferenceSchema, PollManagerParams, type PollManagerParamsSP, PollManagerRedeemer, PollShardParams, type PollShardParamsSP, PollShardRedeemer, type PriceOracleDatum, PriceOracleDatumSchema, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PubKeyHash, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StabilityPoolSnapshot, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type SystemParams, type TokenName, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UtxoOrOutRef, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, addressFromBech32, addressToBech32, adjust, adjustLrp, adjustSpAccount, adjustStakingPosition, adjustmentHelper, annulRequest, approximateLeverageRedemptions, assetClassToUnit, assetClassValueOf, balance, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculateTotalAdaForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelLrp, castCDPCreatorParams, castCdpParams, castExecuteParams, castGovParams, castInterestOracleParams, castLrpParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimLrp, closeCdp, closeSpAccount, closeStakingPosition, collectorFeeTx, computeInterestLovelacesFor100PercentCR, createProposal, createScriptAddress, createShardsChunks, createSpAccount, depositCdp, distributeAda, distributeReward, endProposal, executeProposal, feedInterestOracle, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromSPInteger, fromSysParamsScriptCredential, fromSystemParamsAsset, fromSystemParamsScriptRef, getAccountFund, getAccountReward, getInlineDatumOrThrow, getRandomElement, getSumFromEpochToScaleToSum, initEpochToScaleToSumMap, initSpSnapshot, insertSorted, isAssetsZero, leverageCdpWithLrp, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, lovelacesAmt, lrpRedeemableLovelacesInclReimb, matchSingle, mergeCdps, mergeShards, mintCdp, mkAssetsOf, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkInterestOracleValidator, mkLovelacesOf, mkLrpValidator, mkLrpValidatorFromSP, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkSPInteger, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, negateAssets, oneShotMintTx, openCdp, openLrp, openStakingPosition, parseAccountDatum, parseCdpDatum, parseCdpDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestOracleDatum, parseLrpDatum, parseLrpDatumOrThrow, parsePriceOracleDatum, parseSnapshotEpochToScaleToSumDatum, parseStabilityPoolDatum, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, processSpRequest, randomLrpsSubsetSatisfyingTargetLovelaces, redeemCdp, redeemLrp, resolveUtxo, rewardSnapshotPrecision, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseCDPCreatorDatum, serialiseCDPCreatorRedeemer, serialiseCdpDatum, serialiseCdpRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseInterestOracleDatum, serialiseLrpDatum, serialiseLrpRedeemer, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStakingDatum, serialiseStakingRedeemer, setSumInEpochToScaleToSum, shuffle, spAdd, spDiv, spMul, spSub, startInterestOracle, summarizeActualLeverageRedemptions, toSystemParamsAsset, treasuryFeeTx, updatePoolSnapshotWithdrawalFee, updateStakingLockedAmount, vote, withdrawCdp };