@indigo-labs/indigo-sdk 0.3.14 → 0.3.16
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/.github/workflows/ci.yml +2 -4
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +99 -4
- package/dist/index.mjs +92 -6
- package/package.json +2 -1
- package/scripts/bench.sh +62 -0
- package/src/contracts/cdp/types-new.ts +21 -0
- package/src/contracts/gov/transactions.ts +3 -1
- package/src/contracts/poll/types-poll-new.ts +26 -0
- package/src/contracts/stability-pool/types-new.ts +26 -0
- package/src/contracts/stableswap/transactions.ts +1 -5
- package/src/contracts/staking/types-new.ts +22 -0
- package/tests/stability-pool.test.ts +1 -1
- package/vitest.config.ts +1 -1
package/.github/workflows/ci.yml
CHANGED
|
@@ -16,14 +16,12 @@ jobs:
|
|
|
16
16
|
uses: actions/checkout@v4
|
|
17
17
|
|
|
18
18
|
- name: Setup Node.js
|
|
19
|
-
uses: actions/setup-node@
|
|
19
|
+
uses: actions/setup-node@v6
|
|
20
20
|
with:
|
|
21
21
|
node-version-file: '.nvmrc'
|
|
22
22
|
|
|
23
23
|
- name: Setup pnpm
|
|
24
|
-
uses: pnpm/action-setup@
|
|
25
|
-
with:
|
|
26
|
-
version: latest
|
|
24
|
+
uses: pnpm/action-setup@v6
|
|
27
25
|
|
|
28
26
|
- name: Get pnpm store directory
|
|
29
27
|
shell: bash
|
package/dist/index.d.mts
CHANGED
|
@@ -792,6 +792,8 @@ declare const CDPDatumSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
792
792
|
}>]>;
|
|
793
793
|
type CDPDatum = typeof CDPDatumSchema.Type;
|
|
794
794
|
declare function serialiseCdpRedeemer(r: CdpRedeemer): string;
|
|
795
|
+
declare function parseCdpRedeemer(datum: string): option.Option<CdpRedeemer>;
|
|
796
|
+
declare function parseCdpRedeemerOrThrow(datum: string): CdpRedeemer;
|
|
795
797
|
declare function serialiseRedeemCdpWithdrawalRedeemer(r: RedeemCdpWithdrawalRedeemer): string;
|
|
796
798
|
declare function serialiseCdpDatum(d: CDPContent): string;
|
|
797
799
|
declare function serialiseStableswapPoolDatum(d: StableswapPoolContent): string;
|
|
@@ -2342,6 +2344,8 @@ declare const PollManagerRedeemerSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
2342
2344
|
type PollManagerRedeemer = typeof PollManagerRedeemerSchema.Type;
|
|
2343
2345
|
declare function serialisePollManagerRedeemer(r: PollManagerRedeemer): string;
|
|
2344
2346
|
declare function serialisePollShardRedeemer(r: PollShardRedeemer): string;
|
|
2347
|
+
declare function parsePollShardRedeemer(datum: string): option.Option<PollShardRedeemer>;
|
|
2348
|
+
declare function parsePollShardRedeemerOrThrow(datum: string): PollShardRedeemer;
|
|
2345
2349
|
declare function parsePollManager(datum: string): option.Option<PollManagerContent>;
|
|
2346
2350
|
declare function parsePollManagerOrThrow(datum: string): PollManagerContent;
|
|
2347
2351
|
declare function parsePollShard(datum: string): option.Option<PollShardContent>;
|
|
@@ -2537,6 +2541,8 @@ declare const StakingRedeemerSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
2537
2541
|
}>, TSchema.Literal<["Unstake"]>, TSchema.Literal<["Lock"]>, TSchema.Literal<["UpgradeVersion"]>]>;
|
|
2538
2542
|
type StakingRedeemer = typeof StakingRedeemerSchema.Type;
|
|
2539
2543
|
declare function serialiseStakingRedeemer(r: StakingRedeemer): string;
|
|
2544
|
+
declare function parseStakingRedeemer(datum: string): option.Option<StakingRedeemer>;
|
|
2545
|
+
declare function parseStakingRedeemerOrThrow(datum: string): StakingRedeemer;
|
|
2540
2546
|
declare function parseStakingPosition(datum: string): option.Option<StakingPosition>;
|
|
2541
2547
|
declare function parseStakingPositionOrThrow(datum: string): StakingPosition;
|
|
2542
2548
|
declare function parseStakingManagerDatum(datum: string): StakingManager;
|
|
@@ -3217,6 +3223,8 @@ declare const ActionReturnDatumSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
3217
3223
|
type ActionReturnDatum = typeof ActionReturnDatumSchema.Type;
|
|
3218
3224
|
declare function serialiseActionReturnDatum(d: ActionReturnDatum): string;
|
|
3219
3225
|
declare function serialiseStabilityPoolRedeemer(r: StabilityPoolRedeemer): string;
|
|
3226
|
+
declare function parseStabilityPoolRedeemer(datum: string): option.Option<StabilityPoolRedeemer>;
|
|
3227
|
+
declare function parseStabilityPoolRedeemerOrThrow(datum: string): StabilityPoolRedeemer;
|
|
3220
3228
|
declare function serialiseStabilityPoolDatum(d: typeof StabilityPoolDatumSchema.Type,
|
|
3221
3229
|
/**
|
|
3222
3230
|
* This is necessary to change only in case of execute propose asset.
|
|
@@ -4530,4 +4538,4 @@ declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;
|
|
|
4530
4538
|
|
|
4531
4539
|
declare const alwaysFailValidator: SpendingValidator;
|
|
4532
4540
|
|
|
4533
|
-
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_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, 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, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, 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, 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, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, partitionEpochToScaleToSums, processSpRequest, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, robAmtToSpend, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, 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 };
|
|
4541
|
+
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_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, 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, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, 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, 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, robAmtToSpend, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -792,6 +792,8 @@ declare const CDPDatumSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
792
792
|
}>]>;
|
|
793
793
|
type CDPDatum = typeof CDPDatumSchema.Type;
|
|
794
794
|
declare function serialiseCdpRedeemer(r: CdpRedeemer): string;
|
|
795
|
+
declare function parseCdpRedeemer(datum: string): option.Option<CdpRedeemer>;
|
|
796
|
+
declare function parseCdpRedeemerOrThrow(datum: string): CdpRedeemer;
|
|
795
797
|
declare function serialiseRedeemCdpWithdrawalRedeemer(r: RedeemCdpWithdrawalRedeemer): string;
|
|
796
798
|
declare function serialiseCdpDatum(d: CDPContent): string;
|
|
797
799
|
declare function serialiseStableswapPoolDatum(d: StableswapPoolContent): string;
|
|
@@ -2342,6 +2344,8 @@ declare const PollManagerRedeemerSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
2342
2344
|
type PollManagerRedeemer = typeof PollManagerRedeemerSchema.Type;
|
|
2343
2345
|
declare function serialisePollManagerRedeemer(r: PollManagerRedeemer): string;
|
|
2344
2346
|
declare function serialisePollShardRedeemer(r: PollShardRedeemer): string;
|
|
2347
|
+
declare function parsePollShardRedeemer(datum: string): option.Option<PollShardRedeemer>;
|
|
2348
|
+
declare function parsePollShardRedeemerOrThrow(datum: string): PollShardRedeemer;
|
|
2345
2349
|
declare function parsePollManager(datum: string): option.Option<PollManagerContent>;
|
|
2346
2350
|
declare function parsePollManagerOrThrow(datum: string): PollManagerContent;
|
|
2347
2351
|
declare function parsePollShard(datum: string): option.Option<PollShardContent>;
|
|
@@ -2537,6 +2541,8 @@ declare const StakingRedeemerSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
2537
2541
|
}>, TSchema.Literal<["Unstake"]>, TSchema.Literal<["Lock"]>, TSchema.Literal<["UpgradeVersion"]>]>;
|
|
2538
2542
|
type StakingRedeemer = typeof StakingRedeemerSchema.Type;
|
|
2539
2543
|
declare function serialiseStakingRedeemer(r: StakingRedeemer): string;
|
|
2544
|
+
declare function parseStakingRedeemer(datum: string): option.Option<StakingRedeemer>;
|
|
2545
|
+
declare function parseStakingRedeemerOrThrow(datum: string): StakingRedeemer;
|
|
2540
2546
|
declare function parseStakingPosition(datum: string): option.Option<StakingPosition>;
|
|
2541
2547
|
declare function parseStakingPositionOrThrow(datum: string): StakingPosition;
|
|
2542
2548
|
declare function parseStakingManagerDatum(datum: string): StakingManager;
|
|
@@ -3217,6 +3223,8 @@ declare const ActionReturnDatumSchema: TSchema.Union<[TSchema.Struct<{
|
|
|
3217
3223
|
type ActionReturnDatum = typeof ActionReturnDatumSchema.Type;
|
|
3218
3224
|
declare function serialiseActionReturnDatum(d: ActionReturnDatum): string;
|
|
3219
3225
|
declare function serialiseStabilityPoolRedeemer(r: StabilityPoolRedeemer): string;
|
|
3226
|
+
declare function parseStabilityPoolRedeemer(datum: string): option.Option<StabilityPoolRedeemer>;
|
|
3227
|
+
declare function parseStabilityPoolRedeemerOrThrow(datum: string): StabilityPoolRedeemer;
|
|
3220
3228
|
declare function serialiseStabilityPoolDatum(d: typeof StabilityPoolDatumSchema.Type,
|
|
3221
3229
|
/**
|
|
3222
3230
|
* This is necessary to change only in case of execute propose asset.
|
|
@@ -4530,4 +4538,4 @@ declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;
|
|
|
4530
4538
|
|
|
4531
4539
|
declare const alwaysFailValidator: SpendingValidator;
|
|
4532
4540
|
|
|
4533
|
-
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_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, 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, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, 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, 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, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, partitionEpochToScaleToSums, processSpRequest, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, robAmtToSpend, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, 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 };
|
|
4541
|
+
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_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, 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, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, 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, 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, robAmtToSpend, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, 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 };
|
package/dist/index.js
CHANGED
|
@@ -243,6 +243,8 @@ __export(index_exports, {
|
|
|
243
243
|
parseAccountDatumOrThrow: () => parseAccountDatumOrThrow,
|
|
244
244
|
parseCdpDatum: () => parseCdpDatum,
|
|
245
245
|
parseCdpDatumOrThrow: () => parseCdpDatumOrThrow,
|
|
246
|
+
parseCdpRedeemer: () => parseCdpRedeemer,
|
|
247
|
+
parseCdpRedeemerOrThrow: () => parseCdpRedeemerOrThrow,
|
|
246
248
|
parseCollateralAssetDatum: () => parseCollateralAssetDatum,
|
|
247
249
|
parseCollateralAssetDatumOrThrow: () => parseCollateralAssetDatumOrThrow,
|
|
248
250
|
parseExecuteDatum: () => parseExecuteDatum,
|
|
@@ -257,6 +259,8 @@ __export(index_exports, {
|
|
|
257
259
|
parsePollManagerOrThrow: () => parsePollManagerOrThrow,
|
|
258
260
|
parsePollShard: () => parsePollShard,
|
|
259
261
|
parsePollShardOrThrow: () => parsePollShardOrThrow,
|
|
262
|
+
parsePollShardRedeemer: () => parsePollShardRedeemer,
|
|
263
|
+
parsePollShardRedeemerOrThrow: () => parsePollShardRedeemerOrThrow,
|
|
260
264
|
parsePriceOracleDatum: () => parsePriceOracleDatum,
|
|
261
265
|
parsePythStateDatum: () => parsePythStateDatum,
|
|
262
266
|
parseRobDatum: () => parseRobDatum,
|
|
@@ -267,6 +271,8 @@ __export(index_exports, {
|
|
|
267
271
|
parseSnapshotEpochToScaleToSumDatumOrThrow: () => parseSnapshotEpochToScaleToSumDatumOrThrow,
|
|
268
272
|
parseStabilityPoolDatum: () => parseStabilityPoolDatum,
|
|
269
273
|
parseStabilityPoolDatumOrThrow: () => parseStabilityPoolDatumOrThrow,
|
|
274
|
+
parseStabilityPoolRedeemer: () => parseStabilityPoolRedeemer,
|
|
275
|
+
parseStabilityPoolRedeemerOrThrow: () => parseStabilityPoolRedeemerOrThrow,
|
|
270
276
|
parseStableswapOrderDatum: () => parseStableswapOrderDatum,
|
|
271
277
|
parseStableswapOrderDatumOrThrow: () => parseStableswapOrderDatumOrThrow,
|
|
272
278
|
parseStableswapOrderRedeemer: () => parseStableswapOrderRedeemer,
|
|
@@ -276,6 +282,8 @@ __export(index_exports, {
|
|
|
276
282
|
parseStakingManagerDatum: () => parseStakingManagerDatum,
|
|
277
283
|
parseStakingPosition: () => parseStakingPosition,
|
|
278
284
|
parseStakingPositionOrThrow: () => parseStakingPositionOrThrow,
|
|
285
|
+
parseStakingRedeemer: () => parseStakingRedeemer,
|
|
286
|
+
parseStakingRedeemerOrThrow: () => parseStakingRedeemerOrThrow,
|
|
279
287
|
partitionEpochToScaleToSums: () => partitionEpochToScaleToSums,
|
|
280
288
|
processSpRequest: () => processSpRequest,
|
|
281
289
|
randomRobsSubsetSatisfyingTargetCollateral: () => randomRobsSubsetSatisfyingTargetCollateral,
|
|
@@ -1068,6 +1076,26 @@ function serialiseStabilityPoolRedeemer(r) {
|
|
|
1068
1076
|
DEFAULT_SCHEMA_OPTIONS
|
|
1069
1077
|
).toCBORHex(r);
|
|
1070
1078
|
}
|
|
1079
|
+
function parseStabilityPoolRedeemer(datum) {
|
|
1080
|
+
try {
|
|
1081
|
+
return import_fp_ts2.option.some(
|
|
1082
|
+
import_evolution4.Data.withSchema(
|
|
1083
|
+
StabilityPoolRedeemerSchema,
|
|
1084
|
+
DEFAULT_SCHEMA_OPTIONS
|
|
1085
|
+
).fromCBORHex(datum)
|
|
1086
|
+
);
|
|
1087
|
+
} catch (_) {
|
|
1088
|
+
return import_fp_ts2.option.none;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
function parseStabilityPoolRedeemerOrThrow(datum) {
|
|
1092
|
+
return import_fp_ts2.function.pipe(
|
|
1093
|
+
parseStabilityPoolRedeemer(datum),
|
|
1094
|
+
import_fp_ts2.option.match(() => {
|
|
1095
|
+
throw new Error("Expected a StabilityPoolRedeemer datum.");
|
|
1096
|
+
}, import_fp_ts2.function.identity)
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1071
1099
|
function serialiseStabilityPoolDatum(d, useIndefiniteMaps = false) {
|
|
1072
1100
|
return import_evolution4.Data.withSchema(StabilityPoolDatumSchema, {
|
|
1073
1101
|
...DEFAULT_SCHEMA_OPTIONS,
|
|
@@ -2161,6 +2189,25 @@ function serialiseCdpRedeemer(r) {
|
|
|
2161
2189
|
r
|
|
2162
2190
|
);
|
|
2163
2191
|
}
|
|
2192
|
+
function parseCdpRedeemer(datum) {
|
|
2193
|
+
try {
|
|
2194
|
+
return import_fp_ts5.option.some(
|
|
2195
|
+
import_evolution8.Data.withSchema(CdpRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
|
|
2196
|
+
datum
|
|
2197
|
+
)
|
|
2198
|
+
);
|
|
2199
|
+
} catch (_) {
|
|
2200
|
+
return import_fp_ts5.option.none;
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
function parseCdpRedeemerOrThrow(datum) {
|
|
2204
|
+
return import_fp_ts5.function.pipe(
|
|
2205
|
+
parseCdpRedeemer(datum),
|
|
2206
|
+
import_fp_ts5.option.match(() => {
|
|
2207
|
+
throw new Error("Expected a cdp redeemer.");
|
|
2208
|
+
}, import_fp_ts5.function.identity)
|
|
2209
|
+
);
|
|
2210
|
+
}
|
|
2164
2211
|
function serialiseRedeemCdpWithdrawalRedeemer(r) {
|
|
2165
2212
|
return import_evolution8.Data.withSchema(
|
|
2166
2213
|
RedeemCdpWithdrawalRedeemerSchema,
|
|
@@ -5546,6 +5593,26 @@ function serialiseStakingRedeemer(r) {
|
|
|
5546
5593
|
DEFAULT_SCHEMA_OPTIONS
|
|
5547
5594
|
).toCBORHex(r);
|
|
5548
5595
|
}
|
|
5596
|
+
function parseStakingRedeemer(datum) {
|
|
5597
|
+
try {
|
|
5598
|
+
return import_fp_ts13.option.some(
|
|
5599
|
+
import_evolution16.Data.withSchema(
|
|
5600
|
+
StakingRedeemerSchema,
|
|
5601
|
+
DEFAULT_SCHEMA_OPTIONS
|
|
5602
|
+
).fromCBORHex(datum)
|
|
5603
|
+
);
|
|
5604
|
+
} catch (_) {
|
|
5605
|
+
return import_fp_ts13.option.none;
|
|
5606
|
+
}
|
|
5607
|
+
}
|
|
5608
|
+
function parseStakingRedeemerOrThrow(datum) {
|
|
5609
|
+
return import_fp_ts13.function.pipe(
|
|
5610
|
+
parseStakingRedeemer(datum),
|
|
5611
|
+
import_fp_ts13.option.match(() => {
|
|
5612
|
+
throw new Error("Expected a StakingRedeemer datum.");
|
|
5613
|
+
}, import_fp_ts13.function.identity)
|
|
5614
|
+
);
|
|
5615
|
+
}
|
|
5549
5616
|
function parseStakingPosition(datum) {
|
|
5550
5617
|
try {
|
|
5551
5618
|
return (0, import_ts_pattern15.match)(
|
|
@@ -5824,6 +5891,26 @@ function serialisePollManagerRedeemer(r) {
|
|
|
5824
5891
|
function serialisePollShardRedeemer(r) {
|
|
5825
5892
|
return import_evolution18.Data.withSchema(PollShardRedeemerSchema).toCBORHex(r);
|
|
5826
5893
|
}
|
|
5894
|
+
function parsePollShardRedeemer(datum) {
|
|
5895
|
+
try {
|
|
5896
|
+
return import_fp_ts14.option.some(
|
|
5897
|
+
import_evolution18.Data.withSchema(
|
|
5898
|
+
PollShardRedeemerSchema,
|
|
5899
|
+
DEFAULT_SCHEMA_OPTIONS
|
|
5900
|
+
).fromCBORHex(datum)
|
|
5901
|
+
);
|
|
5902
|
+
} catch (_) {
|
|
5903
|
+
return import_fp_ts14.option.none;
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
function parsePollShardRedeemerOrThrow(datum) {
|
|
5907
|
+
return import_fp_ts14.function.pipe(
|
|
5908
|
+
parsePollShardRedeemer(datum),
|
|
5909
|
+
import_fp_ts14.option.match(() => {
|
|
5910
|
+
throw new Error("Expected a poll shard redeemer.");
|
|
5911
|
+
}, import_fp_ts14.function.identity)
|
|
5912
|
+
);
|
|
5913
|
+
}
|
|
5827
5914
|
function parsePollManager(datum) {
|
|
5828
5915
|
try {
|
|
5829
5916
|
return (0, import_ts_pattern16.match)(
|
|
@@ -7017,7 +7104,9 @@ async function executeProposal(executeOref, govOref, treasuryWithdrawalOref, all
|
|
|
7017
7104
|
);
|
|
7018
7105
|
}).otherwise(() => {
|
|
7019
7106
|
});
|
|
7020
|
-
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
7107
|
+
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
7108
|
+
Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND
|
|
7109
|
+
).collectFrom([executeUtxo], import_lucid26.Data.void()).mintAssets(
|
|
7021
7110
|
(0, import_cardano_offchain_common16.mkAssetsOf)(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
|
|
7022
7111
|
import_lucid26.Data.void()
|
|
7023
7112
|
).addSigner(ownAddr).setMinFee(922932n);
|
|
@@ -10981,9 +11070,7 @@ async function createStableswapOrder(iasset, collateralAsset, amount, minting, p
|
|
|
10981
11070
|
const roundedExpectedOutputLovelaces = (expectedOutputLovelaces / 1000000n + 1n) * 1000000n;
|
|
10982
11071
|
return lucid.newTx().pay.ToContract(
|
|
10983
11072
|
(0, import_lucid67.credentialToAddress)(lucid.config().network, {
|
|
10984
|
-
hash:
|
|
10985
|
-
mkStableswapValidatorFromSP(params.stableswapParams)
|
|
10986
|
-
),
|
|
11073
|
+
hash: params.validatorHashes.stableswapHash,
|
|
10987
11074
|
type: "Script"
|
|
10988
11075
|
}),
|
|
10989
11076
|
{
|
|
@@ -11579,6 +11666,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
11579
11666
|
parseAccountDatumOrThrow,
|
|
11580
11667
|
parseCdpDatum,
|
|
11581
11668
|
parseCdpDatumOrThrow,
|
|
11669
|
+
parseCdpRedeemer,
|
|
11670
|
+
parseCdpRedeemerOrThrow,
|
|
11582
11671
|
parseCollateralAssetDatum,
|
|
11583
11672
|
parseCollateralAssetDatumOrThrow,
|
|
11584
11673
|
parseExecuteDatum,
|
|
@@ -11593,6 +11682,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
11593
11682
|
parsePollManagerOrThrow,
|
|
11594
11683
|
parsePollShard,
|
|
11595
11684
|
parsePollShardOrThrow,
|
|
11685
|
+
parsePollShardRedeemer,
|
|
11686
|
+
parsePollShardRedeemerOrThrow,
|
|
11596
11687
|
parsePriceOracleDatum,
|
|
11597
11688
|
parsePythStateDatum,
|
|
11598
11689
|
parseRobDatum,
|
|
@@ -11603,6 +11694,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
11603
11694
|
parseSnapshotEpochToScaleToSumDatumOrThrow,
|
|
11604
11695
|
parseStabilityPoolDatum,
|
|
11605
11696
|
parseStabilityPoolDatumOrThrow,
|
|
11697
|
+
parseStabilityPoolRedeemer,
|
|
11698
|
+
parseStabilityPoolRedeemerOrThrow,
|
|
11606
11699
|
parseStableswapOrderDatum,
|
|
11607
11700
|
parseStableswapOrderDatumOrThrow,
|
|
11608
11701
|
parseStableswapOrderRedeemer,
|
|
@@ -11612,6 +11705,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
11612
11705
|
parseStakingManagerDatum,
|
|
11613
11706
|
parseStakingPosition,
|
|
11614
11707
|
parseStakingPositionOrThrow,
|
|
11708
|
+
parseStakingRedeemer,
|
|
11709
|
+
parseStakingRedeemerOrThrow,
|
|
11615
11710
|
partitionEpochToScaleToSums,
|
|
11616
11711
|
processSpRequest,
|
|
11617
11712
|
randomRobsSubsetSatisfyingTargetCollateral,
|
package/dist/index.mjs
CHANGED
|
@@ -727,6 +727,26 @@ function serialiseStabilityPoolRedeemer(r) {
|
|
|
727
727
|
DEFAULT_SCHEMA_OPTIONS
|
|
728
728
|
).toCBORHex(r);
|
|
729
729
|
}
|
|
730
|
+
function parseStabilityPoolRedeemer(datum) {
|
|
731
|
+
try {
|
|
732
|
+
return O.some(
|
|
733
|
+
Data3.withSchema(
|
|
734
|
+
StabilityPoolRedeemerSchema,
|
|
735
|
+
DEFAULT_SCHEMA_OPTIONS
|
|
736
|
+
).fromCBORHex(datum)
|
|
737
|
+
);
|
|
738
|
+
} catch (_) {
|
|
739
|
+
return O.none;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
function parseStabilityPoolRedeemerOrThrow(datum) {
|
|
743
|
+
return F.pipe(
|
|
744
|
+
parseStabilityPoolRedeemer(datum),
|
|
745
|
+
O.match(() => {
|
|
746
|
+
throw new Error("Expected a StabilityPoolRedeemer datum.");
|
|
747
|
+
}, F.identity)
|
|
748
|
+
);
|
|
749
|
+
}
|
|
730
750
|
function serialiseStabilityPoolDatum(d, useIndefiniteMaps = false) {
|
|
731
751
|
return Data3.withSchema(StabilityPoolDatumSchema, {
|
|
732
752
|
...DEFAULT_SCHEMA_OPTIONS,
|
|
@@ -1856,6 +1876,25 @@ function serialiseCdpRedeemer(r) {
|
|
|
1856
1876
|
r
|
|
1857
1877
|
);
|
|
1858
1878
|
}
|
|
1879
|
+
function parseCdpRedeemer(datum) {
|
|
1880
|
+
try {
|
|
1881
|
+
return O4.some(
|
|
1882
|
+
Data9.withSchema(CdpRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
|
|
1883
|
+
datum
|
|
1884
|
+
)
|
|
1885
|
+
);
|
|
1886
|
+
} catch (_) {
|
|
1887
|
+
return O4.none;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
function parseCdpRedeemerOrThrow(datum) {
|
|
1891
|
+
return F4.pipe(
|
|
1892
|
+
parseCdpRedeemer(datum),
|
|
1893
|
+
O4.match(() => {
|
|
1894
|
+
throw new Error("Expected a cdp redeemer.");
|
|
1895
|
+
}, F4.identity)
|
|
1896
|
+
);
|
|
1897
|
+
}
|
|
1859
1898
|
function serialiseRedeemCdpWithdrawalRedeemer(r) {
|
|
1860
1899
|
return Data9.withSchema(
|
|
1861
1900
|
RedeemCdpWithdrawalRedeemerSchema,
|
|
@@ -5302,6 +5341,26 @@ function serialiseStakingRedeemer(r) {
|
|
|
5302
5341
|
DEFAULT_SCHEMA_OPTIONS
|
|
5303
5342
|
).toCBORHex(r);
|
|
5304
5343
|
}
|
|
5344
|
+
function parseStakingRedeemer(datum) {
|
|
5345
|
+
try {
|
|
5346
|
+
return O10.some(
|
|
5347
|
+
Data27.withSchema(
|
|
5348
|
+
StakingRedeemerSchema,
|
|
5349
|
+
DEFAULT_SCHEMA_OPTIONS
|
|
5350
|
+
).fromCBORHex(datum)
|
|
5351
|
+
);
|
|
5352
|
+
} catch (_) {
|
|
5353
|
+
return O10.none;
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5356
|
+
function parseStakingRedeemerOrThrow(datum) {
|
|
5357
|
+
return F12.pipe(
|
|
5358
|
+
parseStakingRedeemer(datum),
|
|
5359
|
+
O10.match(() => {
|
|
5360
|
+
throw new Error("Expected a StakingRedeemer datum.");
|
|
5361
|
+
}, F12.identity)
|
|
5362
|
+
);
|
|
5363
|
+
}
|
|
5305
5364
|
function parseStakingPosition(datum) {
|
|
5306
5365
|
try {
|
|
5307
5366
|
return match14(
|
|
@@ -5590,6 +5649,26 @@ function serialisePollManagerRedeemer(r) {
|
|
|
5590
5649
|
function serialisePollShardRedeemer(r) {
|
|
5591
5650
|
return Data29.withSchema(PollShardRedeemerSchema).toCBORHex(r);
|
|
5592
5651
|
}
|
|
5652
|
+
function parsePollShardRedeemer(datum) {
|
|
5653
|
+
try {
|
|
5654
|
+
return O11.some(
|
|
5655
|
+
Data29.withSchema(
|
|
5656
|
+
PollShardRedeemerSchema,
|
|
5657
|
+
DEFAULT_SCHEMA_OPTIONS
|
|
5658
|
+
).fromCBORHex(datum)
|
|
5659
|
+
);
|
|
5660
|
+
} catch (_) {
|
|
5661
|
+
return O11.none;
|
|
5662
|
+
}
|
|
5663
|
+
}
|
|
5664
|
+
function parsePollShardRedeemerOrThrow(datum) {
|
|
5665
|
+
return F13.pipe(
|
|
5666
|
+
parsePollShardRedeemer(datum),
|
|
5667
|
+
O11.match(() => {
|
|
5668
|
+
throw new Error("Expected a poll shard redeemer.");
|
|
5669
|
+
}, F13.identity)
|
|
5670
|
+
);
|
|
5671
|
+
}
|
|
5593
5672
|
function parsePollManager(datum) {
|
|
5594
5673
|
try {
|
|
5595
5674
|
return match15(
|
|
@@ -6786,7 +6865,9 @@ async function executeProposal(executeOref, govOref, treasuryWithdrawalOref, all
|
|
|
6786
6865
|
);
|
|
6787
6866
|
}).otherwise(() => {
|
|
6788
6867
|
});
|
|
6789
|
-
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
6868
|
+
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
6869
|
+
Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND
|
|
6870
|
+
).collectFrom([executeUtxo], Data30.void()).mintAssets(
|
|
6790
6871
|
mkAssetsOf6(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
|
|
6791
6872
|
Data30.void()
|
|
6792
6873
|
).addSigner(ownAddr).setMinFee(922932n);
|
|
@@ -10872,8 +10953,7 @@ import {
|
|
|
10872
10953
|
fromText as fromText15,
|
|
10873
10954
|
paymentCredentialOf as paymentCredentialOf3,
|
|
10874
10955
|
sortUTxOs as sortUTxOs2,
|
|
10875
|
-
toHex as toHex17
|
|
10876
|
-
validatorToScriptHash as validatorToScriptHash7
|
|
10956
|
+
toHex as toHex17
|
|
10877
10957
|
} from "@lucid-evolution/lucid";
|
|
10878
10958
|
import {
|
|
10879
10959
|
addressFromBech32 as addressFromBech323,
|
|
@@ -10924,9 +11004,7 @@ async function createStableswapOrder(iasset, collateralAsset, amount, minting, p
|
|
|
10924
11004
|
const roundedExpectedOutputLovelaces = (expectedOutputLovelaces / 1000000n + 1n) * 1000000n;
|
|
10925
11005
|
return lucid.newTx().pay.ToContract(
|
|
10926
11006
|
credentialToAddress6(lucid.config().network, {
|
|
10927
|
-
hash:
|
|
10928
|
-
mkStableswapValidatorFromSP(params.stableswapParams)
|
|
10929
|
-
),
|
|
11007
|
+
hash: params.validatorHashes.stableswapHash,
|
|
10930
11008
|
type: "Script"
|
|
10931
11009
|
}),
|
|
10932
11010
|
{
|
|
@@ -11521,6 +11599,8 @@ export {
|
|
|
11521
11599
|
parseAccountDatumOrThrow,
|
|
11522
11600
|
parseCdpDatum,
|
|
11523
11601
|
parseCdpDatumOrThrow,
|
|
11602
|
+
parseCdpRedeemer,
|
|
11603
|
+
parseCdpRedeemerOrThrow,
|
|
11524
11604
|
parseCollateralAssetDatum,
|
|
11525
11605
|
parseCollateralAssetDatumOrThrow,
|
|
11526
11606
|
parseExecuteDatum,
|
|
@@ -11535,6 +11615,8 @@ export {
|
|
|
11535
11615
|
parsePollManagerOrThrow,
|
|
11536
11616
|
parsePollShard,
|
|
11537
11617
|
parsePollShardOrThrow,
|
|
11618
|
+
parsePollShardRedeemer,
|
|
11619
|
+
parsePollShardRedeemerOrThrow,
|
|
11538
11620
|
parsePriceOracleDatum,
|
|
11539
11621
|
parsePythStateDatum,
|
|
11540
11622
|
parseRobDatum,
|
|
@@ -11545,6 +11627,8 @@ export {
|
|
|
11545
11627
|
parseSnapshotEpochToScaleToSumDatumOrThrow,
|
|
11546
11628
|
parseStabilityPoolDatum,
|
|
11547
11629
|
parseStabilityPoolDatumOrThrow,
|
|
11630
|
+
parseStabilityPoolRedeemer,
|
|
11631
|
+
parseStabilityPoolRedeemerOrThrow,
|
|
11548
11632
|
parseStableswapOrderDatum,
|
|
11549
11633
|
parseStableswapOrderDatumOrThrow,
|
|
11550
11634
|
parseStableswapOrderRedeemer,
|
|
@@ -11554,6 +11638,8 @@ export {
|
|
|
11554
11638
|
parseStakingManagerDatum,
|
|
11555
11639
|
parseStakingPosition,
|
|
11556
11640
|
parseStakingPositionOrThrow,
|
|
11641
|
+
parseStakingRedeemer,
|
|
11642
|
+
parseStakingRedeemerOrThrow,
|
|
11557
11643
|
partitionEpochToScaleToSums,
|
|
11558
11644
|
processSpRequest,
|
|
11559
11645
|
randomRobsSubsetSatisfyingTargetCollateral,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigo-labs/indigo-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "Indigo SDK for interacting with Indigo endpoints via lucid-evolution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"author": "3rd Eye Labs",
|
|
41
41
|
"license": "MIT",
|
|
42
|
+
"packageManager": "pnpm@10.33.4",
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"@3rd-eye-labs/cardano-offchain-common": "1.2.0",
|
|
44
45
|
"@evolution-sdk/evolution": "^0.3.22",
|
package/scripts/bench.sh
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Runs the testsuite X times and collects the mem spent for each run,
|
|
4
|
+
# at the end, it summarises the results (max, median, avg).
|
|
5
|
+
# It's best to run just a single test using `.only` so it's quick.
|
|
6
|
+
#
|
|
7
|
+
# Usage: ./bench.sh <test-file> <benchmark-name> <runs>
|
|
8
|
+
# Example: ./bench.sh interest-collection.test.ts "Interest Collection - Batch Collect 13 CDPs" 20
|
|
9
|
+
|
|
10
|
+
if [ "$#" -ne 3 ]; then
|
|
11
|
+
echo "Usage: $0 <test-file> <benchmark-name> <runs>"
|
|
12
|
+
echo "Example: $0 interest-collection.test.ts \"Interest Collection - Batch Collect 13 CDPs\" 20"
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
test_file="$1"
|
|
17
|
+
benchmark_name="$2"
|
|
18
|
+
runs="$3"
|
|
19
|
+
|
|
20
|
+
if ! [[ "$runs" =~ ^[0-9]+$ ]] || [ "$runs" -lt 1 ]; then
|
|
21
|
+
echo "Error: <runs> must be a positive integer"
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
total=0
|
|
26
|
+
values=()
|
|
27
|
+
|
|
28
|
+
for i in $(seq 1 $runs); do
|
|
29
|
+
echo -n "Run $i/$runs... "
|
|
30
|
+
output=$(pnpm test "$test_file" 2>&1)
|
|
31
|
+
mem=$(echo "$output" | grep "$benchmark_name" | grep -oP "'\d+\.\d+%'" | head -1 | tr -d "'%")
|
|
32
|
+
|
|
33
|
+
if [ -z "$mem" ]; then
|
|
34
|
+
echo "ERROR: benchmark '$benchmark_name' not found in output — aborting"
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
echo "Memory: ${mem}%"
|
|
39
|
+
values+=("$mem")
|
|
40
|
+
total=$(echo "$total + $mem" | bc)
|
|
41
|
+
done
|
|
42
|
+
|
|
43
|
+
sorted=($(printf '%s\n' "${values[@]}" | sort -n))
|
|
44
|
+
|
|
45
|
+
avg=$(echo "scale=3; $total / $runs" | bc)
|
|
46
|
+
min=${sorted[0]}
|
|
47
|
+
max=${sorted[$runs-1]}
|
|
48
|
+
|
|
49
|
+
mid=$(($runs / 2))
|
|
50
|
+
if (( $runs % 2 == 0 )); then
|
|
51
|
+
median=$(echo "scale=3; (${sorted[$mid-1]} + ${sorted[$mid]}) / 2" | bc)
|
|
52
|
+
else
|
|
53
|
+
median=${sorted[$mid]}
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
echo ""
|
|
57
|
+
echo "=== Benchmark: $benchmark_name ==="
|
|
58
|
+
echo "=== Test file: $test_file | Runs: $runs ==="
|
|
59
|
+
echo "Average : ${avg}%"
|
|
60
|
+
echo "Minimum : ${min}%"
|
|
61
|
+
echo "Maximum : ${max}%"
|
|
62
|
+
echo "Median : ${median}%"
|
|
@@ -184,6 +184,27 @@ export function serialiseCdpRedeemer(r: CdpRedeemer): string {
|
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
export function parseCdpRedeemer(datum: string): O.Option<CdpRedeemer> {
|
|
188
|
+
try {
|
|
189
|
+
return O.some(
|
|
190
|
+
Data.withSchema(CdpRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
|
|
191
|
+
datum,
|
|
192
|
+
),
|
|
193
|
+
);
|
|
194
|
+
} catch (_) {
|
|
195
|
+
return O.none;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export function parseCdpRedeemerOrThrow(datum: string): CdpRedeemer {
|
|
200
|
+
return F.pipe(
|
|
201
|
+
parseCdpRedeemer(datum),
|
|
202
|
+
O.match(() => {
|
|
203
|
+
throw new Error('Expected a cdp redeemer.');
|
|
204
|
+
}, F.identity),
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
187
208
|
export function serialiseRedeemCdpWithdrawalRedeemer(
|
|
188
209
|
r: RedeemCdpWithdrawalRedeemer,
|
|
189
210
|
): string {
|
|
@@ -1594,7 +1594,9 @@ export async function executeProposal(
|
|
|
1594
1594
|
|
|
1595
1595
|
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo])
|
|
1596
1596
|
.validFrom(Number(currentTime) - ONE_SECOND)
|
|
1597
|
-
.validTo(
|
|
1597
|
+
.validTo(
|
|
1598
|
+
Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND,
|
|
1599
|
+
)
|
|
1598
1600
|
.collectFrom([executeUtxo], Data.void())
|
|
1599
1601
|
.mintAssets(
|
|
1600
1602
|
mkAssetsOf(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
|
|
@@ -119,6 +119,32 @@ export function serialisePollShardRedeemer(r: PollShardRedeemer): string {
|
|
|
119
119
|
return Data.withSchema(PollShardRedeemerSchema).toCBORHex(r);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
export function parsePollShardRedeemer(
|
|
123
|
+
datum: string,
|
|
124
|
+
): O.Option<PollShardRedeemer> {
|
|
125
|
+
try {
|
|
126
|
+
return O.some(
|
|
127
|
+
Data.withSchema(
|
|
128
|
+
PollShardRedeemerSchema,
|
|
129
|
+
DEFAULT_SCHEMA_OPTIONS,
|
|
130
|
+
).fromCBORHex(datum),
|
|
131
|
+
);
|
|
132
|
+
} catch (_) {
|
|
133
|
+
return O.none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function parsePollShardRedeemerOrThrow(
|
|
138
|
+
datum: string,
|
|
139
|
+
): PollShardRedeemer {
|
|
140
|
+
return F.pipe(
|
|
141
|
+
parsePollShardRedeemer(datum),
|
|
142
|
+
O.match(() => {
|
|
143
|
+
throw new Error('Expected a poll shard redeemer.');
|
|
144
|
+
}, F.identity),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
122
148
|
export function parsePollManager(datum: string): O.Option<PollManagerContent> {
|
|
123
149
|
try {
|
|
124
150
|
return match(
|
|
@@ -236,6 +236,32 @@ export function serialiseStabilityPoolRedeemer(
|
|
|
236
236
|
).toCBORHex(r);
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
export function parseStabilityPoolRedeemer(
|
|
240
|
+
datum: string,
|
|
241
|
+
): O.Option<StabilityPoolRedeemer> {
|
|
242
|
+
try {
|
|
243
|
+
return O.some(
|
|
244
|
+
Data.withSchema(
|
|
245
|
+
StabilityPoolRedeemerSchema,
|
|
246
|
+
DEFAULT_SCHEMA_OPTIONS,
|
|
247
|
+
).fromCBORHex(datum),
|
|
248
|
+
);
|
|
249
|
+
} catch (_) {
|
|
250
|
+
return O.none;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export function parseStabilityPoolRedeemerOrThrow(
|
|
255
|
+
datum: string,
|
|
256
|
+
): StabilityPoolRedeemer {
|
|
257
|
+
return F.pipe(
|
|
258
|
+
parseStabilityPoolRedeemer(datum),
|
|
259
|
+
O.match(() => {
|
|
260
|
+
throw new Error('Expected a StabilityPoolRedeemer datum.');
|
|
261
|
+
}, F.identity),
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
239
265
|
export function serialiseStabilityPoolDatum(
|
|
240
266
|
d: typeof StabilityPoolDatumSchema.Type,
|
|
241
267
|
/**
|
|
@@ -12,13 +12,11 @@ import {
|
|
|
12
12
|
toHex,
|
|
13
13
|
TxBuilder,
|
|
14
14
|
UTxO,
|
|
15
|
-
validatorToScriptHash,
|
|
16
15
|
} from '@lucid-evolution/lucid';
|
|
17
16
|
import {
|
|
18
17
|
fromSystemParamsScriptRef,
|
|
19
18
|
SystemParams,
|
|
20
19
|
} from '../../types/system-params';
|
|
21
|
-
import { mkStableswapValidatorFromSP } from './scripts';
|
|
22
20
|
import { estimateUtxoMinLovelace } from '../../utils/lucid-utils';
|
|
23
21
|
import {
|
|
24
22
|
parseStableswapOrderDatumOrThrow,
|
|
@@ -135,9 +133,7 @@ export async function createStableswapOrder(
|
|
|
135
133
|
|
|
136
134
|
return lucid.newTx().pay.ToContract(
|
|
137
135
|
credentialToAddress(lucid.config().network!, {
|
|
138
|
-
hash:
|
|
139
|
-
mkStableswapValidatorFromSP(params.stableswapParams),
|
|
140
|
-
),
|
|
136
|
+
hash: params.validatorHashes.stableswapHash,
|
|
141
137
|
type: 'Script',
|
|
142
138
|
}),
|
|
143
139
|
{
|
|
@@ -73,6 +73,28 @@ export function serialiseStakingRedeemer(r: StakingRedeemer): string {
|
|
|
73
73
|
).toCBORHex(r);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
export function parseStakingRedeemer(datum: string): O.Option<StakingRedeemer> {
|
|
77
|
+
try {
|
|
78
|
+
return O.some(
|
|
79
|
+
Data.withSchema(
|
|
80
|
+
StakingRedeemerSchema,
|
|
81
|
+
DEFAULT_SCHEMA_OPTIONS,
|
|
82
|
+
).fromCBORHex(datum),
|
|
83
|
+
);
|
|
84
|
+
} catch (_) {
|
|
85
|
+
return O.none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function parseStakingRedeemerOrThrow(datum: string): StakingRedeemer {
|
|
90
|
+
return F.pipe(
|
|
91
|
+
parseStakingRedeemer(datum),
|
|
92
|
+
O.match(() => {
|
|
93
|
+
throw new Error('Expected a StakingRedeemer datum.');
|
|
94
|
+
}, F.identity),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
76
98
|
export function parseStakingPosition(datum: string): O.Option<StakingPosition> {
|
|
77
99
|
try {
|
|
78
100
|
return match(
|
|
@@ -1924,7 +1924,7 @@ describe('Stability pool', () => {
|
|
|
1924
1924
|
});
|
|
1925
1925
|
|
|
1926
1926
|
// These are the most significant tests for benchmarking the maximum number of collateral assets supported.
|
|
1927
|
-
describe('Liquidate', () => {
|
|
1927
|
+
describe.skip('Liquidate', () => {
|
|
1928
1928
|
test<MyContext>('Liquidate with 10 reward assets in the pool - collecting with 2 assets in treasury', async (context: MyContext) => {
|
|
1929
1929
|
context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
|
|
1930
1930
|
|
package/vitest.config.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { defineConfig } from 'vitest/config';
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
test: {
|
|
5
5
|
hookTimeout: 0,
|
|
6
|
-
testTimeout:
|
|
6
|
+
testTimeout: 500_000,
|
|
7
7
|
reporters: 'verbose',
|
|
8
8
|
include: ['./tests/**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
9
9
|
globalSetup: './tests/setup.ts',
|