@indigo-labs/indigo-sdk 0.5.4 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/index.d.mts +11 -1
  2. package/dist/index.d.ts +11 -1
  3. package/dist/index.js +17 -0
  4. package/dist/index.mjs +15 -0
  5. package/package.json +11 -1
  6. package/.claude/settings.local.json +0 -7
  7. package/.github/workflows/ci.yml +0 -66
  8. package/.husky/pre-commit +0 -1
  9. package/.nvmrc +0 -1
  10. package/.prettierignore +0 -1
  11. package/.prettierrc +0 -6
  12. package/eslint.config.mjs +0 -42
  13. package/scripts/bench.sh +0 -62
  14. package/scripts/run-repeat.sh +0 -22
  15. package/src/contracts/cdp/helpers.ts +0 -173
  16. package/src/contracts/cdp/scripts.ts +0 -70
  17. package/src/contracts/cdp/transactions.ts +0 -1584
  18. package/src/contracts/cdp/types-new.ts +0 -277
  19. package/src/contracts/cdp/types.ts +0 -43
  20. package/src/contracts/cdp-creator/queries.ts +0 -30
  21. package/src/contracts/cdp-creator/scripts.ts +0 -45
  22. package/src/contracts/cdp-creator/types-new.ts +0 -50
  23. package/src/contracts/cdp-creator/types.ts +0 -24
  24. package/src/contracts/collector/scripts.ts +0 -32
  25. package/src/contracts/collector/transactions.ts +0 -50
  26. package/src/contracts/collector/types-new.ts +0 -17
  27. package/src/contracts/execute/scripts.ts +0 -57
  28. package/src/contracts/execute/types-new.ts +0 -44
  29. package/src/contracts/execute/types.ts +0 -24
  30. package/src/contracts/gov/helpers.ts +0 -351
  31. package/src/contracts/gov/scripts.ts +0 -41
  32. package/src/contracts/gov/transactions.ts +0 -1607
  33. package/src/contracts/gov/types-new.ts +0 -268
  34. package/src/contracts/gov/types.ts +0 -22
  35. package/src/contracts/iasset/helpers.ts +0 -170
  36. package/src/contracts/iasset/queries.ts +0 -102
  37. package/src/contracts/iasset/scripts.ts +0 -38
  38. package/src/contracts/iasset/types.ts +0 -154
  39. package/src/contracts/initialize/actions.ts +0 -789
  40. package/src/contracts/initialize/helpers.ts +0 -616
  41. package/src/contracts/initialize/types.ts +0 -116
  42. package/src/contracts/interest-collection/helpers.ts +0 -19
  43. package/src/contracts/interest-collection/queries.ts +0 -66
  44. package/src/contracts/interest-collection/scripts.ts +0 -44
  45. package/src/contracts/interest-collection/transactions.ts +0 -433
  46. package/src/contracts/interest-collection/types-new.ts +0 -50
  47. package/src/contracts/interest-collection/types.ts +0 -26
  48. package/src/contracts/interest-oracle/helpers.ts +0 -61
  49. package/src/contracts/interest-oracle/scripts.ts +0 -18
  50. package/src/contracts/interest-oracle/transactions.ts +0 -151
  51. package/src/contracts/interest-oracle/types-new.ts +0 -32
  52. package/src/contracts/interest-oracle/types.ts +0 -16
  53. package/src/contracts/one-shot/scripts.ts +0 -12
  54. package/src/contracts/one-shot/transactions.ts +0 -66
  55. package/src/contracts/one-shot/types.ts +0 -22
  56. package/src/contracts/poll/helpers.ts +0 -37
  57. package/src/contracts/poll/scripts.ts +0 -71
  58. package/src/contracts/poll/types-poll-manager.ts +0 -20
  59. package/src/contracts/poll/types-poll-new.ts +0 -196
  60. package/src/contracts/poll/types-poll-shard.ts +0 -16
  61. package/src/contracts/price-oracle/helpers.ts +0 -30
  62. package/src/contracts/price-oracle/scripts.ts +0 -18
  63. package/src/contracts/price-oracle/transactions.ts +0 -115
  64. package/src/contracts/price-oracle/types-new.ts +0 -50
  65. package/src/contracts/price-oracle/types.ts +0 -16
  66. package/src/contracts/pyth-feed/helpers.ts +0 -82
  67. package/src/contracts/pyth-feed/scripts.ts +0 -15
  68. package/src/contracts/pyth-feed/types.ts +0 -181
  69. package/src/contracts/rob/helpers.ts +0 -666
  70. package/src/contracts/rob/scripts.ts +0 -35
  71. package/src/contracts/rob/transactions.ts +0 -423
  72. package/src/contracts/rob/types-new.ts +0 -128
  73. package/src/contracts/rob/types.ts +0 -16
  74. package/src/contracts/rob-leverage/helpers.ts +0 -422
  75. package/src/contracts/rob-leverage/transactions.ts +0 -368
  76. package/src/contracts/stability-pool/helpers.ts +0 -798
  77. package/src/contracts/stability-pool/queries.ts +0 -132
  78. package/src/contracts/stability-pool/scripts.ts +0 -51
  79. package/src/contracts/stability-pool/transactions.ts +0 -921
  80. package/src/contracts/stability-pool/types-new.ts +0 -385
  81. package/src/contracts/stability-pool/types.ts +0 -25
  82. package/src/contracts/stableswap/helpers.ts +0 -507
  83. package/src/contracts/stableswap/scripts.ts +0 -37
  84. package/src/contracts/stableswap/transactions.ts +0 -475
  85. package/src/contracts/stableswap/types-new.ts +0 -131
  86. package/src/contracts/stableswap/types.ts +0 -17
  87. package/src/contracts/staking/helpers.ts +0 -136
  88. package/src/contracts/staking/scripts.ts +0 -41
  89. package/src/contracts/staking/transactions.ts +0 -349
  90. package/src/contracts/staking/types-new.ts +0 -137
  91. package/src/contracts/staking/types.ts +0 -17
  92. package/src/contracts/treasury/helpers.ts +0 -21
  93. package/src/contracts/treasury/queries.ts +0 -100
  94. package/src/contracts/treasury/scripts.ts +0 -27
  95. package/src/contracts/treasury/transactions.ts +0 -334
  96. package/src/contracts/treasury/types-new.ts +0 -69
  97. package/src/contracts/treasury/types.ts +0 -14
  98. package/src/contracts/version-registry/scripts.ts +0 -29
  99. package/src/contracts/version-registry/types-new.ts +0 -18
  100. package/src/contracts/version-registry/types.ts +0 -17
  101. package/src/index.ts +0 -93
  102. package/src/scripts/always-fail-validator.ts +0 -7
  103. package/src/scripts/auth-token-policy.ts +0 -24
  104. package/src/scripts/iasset-policy.ts +0 -23
  105. package/src/types/evolution-schema-options.ts +0 -16
  106. package/src/types/generic.ts +0 -52
  107. package/src/types/multisig.ts +0 -48
  108. package/src/types/on-chain-decimal.ts +0 -57
  109. package/src/types/rational.ts +0 -61
  110. package/src/types/system-params.ts +0 -463
  111. package/src/utils/array-utils.ts +0 -108
  112. package/src/utils/bigint-utils.ts +0 -35
  113. package/src/utils/helper-txs.ts +0 -31
  114. package/src/utils/indigo-helpers.ts +0 -17
  115. package/src/utils/lucid-utils.ts +0 -125
  116. package/src/utils/oracle-helpers.ts +0 -62
  117. package/src/utils/pyth/decode.ts +0 -223
  118. package/src/utils/pyth/encode.ts +0 -262
  119. package/src/utils/pyth/index.ts +0 -14
  120. package/src/utils/pyth/types.ts +0 -87
  121. package/src/utils/time-helpers.ts +0 -4
  122. package/src/utils/utils.ts +0 -25
  123. package/src/validators/always-succeed-validator.ts +0 -6
  124. package/src/validators/cdp-creator-validator.ts +0 -7
  125. package/src/validators/cdp-redeem-validator.ts +0 -7
  126. package/src/validators/cdp-validator.ts +0 -7
  127. package/src/validators/collector-validator.ts +0 -7
  128. package/src/validators/execute-validator.ts +0 -7
  129. package/src/validators/governance-validator.ts +0 -7
  130. package/src/validators/iasset-validator.ts +0 -7
  131. package/src/validators/interest-collection-validator.ts +0 -7
  132. package/src/validators/interest-oracle-validator.ts +0 -7
  133. package/src/validators/one-shot-policy.ts +0 -7
  134. package/src/validators/poll-manager-validator.ts +0 -7
  135. package/src/validators/poll-shard-validator.ts +0 -7
  136. package/src/validators/price-oracle-validator.ts +0 -7
  137. package/src/validators/pyth-feed-validator.ts +0 -7
  138. package/src/validators/rob-validator.ts +0 -7
  139. package/src/validators/stability-pool-validator.ts +0 -7
  140. package/src/validators/stableswap-validator.ts +0 -7
  141. package/src/validators/staking-validator.ts +0 -7
  142. package/src/validators/treasury-validator.ts +0 -7
  143. package/src/validators/version-record-policy.ts +0 -7
  144. package/src/validators/version-registry-validator.ts +0 -7
  145. package/tests/always-succeed/script.ts +0 -7
  146. package/tests/array-utils.test.ts +0 -92
  147. package/tests/bigint-utils.test.ts +0 -41
  148. package/tests/cdp/actions.ts +0 -680
  149. package/tests/cdp/cdp-helpers.ts +0 -55
  150. package/tests/cdp/cdp-queries.ts +0 -423
  151. package/tests/cdp/cdp.test.ts +0 -6730
  152. package/tests/cdp/transactions-mutated.ts +0 -1733
  153. package/tests/data/system-params.json +0 -1155
  154. package/tests/datums.test.ts +0 -302
  155. package/tests/endpoints/initialize.ts +0 -78
  156. package/tests/endpoints/interest-collector.ts +0 -37
  157. package/tests/endpoints/treasury.ts +0 -70
  158. package/tests/gov/actions.ts +0 -381
  159. package/tests/gov/gov.test.ts +0 -5147
  160. package/tests/gov/governance-queries.ts +0 -37
  161. package/tests/hash-checks.test.ts +0 -112
  162. package/tests/indigo-test-helpers.ts +0 -99
  163. package/tests/initialize.test.ts +0 -79
  164. package/tests/interest-calculations.test.ts +0 -120
  165. package/tests/interest-collection/interest-collection.test.ts +0 -843
  166. package/tests/interest-collection/transactions-mutated.ts +0 -260
  167. package/tests/interest-oracle.test.ts +0 -93
  168. package/tests/mock/assets-mock.ts +0 -243
  169. package/tests/mock/protocol-params-mock.ts +0 -21
  170. package/tests/price-oracle/actions.ts +0 -161
  171. package/tests/price-oracle/price-oracle-queries.ts +0 -12
  172. package/tests/price-oracle/price-oracle.test.ts +0 -228
  173. package/tests/price-oracle/transactions-mutated.ts +0 -59
  174. package/tests/pyth/endpoints.ts +0 -96
  175. package/tests/pyth/helpers.ts +0 -37
  176. package/tests/pyth/pyth-encoding.test.ts +0 -376
  177. package/tests/pyth/pyth-feeds.test.ts +0 -943
  178. package/tests/pyth/pyth-indigo.test.ts +0 -505
  179. package/tests/pyth/pyth.test.ts +0 -299
  180. package/tests/queries/collector-queries.ts +0 -27
  181. package/tests/queries/execute-queries.ts +0 -47
  182. package/tests/queries/iasset-queries.ts +0 -149
  183. package/tests/queries/interest-oracle-queries.ts +0 -12
  184. package/tests/queries/poll-queries.ts +0 -97
  185. package/tests/queries/staking-queries.ts +0 -54
  186. package/tests/rob/actions.ts +0 -56
  187. package/tests/rob/rob-leverage.test.ts +0 -2555
  188. package/tests/rob/rob-queries.ts +0 -95
  189. package/tests/rob/rob.test.ts +0 -3677
  190. package/tests/rob/transactions-mutated.ts +0 -844
  191. package/tests/script-size.test.ts +0 -240
  192. package/tests/setup.ts +0 -135
  193. package/tests/stability-pool/actions.ts +0 -229
  194. package/tests/stability-pool.test.ts +0 -6491
  195. package/tests/stableswap/stableswap-actions.ts +0 -83
  196. package/tests/stableswap/stableswap-queries.ts +0 -98
  197. package/tests/stableswap/stableswap.test.ts +0 -4471
  198. package/tests/stableswap/transactions-mutated.ts +0 -348
  199. package/tests/staking.test.ts +0 -172
  200. package/tests/test-helpers.ts +0 -94
  201. package/tests/treasury/actions.ts +0 -67
  202. package/tests/treasury/treasury.test.ts +0 -320
  203. package/tests/utils/asserts.ts +0 -87
  204. package/tests/utils/benchmark-utils.ts +0 -130
  205. package/tests/utils/index.ts +0 -168
  206. package/tsconfig.build.json +0 -4
  207. package/tsconfig.json +0 -27
  208. package/vitest.config.ts +0 -11
