@indigo-labs/indigo-sdk 0.3.14 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -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,25 @@ 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(StabilityPoolRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
1083
+ datum
1084
+ )
1085
+ );
1086
+ } catch (_) {
1087
+ return import_fp_ts2.option.none;
1088
+ }
1089
+ }
1090
+ function parseStabilityPoolRedeemerOrThrow(datum) {
1091
+ return import_fp_ts2.function.pipe(
1092
+ parseStabilityPoolRedeemer(datum),
1093
+ import_fp_ts2.option.match(() => {
1094
+ throw new Error("Expected a StabilityPoolRedeemer datum.");
1095
+ }, import_fp_ts2.function.identity)
1096
+ );
1097
+ }
1071
1098
  function serialiseStabilityPoolDatum(d, useIndefiniteMaps = false) {
1072
1099
  return import_evolution4.Data.withSchema(StabilityPoolDatumSchema, {
1073
1100
  ...DEFAULT_SCHEMA_OPTIONS,
@@ -2161,6 +2188,25 @@ function serialiseCdpRedeemer(r) {
2161
2188
  r
2162
2189
  );
2163
2190
  }
2191
+ function parseCdpRedeemer(datum) {
2192
+ try {
2193
+ return import_fp_ts5.option.some(
2194
+ import_evolution8.Data.withSchema(CdpRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
2195
+ datum
2196
+ )
2197
+ );
2198
+ } catch (_) {
2199
+ return import_fp_ts5.option.none;
2200
+ }
2201
+ }
2202
+ function parseCdpRedeemerOrThrow(datum) {
2203
+ return import_fp_ts5.function.pipe(
2204
+ parseCdpRedeemer(datum),
2205
+ import_fp_ts5.option.match(() => {
2206
+ throw new Error("Expected a cdp redeemer.");
2207
+ }, import_fp_ts5.function.identity)
2208
+ );
2209
+ }
2164
2210
  function serialiseRedeemCdpWithdrawalRedeemer(r) {
2165
2211
  return import_evolution8.Data.withSchema(
2166
2212
  RedeemCdpWithdrawalRedeemerSchema,
@@ -5546,6 +5592,25 @@ function serialiseStakingRedeemer(r) {
5546
5592
  DEFAULT_SCHEMA_OPTIONS
5547
5593
  ).toCBORHex(r);
5548
5594
  }
5595
+ function parseStakingRedeemer(datum) {
5596
+ try {
5597
+ return import_fp_ts13.option.some(
5598
+ import_evolution16.Data.withSchema(StakingRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
5599
+ datum
5600
+ )
5601
+ );
5602
+ } catch (_) {
5603
+ return import_fp_ts13.option.none;
5604
+ }
5605
+ }
5606
+ function parseStakingRedeemerOrThrow(datum) {
5607
+ return import_fp_ts13.function.pipe(
5608
+ parseStakingRedeemer(datum),
5609
+ import_fp_ts13.option.match(() => {
5610
+ throw new Error("Expected a StakingRedeemer datum.");
5611
+ }, import_fp_ts13.function.identity)
5612
+ );
5613
+ }
5549
5614
  function parseStakingPosition(datum) {
5550
5615
  try {
5551
5616
  return (0, import_ts_pattern15.match)(
@@ -5824,6 +5889,25 @@ function serialisePollManagerRedeemer(r) {
5824
5889
  function serialisePollShardRedeemer(r) {
5825
5890
  return import_evolution18.Data.withSchema(PollShardRedeemerSchema).toCBORHex(r);
5826
5891
  }
5892
+ function parsePollShardRedeemer(datum) {
5893
+ try {
5894
+ return import_fp_ts14.option.some(
5895
+ import_evolution18.Data.withSchema(PollShardRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
5896
+ datum
5897
+ )
5898
+ );
5899
+ } catch (_) {
5900
+ return import_fp_ts14.option.none;
5901
+ }
5902
+ }
5903
+ function parsePollShardRedeemerOrThrow(datum) {
5904
+ return import_fp_ts14.function.pipe(
5905
+ parsePollShardRedeemer(datum),
5906
+ import_fp_ts14.option.match(() => {
5907
+ throw new Error("Expected a poll shard redeemer.");
5908
+ }, import_fp_ts14.function.identity)
5909
+ );
5910
+ }
5827
5911
  function parsePollManager(datum) {
5828
5912
  try {
5829
5913
  return (0, import_ts_pattern16.match)(
@@ -7017,7 +7101,9 @@ async function executeProposal(executeOref, govOref, treasuryWithdrawalOref, all
7017
7101
  );
7018
7102
  }).otherwise(() => {
7019
7103
  });
7020
- tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND).collectFrom([executeUtxo], import_lucid26.Data.void()).mintAssets(
7104
+ tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(
7105
+ Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND
7106
+ ).collectFrom([executeUtxo], import_lucid26.Data.void()).mintAssets(
7021
7107
  (0, import_cardano_offchain_common16.mkAssetsOf)(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
7022
7108
  import_lucid26.Data.void()
7023
7109
  ).addSigner(ownAddr).setMinFee(922932n);
@@ -11579,6 +11665,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
11579
11665
  parseAccountDatumOrThrow,
11580
11666
  parseCdpDatum,
11581
11667
  parseCdpDatumOrThrow,
11668
+ parseCdpRedeemer,
11669
+ parseCdpRedeemerOrThrow,
11582
11670
  parseCollateralAssetDatum,
11583
11671
  parseCollateralAssetDatumOrThrow,
11584
11672
  parseExecuteDatum,
@@ -11593,6 +11681,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
11593
11681
  parsePollManagerOrThrow,
11594
11682
  parsePollShard,
11595
11683
  parsePollShardOrThrow,
11684
+ parsePollShardRedeemer,
11685
+ parsePollShardRedeemerOrThrow,
11596
11686
  parsePriceOracleDatum,
11597
11687
  parsePythStateDatum,
11598
11688
  parseRobDatum,
@@ -11603,6 +11693,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
11603
11693
  parseSnapshotEpochToScaleToSumDatumOrThrow,
11604
11694
  parseStabilityPoolDatum,
11605
11695
  parseStabilityPoolDatumOrThrow,
11696
+ parseStabilityPoolRedeemer,
11697
+ parseStabilityPoolRedeemerOrThrow,
11606
11698
  parseStableswapOrderDatum,
11607
11699
  parseStableswapOrderDatumOrThrow,
11608
11700
  parseStableswapOrderRedeemer,
@@ -11612,6 +11704,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
11612
11704
  parseStakingManagerDatum,
11613
11705
  parseStakingPosition,
11614
11706
  parseStakingPositionOrThrow,
11707
+ parseStakingRedeemer,
11708
+ parseStakingRedeemerOrThrow,
11615
11709
  partitionEpochToScaleToSums,
11616
11710
  processSpRequest,
11617
11711
  randomRobsSubsetSatisfyingTargetCollateral,
package/dist/index.mjs CHANGED
@@ -727,6 +727,25 @@ 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(StabilityPoolRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
734
+ datum
735
+ )
736
+ );
737
+ } catch (_) {
738
+ return O.none;
739
+ }
740
+ }
741
+ function parseStabilityPoolRedeemerOrThrow(datum) {
742
+ return F.pipe(
743
+ parseStabilityPoolRedeemer(datum),
744
+ O.match(() => {
745
+ throw new Error("Expected a StabilityPoolRedeemer datum.");
746
+ }, F.identity)
747
+ );
748
+ }
730
749
  function serialiseStabilityPoolDatum(d, useIndefiniteMaps = false) {
731
750
  return Data3.withSchema(StabilityPoolDatumSchema, {
732
751
  ...DEFAULT_SCHEMA_OPTIONS,
@@ -1856,6 +1875,25 @@ function serialiseCdpRedeemer(r) {
1856
1875
  r
1857
1876
  );
1858
1877
  }
1878
+ function parseCdpRedeemer(datum) {
1879
+ try {
1880
+ return O4.some(
1881
+ Data9.withSchema(CdpRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
1882
+ datum
1883
+ )
1884
+ );
1885
+ } catch (_) {
1886
+ return O4.none;
1887
+ }
1888
+ }
1889
+ function parseCdpRedeemerOrThrow(datum) {
1890
+ return F4.pipe(
1891
+ parseCdpRedeemer(datum),
1892
+ O4.match(() => {
1893
+ throw new Error("Expected a cdp redeemer.");
1894
+ }, F4.identity)
1895
+ );
1896
+ }
1859
1897
  function serialiseRedeemCdpWithdrawalRedeemer(r) {
1860
1898
  return Data9.withSchema(
1861
1899
  RedeemCdpWithdrawalRedeemerSchema,
@@ -5302,6 +5340,25 @@ function serialiseStakingRedeemer(r) {
5302
5340
  DEFAULT_SCHEMA_OPTIONS
5303
5341
  ).toCBORHex(r);
5304
5342
  }
5343
+ function parseStakingRedeemer(datum) {
5344
+ try {
5345
+ return O10.some(
5346
+ Data27.withSchema(StakingRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
5347
+ datum
5348
+ )
5349
+ );
5350
+ } catch (_) {
5351
+ return O10.none;
5352
+ }
5353
+ }
5354
+ function parseStakingRedeemerOrThrow(datum) {
5355
+ return F12.pipe(
5356
+ parseStakingRedeemer(datum),
5357
+ O10.match(() => {
5358
+ throw new Error("Expected a StakingRedeemer datum.");
5359
+ }, F12.identity)
5360
+ );
5361
+ }
5305
5362
  function parseStakingPosition(datum) {
5306
5363
  try {
5307
5364
  return match14(
@@ -5590,6 +5647,25 @@ function serialisePollManagerRedeemer(r) {
5590
5647
  function serialisePollShardRedeemer(r) {
5591
5648
  return Data29.withSchema(PollShardRedeemerSchema).toCBORHex(r);
5592
5649
  }
5650
+ function parsePollShardRedeemer(datum) {
5651
+ try {
5652
+ return O11.some(
5653
+ Data29.withSchema(PollShardRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
5654
+ datum
5655
+ )
5656
+ );
5657
+ } catch (_) {
5658
+ return O11.none;
5659
+ }
5660
+ }
5661
+ function parsePollShardRedeemerOrThrow(datum) {
5662
+ return F13.pipe(
5663
+ parsePollShardRedeemer(datum),
5664
+ O11.match(() => {
5665
+ throw new Error("Expected a poll shard redeemer.");
5666
+ }, F13.identity)
5667
+ );
5668
+ }
5593
5669
  function parsePollManager(datum) {
5594
5670
  try {
5595
5671
  return match15(
@@ -6786,7 +6862,9 @@ async function executeProposal(executeOref, govOref, treasuryWithdrawalOref, all
6786
6862
  );
6787
6863
  }).otherwise(() => {
6788
6864
  });
6789
- tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND).collectFrom([executeUtxo], Data30.void()).mintAssets(
6865
+ tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(
6866
+ Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND
6867
+ ).collectFrom([executeUtxo], Data30.void()).mintAssets(
6790
6868
  mkAssetsOf6(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
6791
6869
  Data30.void()
6792
6870
  ).addSigner(ownAddr).setMinFee(922932n);
@@ -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.14",
3
+ "version": "0.3.15",
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",
@@ -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(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND)
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,27 @@ export function serialisePollShardRedeemer(r: PollShardRedeemer): string {
119
119
  return Data.withSchema(PollShardRedeemerSchema).toCBORHex(r);
120
120
  }
121
121
 
122
+ export function parsePollShardRedeemer(datum: string): O.Option<PollShardRedeemer> {
123
+ try {
124
+ return O.some(
125
+ Data.withSchema(PollShardRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
126
+ datum,
127
+ ),
128
+ );
129
+ } catch (_) {
130
+ return O.none;
131
+ }
132
+ }
133
+
134
+ export function parsePollShardRedeemerOrThrow(datum: string): PollShardRedeemer {
135
+ return F.pipe(
136
+ parsePollShardRedeemer(datum),
137
+ O.match(() => {
138
+ throw new Error('Expected a poll shard redeemer.');
139
+ }, F.identity),
140
+ );
141
+ }
142
+
122
143
  export function parsePollManager(datum: string): O.Option<PollManagerContent> {
123
144
  try {
124
145
  return match(
@@ -236,6 +236,26 @@ export function serialiseStabilityPoolRedeemer(
236
236
  ).toCBORHex(r);
237
237
  }
238
238
 
239
+ export function parseStabilityPoolRedeemer(datum: string): O.Option<StabilityPoolRedeemer> {
240
+ try {
241
+ return O.some(Data.withSchema(StabilityPoolRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
242
+ datum,
243
+ )
244
+ );
245
+ } catch (_) {
246
+ return O.none;
247
+ }
248
+ }
249
+
250
+ export function parseStabilityPoolRedeemerOrThrow(datum: string): StabilityPoolRedeemer {
251
+ return F.pipe(
252
+ parseStabilityPoolRedeemer(datum),
253
+ O.match(() => {
254
+ throw new Error('Expected a StabilityPoolRedeemer datum.');
255
+ }, F.identity),
256
+ );
257
+ }
258
+
239
259
  export function serialiseStabilityPoolDatum(
240
260
  d: typeof StabilityPoolDatumSchema.Type,
241
261
  /**
@@ -73,6 +73,26 @@ 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(Data.withSchema(StakingRedeemerSchema, DEFAULT_SCHEMA_OPTIONS).fromCBORHex(
79
+ datum,
80
+ ),
81
+ );
82
+ } catch (_) {
83
+ return O.none;
84
+ }
85
+ }
86
+
87
+ export function parseStakingRedeemerOrThrow(datum: string): StakingRedeemer {
88
+ return F.pipe(
89
+ parseStakingRedeemer(datum),
90
+ O.match(() => {
91
+ throw new Error('Expected a StakingRedeemer datum.');
92
+ }, F.identity),
93
+ );
94
+ }
95
+
76
96
  export function parseStakingPosition(datum: string): O.Option<StakingPosition> {
77
97
  try {
78
98
  return match(