@indigo-labs/indigo-sdk 0.4.4 → 0.5.0

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.
Files changed (49) hide show
  1. package/dist/index.d.mts +102 -40
  2. package/dist/index.d.ts +102 -40
  3. package/dist/index.js +900 -801
  4. package/dist/index.mjs +339 -256
  5. package/package.json +2 -2
  6. package/src/contracts/cdp/helpers.ts +7 -6
  7. package/src/contracts/cdp/transactions.ts +8 -29
  8. package/src/contracts/gov/transactions.ts +12 -16
  9. package/src/contracts/iasset/helpers.ts +2 -7
  10. package/src/contracts/initialize/actions.ts +0 -2
  11. package/src/contracts/initialize/helpers.ts +0 -4
  12. package/src/contracts/interest-collection/transactions.ts +2 -5
  13. package/src/contracts/interest-oracle/helpers.ts +4 -0
  14. package/src/contracts/interest-oracle/transactions.ts +1 -4
  15. package/src/contracts/price-oracle/helpers.ts +5 -11
  16. package/src/contracts/price-oracle/transactions.ts +2 -7
  17. package/src/contracts/rob/transactions.ts +0 -2
  18. package/src/contracts/rob-leverage/transactions.ts +1 -4
  19. package/src/contracts/stability-pool/transactions.ts +2 -8
  20. package/src/contracts/stableswap/helpers.ts +369 -1
  21. package/src/contracts/stableswap/transactions.ts +43 -191
  22. package/src/contracts/staking/transactions.ts +2 -7
  23. package/tests/cdp/actions.ts +0 -11
  24. package/tests/cdp/cdp-helpers.ts +2 -2
  25. package/tests/cdp/cdp-queries.ts +1 -3
  26. package/tests/cdp/cdp.test.ts +409 -620
  27. package/tests/cdp/transactions-mutated.ts +30 -25
  28. package/tests/endpoints/initialize.ts +0 -2
  29. package/tests/gov/actions.ts +7 -32
  30. package/tests/gov/gov.test.ts +169 -401
  31. package/tests/indigo-test-helpers.ts +0 -1
  32. package/tests/initialize.test.ts +15 -20
  33. package/tests/interest-collection/interest-collection.test.ts +0 -4
  34. package/tests/interest-oracle.test.ts +1 -8
  35. package/tests/price-oracle/actions.ts +6 -8
  36. package/tests/price-oracle/price-oracle.test.ts +1 -13
  37. package/tests/price-oracle/transactions-mutated.ts +1 -4
  38. package/tests/pyth/pyth-indigo.test.ts +8 -12
  39. package/tests/pyth/pyth.test.ts +1 -2
  40. package/tests/rob/actions.ts +0 -2
  41. package/tests/rob/rob-leverage.test.ts +164 -220
  42. package/tests/rob/rob.test.ts +158 -263
  43. package/tests/rob/transactions-mutated.ts +7 -18
  44. package/tests/stability-pool/actions.ts +4 -8
  45. package/tests/stability-pool.test.ts +164 -255
  46. package/tests/stableswap/stableswap-actions.ts +0 -1
  47. package/tests/stableswap/stableswap.test.ts +226 -4
  48. package/tests/staking.test.ts +2 -13
  49. package/tests/treasury/treasury.test.ts +6 -30
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
2
- import { Data, UTxO, Credential, OutRef, LucidEvolution, TxBuilder, Assets, Network, WithdrawalValidator, SpendingValidator, MintingPolicy, Address, PolicyId, ScriptHash, ProtocolParameters, OutputDatum, Script, Datum } from '@lucid-evolution/lucid';
2
+ import { Data, UTxO, Credential, OutRef, LucidEvolution, TxBuilder, Assets, WithdrawalValidator, SpendingValidator, MintingPolicy, Address, PolicyId, Network, ScriptHash, ProtocolParameters, OutputDatum, Script, Datum } from '@lucid-evolution/lucid';
3
3
  import { AssetClass } from '@3rd-eye-labs/cardano-offchain-common';
4
4
  import * as Core from '@evolution-sdk/evolution';