package/dist/index.d.mts CHANGED
@@ -1,8 +1,12 @@
1
1
  import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
2
2
  import { Data, UTxO, Credential, OutRef, LucidEvolution, TxBuilder, Assets, WithdrawalValidator, SpendingValidator, MintingPolicy, Address, PolicyId, Network, ScriptHash, ProtocolParameters, OutputDatum, Script, Datum } from '@lucid-evolution/lucid';
3
+ export { _lucid_evolution_lucid as Lucid };
3
4
  import { AssetClass } from '@3rd-eye-labs/cardano-offchain-common';
5
+ import * as cardanoOffchainCommon from '@3rd-eye-labs/cardano-offchain-common';
6
+ export { cardanoOffchainCommon as OffchainCommon };
4
7
  import * as Core from '@evolution-sdk/evolution';
5
8
  import { TSchema, Schema, Data as Data$1 } from '@evolution-sdk/evolution';
9
+ export { Core as Evo };
6
10
  import { option, ord } from 'fp-ts';
7
11
  import * as effect_Schema from 'effect/Schema';
8
12
  import { Schema as Schema$1 } from 'effect';
@@ -817,6 +821,12 @@ declare function rationalSub(a: Rational, b: Rational): Rational;
817
821
  declare function rationalMul(a: Rational, b: Rational): Rational;
818
822
  declare function rationalDiv(a: Rational, b: Rational): Rational;
819
823
  declare function rationalToFloat(a: Rational): number;
824
+ /**
825
+ * This is a lossy conversion, the precision determines the number
826
+ * of decimal places that will be retained. Additionally, use of floats
827
+ * causes some additional imprecisions.
828
+ */
829
+ declare function numberToRational(num: number, precision?: number): Rational;
820
830
 
821
831
  /**
822
832
  * Amount of iasset equal in value to the given number of collateral amount.
@@ -4742,4 +4752,4 @@ declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;
4742
4752
 
4743
4753
  declare const alwaysFailValidator: SpendingValidator;
4744
4754
 
4745
- export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type PSMProcessingConfig, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapInfo, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderInfo, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectPriceFeedIds, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, derivePythPrice, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateMinOrderOutputLovelaces, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findAdminInterestCollectors, findAllInterestCollectors, findAllTreasuryUtxos, findAllTreasuryUtxosWithNonAdaAsset, findCollateralAsset, findE2s2sSnapshots, findIAsset, findRandomCdpCreator, findRandomNonAdminInterestCollector, findRandomTreasuryUtxo, findRandomTreasuryUtxoWithAsset, findRandomTreasuryUtxoWithOnlyAda, findRelevantE2s2sIdxs, findStabilityPool, findStabilityPoolAccount, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, pickValidSatisfiableOrders, processSpRequest, psmOrderType, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, rewardsPerAsset, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summariseOrder, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
4755
+ export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type PSMProcessingConfig, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapInfo, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderInfo, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectPriceFeedIds, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, derivePythPrice, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateMinOrderOutputLovelaces, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findAdminInterestCollectors, findAllInterestCollectors, findAllTreasuryUtxos, findAllTreasuryUtxosWithNonAdaAsset, findCollateralAsset, findE2s2sSnapshots, findIAsset, findRandomCdpCreator, findRandomNonAdminInterestCollector, findRandomTreasuryUtxo, findRandomTreasuryUtxoWithAsset, findRandomTreasuryUtxoWithOnlyAda, findRelevantE2s2sIdxs, findStabilityPool, findStabilityPoolAccount, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, numberToRational, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, pickValidSatisfiableOrders, processSpRequest, psmOrderType, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, rewardsPerAsset, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summariseOrder, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
1
  import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
2
2
  import { Data, UTxO, Credential, OutRef, LucidEvolution, TxBuilder, Assets, WithdrawalValidator, SpendingValidator, MintingPolicy, Address, PolicyId, Network, ScriptHash, ProtocolParameters, OutputDatum, Script, Datum } from '@lucid-evolution/lucid';
3
+ export { _lucid_evolution_lucid as Lucid };
3
4
  import { AssetClass } from '@3rd-eye-labs/cardano-offchain-common';
5
+ import * as cardanoOffchainCommon from '@3rd-eye-labs/cardano-offchain-common';
6
+ export { cardanoOffchainCommon as OffchainCommon };
4
7
  import * as Core from '@evolution-sdk/evolution';
5
8
  import { TSchema, Schema, Data as Data$1 } from '@evolution-sdk/evolution';
9
+ export { Core as Evo };
6
10
  import { option, ord } from 'fp-ts';
7
11
  import * as effect_Schema from 'effect/Schema';
8
12
  import { Schema as Schema$1 } from 'effect';
@@ -817,6 +821,12 @@ declare function rationalSub(a: Rational, b: Rational): Rational;
817
821
  declare function rationalMul(a: Rational, b: Rational): Rational;
818
822
  declare function rationalDiv(a: Rational, b: Rational): Rational;
819
823
  declare function rationalToFloat(a: Rational): number;
824
+ /**
825
+ * This is a lossy conversion, the precision determines the number
826
+ * of decimal places that will be retained. Additionally, use of floats
827
+ * causes some additional imprecisions.
828
+ */
829
+ declare function numberToRational(num: number, precision?: number): Rational;
820
830
 
821
831
  /**
822
832
  * Amount of iasset equal in value to the given number of collateral amount.
@@ -4742,4 +4752,4 @@ declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;
4742
4752
 
4743
4753
  declare const alwaysFailValidator: SpendingValidator;
4744
4754
 
4745
- export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type PSMProcessingConfig, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapInfo, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderInfo, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectPriceFeedIds, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, derivePythPrice, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateMinOrderOutputLovelaces, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findAdminInterestCollectors, findAllInterestCollectors, findAllTreasuryUtxos, findAllTreasuryUtxosWithNonAdaAsset, findCollateralAsset, findE2s2sSnapshots, findIAsset, findRandomCdpCreator, findRandomNonAdminInterestCollector, findRandomTreasuryUtxo, findRandomTreasuryUtxoWithAsset, findRandomTreasuryUtxoWithOnlyAda, findRelevantE2s2sIdxs, findStabilityPool, findStabilityPoolAccount, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, pickValidSatisfiableOrders, processSpRequest, psmOrderType, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, rewardsPerAsset, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summariseOrder, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
4755
+ export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type PSMProcessingConfig, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapInfo, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderInfo, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectPriceFeedIds, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, derivePythPrice, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateMinOrderOutputLovelaces, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findAdminInterestCollectors, findAllInterestCollectors, findAllTreasuryUtxos, findAllTreasuryUtxosWithNonAdaAsset, findCollateralAsset, findE2s2sSnapshots, findIAsset, findRandomCdpCreator, findRandomNonAdminInterestCollector, findRandomTreasuryUtxo, findRandomTreasuryUtxoWithAsset, findRandomTreasuryUtxoWithOnlyAda, findRelevantE2s2sIdxs, findStabilityPool, findStabilityPoolAccount, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, numberToRational, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, pickValidSatisfiableOrders, processSpRequest, psmOrderType, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, rewardsPerAsset, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summariseOrder, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
package/dist/index.js CHANGED
@@ -44,6 +44,7 @@ __export(index_exports, {
44
44
  CredentialSchema: () => CredentialSchema,
45
45
  DEFAULT_INIT_OPTIONS: () => DEFAULT_INIT_OPTIONS,
46
46
  DerivedPythPriceSchema: () => DerivedPythPriceSchema,
47
+ Evo: () => Evo,
47
48
  ExecuteParams: () => ExecuteParams,
48
49
  GovParams: () => GovParams,
49
50
  IAssetPriceInfoSchema: () => IAssetPriceInfoSchema,
@@ -52,6 +53,7 @@ __export(index_exports, {
52
53
  InterestCollectionParamsSchema: () => InterestCollectionParamsSchema,
53
54
  InterestOracleDatumSchema: () => InterestOracleDatumSchema,
54
55
  InterestOracleParamsSchema: () => InterestOracleParamsSchema,
56
+ Lucid: () => Lucid,
55
57
  MAX_BUY_ROB_REDEMPTIONS_COUNT: () => MAX_BUY_ROB_REDEMPTIONS_COUNT,
56
58
  MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET: () => MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET,
57
59
  MAX_E2S2S_ENTRIES_COUNT: () => MAX_E2S2S_ENTRIES_COUNT,
@@ -62,6 +64,7 @@ __export(index_exports, {
62
64
  ONE_HOUR: () => ONE_HOUR,
63
65
  ONE_SECOND: () => ONE_SECOND,
64
66
  ONE_YEAR: () => ONE_YEAR,
67
+ OffchainCommon: () => OffchainCommon,
65
68
  OneShotParamsSchema: () => OneShotParamsSchema,
66
69
  OracleIdxSchema: () => OracleIdxSchema,
67
70
  PRICE_UPDATE_MAGIC: () => PRICE_UPDATE_MAGIC,
@@ -261,6 +264,7 @@ __export(index_exports, {
261
264
  mkTreasuryValidatorFromSP: () => mkTreasuryValidatorFromSP,
262
265
  mkVersionRecordTokenPolicy: () => mkVersionRecordTokenPolicy,
263
266
  mkVersionRegistryValidator: () => mkVersionRegistryValidator,
267
+ numberToRational: () => numberToRational,
264
268
  oneShotMintTx: () => oneShotMintTx,
265
269
  openCdp: () => openCdp,
266
270
  openRob: () => openRob,
@@ -407,6 +411,9 @@ __export(index_exports, {
407
411
  zeroNegatives: () => zeroNegatives
408
412
  });
409
413
  module.exports = __toCommonJS(index_exports);
414
+ var Lucid = __toESM(require("@lucid-evolution/lucid"));
415
+ var OffchainCommon = __toESM(require("@3rd-eye-labs/cardano-offchain-common"));
416
+ var Evo = __toESM(require("@evolution-sdk/evolution"));
410
417
 
411
418
  // src/contracts/cdp/transactions.ts
412
419
  var import_lucid12 = require("@lucid-evolution/lucid");
@@ -506,6 +513,12 @@ function rationalDiv(a, b) {
506
513
  function rationalToFloat(a) {
507
514
  return Number(a.numerator) / Number(a.denominator);
508
515
  }
516
+ function numberToRational(num, precision = 10 ** 12) {
517
+ return {
518
+ numerator: BigInt(Math.floor(num * precision)),
519
+ denominator: BigInt(precision)
520
+ };
521
+ }
509
522
 
510
523
  // src/contracts/pyth-feed/types.ts
511
524
  var PythConfigurationSchema = import_evolution2.TSchema.Struct({
@@ -12088,6 +12101,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
12088
12101
  CredentialSchema,
12089
12102
  DEFAULT_INIT_OPTIONS,
12090
12103
  DerivedPythPriceSchema,
12104
+ Evo,
12091
12105
  ExecuteParams,
12092
12106
  GovParams,
12093
12107
  IAssetPriceInfoSchema,
@@ -12096,6 +12110,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
12096
12110
  InterestCollectionParamsSchema,
12097
12111
  InterestOracleDatumSchema,
12098
12112
  InterestOracleParamsSchema,
12113
+ Lucid,
12099
12114
  MAX_BUY_ROB_REDEMPTIONS_COUNT,
12100
12115
  MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET,
12101
12116
  MAX_E2S2S_ENTRIES_COUNT,
@@ -12106,6 +12121,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
12106
12121
  ONE_HOUR,
12107
12122
  ONE_SECOND,
12108
12123
  ONE_YEAR,
12124
+ OffchainCommon,
12109
12125
  OneShotParamsSchema,
12110
12126
  OracleIdxSchema,
12111
12127
  PRICE_UPDATE_MAGIC,
@@ -12305,6 +12321,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
12305
12321
  mkTreasuryValidatorFromSP,
12306
12322
  mkVersionRecordTokenPolicy,
12307
12323
  mkVersionRegistryValidator,
12324
+ numberToRational,
12308
12325
  oneShotMintTx,
12309
12326
  openCdp,
12310
12327
  openRob,
package/dist/index.mjs CHANGED
@@ -1,3 +1,8 @@
1
+ // src/index.ts
2
+ import * as Lucid from "@lucid-evolution/lucid";
3
+ import * as OffchainCommon from "@3rd-eye-labs/cardano-offchain-common";
4
+ import * as Evo from "@evolution-sdk/evolution";
5
+
1
6
  // src/contracts/cdp/transactions.ts
2
7
  import {
3
8
  addAssets as addAssets6,
@@ -109,6 +114,12 @@ function rationalDiv(a, b) {
109
114
  function rationalToFloat(a) {
110
115
  return Number(a.numerator) / Number(a.denominator);
111
116
  }
117
+ function numberToRational(num, precision = 10 ** 12) {
118
+ return {
119
+ numerator: BigInt(Math.floor(num * precision)),
120
+ denominator: BigInt(precision)
121
+ };
122
+ }
112
123
 
113
124
  // src/contracts/pyth-feed/types.ts
114
125
  var PythConfigurationSchema = TSchema2.Struct({
@@ -12002,6 +12013,7 @@ export {
12002
12013
  CredentialSchema,
12003
12014
  DEFAULT_INIT_OPTIONS,
12004
12015
  DerivedPythPriceSchema,
12016
+ Evo,
12005
12017
  ExecuteParams,
12006
12018
  GovParams,
12007
12019
  IAssetPriceInfoSchema,
@@ -12010,6 +12022,7 @@ export {
12010
12022
  InterestCollectionParamsSchema,
12011
12023
  InterestOracleDatumSchema,
12012
12024
  InterestOracleParamsSchema,
12025
+ Lucid,
12013
12026
  MAX_BUY_ROB_REDEMPTIONS_COUNT,
12014
12027
  MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET,
12015
12028
  MAX_E2S2S_ENTRIES_COUNT,
@@ -12020,6 +12033,7 @@ export {
12020
12033
  ONE_HOUR,
12021
12034
  ONE_SECOND,
12022
12035
  ONE_YEAR,
12036
+ OffchainCommon,
12023
12037
  OneShotParamsSchema,
12024
12038
  OracleIdxSchema,
12025
12039
  PRICE_UPDATE_MAGIC,
@@ -12219,6 +12233,7 @@ export {
12219
12233
  mkTreasuryValidatorFromSP,
12220
12234
  mkVersionRecordTokenPolicy,
12221
12235
  mkVersionRegistryValidator,
12236
+ numberToRational,
12222
12237
  oneShotMintTx,
12223
12238
  openCdp,
12224
12239
  openRob,
package/package.json CHANGED
@@ -1,10 +1,20 @@
1
1
  {
2
2
  "name": "@indigo-labs/indigo-sdk",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
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",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
8
18
  "lint-staged": {
9
19
  "*.{js,ts,jsx,tsx}": [
10
20
  "prettier --write",
@@ -1,7 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(xargs cat)"
5
- ]
6
- }
7
- }
@@ -1,66 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
-
9
- jobs:
10
- lint-and-build:
11
- runs-on: self-hosted
12
-
13
- steps:
14
- - name: Checkout code
15
- uses: actions/checkout@v4
16
-
17
- - name: Setup Node.js
18
- uses: actions/setup-node@v6
19
- with:
20
- node-version-file: '.nvmrc'
21
-
22
- - name: Setup pnpm
23
- uses: pnpm/action-setup@v6
24
-
25
- - name: Get pnpm store directory
26
- shell: bash
27
- run: |
28
- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29
-
30
- - name: Setup pnpm cache
31
- uses: actions/cache@v4
32
- with:
33
- path: ${{ env.STORE_PATH }}
34
- key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35
- restore-keys: |
36
- ${{ runner.os }}-pnpm-store-
37
-
38
- - name: Install dependencies
39
- run: pnpm install
40
-
41
- - name: Check formatting
42
- run: pnpm run format:check
43
-
44
- - name: Check linting
45
- run: pnpm run lint
46
-
47
- - name: Type check
48
- run: pnpm run type-check
49
-
50
- - name: Run tests
51
- run: pnpm test
52
-
53
- - name: Build project
54
- run: pnpm run build
55
-
56
- - name: Verify build output
57
- run: |
58
- if [ ! -d "dist" ]; then
59
- echo "Build failed: dist directory not found"
60
- exit 1
61
- fi
62
- if [ ! -f "dist/index.js" ] || [ ! -f "dist/index.mjs" ] || [ ! -f "dist/index.d.ts" ]; then
63
- echo "Build failed: expected output files not found"
64
- exit 1
65
- fi
66
- echo "Build verification passed"
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- pnpm exec lint-staged
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v24.4.1
package/.prettierignore DELETED
@@ -1 +0,0 @@
1
- pnpm-lock.yaml
package/.prettierrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "all",
4
- "tabWidth": 2,
5
- "semi": true
6
- }
package/eslint.config.mjs DELETED
@@ -1,42 +0,0 @@
1
- import eslint from '@eslint/js';
2
- import tseslint from 'typescript-eslint';
3
- import vitestEslint from '@vitest/eslint-plugin';
4
- import { defineConfig } from 'eslint/config';
5
-
6
- export default defineConfig(
7
- {
8
- ignores: ['**/dist/*', '**/node_modules/*'],
9
- },
10
- {
11
- files: ['**/*.ts'],
12
- extends: [
13
- // The vitest eslint recommended is important at least because it's easy to forget `expect`'s matcher calls.
14
- vitestEslint.configs.recommended,
15
- eslint.configs.recommended,
16
- tseslint.configs.recommendedTypeChecked,
17
- {
18
- languageOptions: {
19
- parserOptions: {
20
- projectService: true,
21
- tsconfigRootDir: import.meta.dirname,
22
- },
23
- },
24
- },
25
- ],
26
- rules: {
27
- 'vitest/expect-expect': 'off',
28
- 'no-unreachable': 'warn',
29
- 'no-use-before-define': 'error',
30
- 'no-unused-expressions': 'warn',
31
- '@typescript-eslint/no-unused-vars': [
32
- 'error',
33
- {
34
- args: 'all',
35
- argsIgnorePattern: '^_',
36
- varsIgnorePattern: '^_',
37
- caughtErrorsIgnorePattern: '^_',
38
- },
39
- ],
40
- },
41
- },
42
- );
package/scripts/bench.sh DELETED
@@ -1,62 +0,0 @@
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}%"
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Usage: ./scripts/run-repeat.sh <n> <command...>
3
- # Example: ./scripts/run-repeat.sh 100 pnpm test stableswap.test.ts
4
-
5
- N=${1:?Usage: $0 <n> <command...>}
6
- shift
7
- CMD=("$@")
8
-
9
- failures=0
10
-
11
- for ((i = 1; i <= N; i++)); do
12
- printf "Run %d/%d ... " "$i" "$N"
13
- if "${CMD[@]}" > /tmp/run-repeat-out.txt 2>&1; then
14
- echo "ok"
15
- else
16
- echo "FAILED"
17
- ((failures++))
18
- fi
19
- done
20
-
21
- echo ""
22
- echo "Done: $((N - failures))/$N passed, $failures failed."