5
5
  import { TSchema, Schema, Data as Data$1 } from '@evolution-sdk/evolution';
@@ -575,33 +575,33 @@ declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysPara
575
575
  /**
576
576
  * `undefined` in case using direct treasury payment.
577
577
  */
578
- treasuryOref: OutRef | undefined, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
578
+ treasuryOref: OutRef | undefined, lucid: LucidEvolution, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
579
579
  declare function adjustCdp(collateralAdjustment: bigint, debtAdjustment: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef,
580
580
  /**
581
581
  * `undefined` in case using direct treasury payment.
582
582
  */
583
- treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
583
+ treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
584
584
  declare function depositCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef,
585
585
  /**
586
586
  * `undefined` in case using direct treasury payment.
587
587
  */
588
- treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
588
+ treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
589
589
  declare function withdrawCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef,
590
590
  /**
591
591
  * `undefined` in case using direct treasury payment.
592
592
  */
593
- treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
593
+ treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
594
594
  declare function mintCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef,
595
595
  /**
596
596
  * `undefined` in case using direct treasury payment.
597
597
  */
598
- treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
598
+ treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
599
599
  declare function burnCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef,
600
600
  /**
601
601
  * `undefined` in case using direct treasury payment.
602
602
  */
603
- treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
604
- declare function closeCdp(cdpOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef, interestCollectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
603
+ treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
604
+ declare function closeCdp(cdpOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef, interestCollectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
605
605
  declare function redeemCdp(
606
606
  /**
607
607
  * When the goal is to redeem the maximum possible, just pass in the total minted amount of the CDP.
@@ -611,8 +611,8 @@ attemptedRedemptionIAssetAmt: bigint, cdpOref: OutRef, iassetOref: OutRef, colla
611
611
  /**
612
612
  * `undefined` in case using direct treasury payment.
613
613
  */
614
- treasuryOref: OutRef | undefined, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, _pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
615
- declare function freezeCdp(cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
614
+ treasuryOref: OutRef | undefined, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, pythMessage?: string | undefined, _pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
615
+ declare function freezeCdp(cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
616
616
  declare function liquidateCdp(cdpOref: OutRef, stabilityPoolOref: OutRef, interestCollectorOref: OutRef,
617
617
  /**
618
618
  * `undefined` in case using direct treasury payment.
@@ -822,7 +822,12 @@ declare function rationalToFloat(a: Rational): number;
822
822
  * Amount of iasset equal in value to the given number of collateral amount.
823
823
  */
824
824
  declare function iassetValueOfCollateral(collateralAmt: bigint, oraclePrice: Rational): bigint;
825
- declare function cdpCollateralRatioPercentage(currentSlot: number, iassetPrice: Rational, cdpUtxoAssets: Assets, cdpContent: CDPContent, interestOracleDatum: InterestOracleDatum, network: Network): number;
825
+ declare function cdpCollateralRatioPercentage(
826
+ /**
827
+ * Should be ideally the result of the following: lucid.slotToUnixTime(lucid.currentSlot()).
828
+ * Otherwise, the unix timestamp should suffice, but might not be 100% precise as on-chain.
829
+ */
830
+ now: bigint, iassetPrice: Rational, cdpUtxoAssets: Assets, cdpContent: CDPContent, interestOracleDatum: InterestOracleDatum): number;
826
831
  /**
827
832
  * The amount of iassets to redeem to reach the RMR.
828
833
  */
@@ -2354,7 +2359,7 @@ declare function serialisePollDatum(d: PollDatum): string;
2354
2359
  /**
2355
2360
  * Returns the new PollId.
2356
2361
  */
2357
- declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, govOref: OutRef,
2362
+ declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, govOref: OutRef,
2358
2363
  /**
2359
2364
  * This has to be passed only in case of createAsset proposal
2360
2365
  */
@@ -2366,10 +2371,10 @@ declare function createShardsChunks(
2366
2371
  /**
2367
2372
  * This gets automatically capped to total shards count.
2368
2373
  */
2369
- chunkSize: bigint, pollManagerOref: OutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
2370
- declare function vote(voteOption: VoteOption, pollShardOref: OutRef, stakingPositionOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
2371
- declare function mergeShards(pollManagerOref: OutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
2372
- declare function endProposal(pollManagerOref: OutRef, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
2374
+ chunkSize: bigint, pollManagerOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2375
+ declare function vote(voteOption: VoteOption, pollShardOref: OutRef, stakingPositionOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2376
+ declare function mergeShards(pollManagerOref: OutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2377
+ declare function endProposal(pollManagerOref: OutRef, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2373
2378
  declare function executeProposal(executeOref: OutRef, govOref: OutRef, treasuryWithdrawalOref: OutRef | null, allIAssetOrefs: OutRef[] | null,
2374
2379
  /**
2375
2380
  * This for either Propose IAsset, Modify IAsset or Add Collateral asset proposals.
@@ -2379,7 +2384,7 @@ iAssetOref: OutRef | null,
2379
2384
  * This is when adding new collateral asset. It should be all collateral assets of the given iAsset
2380
2385
  * where it's adding the new collateral asset.
2381
2386
  */
2382
- allCollateralAssetsOrefsOfIAsset: OutRef[] | null, collateralAssetOref: OutRef | null, stableswapPoolOrCdpCreatorOref: OutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
2387
+ allCollateralAssetsOrefsOfIAsset: OutRef[] | null, collateralAssetOref: OutRef | null, stableswapPoolOrCdpCreatorOref: OutRef | null, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2383
2388
 
2384
2389
  declare const GovParamsSchema: _lucid_evolution_lucid.TObject<{
2385
2390
  govNFT: _lucid_evolution_lucid.TObject<{
@@ -2423,8 +2428,8 @@ declare const mkGovValidator: (params: GovParams) => SpendingValidator;
2423
2428
  declare const mkGovValidatorFromSP: (params: GovParamsSP) => SpendingValidator;
2424
2429
 
2425
2430
  declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
2426
- declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
2427
- declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
2431
+ declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
2432
+ declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
2428
2433
  declare function distributeAda(stakingManagerRef: OutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2429
2434
 
2430
2435
  declare const StakingPosLockedAmtSchema: TSchema.Array<TSchema.Tuple<[TSchema.Integer, TSchema.Struct<{
@@ -2541,11 +2546,16 @@ type InterestOracleParams = Data.Static<typeof InterestOracleParamsSchema>;
2541
2546
  declare function castInterestOracleParams(params: InterestOracleParams): Data;
2542
2547
 
2543
2548
  declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refOutRef?: OutRef): Promise<[TxBuilder, AssetClass]>;
2544
- declare function feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, currentSlot: number, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;
2549
+ declare function feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;
2545
2550
 
2546
2551
  declare function calculateUnitaryInterest(timePeriod: bigint, interestRate: bigint): bigint;
2547
2552
  declare function calculateUnitaryInterestSinceOracleLastUpdated(now: bigint, oracleDatum: InterestOracleDatum): bigint;
2548
- declare function calculateAccruedInterest(now: bigint, unitaryInterestSnapshot: bigint, mintedAmount: bigint, interestLastSettled: bigint, interestOracleDatum: InterestOracleDatum): bigint;
2553
+ declare function calculateAccruedInterest(
2554
+ /**
2555
+ * Should be ideally the result of the following: lucid.slotToUnixTime(lucid.currentSlot()).
2556
+ * Otherwise, the unix timestamp should suffice, but might not be 100% precise as on-chain.
2557
+ */
2558
+ now: bigint, unitaryInterestSnapshot: bigint, mintedAmount: bigint, interestLastSettled: bigint, interestOracleDatum: InterestOracleDatum): bigint;
2549
2559
 
2550
2560
  declare const MultisigSchema: TSchema.Union<[TSchema.Struct<{
2551
2561
  Signature: TSchema.Struct<{
@@ -2618,7 +2628,7 @@ declare function serialiseInterestCollectionDatum(datum: InterestCollectionDatum
2618
2628
  declare function mkInterestCollectionValidator(params: InterestCollectionParams): SpendingValidator;
2619
2629
  declare const mkInterestCollectionValidatorFromSP: (params: InterestCollectionParamsSP) => SpendingValidator;
2620
2630
 
2621
- declare function batchCollectInterest(collateralAssetOref: OutRef, interestCollectorOutRef: OutRef, interestOracleOutRef: OutRef, cdpOutRefs: OutRef[], params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
2631
+ declare function batchCollectInterest(collateralAssetOref: OutRef, interestCollectorOutRef: OutRef, interestOracleOutRef: OutRef, cdpOutRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2622
2632
  declare function collectInterestTx(value: Assets, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, interestCollectorOref: OutRef): Promise<UTxO>;
2623
2633
  declare function distributeInterest(interestCollectorOutRefs: OutRef[], interestAdminOutRef: OutRef, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
2624
2634
  declare function updatePermissions(interestAdminOutRef: OutRef, govOref: OutRef, newAdminPermissions: Multisig, expectedSigners: string[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
@@ -3638,7 +3648,7 @@ declare function processSpRequest(stabilityPoolUtxo: UTxO, accountUtxo: UTxO, iA
3638
3648
  /**
3639
3649
  * For performance provide only the ones related to the pool's iAsset.
3640
3650
  */
3641
- allE2s2sSnapshotOrefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
3651
+ allE2s2sSnapshotOrefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
3642
3652
  declare function createE2s2sSnapshots(stabilityPoolOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
3643
3653
  declare function annulRequest(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
3644
3654
 
@@ -3907,7 +3917,7 @@ declare function redeemRob(
3907
3917
  * The tuple represents the ROB UTXO and the amount to payout for a redemption. In case of buy order,
3908
3918
  * it's denominated in iAssets, in case of sell order, it's denominated in collateral asset.
3909
3919
  */
3910
- redemptionRobsData: [OutRef, bigint][], priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams, currentSlot: number, pythMessage?: string | undefined, pythStateOutRef?: OutRef | undefined): Promise<TxBuilder>;
3920
+ redemptionRobsData: [OutRef, bigint][], priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams, pythMessage?: string | undefined, pythStateOutRef?: OutRef | undefined): Promise<TxBuilder>;
3911
3921
  /**
3912
3922
  * Create Tx adjusting the ROB and claiming the received iAssets
3913
3923
  */
@@ -3949,7 +3959,7 @@ declare function mkOneShotPolicy(params: OneShotParams): MintingPolicy;
3949
3959
  declare function oneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<[TxBuilder, PolicyId]>;
3950
3960
  declare function runOneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<PolicyId>;
3951
3961
 
3952
- 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][], currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
3962
+ 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>;
3953
3963
 
3954
3964
  declare const OnChainDecimalSchema: TSchema.Struct<{
3955
3965
  getOnChainInt: TSchema.Integer;
@@ -4059,8 +4069,8 @@ declare function calculateCollateralRatioFromLeverage(iasset: Uint8Array<ArrayBu
4059
4069
  */
4060
4070
  declare function calculateLeverageFromCollateralRatio(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, collateralRatio: Rational, baseCollateral: bigint, iassetPrice: Rational, debtMintingFeeRatio: Rational, redemptionReimbursementRatio: Rational, allLrps: [UTxO, RobDatum][]): number | undefined;
4061
4071
 
4062
- declare function startPriceOracleTx(lucid: LucidEvolution, assetName: string, startPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, refOutRef?: OutRef, auxiliaryData?: Core.Data.Data): Promise<[TxBuilder, AssetClass]>;
4063
- declare function feedPriceOracleTx(lucid: LucidEvolution, oracleOref: OutRef, newPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, auxiliaryData?: Core.Data.Data): Promise<TxBuilder>;
4072
+ declare function startPriceOracleTx(lucid: LucidEvolution, assetName: string, startPrice: Rational, oracleParams: PriceOracleParams, refOutRef?: OutRef, auxiliaryData?: Core.Data.Data): Promise<[TxBuilder, AssetClass]>;
4073
+ declare function feedPriceOracleTx(lucid: LucidEvolution, oracleOref: OutRef, newPrice: Rational, oracleParams: PriceOracleParams, auxiliaryData?: Core.Data.Data): Promise<TxBuilder>;
4064
4074
 
4065
4075
  declare function mkPriceOracleValidator(params: PriceOracleParams): SpendingValidator;
4066
4076
 
@@ -4434,11 +4444,11 @@ declare function initInterestCollector(lucid: LucidEvolution, interestCollection
4434
4444
  declare function initCDPCreator(lucid: LucidEvolution, cdpCreatorParams: CDPCreatorParamsSP, numCdpCreators: bigint): Promise<void>;
4435
4445
  declare function initTreasury(lucid: LucidEvolution, treasuryParams: TreasuryParamsSP, daoAsset: AssetClass, indyAsset: AssetClass, treasuryIndyAmount: bigint, numTreasuryCollectors: bigint): Promise<void>;
4436
4446
  declare function initStakingManager(lucid: LucidEvolution, stakingParams: StakingParamsSP): Promise<void>;
4437
- declare function handleOracleForCollateralAsset(lucid: LucidEvolution, iasset: InitialAssetParam, collateralAsset: InitialCollateralAssetParam, pythConfig: PythConfig, currentSlot: number): Promise<{
4447
+ declare function handleOracleForCollateralAsset(lucid: LucidEvolution, iasset: InitialAssetParam, collateralAsset: InitialCollateralAssetParam, pythConfig: PythConfig): Promise<{
4438
4448
  info: IAssetPriceInfo;
4439
4449
  params: PriceOracleParams | undefined;
4440
4450
  }>;
4441
- declare function initializeAsset(lucid: LucidEvolution, iassetParams: IAssetParamsSP, iassetToken: AssetClass, collateralAssetAuthToken: AssetClass, cdpAuthToken: AssetClass, cdpParams: CdpParamsSP, stableswapValidatorHash: string, stabilityPoolParams: StabilityPoolParamsSP, stabilityPoolToken: AssetClass, asset: InitialAssetParam, pythConfig: PythConfig, currentSlot: number): Promise<AssetInfo>;
4451
+ declare function initializeAsset(lucid: LucidEvolution, iassetParams: IAssetParamsSP, iassetToken: AssetClass, collateralAssetAuthToken: AssetClass, cdpAuthToken: AssetClass, cdpParams: CdpParamsSP, stableswapValidatorHash: string, stabilityPoolParams: StabilityPoolParamsSP, stabilityPoolToken: AssetClass, asset: InitialAssetParam, pythConfig: PythConfig): Promise<AssetInfo>;
4442
4452
  declare function initGovernance(lucid: LucidEvolution, governanceParams: GovParamsSP, govToken: AssetClass, initialAssets: InitialAssetParam[], protocolParams: ProtocolParams): Promise<void>;
4443
4453
  declare function mintAuthTokenDirect(lucid: LucidEvolution, asset: AssetClass, tokenName: string, amount: bigint): Promise<void>;
4444
4454
 
@@ -4447,7 +4457,7 @@ declare function mintAuthTokenDirect(lucid: LucidEvolution, asset: AssetClass, t
4447
4457
  * Caller is responsible for creating the Pyth state asset before calling this.
4448
4458
  */
4449
4459
  declare function initPythConfig(lucid: LucidEvolution, initialAssets: InitialAssetParam[], pythStateAsset: AssetClass): Promise<PythConfig>;
4450
- declare function init(lucid: LucidEvolution, defaultInitialAssets: InitialAssetParam[], currentSlot: number, mkPythBasedAssets: ((pythStateNft: AssetClass) => InitialAssetParam[]) | undefined, protocolParams: ProtocolParams, initOptions: InitializeOptions, spStakingCred?: ScriptCredential | undefined, treasuryStakingCred?: ScriptCredential | undefined): Promise<[SystemParams, AssetInfo[]]>;
4460
+ declare function init(lucid: LucidEvolution, defaultInitialAssets: InitialAssetParam[], mkPythBasedAssets: ((pythStateNft: AssetClass) => InitialAssetParam[]) | undefined, protocolParams: ProtocolParams, initOptions: InitializeOptions, spStakingCred?: ScriptCredential | undefined, treasuryStakingCred?: ScriptCredential | undefined): Promise<[SystemParams, AssetInfo[]]>;
4451
4461
 
4452
4462
  /**
4453
4463
  * Types mirroring the Aiken Pyth parser (lib/pyth).
@@ -4554,7 +4564,7 @@ type Interval = {
4554
4564
  validFrom: number;
4555
4565
  validTo: number;
4556
4566
  };
4557
- declare function attachOracle(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, priceInfo: IAssetPriceInfo, priceOracleOref: OutRef | undefined, pythStateOref: OutRef | undefined, pythMessage: string | undefined, pythConfig: PythConfig, biasTime: bigint, currentSlot: number, lucid: LucidEvolution, tx: TxBuilder): Promise<{
4567
+ declare function attachOracle(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, priceInfo: IAssetPriceInfo, priceOracleOref: OutRef | undefined, pythStateOref: OutRef | undefined, pythMessage: string | undefined, pythConfig: PythConfig, biasTime: bigint, lucid: LucidEvolution, tx: TxBuilder): Promise<{
4558
4568
  interval: Interval;
4559
4569
  referenceInputs: UTxO[];
4560
4570
  }>;
@@ -4570,14 +4580,6 @@ declare function findCollateralAsset(lucid: LucidEvolution, sysParams: SystemPar
4570
4580
  */
4571
4581
  iassetName: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass): Promise<CollateralAssetOutput>;
4572
4582
 
4573
- declare const BASE_MAX_EXECUTION_FEE = 1620000n;
4574
- declare function createDestinationDatum(datum: Data$1.Data | null, outRef: OutRef): string;
4575
-
4576
- 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>;
4577
- declare function cancelStableswapOrder(stableswapOrderOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
4578
- declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
4579
- declare function updateStableswapPoolFees(stableswapPoolOutRef: OutRef, stableswapFeeOutRef: OutRef, newMintingFeeRatio: Rational | null, newRedemptionFeeRatio: Rational | null, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
4580
-
4581
4583
  declare const StableswapOrderDatumSchema: TSchema.Struct<{
4582
4584
  iasset: TSchema.ByteArray;
4583
4585
  collateralAsset: TSchema.Struct<{
@@ -4636,6 +4638,66 @@ declare function serialiseStableswapOrderRedeemer(r: StableswapOrderRedeemer): s
4636
4638
  declare function parseStableswapOrderRedeemer(redeemerCborHex: string): option.Option<StableswapOrderRedeemer>;
4637
4639
  declare function parseStableswapOrderRedeemerOrThrow(redeemerCborHex: string): StableswapOrderRedeemer;
4638
4640
 
4641
+ declare const BASE_MAX_EXECUTION_FEE = 1620000n;
4642
+ type OrderProcessConfig = {
4643
+ /**
4644
+ * Whether to ignore that an order has max execution fee set lower
4645
+ * than the threshold (i.e. the processor might be paying the remaining cardano tx fee).
4646
+ *
4647
+ * The default should be `false`. In case, owner wants to process
4648
+ * such order himself, he can ignore the constraint.
4649
+ */
4650
+ ignoreMaxExecutionFeeConstraint: boolean;
4651
+ };
4652
+ declare const defaultOrderProcessingConfig: OrderProcessConfig;
4653
+ declare function createDestinationDatum(datum: Data$1.Data | null, outRef: OutRef): string;
4654
+ type StableswapInfo = {
4655
+ suppliedIasset: bigint;
4656
+ suppliedCollateralAsset: bigint;
4657
+ owedIasset: bigint;
4658
+ owedCollateralAsset: bigint;
4659
+ redemptionFee: bigint;
4660
+ mintingFee: bigint;
4661
+ };
4662
+ type StableswapOrderInfo = {
4663
+ order: ParsedOutput<StableswapOrderDatum>;
4664
+ orderType: 'MINTING' | 'REDEEMING';
4665
+ swapInfo: StableswapInfo;
4666
+ };
4667
+ /**
4668
+ * Determine the PSM order type.
4669
+ */
4670
+ declare function psmOrderType(order: ParsedOutput<StableswapOrderDatum>, sysParams: SystemParams): {
4671
+ type: 'MINTING';
4672
+ suppliedCollateral: bigint;
4673
+ } | {
4674
+ type: 'REDEEMING';
4675
+ suppliedIassets: bigint;
4676
+ } | {
4677
+ type: 'ERROR';
4678
+ reason: string;
4679
+ };
4680
+ type SummaryResult = {
4681
+ _tag: 'SUCCESS';
4682
+ result: StableswapOrderInfo;
4683
+ } | {
4684
+ _tag: 'ERROR';
4685
+ reason: string;
4686
+ };
4687
+ /**
4688
+ * Summarise the order in detail
4689
+ */
4690
+ declare function summariseOrder(order: ParsedOutput<StableswapOrderDatum>, psmPool: ParsedOutput<StableswapPoolContent>, sysParams: SystemParams, orderProcessingConfig: OrderProcessConfig): SummaryResult;
4691
+ /**
4692
+ * Pick only orders that are valid and can be processed based on available liquidity.
4693
+ */
4694
+ declare function pickValidSatisfiableOrders(orders: ParsedOutput<StableswapOrderDatum>[], pool: ParsedOutput<StableswapPoolContent>, sysParams: SystemParams, orderProcessingConfig: OrderProcessConfig): ParsedOutput<StableswapOrderDatum>[];
4695
+
4696
+ 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>;
4697
+ declare function cancelStableswapOrder(stableswapOrderOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
4698
+ declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, orderProcessingConfig?: OrderProcessConfig): Promise<TxBuilder>;
4699
+ declare function updateStableswapPoolFees(stableswapPoolOutRef: OutRef, stableswapFeeOutRef: OutRef, newMintingFeeRatio: Rational | null, newRedemptionFeeRatio: Rational | null, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
4700
+
4639
4701
  declare const StableswapParamsSchema: _lucid_evolution_lucid.TObject<{
4640
4702
  iassetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
4641
4703
  cdpToken: _lucid_evolution_lucid.TObject<{
@@ -4661,4 +4723,4 @@ declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;
4661
4723
 
4662
4724
  declare const alwaysFailValidator: SpendingValidator;
4663
4725
 
4664
- export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, 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 StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectPriceFeedIds, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, derivePythPrice, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findAdminInterestCollectors, findAllInterestCollectors, findAllTreasuryUtxos, findAllTreasuryUtxosWithNonAdaAsset, findCollateralAsset, findE2s2sSnapshots, findIAsset, findRandomCdpCreator, findRandomNonAdminInterestCollector, findRandomTreasuryUtxo, findRandomTreasuryUtxoWithAsset, findRandomTreasuryUtxoWithOnlyAda, findRelevantE2s2sIdxs, findStabilityPool, findStabilityPoolAccount, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, processSpRequest, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, rewardsPerAsset, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
4726
+ export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type OrderProcessConfig, type Output, PRICE_UPDATE_MAGIC, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, 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 StableswapInfo, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderInfo, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectPriceFeedIds, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, defaultOrderProcessingConfig, depositCdp, deriveAuthToken, derivePythPrice, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findAdminInterestCollectors, findAllInterestCollectors, findAllTreasuryUtxos, findAllTreasuryUtxosWithNonAdaAsset, findCollateralAsset, findE2s2sSnapshots, findIAsset, findRandomCdpCreator, findRandomNonAdminInterestCollector, findRandomTreasuryUtxo, findRandomTreasuryUtxoWithAsset, findRandomTreasuryUtxoWithOnlyAda, findRelevantE2s2sIdxs, findStabilityPool, findStabilityPoolAccount, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, pickValidSatisfiableOrders, processSpRequest, psmOrderType, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, rewardsPerAsset, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summariseOrder, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };