@indigo-labs/indigo-sdk 0.1.28 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/.github/workflows/ci.yml +8 -3
  2. package/dist/index.d.mts +1300 -671
  3. package/dist/index.d.ts +1300 -671
  4. package/dist/index.js +4663 -2220
  5. package/dist/index.mjs +4594 -2190
  6. package/eslint.config.mjs +7 -1
  7. package/package.json +9 -4
  8. package/src/contracts/cdp/helpers.ts +167 -0
  9. package/src/contracts/cdp/scripts.ts +33 -0
  10. package/src/contracts/cdp/transactions.ts +1310 -0
  11. package/src/contracts/cdp/types.ts +161 -0
  12. package/src/contracts/cdp-creator/scripts.ts +39 -0
  13. package/src/{types/indigo/cdp-creator.ts → contracts/cdp-creator/types.ts} +6 -4
  14. package/src/contracts/collector/scripts.ts +32 -0
  15. package/src/contracts/collector/transactions.ts +44 -0
  16. package/src/contracts/execute/scripts.ts +48 -0
  17. package/src/contracts/execute/types.ts +57 -0
  18. package/src/contracts/gov/helpers.ts +157 -0
  19. package/src/contracts/gov/scripts.ts +34 -0
  20. package/src/contracts/gov/transactions.ts +1224 -0
  21. package/src/contracts/gov/types-new.ts +115 -0
  22. package/src/contracts/gov/types.ts +89 -0
  23. package/src/{helpers/interest-oracle.ts → contracts/interest-oracle/helpers.ts} +37 -9
  24. package/src/contracts/interest-oracle/scripts.ts +18 -0
  25. package/src/contracts/interest-oracle/transactions.ts +149 -0
  26. package/src/{types/indigo/interest-oracle.ts → contracts/interest-oracle/types.ts} +1 -1
  27. package/src/contracts/lrp/scripts.ts +27 -0
  28. package/src/contracts/{lrp.ts → lrp/transactions.ts} +14 -14
  29. package/src/{types/indigo/lrp.ts → contracts/lrp/types.ts} +2 -2
  30. package/src/{scripts/one-shot-policy.ts → contracts/one-shot/scripts.ts} +1 -1
  31. package/src/contracts/{one-shot.ts → one-shot/transactions.ts} +3 -3
  32. package/src/contracts/poll/helpers.ts +55 -0
  33. package/src/contracts/poll/scripts.ts +72 -0
  34. package/src/contracts/poll/types-poll-manager.ts +38 -0
  35. package/src/contracts/poll/types-poll-shard.ts +38 -0
  36. package/src/contracts/poll/types-poll.ts +88 -0
  37. package/src/{scripts/price-oracle-validator.ts → contracts/price-oracle/scripts.ts} +1 -4
  38. package/src/contracts/price-oracle/transactions.ts +112 -0
  39. package/src/{types/indigo/price-oracle.ts → contracts/price-oracle/types.ts} +16 -4
  40. package/src/{helpers/stability-pool-helpers.ts → contracts/stability-pool/helpers.ts} +110 -6
  41. package/src/contracts/stability-pool/scripts.ts +46 -0
  42. package/src/contracts/stability-pool/transactions.ts +676 -0
  43. package/src/contracts/stability-pool/types-new.ts +208 -0
  44. package/src/contracts/stability-pool/types.ts +42 -0
  45. package/src/contracts/staking/helpers.ts +116 -0
  46. package/src/contracts/staking/scripts.ts +41 -0
  47. package/src/contracts/staking/transactions.ts +268 -0
  48. package/src/contracts/staking/types-new.ts +81 -0
  49. package/src/contracts/staking/types.ts +41 -0
  50. package/src/contracts/treasury/scripts.ts +37 -0
  51. package/src/contracts/treasury/transactions.ts +44 -0
  52. package/src/contracts/treasury/types.ts +55 -0
  53. package/src/contracts/version-registry/scripts.ts +29 -0
  54. package/src/contracts/version-registry/types-new.ts +19 -0
  55. package/src/{types/indigo/version-record.ts → contracts/version-registry/types.ts} +1 -1
  56. package/src/contracts/vesting/helpers.ts +267 -0
  57. package/src/index.ts +39 -33
  58. package/src/types/evolution-schema-options.ts +16 -0
  59. package/src/types/generic.ts +78 -60
  60. package/src/types/on-chain-decimal.ts +22 -0
  61. package/src/types/system-params.ts +22 -11
  62. package/src/utils/bigint-utils.ts +7 -0
  63. package/src/{helpers → utils}/helper-txs.ts +1 -0
  64. package/src/utils/time-helpers.ts +4 -0
  65. package/src/{helpers/helpers.ts → utils/utils.ts} +0 -10
  66. package/src/{helpers → utils}/value-helpers.ts +10 -0
  67. package/src/{scripts → validators}/cdp-creator-validator.ts +4 -50
  68. package/src/{scripts → validators}/cdp-validator.ts +3 -5
  69. package/src/{scripts → validators}/collector-validator.ts +2 -3
  70. package/src/{scripts/version-registry.ts → validators/execute-validator.ts} +3 -11
  71. package/src/{scripts/gov-validator.ts → validators/governance-validator.ts} +3 -40
  72. package/src/{scripts → validators}/interest-oracle-validator.ts +4 -20
  73. package/src/validators/lrp-validator.ts +7 -0
  74. package/src/validators/poll-manager-validator.ts +7 -0
  75. package/src/{scripts → validators}/poll-shard-validator.ts +3 -43
  76. package/src/{scripts → validators}/stability-pool-validator.ts +4 -57
  77. package/src/{scripts → validators}/staking-validator.ts +2 -3
  78. package/src/{scripts → validators}/treasury-validator.ts +2 -3
  79. package/src/{scripts → validators}/version-record-policy.ts +4 -23
  80. package/src/validators/version-registry-validator.ts +7 -0
  81. package/tests/cdp.test.ts +1565 -0
  82. package/tests/datums.test.ts +125 -108
  83. package/tests/endpoints/initialize.ts +240 -338
  84. package/tests/gov.test.ts +1874 -0
  85. package/tests/hash-checks.test.ts +26 -21
  86. package/tests/indigo-test-helpers.ts +1 -55
  87. package/tests/initialize.test.ts +10 -5
  88. package/tests/interest-calculations.test.ts +18 -18
  89. package/tests/interest-oracle.test.ts +20 -18
  90. package/tests/lrp.test.ts +191 -65
  91. package/tests/mock/assets-mock.ts +59 -0
  92. package/tests/queries/cdp-queries.ts +144 -0
  93. package/tests/queries/collector-queries.ts +26 -0
  94. package/tests/queries/execute-queries.ts +46 -0
  95. package/tests/queries/governance-queries.ts +19 -16
  96. package/tests/queries/iasset-queries.ts +46 -23
  97. package/tests/queries/interest-oracle-queries.ts +3 -6
  98. package/tests/queries/lrp-queries.ts +2 -2
  99. package/tests/queries/poll-queries.ts +97 -0
  100. package/tests/queries/price-oracle-queries.ts +5 -22
  101. package/tests/queries/stability-pool-queries.ts +10 -8
  102. package/tests/queries/staking-queries.ts +28 -19
  103. package/tests/queries/treasury-queries.ts +19 -0
  104. package/tests/stability-pool.test.ts +186 -71
  105. package/tests/staking.test.ts +30 -23
  106. package/tests/test-helpers.ts +11 -2
  107. package/tests/utils/asserts.ts +13 -0
  108. package/tests/utils/index.ts +50 -0
  109. package/tsconfig.json +3 -1
  110. package/vitest.config.ts +1 -1
  111. package/.github/workflows/test.yml +0 -44
  112. package/src/contracts/cdp.ts +0 -752
  113. package/src/contracts/collector.ts +0 -98
  114. package/src/contracts/gov.ts +0 -1
  115. package/src/contracts/interest-oracle.ts +0 -149
  116. package/src/contracts/stability-pool.ts +0 -690
  117. package/src/contracts/staking.ts +0 -348
  118. package/src/contracts/treasury.ts +0 -112
  119. package/src/helpers/asset-helpers.ts +0 -62
  120. package/src/helpers/staking-helpers.ts +0 -94
  121. package/src/helpers/time-helpers.ts +0 -4
  122. package/src/scripts/execute-validator.ts +0 -52
  123. package/src/scripts/lrp-validator.ts +0 -40
  124. package/src/scripts/poll-manager-validator.ts +0 -52
  125. package/src/types/indigo/cdp.ts +0 -88
  126. package/src/types/indigo/execute.ts +0 -21
  127. package/src/types/indigo/gov.ts +0 -51
  128. package/src/types/indigo/poll-manager.ts +0 -21
  129. package/src/types/indigo/poll-shard.ts +0 -16
  130. package/src/types/indigo/stability-pool.ts +0 -233
  131. package/src/types/indigo/staking.ts +0 -99
  132. /package/src/{types/one-shot.ts → contracts/one-shot/types.ts} +0 -0
  133. /package/src/{helpers/price-oracle-helpers.ts → contracts/price-oracle/helpers.ts} +0 -0
  134. /package/src/{helpers → utils}/indigo-helpers.ts +0 -0
  135. /package/src/{helpers → utils}/lucid-utils.ts +0 -0
package/dist/index.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
2
- import { Data, LucidEvolution, OutRef, TxBuilder, SpendingValidator, Credential as Credential$1, UTxO, Address as Address$1, Datum, Network, ScriptHash, Assets, ScriptType, Redeemer, PolicyId } from '@lucid-evolution/lucid';
2
+ import { Data, Network, OutRef, Credential, LucidEvolution, TxBuilder, Redeemer, Datum, UTxO, SpendingValidator, MintingPolicy, ScriptHash, Address, Assets, PolicyId, Unit } from '@lucid-evolution/lucid';
3
+ import { option } from 'fp-ts';
4
+ import { Core } from '@evolution-sdk/evolution';
3
5
 
4
6
  declare const AssetClassSchema: _lucid_evolution_lucid.TObject<{
5
7
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
@@ -20,8 +22,21 @@ declare const CredentialSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_
20
22
  }> | _lucid_evolution_lucid.TObject<{
21
23
  ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
22
24
  }>)[]>;
23
- type Credential = Data.Static<typeof CredentialSchema>;
24
- declare const Credential: Credential;
25
+ type CredentialD = Data.Static<typeof CredentialSchema>;
26
+ declare const CredentialD: CredentialD;
27
+ declare const StakeCredentialSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
28
+ Inline: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
29
+ PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
30
+ }> | _lucid_evolution_lucid.TObject<{
31
+ ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
32
+ }>)[]>]>;
33
+ }> | _lucid_evolution_lucid.TObject<{
34
+ Pointer: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TObject<{
35
+ slotNumber: _lucid_evolution_lucid.TUnsafe<bigint>;
36
+ transactionIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
37
+ certificateIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
38
+ }>]>;
39
+ }>)[]>;
25
40
  declare const AddressSchema: _lucid_evolution_lucid.TObject<{
26
41
  paymentCredential: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
27
42
  PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
@@ -40,12 +55,12 @@ declare const AddressSchema: _lucid_evolution_lucid.TObject<{
40
55
  transactionIndex: bigint;
41
56
  certificateIndex: bigint;
42
57
  }];
43
- }>;
58
+ } | null>;
44
59
  }>;
45
- type Address = Data.Static<typeof AddressSchema>;
46
- declare const Address: Address;
47
- declare function addressToBech32(lucid: LucidEvolution, address: Address): string;
48
- declare function addressFromBech32(address: string): Address;
60
+ type AddressD = Data.Static<typeof AddressSchema>;
61
+ declare const AddressD: AddressD;
62
+ declare function addressToBech32(address: AddressD, network: Network): string;
63
+ declare function addressFromBech32(address: string): AddressD;
49
64
  interface CurrencySymbol {
50
65
  unCurrencySymbol: string;
51
66
  }
@@ -60,9 +75,9 @@ type AssetClassSP = [CurrencySymbol, TokenName];
60
75
  interface SystemParams {
61
76
  versionRecordParams: VersionRecordParams;
62
77
  validatorHashes: ValidatorHashes;
63
- treasuryParams: TreasuryParams;
78
+ treasuryParams: TreasuryParamsSP;
64
79
  startTime: StartTime;
65
- stakingParams: StakingParams;
80
+ stakingParams: StakingParamsSP;
66
81
  stabilityPoolParams: StabilityPoolParamsSP;
67
82
  scriptReferences: ScriptReferences;
68
83
  pollShardParams: PollShardParamsSP;
@@ -72,8 +87,8 @@ interface SystemParams {
72
87
  govParams: GovParamsSP;
73
88
  executeParams: ExecuteParamsSP;
74
89
  distributionParams: DistributionParams;
75
- collectorParams: CollectorParams;
76
- cdpParams: CdpParams;
90
+ collectorParams: CollectorParamsSP;
91
+ cdpParams: CdpParamsSP;
77
92
  cdpCreatorParams: CDPCreatorParamsSP;
78
93
  }
79
94
  type ValidatorHashes = {
@@ -107,7 +122,7 @@ interface PubKeyHash {
107
122
  interface VersionRecordParams {
108
123
  upgradeToken: AssetClassSP;
109
124
  }
110
- interface TreasuryParams {
125
+ interface TreasuryParamsSP {
111
126
  upgradeToken: AssetClassSP;
112
127
  versionRecordToken: AssetClassSP;
113
128
  treasuryUtxosStakeCredential?: ScriptCredential;
@@ -116,7 +131,7 @@ interface StartTime {
116
131
  slot: number;
117
132
  blockHeader: string;
118
133
  }
119
- interface StakingParams {
134
+ interface StakingParamsSP {
120
135
  versionRecordToken: AssetClassSP;
121
136
  stakingToken: AssetClassSP;
122
137
  stakingManagerNFT: AssetClassSP;
@@ -139,7 +154,6 @@ interface StabilityPoolParamsSP {
139
154
  accountAdjustmentFeeLovelaces: number;
140
155
  }
141
156
  interface ScriptReferences {
142
- vestingValidatorRef: ScriptReference;
143
157
  versionRegistryValidatorRef: ScriptReference;
144
158
  versionRecordTokenPolicyRef: ScriptReference;
145
159
  treasuryValidatorRef: ScriptReference;
@@ -148,7 +162,6 @@ interface ScriptReferences {
148
162
  pollShardValidatorRef: ScriptReference;
149
163
  pollManagerValidatorRef: ScriptReference;
150
164
  lrpValidatorRef: ScriptReference;
151
- liquidityValidatorRef: ScriptReference;
152
165
  iAssetTokenPolicyRef: ScriptReference;
153
166
  governanceValidatorRef: ScriptReference;
154
167
  executeValidatorRef: ScriptReference;
@@ -194,8 +207,10 @@ interface AuthTokenPolicies {
194
207
  upgradeTokenRef: ScriptReference;
195
208
  stakingTokenRef: ScriptReference;
196
209
  stabilityPoolTokenRef: ScriptReference;
210
+ stabilityPoolAuthTokenRef: ScriptReference;
197
211
  snapshotEpochToScaleToSumTokenRef: ScriptReference;
198
212
  pollManagerTokenRef: ScriptReference;
213
+ iAssetAuthTokenRef: ScriptReference;
199
214
  iAssetTokenRef: ScriptReference;
200
215
  cdpAuthTokenRef: ScriptReference;
201
216
  accountTokenRef: ScriptReference;
@@ -251,12 +266,12 @@ interface DistributionParams {
251
266
  totalINDYSupply: number;
252
267
  initialIndyDistribution: number;
253
268
  }
254
- interface CollectorParams {
269
+ interface CollectorParamsSP {
255
270
  versionRecordToken: AssetClassSP;
256
271
  stakingToken: AssetClassSP;
257
272
  stakingManagerNFT: AssetClassSP;
258
273
  }
259
- interface CdpParams {
274
+ interface CdpParamsSP {
260
275
  versionRecordToken: AssetClassSP;
261
276
  upgradeToken: AssetClassSP;
262
277
  treasuryValHash: string;
@@ -284,92 +299,64 @@ interface CDPCreatorParamsSP {
284
299
  }
285
300
  declare function toSystemParamsAsset(asset: AssetClass): AssetClassSP;
286
301
  declare function fromSystemParamsAsset(asset: AssetClassSP): AssetClass;
302
+ declare function fromSystemParamsScriptRef(ref: ScriptReference): OutRef;
303
+ declare function fromSysParamsScriptCredential(cred: ScriptCredential): Credential;
287
304
 
288
- declare class CDPContract {
289
- static openPosition(asset: string, collateralAmount: bigint, mintedAmount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, cdpCreatorRef?: OutRef, collectorRef?: OutRef): Promise<TxBuilder>;
290
- static deposit(cdpRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, collectorRef?: OutRef, govRef?: OutRef, treasuryRef?: OutRef): Promise<TxBuilder>;
291
- static withdraw(cdpRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, collectorRef?: OutRef, govRef?: OutRef, treasuryRef?: OutRef): Promise<TxBuilder>;
292
- static mint(cdpRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, collectorRef?: OutRef, govRef?: OutRef, treasuryRef?: OutRef): Promise<TxBuilder>;
293
- static burn(cdpRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, collectorRef?: OutRef, govRef?: OutRef, treasuryRef?: OutRef): Promise<TxBuilder>;
294
- static adjust(cdpRef: OutRef, collateralAmount: bigint, mintAmount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, collectorRef?: OutRef, govRef?: OutRef, treasuryRef?: OutRef): Promise<TxBuilder>;
295
- static close(cdpRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, assetRef?: OutRef, priceOracleRef?: OutRef, interestOracleRef?: OutRef, collectorRef?: OutRef, govRef?: OutRef, treasuryRef?: OutRef): Promise<TxBuilder>;
296
- static validator(params: CdpParams): SpendingValidator;
297
- static validatorHash(params: CdpParams): string;
298
- static address(cdpParams: CdpParams, lucid: LucidEvolution, skh?: Credential$1): string;
299
- static scriptRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
300
- static cdpAuthTokenRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
301
- static assetTokenRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
302
- static assetAuthTokenRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
303
- }
304
-
305
- declare class CollectorContract {
306
- static feeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collectorRef?: OutRef): Promise<void>;
307
- static validator(params: CollectorParams): SpendingValidator;
308
- static validatorHash(params: CollectorParams): string;
309
- static address(params: CollectorParams, lucid: LucidEvolution): Address$1;
310
- static scriptRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
311
- }
312
-
313
- declare class GovContract {
314
- }
315
-
316
- declare class StabilityPoolContract {
317
- static createAccount(asset: string, amount: bigint, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
318
- static adjustAccount(asset: string, amount: bigint, accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
319
- static closeAccount(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
320
- static processRequest(asset: string, stabilityPoolUtxo: UTxO, accountUtxo: UTxO, govUtxo: UTxO, iAssetUtxo: UTxO, newSnapshotUtxo: UTxO | undefined, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
321
- }
305
+ declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysParams: SystemParams, cdpCreatorOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
306
+ declare function depositCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
307
+ declare function withdrawCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
308
+ declare function mintCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
309
+ declare function burnCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
310
+ declare function closeCdp(cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, govOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
311
+ declare function redeemCdp(
312
+ /**
313
+ * When the goal is to redeem the maximum possible, just pass in the total minted amount of the CDP.
314
+ * The logic will automatically cap the amount to the max.
315
+ */
316
+ attemptedRedemptionIAssetAmt: bigint, cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, collectorOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
317
+ declare function freezeCdp(cdpOref: OutRef, iassetOref: OutRef, priceOracleOref: OutRef, interestOracleOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
318
+ declare function liquidateCdp(cdpOref: OutRef, stabilityPoolOref: OutRef, collectorOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
319
+ declare function mergeCdps(cdpsToMergeUtxos: OutRef[], sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
322
320
 
323
- declare class StakingContract {
324
- static openPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
325
- static adjustPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
326
- static closePosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
327
- static validator(params: StakingParams): SpendingValidator;
328
- static validatorHash(params: StakingParams): string;
329
- static address(params: StakingParams, lucid: LucidEvolution): Address$1;
330
- static scriptRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
331
- static stakingTokenScriptRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
332
- }
321
+ declare const OnChainDecimalSchema: _lucid_evolution_lucid.TObject<{
322
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
323
+ }>;
324
+ type OnChainDecimal = Data.Static<typeof OnChainDecimalSchema>;
333
325
 
334
- declare const InterestOracleDatumSchema: _lucid_evolution_lucid.TObject<{
335
- unitaryInterest: _lucid_evolution_lucid.TUnsafe<bigint>;
336
- interestRate: _lucid_evolution_lucid.TObject<{
337
- getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
326
+ declare const CdpParamsSchema: _lucid_evolution_lucid.TObject<{
327
+ cdp_auth_token: _lucid_evolution_lucid.TObject<{
328
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
329
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
338
330
  }>;
339
- lastUpdated: _lucid_evolution_lucid.TUnsafe<bigint>;
340
- }>;
341
- type InterestOracleDatum = Data.Static<typeof InterestOracleDatumSchema>;
342
- declare function parseInterestOracleDatum(datum: Datum): InterestOracleDatum;
343
- declare function serialiseInterestOracleDatum(datum: InterestOracleDatum): Datum;
344
- declare const FeedInterestOracleRedeemerSchema: _lucid_evolution_lucid.TObject<{
345
- newInterestRate: _lucid_evolution_lucid.TObject<{
346
- getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
331
+ cdp_asset_symbol: _lucid_evolution_lucid.TUnsafe<string>;
332
+ iasset_auth_token: _lucid_evolution_lucid.TObject<{
333
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
334
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
347
335
  }>;
348
- currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
349
- }>;
350
- type FeedInterestOracleRedeemer = Data.Static<typeof FeedInterestOracleRedeemerSchema>;
351
- declare function serialiseFeedInterestOracleRedeemer(redeemer: FeedInterestOracleRedeemer): Datum;
352
- declare const InterestOracleParamsSchema: _lucid_evolution_lucid.TObject<{
353
- /** Milliseconds */
354
- biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
355
- owner: _lucid_evolution_lucid.TUnsafe<string>;
336
+ stability_pool_auth_token: _lucid_evolution_lucid.TObject<{
337
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
338
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
339
+ }>;
340
+ version_record_token: _lucid_evolution_lucid.TObject<{
341
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
342
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
343
+ }>;
344
+ upgrade_token: _lucid_evolution_lucid.TObject<{
345
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
346
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
347
+ }>;
348
+ collector_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
349
+ sp_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
350
+ gov_nft: _lucid_evolution_lucid.TObject<{
351
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
352
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
353
+ }>;
354
+ min_collateral_in_lovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
355
+ partial_redemption_extra_fee_lovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
356
+ bias_time: _lucid_evolution_lucid.TUnsafe<bigint>;
357
+ treasury_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
356
358
  }>;
357
- type InterestOracleParams = Data.Static<typeof InterestOracleParamsSchema>;
358
- declare function castInterestOracleParams(params: InterestOracleParams): Data;
359
-
360
- declare class InterestOracleContract {
361
- static startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, withScriptRef?: boolean, refOutRef?: OutRef, interestTokenName?: string): Promise<[TxBuilder, AssetClass]>;
362
- static feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;
363
- }
364
-
365
- declare class TreasuryContract {
366
- static feeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, treasuryRef?: OutRef): Promise<void>;
367
- static validator(params: TreasuryParams): SpendingValidator;
368
- static validatorHash(params: TreasuryParams): string;
369
- static address(params: TreasuryParams, lucid: LucidEvolution): Address$1;
370
- static scriptRef(params: ScriptReferences, lucid: LucidEvolution): Promise<UTxO>;
371
- }
372
-
359
+ type CdpParams = Data.Static<typeof CdpParamsSchema>;
373
360
  declare const CDPFeesSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
374
361
  ActiveCDPInterestTracking: _lucid_evolution_lucid.TObject<{
375
362
  lastSettled: _lucid_evolution_lucid.TUnsafe<bigint>;
@@ -382,7 +369,7 @@ declare const CDPFeesSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_luc
382
369
  }>;
383
370
  }>)[]>;
384
371
  declare const CDPContentSchema: _lucid_evolution_lucid.TObject<{
385
- cdpOwner: _lucid_evolution_lucid.TUnsafe<string>;
372
+ cdpOwner: _lucid_evolution_lucid.TUnsafe<string | null>;
386
373
  iasset: _lucid_evolution_lucid.TUnsafe<string>;
387
374
  mintedAmt: _lucid_evolution_lucid.TUnsafe<bigint>;
388
375
  cdpFees: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
@@ -397,17 +384,35 @@ declare const CDPContentSchema: _lucid_evolution_lucid.TObject<{
397
384
  }>;
398
385
  }>)[]>;
399
386
  }>;
387
+ declare const IAssetPriceInfoSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
388
+ Delisted: _lucid_evolution_lucid.TObject<{
389
+ content: _lucid_evolution_lucid.TObject<{
390
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
391
+ }>;
392
+ }>;
393
+ }> | _lucid_evolution_lucid.TObject<{
394
+ Oracle: _lucid_evolution_lucid.TObject<{
395
+ content: _lucid_evolution_lucid.TObject<{
396
+ oracleNft: _lucid_evolution_lucid.TObject<{
397
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
398
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
399
+ }>;
400
+ }>;
401
+ }>;
402
+ }>)[]>;
400
403
  declare const IAssetContentSchema: _lucid_evolution_lucid.TObject<{
401
404
  /** Use the HEX encoding */
402
405
  assetName: _lucid_evolution_lucid.TUnsafe<string>;
403
406
  price: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
404
407
  Delisted: _lucid_evolution_lucid.TObject<{
405
- getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
408
+ content: _lucid_evolution_lucid.TObject<{
409
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
410
+ }>;
406
411
  }>;
407
412
  }> | _lucid_evolution_lucid.TObject<{
408
413
  Oracle: _lucid_evolution_lucid.TObject<{
409
- oracleNft: _lucid_evolution_lucid.TObject<{
410
- asset: _lucid_evolution_lucid.TObject<{
414
+ content: _lucid_evolution_lucid.TObject<{
415
+ oracleNft: _lucid_evolution_lucid.TObject<{
411
416
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
412
417
  tokenName: _lucid_evolution_lucid.TUnsafe<string>;
413
418
  }>;
@@ -446,12 +451,12 @@ declare const IAssetContentSchema: _lucid_evolution_lucid.TObject<{
446
451
  getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
447
452
  }>;
448
453
  firstIAsset: _lucid_evolution_lucid.TUnsafe<boolean>;
449
- nextIAsset: _lucid_evolution_lucid.TUnsafe<string>;
454
+ nextIAsset: _lucid_evolution_lucid.TUnsafe<string | null>;
450
455
  }>;
451
456
  declare const CDPDatumSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
452
457
  CDP: _lucid_evolution_lucid.TObject<{
453
458
  content: _lucid_evolution_lucid.TObject<{
454
- cdpOwner: _lucid_evolution_lucid.TUnsafe<string>;
459
+ cdpOwner: _lucid_evolution_lucid.TUnsafe<string | null>;
455
460
  iasset: _lucid_evolution_lucid.TUnsafe<string>;
456
461
  mintedAmt: _lucid_evolution_lucid.TUnsafe<bigint>;
457
462
  cdpFees: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
@@ -474,12 +479,14 @@ declare const CDPDatumSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lu
474
479
  assetName: _lucid_evolution_lucid.TUnsafe<string>;
475
480
  price: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
476
481
  Delisted: _lucid_evolution_lucid.TObject<{
477
- getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
482
+ content: _lucid_evolution_lucid.TObject<{
483
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
484
+ }>;
478
485
  }>;
479
486
  }> | _lucid_evolution_lucid.TObject<{
480
487
  Oracle: _lucid_evolution_lucid.TObject<{
481
- oracleNft: _lucid_evolution_lucid.TObject<{
482
- asset: _lucid_evolution_lucid.TObject<{
488
+ content: _lucid_evolution_lucid.TObject<{
489
+ oracleNft: _lucid_evolution_lucid.TObject<{
483
490
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
484
491
  tokenName: _lucid_evolution_lucid.TUnsafe<string>;
485
492
  }>;
@@ -518,7 +525,7 @@ declare const CDPDatumSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lu
518
525
  getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
519
526
  }>;
520
527
  firstIAsset: _lucid_evolution_lucid.TUnsafe<boolean>;
521
- nextIAsset: _lucid_evolution_lucid.TUnsafe<string>;
528
+ nextIAsset: _lucid_evolution_lucid.TUnsafe<string | null>;
522
529
  }>;
523
530
  }>;
524
531
  }>)[]>;
@@ -526,186 +533,446 @@ type CDPFees = Data.Static<typeof CDPFeesSchema>;
526
533
  type CDPDatum = Data.Static<typeof CDPDatumSchema>;
527
534
  type CDPContent = Data.Static<typeof CDPContentSchema>;
528
535
  type IAssetContent = Data.Static<typeof IAssetContentSchema>;
529
- declare function parseCDPDatum(datum: Datum): CDPContent;
530
- declare function serialiseCDPDatum(cdpDatum: CDPContent): Datum;
531
- declare function parseIAssetDatum(datum: Datum): IAssetContent;
536
+ declare const CDPRedeemerSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
537
+ AdjustCdp: _lucid_evolution_lucid.TObject<{
538
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
539
+ mintedAmtChange: _lucid_evolution_lucid.TUnsafe<bigint>;
540
+ collateralAmtChange: _lucid_evolution_lucid.TUnsafe<bigint>;
541
+ }>;
542
+ }> | _lucid_evolution_lucid.TObject<{
543
+ CloseCdp: _lucid_evolution_lucid.TObject<{
544
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
545
+ }>;
546
+ }> | _lucid_evolution_lucid.TObject<{
547
+ RedeemCdp: _lucid_evolution_lucid.TObject<{
548
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
549
+ }>;
550
+ }> | _lucid_evolution_lucid.TObject<{
551
+ FreezeCdp: _lucid_evolution_lucid.TObject<{
552
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
553
+ }>;
554
+ }> | _lucid_evolution_lucid.TLiteral<"MergeCdps"> | _lucid_evolution_lucid.TObject<{
555
+ MergeAuxiliary: _lucid_evolution_lucid.TObject<{
556
+ mainMergeUtxo: _lucid_evolution_lucid.TObject<{
557
+ txHash: _lucid_evolution_lucid.TObject<{
558
+ hash: _lucid_evolution_lucid.TUnsafe<string>;
559
+ }>;
560
+ outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
561
+ }>;
562
+ }>;
563
+ }> | _lucid_evolution_lucid.TLiteral<"Liquidate"> | _lucid_evolution_lucid.TLiteral<"UpdateOrInsertAsset"> | _lucid_evolution_lucid.TLiteral<"UpgradeVersion">)[]>;
564
+ type CDPRedeemer = Data.Static<typeof CDPRedeemerSchema>;
565
+ declare function serialiseCdpRedeemer(r: CDPRedeemer): Redeemer;
566
+ declare function parseCdpDatum(datum: Datum): option.Option<CDPContent>;
567
+ declare function parseCdpDatumOrThrow(datum: Datum): CDPContent;
568
+ declare function serialiseCdpDatum(cdpDatum: CDPContent): Datum;
569
+ declare function parseIAssetDatum(datum: Datum): option.Option<IAssetContent>;
570
+ declare function parseIAssetDatumOrThrow(datum: Datum): IAssetContent;
532
571
  declare function serialiseIAssetDatum(iassetDatum: IAssetContent): Datum;
533
-
572
+ declare function castCdpParams(params: CdpParams): Data;
534
573
  type IAssetOutput = {
535
- utxo: UTxO;
536
574
  datum: IAssetContent;
575
+ utxo: UTxO;
537
576
  };
538
- declare class IAssetHelpers {
539
- static findIAssetByRef(outRef: OutRef, lucid: LucidEvolution): Promise<IAssetOutput>;
540
- static findIAssetByName(assetName: string, params: SystemParams, lucid: LucidEvolution): Promise<IAssetOutput>;
541
- }
577
+
578
+ declare const InterestOracleDatumSchema: _lucid_evolution_lucid.TObject<{
579
+ unitaryInterest: _lucid_evolution_lucid.TUnsafe<bigint>;
580
+ interestRate: _lucid_evolution_lucid.TObject<{
581
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
582
+ }>;
583
+ lastUpdated: _lucid_evolution_lucid.TUnsafe<bigint>;
584
+ }>;
585
+ type InterestOracleDatum = Data.Static<typeof InterestOracleDatumSchema>;
586
+ declare function parseInterestOracleDatum(datum: Datum): InterestOracleDatum;
587
+ declare function serialiseInterestOracleDatum(datum: InterestOracleDatum): Datum;
588
+ declare const FeedInterestOracleRedeemerSchema: _lucid_evolution_lucid.TObject<{
589
+ newInterestRate: _lucid_evolution_lucid.TObject<{
590
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
591
+ }>;
592
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
593
+ }>;
594
+ type FeedInterestOracleRedeemer = Data.Static<typeof FeedInterestOracleRedeemerSchema>;
595
+ declare function serialiseFeedInterestOracleRedeemer(redeemer: FeedInterestOracleRedeemer): Datum;
596
+ declare const InterestOracleParamsSchema: _lucid_evolution_lucid.TObject<{
597
+ /** Milliseconds */
598
+ biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
599
+ owner: _lucid_evolution_lucid.TUnsafe<string>;
600
+ }>;
601
+ type InterestOracleParams = Data.Static<typeof InterestOracleParamsSchema>;
602
+ declare function castInterestOracleParams(params: InterestOracleParams): Data;
542
603
 
543
604
  /**
544
- * Accept only a single item in the array and return it.
545
- * When not exclusively a single item, throw an error.
605
+ * This is mostly for debugging purposes.
546
606
  */
547
- declare function matchSingle<T>(xs: T[], mkErr: (xs: T[]) => Error): T;
548
- declare function calculateFeeFromPercentage(percent: bigint, amount: bigint): bigint;
549
- declare function loadSystemParamsFromFile(file: string): SystemParams;
550
- declare function loadSystemParamsFromUrl(url: string): Promise<SystemParams>;
551
- declare const getRandomElement: <T>(arr: T[]) => T;
552
-
607
+ declare function cdpCollateralRatioPercentage(currentSlot: number, iassetPrice: OnChainDecimal, cdpUtxo: UTxO, cdpContent: CDPContent, interestOracleDatum: InterestOracleDatum, network: Network): number;
553
608
  /**
554
- * Returns the inline datum.
555
- * Throws when the UTXO doesn't have an inline datum
556
- * (i.e. in case it has hash datum or no datum).
609
+ * The amount of iassets to redeem to reach the RMR.
557
610
  */
558
- declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
559
- declare function addrDetails(lucid: LucidEvolution): Promise<[Credential$1, Credential$1 | undefined]>;
560
- declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential$1): Address$1;
561
- declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
562
- declare function balance(utxos: UTxO[]): Assets;
611
+ declare function calculateIAssetRedemptionAmt(collateralAmt: bigint, mintedAmt: bigint, price: OnChainDecimal, rmr: OnChainDecimal): bigint;
612
+ /**
613
+ * Calculates the allowable redemption amount so the min collateral constraint still holds.
614
+ * It caps the redemption amount to still satisfy the min collateral.
615
+ *
616
+ * Returns uncapped max iassets /\ capped max iassets
617
+ *
618
+ * The derived calculation comes from the following equation where:
619
+ * c - collateral
620
+ * m - min collateral
621
+ * r - reimburstment ratio
622
+ * x - redemption amount
623
+ *
624
+ * `c - x + r * x = m`
625
+ * `-x + r * x = m - c`
626
+ * `x * (r - 1) = m - c`
627
+ * `x = (m - c) / r - 1`
628
+ */
629
+ declare function calculateMinCollateralCappedIAssetRedemptionAmt(collateralAmt: bigint, mintedAmt: bigint, price: OnChainDecimal, rmr: OnChainDecimal, reimburstmentPercentage: OnChainDecimal, minCollateral: bigint): {
630
+ uncappedIAssetRedemptionAmt: bigint;
631
+ cappedIAssetRedemptionAmt: bigint;
632
+ };
633
+
634
+ declare const mkCdpValidatorFromSP: (params: CdpParamsSP) => SpendingValidator;
563
635
 
564
- declare const SPIntegerSchema: _lucid_evolution_lucid.TObject<{
565
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
636
+ declare const CDPCreatorParamsSchema: _lucid_evolution_lucid.TObject<{
637
+ cdpCreatorNft: _lucid_evolution_lucid.TObject<{
638
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
639
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
640
+ }>;
641
+ cdpAssetCs: _lucid_evolution_lucid.TUnsafe<string>;
642
+ cdpAuthTk: _lucid_evolution_lucid.TObject<{
643
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
644
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
645
+ }>;
646
+ iAssetAuthTk: _lucid_evolution_lucid.TObject<{
647
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
648
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
649
+ }>;
650
+ versionRecordToken: _lucid_evolution_lucid.TObject<{
651
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
652
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
653
+ }>;
654
+ cdpScriptHash: _lucid_evolution_lucid.TUnsafe<string>;
655
+ collectorValHash: _lucid_evolution_lucid.TUnsafe<string>;
656
+ minCollateralInLovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
657
+ biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
566
658
  }>;
567
- type SPInteger = Data.Static<typeof SPIntegerSchema>;
568
- declare const SPInteger: SPInteger;
569
- declare const StabilityPoolSnapshotSchema: _lucid_evolution_lucid.TObject<{
570
- productVal: _lucid_evolution_lucid.TObject<{
571
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
659
+ type CDPCreatorParams = Data.Static<typeof CDPCreatorParamsSchema>;
660
+ declare const CDPCreatorParams: CDPCreatorParams;
661
+ declare function castCDPCreatorParams(params: CDPCreatorParams): Data;
662
+ declare const CDPCreatorRedeemerSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
663
+ CreateCDP: _lucid_evolution_lucid.TObject<{
664
+ cdpOwner: _lucid_evolution_lucid.TUnsafe<string>;
665
+ minted: _lucid_evolution_lucid.TUnsafe<bigint>;
666
+ collateral: _lucid_evolution_lucid.TUnsafe<bigint>;
667
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
668
+ }>;
669
+ }> | _lucid_evolution_lucid.TObject<{
670
+ UpgradeCreatorVersion: _lucid_evolution_lucid.TObject<{}>;
671
+ }>)[]>;
672
+ type CDPCreatorRedeemer = Data.Static<typeof CDPCreatorRedeemerSchema>;
673
+ declare const CDPCreatorRedeemer: CDPCreatorRedeemer;
674
+ declare function serialiseCDPCreatorRedeemer(params: CDPCreatorRedeemer): Redeemer;
675
+ declare function serialiseCDPCreatorDatum(): Datum;
676
+
677
+ declare const mkCDPCreatorValidator: (params: CDPCreatorParams) => SpendingValidator;
678
+ declare const mkCDPCreatorValidatorFromSP: (params: CDPCreatorParamsSP) => SpendingValidator;
679
+
680
+ declare const PollManagerParamsSchema: _lucid_evolution_lucid.TObject<{
681
+ govNFT: _lucid_evolution_lucid.TObject<{
682
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
683
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
684
+ }>;
685
+ pollToken: _lucid_evolution_lucid.TObject<{
686
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
687
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
572
688
  }>;
573
- depositVal: _lucid_evolution_lucid.TObject<{
574
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
689
+ upgradeToken: _lucid_evolution_lucid.TObject<{
690
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
691
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
575
692
  }>;
576
- sumVal: _lucid_evolution_lucid.TObject<{
577
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
693
+ indyAsset: _lucid_evolution_lucid.TObject<{
694
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
695
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
578
696
  }>;
579
- epoch: _lucid_evolution_lucid.TUnsafe<bigint>;
580
- scale: _lucid_evolution_lucid.TUnsafe<bigint>;
697
+ govExecuteValHash: _lucid_evolution_lucid.TUnsafe<string>;
698
+ pBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
699
+ shardValHash: _lucid_evolution_lucid.TUnsafe<string>;
700
+ treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
701
+ initialIndyDistribution: _lucid_evolution_lucid.TUnsafe<bigint>;
581
702
  }>;
582
- type StabilityPoolSnapshot = Data.Static<typeof StabilityPoolSnapshotSchema>;
583
- declare const StabilityPoolSnapshot: StabilityPoolSnapshot;
584
- declare const EpochToScaleToSumSchema: _lucid_evolution_lucid.TUnsafe<Map<{
585
- epoch: bigint;
586
- scale: bigint;
587
- }, {
588
- value: bigint;
589
- }>>;
590
- type EpochToScaleToSum = Data.Static<typeof EpochToScaleToSumSchema>;
591
- declare const EpochToScaleToSum: EpochToScaleToSum;
592
- declare const StabilityPoolContentSchema: _lucid_evolution_lucid.TObject<{
593
- asset: _lucid_evolution_lucid.TUnsafe<string>;
594
- snapshot: _lucid_evolution_lucid.TObject<{
595
- productVal: _lucid_evolution_lucid.TObject<{
596
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
597
- }>;
598
- depositVal: _lucid_evolution_lucid.TObject<{
599
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
600
- }>;
601
- sumVal: _lucid_evolution_lucid.TObject<{
602
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
603
- }>;
604
- epoch: _lucid_evolution_lucid.TUnsafe<bigint>;
605
- scale: _lucid_evolution_lucid.TUnsafe<bigint>;
606
- }>;
607
- epochToScaleToSum: _lucid_evolution_lucid.TUnsafe<Map<{
608
- epoch: bigint;
609
- scale: bigint;
610
- }, {
611
- value: bigint;
612
- }>>;
703
+ type PollManagerParams = Data.Static<typeof PollManagerParamsSchema>;
704
+ declare const PollManagerParams: PollManagerParams;
705
+ declare const PollManagerRedeemerSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
706
+ EndPoll: _lucid_evolution_lucid.TObject<{
707
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
708
+ }>;
709
+ }> | _lucid_evolution_lucid.TObject<{
710
+ CreateShards: _lucid_evolution_lucid.TObject<{
711
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
712
+ }>;
713
+ }> | _lucid_evolution_lucid.TObject<{
714
+ MergeShardsManager: _lucid_evolution_lucid.TObject<{
715
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
716
+ }>;
717
+ }>)[]>;
718
+ type PollManagerRedeemer = Data.Static<typeof PollManagerRedeemerSchema>;
719
+ declare const PollManagerRedeemer: PollManagerRedeemer;
720
+ declare function serialisePollManagerRedeemer(r: PollManagerRedeemer): Redeemer;
721
+ declare function castPollManagerParams(params: PollManagerParams): Data;
722
+
723
+ declare const PollShardParamsSchema: _lucid_evolution_lucid.TObject<{
724
+ pollToken: _lucid_evolution_lucid.TObject<{
725
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
726
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
727
+ }>;
728
+ stakingToken: _lucid_evolution_lucid.TObject<{
729
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
730
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
731
+ }>;
732
+ indyAsset: _lucid_evolution_lucid.TObject<{
733
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
734
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
735
+ }>;
736
+ stakingValHash: _lucid_evolution_lucid.TUnsafe<string>;
613
737
  }>;
614
- type StabilityPoolContent = Data.Static<typeof StabilityPoolContentSchema>;
615
- declare const StabilityPoolContent: StabilityPoolContent;
616
- declare const AccountActionSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TLiteral<"Create"> | _lucid_evolution_lucid.TObject<{
617
- Adjust: _lucid_evolution_lucid.TObject<{
618
- amount: _lucid_evolution_lucid.TUnsafe<bigint>;
619
- outputAddress: _lucid_evolution_lucid.TObject<{
620
- paymentCredential: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
621
- PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
622
- }> | _lucid_evolution_lucid.TObject<{
623
- ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
624
- }>)[]>;
625
- stakeCredential: _lucid_evolution_lucid.TUnsafe<{
626
- Inline: [{
627
- PublicKeyCredential: [string];
628
- } | {
629
- ScriptCredential: [string];
630
- }];
631
- } | {
632
- Pointer: [{
633
- slotNumber: bigint;
634
- transactionIndex: bigint;
635
- certificateIndex: bigint;
636
- }];
637
- }>;
638
- }>;
738
+ type PollShardParams = Data.Static<typeof PollShardParamsSchema>;
739
+ declare const PollShardParams: PollShardParams;
740
+ declare const VoteOptionSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TLiteral<"Yes"> | _lucid_evolution_lucid.TLiteral<"No">)[]>;
741
+ type VoteOption = Data.Static<typeof VoteOptionSchema>;
742
+ declare const PollShardRedeemerSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
743
+ Vote: _lucid_evolution_lucid.TObject<{
744
+ content: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TLiteral<"Yes"> | _lucid_evolution_lucid.TLiteral<"No">)[]>;
639
745
  }>;
640
746
  }> | _lucid_evolution_lucid.TObject<{
641
- Close: _lucid_evolution_lucid.TObject<{
642
- outputAddress: _lucid_evolution_lucid.TObject<{
643
- paymentCredential: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
644
- PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
645
- }> | _lucid_evolution_lucid.TObject<{
646
- ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
647
- }>)[]>;
648
- stakeCredential: _lucid_evolution_lucid.TUnsafe<{
649
- Inline: [{
650
- PublicKeyCredential: [string];
651
- } | {
652
- ScriptCredential: [string];
653
- }];
654
- } | {
655
- Pointer: [{
656
- slotNumber: bigint;
657
- transactionIndex: bigint;
658
- certificateIndex: bigint;
659
- }];
747
+ MergeShards: _lucid_evolution_lucid.TObject<{
748
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
749
+ pollManagerRef: _lucid_evolution_lucid.TObject<{
750
+ txHash: _lucid_evolution_lucid.TObject<{
751
+ hash: _lucid_evolution_lucid.TUnsafe<string>;
660
752
  }>;
753
+ outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
661
754
  }>;
662
755
  }>;
663
756
  }>)[]>;
664
- type AccountAction = Data.Static<typeof AccountActionSchema>;
665
- declare const AccountAction: AccountAction;
666
- declare const AccountContentSchema: _lucid_evolution_lucid.TObject<{
667
- owner: _lucid_evolution_lucid.TUnsafe<string>;
668
- asset: _lucid_evolution_lucid.TUnsafe<string>;
669
- snapshot: _lucid_evolution_lucid.TObject<{
670
- productVal: _lucid_evolution_lucid.TObject<{
671
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
672
- }>;
673
- depositVal: _lucid_evolution_lucid.TObject<{
674
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
675
- }>;
676
- sumVal: _lucid_evolution_lucid.TObject<{
677
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
757
+ type PollShardRedeemer = Data.Static<typeof PollShardRedeemerSchema>;
758
+ declare const PollShardRedeemer: PollShardRedeemer;
759
+ declare function serialisePollShardRedeemer(redeemer: PollShardRedeemer): Redeemer;
760
+ declare function castPollShardParams(params: PollShardParams): Data;
761
+
762
+ declare const mkPollManagerValidator: (params: PollManagerParams) => SpendingValidator;
763
+ declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => SpendingValidator;
764
+ declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
765
+ declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;
766
+
767
+ declare function collectorFeeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collectorOref: OutRef): Promise<void>;
768
+
769
+ declare const GovDatumSchema: _lucid_evolution_lucid.TObject<{
770
+ currentProposal: _lucid_evolution_lucid.TUnsafe<bigint>;
771
+ protocolParams: _lucid_evolution_lucid.TObject<{
772
+ proposalDeposit: _lucid_evolution_lucid.TUnsafe<bigint>;
773
+ votingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
774
+ effectiveDelay: _lucid_evolution_lucid.TUnsafe<bigint>;
775
+ expirationPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
776
+ collateralFeePercentage: _lucid_evolution_lucid.TObject<{
777
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
678
778
  }>;
679
- epoch: _lucid_evolution_lucid.TUnsafe<bigint>;
680
- scale: _lucid_evolution_lucid.TUnsafe<bigint>;
779
+ proposingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
780
+ totalShards: _lucid_evolution_lucid.TUnsafe<bigint>;
781
+ minimumQuorum: _lucid_evolution_lucid.TUnsafe<bigint>;
782
+ maxTreasuryLovelaceSpend: _lucid_evolution_lucid.TUnsafe<bigint>;
783
+ maxTreasuryIndySpend: _lucid_evolution_lucid.TUnsafe<bigint>;
681
784
  }>;
682
- request: _lucid_evolution_lucid.TUnsafe<"Create" | {
683
- Adjust: {
684
- amount: bigint;
685
- outputAddress: {
686
- paymentCredential: {
687
- PublicKeyCredential: [string];
688
- } | {
689
- ScriptCredential: [string];
690
- };
691
- stakeCredential: {
692
- Inline: [{
693
- PublicKeyCredential: [string];
694
- } | {
695
- ScriptCredential: [string];
696
- }];
697
- } | {
698
- Pointer: [{
699
- slotNumber: bigint;
700
- transactionIndex: bigint;
701
- certificateIndex: bigint;
702
- }];
703
- };
704
- };
705
- };
706
- } | {
707
- Close: {
708
- outputAddress: {
785
+ currentVersion: _lucid_evolution_lucid.TUnsafe<bigint>;
786
+ iassetsCount: _lucid_evolution_lucid.TUnsafe<bigint>;
787
+ activeProposals: _lucid_evolution_lucid.TUnsafe<bigint>;
788
+ treasuryIndyWithdrawnAmt: _lucid_evolution_lucid.TUnsafe<bigint>;
789
+ }>;
790
+ type GovDatum = Data.Static<typeof GovDatumSchema>;
791
+ declare const GovParamsSchema: _lucid_evolution_lucid.TObject<{
792
+ govNFT: _lucid_evolution_lucid.TObject<{
793
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
794
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
795
+ }>;
796
+ pollToken: _lucid_evolution_lucid.TObject<{
797
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
798
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
799
+ }>;
800
+ upgradeToken: _lucid_evolution_lucid.TObject<{
801
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
802
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
803
+ }>;
804
+ indyAsset: _lucid_evolution_lucid.TObject<{
805
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
806
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
807
+ }>;
808
+ versionRecordToken: _lucid_evolution_lucid.TObject<{
809
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
810
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
811
+ }>;
812
+ pollManagerValHash: _lucid_evolution_lucid.TUnsafe<string>;
813
+ gBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
814
+ daoIdentityToken: _lucid_evolution_lucid.TObject<{
815
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
816
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
817
+ }>;
818
+ iAssetAuthToken: _lucid_evolution_lucid.TObject<{
819
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
820
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
821
+ }>;
822
+ }>;
823
+ type GovParams = Data.Static<typeof GovParamsSchema>;
824
+ declare const GovParams: GovParams;
825
+ declare const ValueWithdrawalItemSchema: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>, _lucid_evolution_lucid.TUnsafe<string>, _lucid_evolution_lucid.TUnsafe<bigint>]>;
826
+ type TreasuryWithdrawalItem = Data.Static<typeof ValueWithdrawalItemSchema>;
827
+ declare const TreasuryWithdrawalSchema: _lucid_evolution_lucid.TObject<{
828
+ destination: _lucid_evolution_lucid.TObject<{
829
+ paymentCredential: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
830
+ PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
831
+ }> | _lucid_evolution_lucid.TObject<{
832
+ ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
833
+ }>)[]>;
834
+ stakeCredential: _lucid_evolution_lucid.TUnsafe<{
835
+ Inline: [{
836
+ PublicKeyCredential: [string];
837
+ } | {
838
+ ScriptCredential: [string];
839
+ }];
840
+ } | {
841
+ Pointer: [{
842
+ slotNumber: bigint;
843
+ transactionIndex: bigint;
844
+ certificateIndex: bigint;
845
+ }];
846
+ } | null>;
847
+ }>;
848
+ value: _lucid_evolution_lucid.TArray<_lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>, _lucid_evolution_lucid.TUnsafe<string>, _lucid_evolution_lucid.TUnsafe<bigint>]>>;
849
+ }>;
850
+ type TreasuryWithdrawal = Data.Static<typeof TreasuryWithdrawalSchema>;
851
+ declare const GovRedeemerSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TLiteral<"UpgradeVersion"> | _lucid_evolution_lucid.TObject<{
852
+ CreatePoll: _lucid_evolution_lucid.TObject<{
853
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
854
+ proposalOwner: _lucid_evolution_lucid.TUnsafe<string>;
855
+ content: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
856
+ ProposeAsset: _lucid_evolution_lucid.TObject<{
857
+ asset: _lucid_evolution_lucid.TUnsafe<string>;
858
+ priceOracleNft: _lucid_evolution_lucid.TObject<{
859
+ oracleNft: _lucid_evolution_lucid.TObject<{
860
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
861
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
862
+ }>;
863
+ }>;
864
+ interestOracleNft: _lucid_evolution_lucid.TObject<{
865
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
866
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
867
+ }>;
868
+ redemptionRatioPercentage: _lucid_evolution_lucid.TObject<{
869
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
870
+ }>;
871
+ maintenanceRatioPercentage: _lucid_evolution_lucid.TObject<{
872
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
873
+ }>;
874
+ liquidationRatioPercentage: _lucid_evolution_lucid.TObject<{
875
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
876
+ }>;
877
+ debtMintingFeePercentage: _lucid_evolution_lucid.TObject<{
878
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
879
+ }>;
880
+ liquidationProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
881
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
882
+ }>;
883
+ stabilityPoolWithdrawalFeePercentage: _lucid_evolution_lucid.TObject<{
884
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
885
+ }>;
886
+ redemptionReimbursementPercentage: _lucid_evolution_lucid.TObject<{
887
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
888
+ }>;
889
+ redemptionProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
890
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
891
+ }>;
892
+ interestCollectorPortionPercentage: _lucid_evolution_lucid.TObject<{
893
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
894
+ }>;
895
+ }>;
896
+ }> | _lucid_evolution_lucid.TObject<{
897
+ ModifyAsset: _lucid_evolution_lucid.TObject<{
898
+ asset: _lucid_evolution_lucid.TUnsafe<string>;
899
+ newAssetPriceInfo: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
900
+ Delisted: _lucid_evolution_lucid.TObject<{
901
+ content: _lucid_evolution_lucid.TObject<{
902
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
903
+ }>;
904
+ }>;
905
+ }> | _lucid_evolution_lucid.TObject<{
906
+ Oracle: _lucid_evolution_lucid.TObject<{
907
+ content: _lucid_evolution_lucid.TObject<{
908
+ oracleNft: _lucid_evolution_lucid.TObject<{
909
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
910
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
911
+ }>;
912
+ }>;
913
+ }>;
914
+ }>)[]>;
915
+ newInterestOracleNft: _lucid_evolution_lucid.TObject<{
916
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
917
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
918
+ }>;
919
+ newRedemptionRatioPercentage: _lucid_evolution_lucid.TObject<{
920
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
921
+ }>;
922
+ newMaintenanceRatioPercentage: _lucid_evolution_lucid.TObject<{
923
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
924
+ }>;
925
+ newLiquidationRatioPercentage: _lucid_evolution_lucid.TObject<{
926
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
927
+ }>;
928
+ newDebtMintingFeePercentage: _lucid_evolution_lucid.TObject<{
929
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
930
+ }>;
931
+ newLiquidationProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
932
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
933
+ }>;
934
+ newStabilityPoolWithdrawalFeePercentage: _lucid_evolution_lucid.TObject<{
935
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
936
+ }>;
937
+ newRedemptionReimbursementPercentage: _lucid_evolution_lucid.TObject<{
938
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
939
+ }>;
940
+ newRedemptionProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
941
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
942
+ }>;
943
+ newInterestCollectorPortionPercentage: _lucid_evolution_lucid.TObject<{
944
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
945
+ }>;
946
+ }>;
947
+ }> | _lucid_evolution_lucid.TObject<{
948
+ ModifyProtocolParams: _lucid_evolution_lucid.TObject<{
949
+ newParams: _lucid_evolution_lucid.TObject<{
950
+ proposalDeposit: _lucid_evolution_lucid.TUnsafe<bigint>;
951
+ votingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
952
+ effectiveDelay: _lucid_evolution_lucid.TUnsafe<bigint>;
953
+ expirationPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
954
+ collateralFeePercentage: _lucid_evolution_lucid.TObject<{
955
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
956
+ }>;
957
+ proposingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
958
+ totalShards: _lucid_evolution_lucid.TUnsafe<bigint>;
959
+ minimumQuorum: _lucid_evolution_lucid.TUnsafe<bigint>;
960
+ maxTreasuryLovelaceSpend: _lucid_evolution_lucid.TUnsafe<bigint>;
961
+ maxTreasuryIndySpend: _lucid_evolution_lucid.TUnsafe<bigint>;
962
+ }>;
963
+ }>;
964
+ }> | _lucid_evolution_lucid.TObject<{
965
+ UpgradeProtocol: _lucid_evolution_lucid.TObject<{
966
+ content: _lucid_evolution_lucid.TUnsafe<Data>;
967
+ }>;
968
+ }> | _lucid_evolution_lucid.TObject<{
969
+ TextProposal: _lucid_evolution_lucid.TObject<{
970
+ bytes: _lucid_evolution_lucid.TUnsafe<string>;
971
+ }>;
972
+ }>)[]>;
973
+ treasuryWithdrawal: _lucid_evolution_lucid.TUnsafe<{
974
+ value: [string, string, bigint][];
975
+ destination: {
709
976
  paymentCredential: {
710
977
  PublicKeyCredential: [string];
711
978
  } | {
@@ -723,268 +990,510 @@ declare const AccountContentSchema: _lucid_evolution_lucid.TObject<{
723
990
  transactionIndex: bigint;
724
991
  certificateIndex: bigint;
725
992
  }];
726
- };
993
+ } | null;
727
994
  };
728
- };
729
- }>;
730
- }>;
731
- type AccountContent = Data.Static<typeof AccountContentSchema>;
732
- declare const AccountContent: AccountContent;
733
- declare const SnapshotEpochToScaleToSumContentSchema: _lucid_evolution_lucid.TObject<{
734
- asset: _lucid_evolution_lucid.TUnsafe<string>;
735
- snapshot: _lucid_evolution_lucid.TUnsafe<Map<{
736
- epoch: bigint;
737
- scale: bigint;
738
- }, {
739
- value: bigint;
740
- }>>;
741
- }>;
742
- type SnapshotEpochToScaleToSumContent = Data.Static<typeof SnapshotEpochToScaleToSumContentSchema>;
743
- declare const SnapshotEpochToScaleToSumContent: SnapshotEpochToScaleToSumContent;
744
- declare const StabilityPoolDatumSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
745
- StabilityPool: _lucid_evolution_lucid.TObject<{
746
- content: _lucid_evolution_lucid.TObject<{
747
- asset: _lucid_evolution_lucid.TUnsafe<string>;
748
- snapshot: _lucid_evolution_lucid.TObject<{
749
- productVal: _lucid_evolution_lucid.TObject<{
750
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
751
- }>;
752
- depositVal: _lucid_evolution_lucid.TObject<{
753
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
754
- }>;
755
- sumVal: _lucid_evolution_lucid.TObject<{
756
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
757
- }>;
758
- epoch: _lucid_evolution_lucid.TUnsafe<bigint>;
759
- scale: _lucid_evolution_lucid.TUnsafe<bigint>;
760
- }>;
761
- epochToScaleToSum: _lucid_evolution_lucid.TUnsafe<Map<{
762
- epoch: bigint;
763
- scale: bigint;
764
- }, {
765
- value: bigint;
766
- }>>;
767
- }>;
995
+ } | null>;
768
996
  }>;
769
997
  }> | _lucid_evolution_lucid.TObject<{
770
- Account: _lucid_evolution_lucid.TObject<{
771
- content: _lucid_evolution_lucid.TObject<{
772
- owner: _lucid_evolution_lucid.TUnsafe<string>;
773
- asset: _lucid_evolution_lucid.TUnsafe<string>;
774
- snapshot: _lucid_evolution_lucid.TObject<{
775
- productVal: _lucid_evolution_lucid.TObject<{
776
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
777
- }>;
778
- depositVal: _lucid_evolution_lucid.TObject<{
779
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
780
- }>;
781
- sumVal: _lucid_evolution_lucid.TObject<{
782
- value: _lucid_evolution_lucid.TUnsafe<bigint>;
783
- }>;
784
- epoch: _lucid_evolution_lucid.TUnsafe<bigint>;
785
- scale: _lucid_evolution_lucid.TUnsafe<bigint>;
786
- }>;
787
- request: _lucid_evolution_lucid.TUnsafe<"Create" | {
788
- Adjust: {
789
- amount: bigint;
790
- outputAddress: {
791
- paymentCredential: {
792
- PublicKeyCredential: [string];
793
- } | {
794
- ScriptCredential: [string];
795
- };
796
- stakeCredential: {
797
- Inline: [{
798
- PublicKeyCredential: [string];
799
- } | {
800
- ScriptCredential: [string];
801
- }];
802
- } | {
803
- Pointer: [{
804
- slotNumber: bigint;
805
- transactionIndex: bigint;
806
- certificateIndex: bigint;
807
- }];
808
- };
809
- };
810
- };
811
- } | {
812
- Close: {
813
- outputAddress: {
814
- paymentCredential: {
815
- PublicKeyCredential: [string];
816
- } | {
817
- ScriptCredential: [string];
818
- };
819
- stakeCredential: {
820
- Inline: [{
821
- PublicKeyCredential: [string];
822
- } | {
823
- ScriptCredential: [string];
824
- }];
825
- } | {
826
- Pointer: [{
827
- slotNumber: bigint;
828
- transactionIndex: bigint;
829
- certificateIndex: bigint;
830
- }];
831
- };
832
- };
833
- };
998
+ WitnessEndPoll: _lucid_evolution_lucid.TObject<{
999
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1000
+ }>;
1001
+ }> | _lucid_evolution_lucid.TLiteral<"UpgradeGov">)[]>;
1002
+ type GovRedeemer = Data.Static<typeof GovRedeemerSchema>;
1003
+ declare const GovRedeemer: GovRedeemer;
1004
+ declare function parseGovDatum(datum: Datum): option.Option<GovDatum>;
1005
+ declare function parseGovDatumOrThrow(datum: Datum): GovDatum;
1006
+ declare function serialiseGovDatum(d: GovDatum): Datum;
1007
+ declare function serialiseGovRedeemer(redeemer: GovRedeemer): Redeemer;
1008
+ declare function castGovParams(params: GovParams): Data;
1009
+
1010
+ declare const ProposalContentSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
1011
+ ProposeAsset: _lucid_evolution_lucid.TObject<{
1012
+ asset: _lucid_evolution_lucid.TUnsafe<string>;
1013
+ priceOracleNft: _lucid_evolution_lucid.TObject<{
1014
+ oracleNft: _lucid_evolution_lucid.TObject<{
1015
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1016
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
834
1017
  }>;
835
1018
  }>;
836
- }>;
837
- }> | _lucid_evolution_lucid.TObject<{
838
- SnapshotEpochToScaleToSum: _lucid_evolution_lucid.TObject<{
839
- content: _lucid_evolution_lucid.TObject<{
840
- asset: _lucid_evolution_lucid.TUnsafe<string>;
841
- snapshot: _lucid_evolution_lucid.TUnsafe<Map<{
842
- epoch: bigint;
843
- scale: bigint;
844
- }, {
845
- value: bigint;
846
- }>>;
1019
+ interestOracleNft: _lucid_evolution_lucid.TObject<{
1020
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1021
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
847
1022
  }>;
848
- }>;
849
- }>)[]>;
850
- type StabilityPoolDatum = Data.Static<typeof StabilityPoolDatumSchema>;
851
- declare const StabilityPoolDatum: StabilityPoolDatum;
852
- declare const ActionReturnDatumSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
853
- IndigoStabilityPoolAccountAdjustment: _lucid_evolution_lucid.TObject<{
854
- spent_account: _lucid_evolution_lucid.TObject<{
855
- txHash: _lucid_evolution_lucid.TObject<{
856
- hash: _lucid_evolution_lucid.TUnsafe<string>;
857
- }>;
858
- outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
1023
+ redemptionRatioPercentage: _lucid_evolution_lucid.TObject<{
1024
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
859
1025
  }>;
860
- }>;
861
- }> | _lucid_evolution_lucid.TObject<{
862
- IndigoStabilityPoolAccountClosure: _lucid_evolution_lucid.TObject<{
863
- closed_account: _lucid_evolution_lucid.TObject<{
864
- txHash: _lucid_evolution_lucid.TObject<{
865
- hash: _lucid_evolution_lucid.TUnsafe<string>;
866
- }>;
867
- outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
1026
+ maintenanceRatioPercentage: _lucid_evolution_lucid.TObject<{
1027
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1028
+ }>;
1029
+ liquidationRatioPercentage: _lucid_evolution_lucid.TObject<{
1030
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1031
+ }>;
1032
+ debtMintingFeePercentage: _lucid_evolution_lucid.TObject<{
1033
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1034
+ }>;
1035
+ liquidationProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1036
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1037
+ }>;
1038
+ stabilityPoolWithdrawalFeePercentage: _lucid_evolution_lucid.TObject<{
1039
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1040
+ }>;
1041
+ redemptionReimbursementPercentage: _lucid_evolution_lucid.TObject<{
1042
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1043
+ }>;
1044
+ redemptionProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1045
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1046
+ }>;
1047
+ interestCollectorPortionPercentage: _lucid_evolution_lucid.TObject<{
1048
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
868
1049
  }>;
869
1050
  }>;
870
- }>)[]>;
871
- type ActionReturnDatum = Data.Static<typeof ActionReturnDatumSchema>;
872
- declare const ActionReturnDatum: ActionReturnDatum;
873
- declare const StabilityPoolRedeemerSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
874
- RequestAction: _lucid_evolution_lucid.TObject<{
875
- action: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TLiteral<"Create"> | _lucid_evolution_lucid.TObject<{
876
- Adjust: _lucid_evolution_lucid.TObject<{
877
- amount: _lucid_evolution_lucid.TUnsafe<bigint>;
878
- outputAddress: _lucid_evolution_lucid.TObject<{
879
- paymentCredential: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
880
- PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
881
- }> | _lucid_evolution_lucid.TObject<{
882
- ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
883
- }>)[]>;
884
- stakeCredential: _lucid_evolution_lucid.TUnsafe<{
885
- Inline: [{
886
- PublicKeyCredential: [string];
887
- } | {
888
- ScriptCredential: [string];
889
- }];
890
- } | {
891
- Pointer: [{
892
- slotNumber: bigint;
893
- transactionIndex: bigint;
894
- certificateIndex: bigint;
895
- }];
896
- }>;
1051
+ }> | _lucid_evolution_lucid.TObject<{
1052
+ ModifyAsset: _lucid_evolution_lucid.TObject<{
1053
+ asset: _lucid_evolution_lucid.TUnsafe<string>;
1054
+ newAssetPriceInfo: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
1055
+ Delisted: _lucid_evolution_lucid.TObject<{
1056
+ content: _lucid_evolution_lucid.TObject<{
1057
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
897
1058
  }>;
898
1059
  }>;
899
1060
  }> | _lucid_evolution_lucid.TObject<{
900
- Close: _lucid_evolution_lucid.TObject<{
901
- outputAddress: _lucid_evolution_lucid.TObject<{
902
- paymentCredential: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
903
- PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
904
- }> | _lucid_evolution_lucid.TObject<{
905
- ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
906
- }>)[]>;
907
- stakeCredential: _lucid_evolution_lucid.TUnsafe<{
908
- Inline: [{
909
- PublicKeyCredential: [string];
910
- } | {
911
- ScriptCredential: [string];
912
- }];
913
- } | {
914
- Pointer: [{
915
- slotNumber: bigint;
916
- transactionIndex: bigint;
917
- certificateIndex: bigint;
918
- }];
1061
+ Oracle: _lucid_evolution_lucid.TObject<{
1062
+ content: _lucid_evolution_lucid.TObject<{
1063
+ oracleNft: _lucid_evolution_lucid.TObject<{
1064
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1065
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
919
1066
  }>;
920
1067
  }>;
921
1068
  }>;
922
1069
  }>)[]>;
1070
+ newInterestOracleNft: _lucid_evolution_lucid.TObject<{
1071
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1072
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1073
+ }>;
1074
+ newRedemptionRatioPercentage: _lucid_evolution_lucid.TObject<{
1075
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1076
+ }>;
1077
+ newMaintenanceRatioPercentage: _lucid_evolution_lucid.TObject<{
1078
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1079
+ }>;
1080
+ newLiquidationRatioPercentage: _lucid_evolution_lucid.TObject<{
1081
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1082
+ }>;
1083
+ newDebtMintingFeePercentage: _lucid_evolution_lucid.TObject<{
1084
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1085
+ }>;
1086
+ newLiquidationProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1087
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1088
+ }>;
1089
+ newStabilityPoolWithdrawalFeePercentage: _lucid_evolution_lucid.TObject<{
1090
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1091
+ }>;
1092
+ newRedemptionReimbursementPercentage: _lucid_evolution_lucid.TObject<{
1093
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1094
+ }>;
1095
+ newRedemptionProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1096
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1097
+ }>;
1098
+ newInterestCollectorPortionPercentage: _lucid_evolution_lucid.TObject<{
1099
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1100
+ }>;
923
1101
  }>;
924
1102
  }> | _lucid_evolution_lucid.TObject<{
925
- ProcessRequest: _lucid_evolution_lucid.TObject<{
926
- requestRef: _lucid_evolution_lucid.TObject<{
927
- txHash: _lucid_evolution_lucid.TObject<{
928
- hash: _lucid_evolution_lucid.TUnsafe<string>;
1103
+ ModifyProtocolParams: _lucid_evolution_lucid.TObject<{
1104
+ newParams: _lucid_evolution_lucid.TObject<{
1105
+ proposalDeposit: _lucid_evolution_lucid.TUnsafe<bigint>;
1106
+ votingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1107
+ effectiveDelay: _lucid_evolution_lucid.TUnsafe<bigint>;
1108
+ expirationPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1109
+ collateralFeePercentage: _lucid_evolution_lucid.TObject<{
1110
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
929
1111
  }>;
930
- outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
1112
+ proposingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1113
+ totalShards: _lucid_evolution_lucid.TUnsafe<bigint>;
1114
+ minimumQuorum: _lucid_evolution_lucid.TUnsafe<bigint>;
1115
+ maxTreasuryLovelaceSpend: _lucid_evolution_lucid.TUnsafe<bigint>;
1116
+ maxTreasuryIndySpend: _lucid_evolution_lucid.TUnsafe<bigint>;
931
1117
  }>;
932
1118
  }>;
933
1119
  }> | _lucid_evolution_lucid.TObject<{
934
- AnnulRequest: _lucid_evolution_lucid.TObject<{}>;
935
- }> | _lucid_evolution_lucid.TObject<{
936
- LiquidateCDP: _lucid_evolution_lucid.TObject<{}>;
937
- }> | _lucid_evolution_lucid.TObject<{
938
- RecordEpochToScaleToSum: _lucid_evolution_lucid.TObject<{}>;
939
- }> | _lucid_evolution_lucid.TObject<{
940
- UpgradeVersion: _lucid_evolution_lucid.TObject<{}>;
941
- }>)[]>;
942
- type StabilityPoolRedeemer = Data.Static<typeof StabilityPoolRedeemerSchema>;
943
- declare const StabilityPoolRedeemer: StabilityPoolRedeemer;
944
- declare function parseStabilityPoolDatum(datum: Datum): StabilityPoolContent;
945
- declare function parseAccountDatum(datum: Datum): AccountContent;
946
- declare function parseSnapshotEpochToScaleToSumDatum(datum: Datum): SnapshotEpochToScaleToSumContent;
947
- declare function serialiseStabilityPoolDatum(d: StabilityPoolDatum): Datum;
948
- declare function serialiseStabilityPoolRedeemer(params: StabilityPoolRedeemer): string;
949
- /** SP Parameters */
950
- declare const StabilityPoolParamsSchema: _lucid_evolution_lucid.TObject<{
951
- assetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
952
- stabilityPoolToken: _lucid_evolution_lucid.TObject<{
953
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
954
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1120
+ UpgradeProtocol: _lucid_evolution_lucid.TObject<{
1121
+ content: _lucid_evolution_lucid.TUnsafe<Data>;
955
1122
  }>;
956
- snapshotEpochToScaleToSumToken: _lucid_evolution_lucid.TObject<{
957
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
958
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1123
+ }> | _lucid_evolution_lucid.TObject<{
1124
+ TextProposal: _lucid_evolution_lucid.TObject<{
1125
+ bytes: _lucid_evolution_lucid.TUnsafe<string>;
959
1126
  }>;
960
- accountToken: _lucid_evolution_lucid.TObject<{
961
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
962
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1127
+ }>)[]>;
1128
+ type ProposalContent = Data.Static<typeof ProposalContentSchema>;
1129
+ declare const ProposalContent: ProposalContent;
1130
+
1131
+ /**
1132
+ * Returns the new PollId.
1133
+ */
1134
+ declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, govOref: OutRef,
1135
+ /**
1136
+ * This has to be passed only in case of createAsset proposal
1137
+ */
1138
+ allIAssetOrefs: OutRef[]): Promise<[TxBuilder, bigint]>;
1139
+ /**
1140
+ * Builds transaction creating shards of count chunk size.
1141
+ */
1142
+ declare function createShardsChunks(
1143
+ /**
1144
+ * This gets automatically capped to total shards count.
1145
+ */
1146
+ chunkSize: bigint, pollManagerOref: OutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
1147
+ declare function vote(voteOption: VoteOption, pollShardOref: OutRef, stakingPositionOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1148
+ declare function mergeShards(pollManagerOref: OutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1149
+ declare function endProposal(pollManagerOref: OutRef, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1150
+ declare function executeProposal(executeOref: OutRef, govOref: OutRef, treasuryWithdrawalOref: OutRef | null, allIAssetOrefs: OutRef[] | null, modifyIAssetOref: OutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
1151
+
1152
+ declare function createSpAccount(asset: string, amount: bigint, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1153
+ declare function adjustSpAccount(asset: string, amount: bigint, accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1154
+ declare function closeSpAccount(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1155
+ declare function processSpRequest(asset: string, stabilityPoolUtxo: UTxO, accountUtxo: UTxO, govUtxo: UTxO, iAssetUtxo: UTxO, newSnapshotUtxo: UTxO | undefined, params: SystemParams, lucid: LucidEvolution, collectorOref: OutRef): Promise<TxBuilder>;
1156
+
1157
+ declare const SPIntegerSchema: Core.TSchema.Struct<{
1158
+ value: Core.TSchema.Integer;
1159
+ }>;
1160
+ type SPInteger = typeof SPIntegerSchema.Type;
1161
+ declare const AccountActionSchema: Core.TSchema.Union<[Core.TSchema.Literal<["Create"]>, Core.TSchema.Struct<{
1162
+ Adjust: Core.TSchema.Struct<{
1163
+ amount: Core.TSchema.Integer;
1164
+ outputAddress: Core.TSchema.Struct<{
1165
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1166
+ PublicKeyCredential: Core.TSchema.ByteArray;
1167
+ }>, Core.TSchema.Struct<{
1168
+ ScriptCredential: Core.TSchema.ByteArray;
1169
+ }>]>;
1170
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1171
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1172
+ PublicKeyCredential: Core.TSchema.ByteArray;
1173
+ }>, Core.TSchema.Struct<{
1174
+ ScriptCredential: Core.TSchema.ByteArray;
1175
+ }>]>;
1176
+ }>, Core.TSchema.Struct<{
1177
+ Pointer: Core.TSchema.Struct<{
1178
+ slotNumber: Core.TSchema.Integer;
1179
+ transactionIndex: Core.TSchema.Integer;
1180
+ certificateIndex: Core.TSchema.Integer;
1181
+ }>;
1182
+ }>]>>;
1183
+ }>;
963
1184
  }>;
964
- cdpToken: _lucid_evolution_lucid.TObject<{
965
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
966
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1185
+ }>, Core.TSchema.Struct<{
1186
+ Close: Core.TSchema.Struct<{
1187
+ outputAddress: Core.TSchema.Struct<{
1188
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1189
+ PublicKeyCredential: Core.TSchema.ByteArray;
1190
+ }>, Core.TSchema.Struct<{
1191
+ ScriptCredential: Core.TSchema.ByteArray;
1192
+ }>]>;
1193
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1194
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1195
+ PublicKeyCredential: Core.TSchema.ByteArray;
1196
+ }>, Core.TSchema.Struct<{
1197
+ ScriptCredential: Core.TSchema.ByteArray;
1198
+ }>]>;
1199
+ }>, Core.TSchema.Struct<{
1200
+ Pointer: Core.TSchema.Struct<{
1201
+ slotNumber: Core.TSchema.Integer;
1202
+ transactionIndex: Core.TSchema.Integer;
1203
+ certificateIndex: Core.TSchema.Integer;
1204
+ }>;
1205
+ }>]>>;
1206
+ }>;
967
1207
  }>;
968
- iAssetAuthToken: _lucid_evolution_lucid.TObject<{
969
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
970
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1208
+ }>]>;
1209
+ type AccountAction = typeof AccountActionSchema.Type;
1210
+ declare const EpochToScaleToSumSchema: Core.TSchema.Map<Core.TSchema.Struct<{
1211
+ epoch: Core.TSchema.Integer;
1212
+ scale: Core.TSchema.Integer;
1213
+ }>, Core.TSchema.Struct<{
1214
+ value: Core.TSchema.Integer;
1215
+ }>>;
1216
+ type EpochToScaleToSum = typeof EpochToScaleToSumSchema.Type;
1217
+ declare const StabilityPoolSnapshotSchema: Core.TSchema.Struct<{
1218
+ productVal: Core.TSchema.Struct<{
1219
+ value: Core.TSchema.Integer;
971
1220
  }>;
972
- versionRecordToken: _lucid_evolution_lucid.TObject<{
973
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
974
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1221
+ depositVal: Core.TSchema.Struct<{
1222
+ value: Core.TSchema.Integer;
975
1223
  }>;
976
- collectorValHash: _lucid_evolution_lucid.TUnsafe<string>;
977
- govNFT: _lucid_evolution_lucid.TObject<{
978
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
979
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1224
+ sumVal: Core.TSchema.Struct<{
1225
+ value: Core.TSchema.Integer;
980
1226
  }>;
981
- accountCreateFeeLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
982
- accountAdjustmentFeeLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
983
- requestCollateralLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
1227
+ epoch: Core.TSchema.Integer;
1228
+ scale: Core.TSchema.Integer;
984
1229
  }>;
985
- type StabilityPoolParams = Data.Static<typeof StabilityPoolParamsSchema>;
986
- declare const StabilityPoolParams: StabilityPoolParams;
987
- declare function castStabilityPoolParams(params: StabilityPoolParams): Data;
1230
+ type StabilityPoolSnapshot = typeof StabilityPoolSnapshotSchema.Type;
1231
+ declare const StabilityPoolContentSchema: Core.TSchema.Struct<{
1232
+ asset: Core.TSchema.ByteArray;
1233
+ poolSnapshot: Core.TSchema.Struct<{
1234
+ productVal: Core.TSchema.Struct<{
1235
+ value: Core.TSchema.Integer;
1236
+ }>;
1237
+ depositVal: Core.TSchema.Struct<{
1238
+ value: Core.TSchema.Integer;
1239
+ }>;
1240
+ sumVal: Core.TSchema.Struct<{
1241
+ value: Core.TSchema.Integer;
1242
+ }>;
1243
+ epoch: Core.TSchema.Integer;
1244
+ scale: Core.TSchema.Integer;
1245
+ }>;
1246
+ epochToScaleToSum: Core.TSchema.Map<Core.TSchema.Struct<{
1247
+ epoch: Core.TSchema.Integer;
1248
+ scale: Core.TSchema.Integer;
1249
+ }>, Core.TSchema.Struct<{
1250
+ value: Core.TSchema.Integer;
1251
+ }>>;
1252
+ }>;
1253
+ type StabilityPoolContent = typeof StabilityPoolContentSchema.Type;
1254
+ declare const AccountContentSchema: Core.TSchema.Struct<{
1255
+ owner: Core.TSchema.ByteArray;
1256
+ asset: Core.TSchema.ByteArray;
1257
+ accountSnapshot: Core.TSchema.Struct<{
1258
+ productVal: Core.TSchema.Struct<{
1259
+ value: Core.TSchema.Integer;
1260
+ }>;
1261
+ depositVal: Core.TSchema.Struct<{
1262
+ value: Core.TSchema.Integer;
1263
+ }>;
1264
+ sumVal: Core.TSchema.Struct<{
1265
+ value: Core.TSchema.Integer;
1266
+ }>;
1267
+ epoch: Core.TSchema.Integer;
1268
+ scale: Core.TSchema.Integer;
1269
+ }>;
1270
+ request: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Literal<["Create"]>, Core.TSchema.Struct<{
1271
+ Adjust: Core.TSchema.Struct<{
1272
+ amount: Core.TSchema.Integer;
1273
+ outputAddress: Core.TSchema.Struct<{
1274
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1275
+ PublicKeyCredential: Core.TSchema.ByteArray;
1276
+ }>, Core.TSchema.Struct<{
1277
+ ScriptCredential: Core.TSchema.ByteArray;
1278
+ }>]>;
1279
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1280
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1281
+ PublicKeyCredential: Core.TSchema.ByteArray;
1282
+ }>, Core.TSchema.Struct<{
1283
+ ScriptCredential: Core.TSchema.ByteArray;
1284
+ }>]>;
1285
+ }>, Core.TSchema.Struct<{
1286
+ Pointer: Core.TSchema.Struct<{
1287
+ slotNumber: Core.TSchema.Integer;
1288
+ transactionIndex: Core.TSchema.Integer;
1289
+ certificateIndex: Core.TSchema.Integer;
1290
+ }>;
1291
+ }>]>>;
1292
+ }>;
1293
+ }>;
1294
+ }>, Core.TSchema.Struct<{
1295
+ Close: Core.TSchema.Struct<{
1296
+ outputAddress: Core.TSchema.Struct<{
1297
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1298
+ PublicKeyCredential: Core.TSchema.ByteArray;
1299
+ }>, Core.TSchema.Struct<{
1300
+ ScriptCredential: Core.TSchema.ByteArray;
1301
+ }>]>;
1302
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1303
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1304
+ PublicKeyCredential: Core.TSchema.ByteArray;
1305
+ }>, Core.TSchema.Struct<{
1306
+ ScriptCredential: Core.TSchema.ByteArray;
1307
+ }>]>;
1308
+ }>, Core.TSchema.Struct<{
1309
+ Pointer: Core.TSchema.Struct<{
1310
+ slotNumber: Core.TSchema.Integer;
1311
+ transactionIndex: Core.TSchema.Integer;
1312
+ certificateIndex: Core.TSchema.Integer;
1313
+ }>;
1314
+ }>]>>;
1315
+ }>;
1316
+ }>;
1317
+ }>]>>;
1318
+ }>;
1319
+ type AccountContent = typeof AccountContentSchema.Type;
1320
+ declare const SnapshotEpochToScaleToSumContentSchema: Core.TSchema.Struct<{
1321
+ snapshot: Core.TSchema.Map<Core.TSchema.Struct<{
1322
+ epoch: Core.TSchema.Integer;
1323
+ scale: Core.TSchema.Integer;
1324
+ }>, Core.TSchema.Struct<{
1325
+ value: Core.TSchema.Integer;
1326
+ }>>;
1327
+ asset: Core.TSchema.ByteArray;
1328
+ }>;
1329
+ type SnapshotEpochToScaleToSumContent = typeof SnapshotEpochToScaleToSumContentSchema.Type;
1330
+ declare const StabilityPoolDatumSchema: Core.TSchema.Union<[Core.TSchema.Struct<{
1331
+ StabilityPool: Core.TSchema.Struct<{
1332
+ asset: Core.TSchema.ByteArray;
1333
+ poolSnapshot: Core.TSchema.Struct<{
1334
+ productVal: Core.TSchema.Struct<{
1335
+ value: Core.TSchema.Integer;
1336
+ }>;
1337
+ depositVal: Core.TSchema.Struct<{
1338
+ value: Core.TSchema.Integer;
1339
+ }>;
1340
+ sumVal: Core.TSchema.Struct<{
1341
+ value: Core.TSchema.Integer;
1342
+ }>;
1343
+ epoch: Core.TSchema.Integer;
1344
+ scale: Core.TSchema.Integer;
1345
+ }>;
1346
+ epochToScaleToSum: Core.TSchema.Map<Core.TSchema.Struct<{
1347
+ epoch: Core.TSchema.Integer;
1348
+ scale: Core.TSchema.Integer;
1349
+ }>, Core.TSchema.Struct<{
1350
+ value: Core.TSchema.Integer;
1351
+ }>>;
1352
+ }>;
1353
+ }>, Core.TSchema.Struct<{
1354
+ Account: Core.TSchema.Struct<{
1355
+ owner: Core.TSchema.ByteArray;
1356
+ asset: Core.TSchema.ByteArray;
1357
+ accountSnapshot: Core.TSchema.Struct<{
1358
+ productVal: Core.TSchema.Struct<{
1359
+ value: Core.TSchema.Integer;
1360
+ }>;
1361
+ depositVal: Core.TSchema.Struct<{
1362
+ value: Core.TSchema.Integer;
1363
+ }>;
1364
+ sumVal: Core.TSchema.Struct<{
1365
+ value: Core.TSchema.Integer;
1366
+ }>;
1367
+ epoch: Core.TSchema.Integer;
1368
+ scale: Core.TSchema.Integer;
1369
+ }>;
1370
+ request: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Literal<["Create"]>, Core.TSchema.Struct<{
1371
+ Adjust: Core.TSchema.Struct<{
1372
+ amount: Core.TSchema.Integer;
1373
+ outputAddress: Core.TSchema.Struct<{
1374
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1375
+ PublicKeyCredential: Core.TSchema.ByteArray;
1376
+ }>, Core.TSchema.Struct<{
1377
+ ScriptCredential: Core.TSchema.ByteArray;
1378
+ }>]>;
1379
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1380
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1381
+ PublicKeyCredential: Core.TSchema.ByteArray;
1382
+ }>, Core.TSchema.Struct<{
1383
+ ScriptCredential: Core.TSchema.ByteArray;
1384
+ }>]>;
1385
+ }>, Core.TSchema.Struct<{
1386
+ Pointer: Core.TSchema.Struct<{
1387
+ slotNumber: Core.TSchema.Integer;
1388
+ transactionIndex: Core.TSchema.Integer;
1389
+ certificateIndex: Core.TSchema.Integer;
1390
+ }>;
1391
+ }>]>>;
1392
+ }>;
1393
+ }>;
1394
+ }>, Core.TSchema.Struct<{
1395
+ Close: Core.TSchema.Struct<{
1396
+ outputAddress: Core.TSchema.Struct<{
1397
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1398
+ PublicKeyCredential: Core.TSchema.ByteArray;
1399
+ }>, Core.TSchema.Struct<{
1400
+ ScriptCredential: Core.TSchema.ByteArray;
1401
+ }>]>;
1402
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1403
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1404
+ PublicKeyCredential: Core.TSchema.ByteArray;
1405
+ }>, Core.TSchema.Struct<{
1406
+ ScriptCredential: Core.TSchema.ByteArray;
1407
+ }>]>;
1408
+ }>, Core.TSchema.Struct<{
1409
+ Pointer: Core.TSchema.Struct<{
1410
+ slotNumber: Core.TSchema.Integer;
1411
+ transactionIndex: Core.TSchema.Integer;
1412
+ certificateIndex: Core.TSchema.Integer;
1413
+ }>;
1414
+ }>]>>;
1415
+ }>;
1416
+ }>;
1417
+ }>]>>;
1418
+ }>;
1419
+ }>, Core.TSchema.Struct<{
1420
+ SnapshotEpochToScaleToSum: Core.TSchema.Struct<{
1421
+ snapshot: Core.TSchema.Map<Core.TSchema.Struct<{
1422
+ epoch: Core.TSchema.Integer;
1423
+ scale: Core.TSchema.Integer;
1424
+ }>, Core.TSchema.Struct<{
1425
+ value: Core.TSchema.Integer;
1426
+ }>>;
1427
+ asset: Core.TSchema.ByteArray;
1428
+ }>;
1429
+ }>]>;
1430
+ declare const StabilityPoolRedeemerSchema: Core.TSchema.Union<[Core.TSchema.Struct<{
1431
+ RequestAction: Core.TSchema.Union<[Core.TSchema.Literal<["Create"]>, Core.TSchema.Struct<{
1432
+ Adjust: Core.TSchema.Struct<{
1433
+ amount: Core.TSchema.Integer;
1434
+ outputAddress: Core.TSchema.Struct<{
1435
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1436
+ PublicKeyCredential: Core.TSchema.ByteArray;
1437
+ }>, Core.TSchema.Struct<{
1438
+ ScriptCredential: Core.TSchema.ByteArray;
1439
+ }>]>;
1440
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1441
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1442
+ PublicKeyCredential: Core.TSchema.ByteArray;
1443
+ }>, Core.TSchema.Struct<{
1444
+ ScriptCredential: Core.TSchema.ByteArray;
1445
+ }>]>;
1446
+ }>, Core.TSchema.Struct<{
1447
+ Pointer: Core.TSchema.Struct<{
1448
+ slotNumber: Core.TSchema.Integer;
1449
+ transactionIndex: Core.TSchema.Integer;
1450
+ certificateIndex: Core.TSchema.Integer;
1451
+ }>;
1452
+ }>]>>;
1453
+ }>;
1454
+ }>;
1455
+ }>, Core.TSchema.Struct<{
1456
+ Close: Core.TSchema.Struct<{
1457
+ outputAddress: Core.TSchema.Struct<{
1458
+ paymentCredential: Core.TSchema.Union<[Core.TSchema.Struct<{
1459
+ PublicKeyCredential: Core.TSchema.ByteArray;
1460
+ }>, Core.TSchema.Struct<{
1461
+ ScriptCredential: Core.TSchema.ByteArray;
1462
+ }>]>;
1463
+ stakeCredential: Core.TSchema.NullOr<Core.TSchema.Union<[Core.TSchema.Struct<{
1464
+ Inline: Core.TSchema.Union<[Core.TSchema.Struct<{
1465
+ PublicKeyCredential: Core.TSchema.ByteArray;
1466
+ }>, Core.TSchema.Struct<{
1467
+ ScriptCredential: Core.TSchema.ByteArray;
1468
+ }>]>;
1469
+ }>, Core.TSchema.Struct<{
1470
+ Pointer: Core.TSchema.Struct<{
1471
+ slotNumber: Core.TSchema.Integer;
1472
+ transactionIndex: Core.TSchema.Integer;
1473
+ certificateIndex: Core.TSchema.Integer;
1474
+ }>;
1475
+ }>]>>;
1476
+ }>;
1477
+ }>;
1478
+ }>]>;
1479
+ }>, Core.TSchema.Struct<{
1480
+ ProcessRequest: Core.TSchema.Struct<{
1481
+ txHash: Core.TSchema.Struct<{
1482
+ hash: Core.TSchema.ByteArray;
1483
+ }>;
1484
+ outputIndex: Core.TSchema.Integer;
1485
+ }>;
1486
+ }>, Core.TSchema.Literal<["AnnulRequest"]>, Core.TSchema.Literal<["LiquidateCDP"]>, Core.TSchema.Literal<["RecordEpochToScaleToSum"]>, Core.TSchema.Literal<["UpgradeVersion"]>]>;
1487
+ type StabilityPoolRedeemer = typeof StabilityPoolRedeemerSchema.Type;
1488
+ declare function serialiseStabilityPoolRedeemer(r: StabilityPoolRedeemer): string;
1489
+ declare function serialiseStabilityPoolDatum(d: typeof StabilityPoolDatumSchema.Type,
1490
+ /**
1491
+ * This is necessary to change only in case of execute propose asset.
1492
+ */
1493
+ useIndefiniteMaps?: boolean): string;
1494
+ declare function parseStabilityPoolDatum(datum: string): StabilityPoolContent;
1495
+ declare function parseAccountDatum(datum: string): AccountContent;
1496
+ declare function parseSnapshotEpochToScaleToSumDatum(datum: string): SnapshotEpochToScaleToSumContent;
988
1497
  declare function mkSPInteger(value: bigint): SPInteger;
989
1498
  declare function fromSPInteger(value: SPInteger): bigint;
990
1499
  declare function spAdd(a: SPInteger, b: SPInteger): SPInteger;
@@ -992,125 +1501,79 @@ declare function spSub(a: SPInteger, b: SPInteger): SPInteger;
992
1501
  declare function spMul(a: SPInteger, b: SPInteger): SPInteger;
993
1502
  declare function spDiv(a: SPInteger, b: SPInteger): SPInteger;
994
1503
 
995
- declare function getSumFromEpochToScaleToSum(e2s2s: EpochToScaleToSum, epoch: bigint, scale: bigint): SPInteger | undefined;
996
- declare function setSumInEpochToScaleToSum(e2s2s: EpochToScaleToSum, epoch: bigint, scale: bigint, sum: SPInteger): EpochToScaleToSum;
997
- declare function getAccountReward(account: StabilityPoolSnapshot, e2s2s: EpochToScaleToSum): SPInteger;
998
- declare function getAccountFund(pool: StabilityPoolSnapshot, account: StabilityPoolSnapshot): SPInteger;
999
- declare function adjust(pool: StabilityPoolSnapshot, account: StabilityPoolSnapshot, e2s2s: EpochToScaleToSum): [StabilityPoolSnapshot, bigint];
1000
- declare function adjustmentHelper(spESTSTokenRef1: UTxO, spESTSTokenRef2: UTxO | undefined, pool: StabilityPoolSnapshot, e2s2s: EpochToScaleToSum, account: StabilityPoolSnapshot): [StabilityPoolSnapshot, bigint, UTxO[]];
1001
- declare function updatePoolSnapshotWithdrawalFee(withdrawalFeeAmount: SPInteger, newPoolDepositExcludingFee: SPInteger, pool: StabilityPoolSnapshot): [SPInteger, SPInteger];
1002
-
1003
- declare const ONE_SECOND: number;
1004
- declare const oneHour: bigint;
1005
- declare const oneDay: bigint;
1006
- declare const oneYear: bigint;
1007
-
1008
- declare const CDPCreatorParamsSchema: _lucid_evolution_lucid.TObject<{
1009
- cdpCreatorNft: _lucid_evolution_lucid.TObject<{
1010
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1011
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1012
- }>;
1013
- cdpAssetCs: _lucid_evolution_lucid.TUnsafe<string>;
1014
- cdpAuthTk: _lucid_evolution_lucid.TObject<{
1015
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1016
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1017
- }>;
1018
- iAssetAuthTk: _lucid_evolution_lucid.TObject<{
1019
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1020
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1021
- }>;
1022
- versionRecordToken: _lucid_evolution_lucid.TObject<{
1023
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1024
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1025
- }>;
1026
- cdpScriptHash: _lucid_evolution_lucid.TUnsafe<string>;
1027
- collectorValHash: _lucid_evolution_lucid.TUnsafe<string>;
1028
- minCollateralInLovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
1029
- biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1030
- }>;
1031
- type CDPCreatorParams = Data.Static<typeof CDPCreatorParamsSchema>;
1032
- declare const CDPCreatorParams: CDPCreatorParams;
1033
-
1034
- declare const cdpCreatorValidator: {
1035
- type: ScriptType;
1036
- description: string;
1037
- cborHex: string;
1038
- };
1039
- declare const mkCDPCreatorValidator: (params: CDPCreatorParams) => SpendingValidator;
1040
- declare const mkCDPCreatorValidatorFromSP: (params: CDPCreatorParamsSP) => SpendingValidator;
1504
+ declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1505
+ declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1506
+ declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1041
1507
 
1042
- declare const _cdpValidator: {
1043
- type: ScriptType;
1044
- description: string;
1045
- cborHex: string;
1046
- };
1047
-
1048
- declare const _collectorValidator: {
1049
- type: ScriptType;
1050
- description: string;
1051
- cborHex: string;
1052
- };
1508
+ declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refOutRef?: OutRef): Promise<[TxBuilder, AssetClass]>;
1509
+ declare function feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;
1053
1510
 
1054
1511
  declare function mkInterestOracleValidator(params: InterestOracleParams): SpendingValidator;
1055
1512
 
1056
- declare const PollShardParamsSchema: _lucid_evolution_lucid.TObject<{
1057
- pollToken: _lucid_evolution_lucid.TObject<{
1058
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1059
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1060
- }>;
1061
- stakingToken: _lucid_evolution_lucid.TObject<{
1062
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1063
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1064
- }>;
1065
- indyAsset: _lucid_evolution_lucid.TObject<{
1513
+ declare const VersionRecordTokenParamsSchema: _lucid_evolution_lucid.TObject<{
1514
+ upgradeToken: _lucid_evolution_lucid.TObject<{
1066
1515
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1067
1516
  tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1068
1517
  }>;
1069
- stakingValHash: _lucid_evolution_lucid.TUnsafe<string>;
1070
1518
  }>;
1071
- type PollShardParams = Data.Static<typeof PollShardParamsSchema>;
1072
- declare const PollShardParams: PollShardParams;
1073
- declare function castPollShardParams(params: PollShardParams): Data;
1519
+ type VersionRecordTokenParams = Data.Static<typeof VersionRecordTokenParamsSchema>;
1520
+ declare const VersionRecordTokenParams: VersionRecordTokenParams;
1521
+ declare function castVersionRecordTokenParams(params: VersionRecordTokenParams): Data;
1074
1522
 
1075
- declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
1076
- declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;
1523
+ declare function mkVersionRecordTokenPolicy(params: VersionRecordTokenParams): MintingPolicy;
1524
+ declare const mkVersionRegistryValidator: () => SpendingValidator;
1077
1525
 
1078
- declare const PollManagerParamsSchema: _lucid_evolution_lucid.TObject<{
1079
- govNFT: _lucid_evolution_lucid.TObject<{
1080
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1081
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1082
- }>;
1083
- pollToken: _lucid_evolution_lucid.TObject<{
1084
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1085
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1086
- }>;
1087
- upgradeToken: _lucid_evolution_lucid.TObject<{
1088
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1089
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1090
- }>;
1091
- indyAsset: _lucid_evolution_lucid.TObject<{
1092
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1093
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1094
- }>;
1095
- govExecuteValHash: _lucid_evolution_lucid.TUnsafe<string>;
1096
- pBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1097
- shardValHash: _lucid_evolution_lucid.TUnsafe<string>;
1098
- treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
1099
- initialIndyDistribution: _lucid_evolution_lucid.TUnsafe<bigint>;
1100
- }>;
1101
- type PollManagerParams = Data.Static<typeof PollManagerParamsSchema>;
1102
- declare const PollManagerParams: PollManagerParams;
1103
- declare function castPollManagerParams(params: PollManagerParams): Data;
1526
+ declare function treasuryFeeTx(fee: bigint, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, treasuryOref: OutRef): Promise<void>;
1527
+
1528
+ /**
1529
+ * Accept only a single item in the array and return it.
1530
+ * When not exclusively a single item, throw an error.
1531
+ */
1532
+ declare function matchSingle<T>(xs: T[], mkErr: (xs: T[]) => Error): T;
1533
+ declare function loadSystemParamsFromFile(file: string): SystemParams;
1534
+ declare function loadSystemParamsFromUrl(url: string): Promise<SystemParams>;
1535
+ declare const getRandomElement: <T>(arr: T[]) => T | undefined;
1104
1536
 
1105
- declare const mkPollManagerValidator: (params: PollManagerParams) => SpendingValidator;
1106
- declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => SpendingValidator;
1537
+ /**
1538
+ * Returns the inline datum.
1539
+ * Throws when the UTXO doesn't have an inline datum
1540
+ * (i.e. in case it has hash datum or no datum).
1541
+ */
1542
+ declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
1543
+ declare function addrDetails(lucid: LucidEvolution): Promise<[Credential, Credential | undefined]>;
1544
+ declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential): Address;
1545
+ declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
1546
+ declare function balance(utxos: UTxO[]): Assets;
1107
1547
 
1108
- declare const _treasuryValidator: {
1109
- type: ScriptType;
1110
- description: string;
1111
- cborHex: string;
1548
+ declare const initSpSnapshot: StabilityPoolSnapshot;
1549
+ declare const initEpochToScaleToSumMap: () => EpochToScaleToSum;
1550
+ declare function getSumFromEpochToScaleToSum(e2s2s: EpochToScaleToSum, epoch: bigint, scale: bigint): SPInteger | undefined;
1551
+ /**
1552
+ * It's necessary to use this to update map entries because typescript can't compare keys as objects.
1553
+ */
1554
+ declare function setSumInEpochToScaleToSum(e2s2s: EpochToScaleToSum, epoch: bigint, scale: bigint, sum: SPInteger): EpochToScaleToSum;
1555
+ declare function getAccountReward(account: StabilityPoolSnapshot, e2s2s: EpochToScaleToSum): SPInteger;
1556
+ declare function getAccountFund(pool: StabilityPoolSnapshot, account: StabilityPoolSnapshot): SPInteger;
1557
+ declare function adjust(pool: StabilityPoolSnapshot, account: StabilityPoolSnapshot, e2s2s: EpochToScaleToSum): [StabilityPoolSnapshot, bigint];
1558
+ declare function adjustmentHelper(spESTSTokenRef1: UTxO, spESTSTokenRef2: UTxO | undefined, pool: StabilityPoolSnapshot, e2s2s: EpochToScaleToSum, account: StabilityPoolSnapshot): [StabilityPoolSnapshot, bigint, UTxO[]];
1559
+ declare function updatePoolSnapshotWithdrawalFee(withdrawalFeeAmount: SPInteger, newPoolDepositExcludingFee: SPInteger, pool: StabilityPoolSnapshot): [SPInteger, SPInteger];
1560
+ declare function liquidationHelper(spContent: StabilityPoolContent, iassetBurnAmt: bigint,
1561
+ /**
1562
+ * The collateral absorbed
1563
+ */
1564
+ reward: bigint): {
1565
+ newSpContent: StabilityPoolContent;
1112
1566
  };
1113
1567
 
1568
+ declare const ONE_SECOND: number;
1569
+ declare const ONE_HOUR: bigint;
1570
+ declare const ONE_DAY: bigint;
1571
+ declare const ONE_YEAR: bigint;
1572
+
1573
+ declare const mkCollectorValidatorFromSP: (params: CollectorParamsSP) => SpendingValidator;
1574
+
1575
+ declare const mkTreasuryValidatorFromSP: (params: TreasuryParamsSP) => SpendingValidator;
1576
+
1114
1577
  declare const ExecuteParamsSchema: _lucid_evolution_lucid.TObject<{
1115
1578
  govNFT: _lucid_evolution_lucid.TObject<{
1116
1579
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
@@ -1143,74 +1606,167 @@ declare const ExecuteParamsSchema: _lucid_evolution_lucid.TObject<{
1143
1606
  }>;
1144
1607
  type ExecuteParams = Data.Static<typeof ExecuteParamsSchema>;
1145
1608
  declare const ExecuteParams: ExecuteParams;
1146
- declare function castExecuteParams(params: ExecuteParams): Data;
1147
-
1148
- declare const GovDatumSchema: _lucid_evolution_lucid.TObject<{
1149
- currentProposal: _lucid_evolution_lucid.TUnsafe<bigint>;
1150
- protocolParams: _lucid_evolution_lucid.TObject<{
1151
- proposalDeposit: _lucid_evolution_lucid.TUnsafe<bigint>;
1152
- votingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1153
- effectiveDelay: _lucid_evolution_lucid.TUnsafe<bigint>;
1154
- expirationPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1155
- collateralFeePercentage: _lucid_evolution_lucid.TObject<{
1156
- getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1609
+ declare const ExecuteDatumSchema: _lucid_evolution_lucid.TObject<{
1610
+ id: _lucid_evolution_lucid.TUnsafe<bigint>;
1611
+ content: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
1612
+ ProposeAsset: _lucid_evolution_lucid.TObject<{
1613
+ asset: _lucid_evolution_lucid.TUnsafe<string>;
1614
+ priceOracleNft: _lucid_evolution_lucid.TObject<{
1615
+ oracleNft: _lucid_evolution_lucid.TObject<{
1616
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1617
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1618
+ }>;
1619
+ }>;
1620
+ interestOracleNft: _lucid_evolution_lucid.TObject<{
1621
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1622
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1623
+ }>;
1624
+ redemptionRatioPercentage: _lucid_evolution_lucid.TObject<{
1625
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1626
+ }>;
1627
+ maintenanceRatioPercentage: _lucid_evolution_lucid.TObject<{
1628
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1629
+ }>;
1630
+ liquidationRatioPercentage: _lucid_evolution_lucid.TObject<{
1631
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1632
+ }>;
1633
+ debtMintingFeePercentage: _lucid_evolution_lucid.TObject<{
1634
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1635
+ }>;
1636
+ liquidationProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1637
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1638
+ }>;
1639
+ stabilityPoolWithdrawalFeePercentage: _lucid_evolution_lucid.TObject<{
1640
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1641
+ }>;
1642
+ redemptionReimbursementPercentage: _lucid_evolution_lucid.TObject<{
1643
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1644
+ }>;
1645
+ redemptionProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1646
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1647
+ }>;
1648
+ interestCollectorPortionPercentage: _lucid_evolution_lucid.TObject<{
1649
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1650
+ }>;
1157
1651
  }>;
1158
- proposingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1159
- totalShards: _lucid_evolution_lucid.TUnsafe<bigint>;
1160
- minimumQuorum: _lucid_evolution_lucid.TUnsafe<bigint>;
1161
- maxTreasuryLovelaceSpend: _lucid_evolution_lucid.TUnsafe<bigint>;
1162
- maxTreasuryIndySpend: _lucid_evolution_lucid.TUnsafe<bigint>;
1163
- }>;
1164
- currentVersion: _lucid_evolution_lucid.TUnsafe<bigint>;
1165
- iassetsCount: _lucid_evolution_lucid.TUnsafe<bigint>;
1166
- activeProposals: _lucid_evolution_lucid.TUnsafe<bigint>;
1167
- treasuryIndyWithdrawnAmt: _lucid_evolution_lucid.TUnsafe<bigint>;
1168
- }>;
1169
- type GovDatum = Data.Static<typeof GovDatumSchema>;
1170
- declare function parseGovDatum(datum: Datum): GovDatum;
1171
- declare function serialiseGovDatum(d: GovDatum): Datum;
1172
- declare const GovParamsSchema: _lucid_evolution_lucid.TObject<{
1173
- govNFT: _lucid_evolution_lucid.TObject<{
1174
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1175
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1176
- }>;
1177
- pollToken: _lucid_evolution_lucid.TObject<{
1178
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1179
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1180
- }>;
1181
- upgradeToken: _lucid_evolution_lucid.TObject<{
1182
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1183
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1184
- }>;
1185
- indyAsset: _lucid_evolution_lucid.TObject<{
1186
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1187
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1188
- }>;
1189
- versionRecordToken: _lucid_evolution_lucid.TObject<{
1190
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1191
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1192
- }>;
1193
- pollManagerValHash: _lucid_evolution_lucid.TUnsafe<string>;
1194
- gBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1195
- daoIdentityToken: _lucid_evolution_lucid.TObject<{
1196
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1197
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1198
- }>;
1199
- iAssetAuthToken: _lucid_evolution_lucid.TObject<{
1200
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1201
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1202
- }>;
1652
+ }> | _lucid_evolution_lucid.TObject<{
1653
+ ModifyAsset: _lucid_evolution_lucid.TObject<{
1654
+ asset: _lucid_evolution_lucid.TUnsafe<string>;
1655
+ newAssetPriceInfo: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
1656
+ Delisted: _lucid_evolution_lucid.TObject<{
1657
+ content: _lucid_evolution_lucid.TObject<{
1658
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1659
+ }>;
1660
+ }>;
1661
+ }> | _lucid_evolution_lucid.TObject<{
1662
+ Oracle: _lucid_evolution_lucid.TObject<{
1663
+ content: _lucid_evolution_lucid.TObject<{
1664
+ oracleNft: _lucid_evolution_lucid.TObject<{
1665
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1666
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1667
+ }>;
1668
+ }>;
1669
+ }>;
1670
+ }>)[]>;
1671
+ newInterestOracleNft: _lucid_evolution_lucid.TObject<{
1672
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1673
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1674
+ }>;
1675
+ newRedemptionRatioPercentage: _lucid_evolution_lucid.TObject<{
1676
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1677
+ }>;
1678
+ newMaintenanceRatioPercentage: _lucid_evolution_lucid.TObject<{
1679
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1680
+ }>;
1681
+ newLiquidationRatioPercentage: _lucid_evolution_lucid.TObject<{
1682
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1683
+ }>;
1684
+ newDebtMintingFeePercentage: _lucid_evolution_lucid.TObject<{
1685
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1686
+ }>;
1687
+ newLiquidationProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1688
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1689
+ }>;
1690
+ newStabilityPoolWithdrawalFeePercentage: _lucid_evolution_lucid.TObject<{
1691
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1692
+ }>;
1693
+ newRedemptionReimbursementPercentage: _lucid_evolution_lucid.TObject<{
1694
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1695
+ }>;
1696
+ newRedemptionProcessingFeePercentage: _lucid_evolution_lucid.TObject<{
1697
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1698
+ }>;
1699
+ newInterestCollectorPortionPercentage: _lucid_evolution_lucid.TObject<{
1700
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1701
+ }>;
1702
+ }>;
1703
+ }> | _lucid_evolution_lucid.TObject<{
1704
+ ModifyProtocolParams: _lucid_evolution_lucid.TObject<{
1705
+ newParams: _lucid_evolution_lucid.TObject<{
1706
+ proposalDeposit: _lucid_evolution_lucid.TUnsafe<bigint>;
1707
+ votingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1708
+ effectiveDelay: _lucid_evolution_lucid.TUnsafe<bigint>;
1709
+ expirationPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1710
+ collateralFeePercentage: _lucid_evolution_lucid.TObject<{
1711
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1712
+ }>;
1713
+ proposingPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
1714
+ totalShards: _lucid_evolution_lucid.TUnsafe<bigint>;
1715
+ minimumQuorum: _lucid_evolution_lucid.TUnsafe<bigint>;
1716
+ maxTreasuryLovelaceSpend: _lucid_evolution_lucid.TUnsafe<bigint>;
1717
+ maxTreasuryIndySpend: _lucid_evolution_lucid.TUnsafe<bigint>;
1718
+ }>;
1719
+ }>;
1720
+ }> | _lucid_evolution_lucid.TObject<{
1721
+ UpgradeProtocol: _lucid_evolution_lucid.TObject<{
1722
+ content: _lucid_evolution_lucid.TUnsafe<Data>;
1723
+ }>;
1724
+ }> | _lucid_evolution_lucid.TObject<{
1725
+ TextProposal: _lucid_evolution_lucid.TObject<{
1726
+ bytes: _lucid_evolution_lucid.TUnsafe<string>;
1727
+ }>;
1728
+ }>)[]>;
1729
+ passedTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1730
+ votingEndTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1731
+ protocolVersion: _lucid_evolution_lucid.TUnsafe<bigint>;
1732
+ treasuryWithdrawal: _lucid_evolution_lucid.TUnsafe<{
1733
+ value: [string, string, bigint][];
1734
+ destination: {
1735
+ paymentCredential: {
1736
+ PublicKeyCredential: [string];
1737
+ } | {
1738
+ ScriptCredential: [string];
1739
+ };
1740
+ stakeCredential: {
1741
+ Inline: [{
1742
+ PublicKeyCredential: [string];
1743
+ } | {
1744
+ ScriptCredential: [string];
1745
+ }];
1746
+ } | {
1747
+ Pointer: [{
1748
+ slotNumber: bigint;
1749
+ transactionIndex: bigint;
1750
+ certificateIndex: bigint;
1751
+ }];
1752
+ } | null;
1753
+ };
1754
+ } | null>;
1203
1755
  }>;
1204
- type GovParams = Data.Static<typeof GovParamsSchema>;
1205
- declare const GovParams: GovParams;
1206
- declare function castGovParams(params: GovParams): Data;
1756
+ type ExecuteDatum = Data.Static<typeof ExecuteDatumSchema>;
1757
+ declare const ExecuteDatum: ExecuteDatum;
1758
+ declare function serialiseExecuteDatum(d: ExecuteDatum): Datum;
1759
+ declare function parseExecuteDatum(d: Datum): option.Option<ExecuteDatum>;
1760
+ declare function parseExecuteDatumOrThrow(d: Datum): ExecuteDatum;
1761
+ declare function castExecuteParams(params: ExecuteParams): Data;
1762
+
1763
+ declare const mkExecuteValidator: (params: ExecuteParams) => SpendingValidator;
1764
+ declare const mkExecuteValidatorFromSP: (params: ExecuteParamsSP) => SpendingValidator;
1207
1765
 
1208
1766
  declare const OracleAssetNftSchema: _lucid_evolution_lucid.TObject<{
1209
1767
  oracleNft: _lucid_evolution_lucid.TObject<{
1210
- asset: _lucid_evolution_lucid.TObject<{
1211
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1212
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1213
- }>;
1768
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1769
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1214
1770
  }>;
1215
1771
  }>;
1216
1772
  type OracleAssetNft = Data.Static<typeof OracleAssetNftSchema>;
@@ -1229,10 +1785,79 @@ declare const PriceOracleDatumSchema: _lucid_evolution_lucid.TObject<{
1229
1785
  expiration: _lucid_evolution_lucid.TUnsafe<bigint>;
1230
1786
  }>;
1231
1787
  type PriceOracleDatum = Data.Static<typeof PriceOracleDatumSchema>;
1788
+ declare const PriceOracleRedeemerSchema: _lucid_evolution_lucid.TObject<{
1789
+ currentTime: _lucid_evolution_lucid.TUnsafe<bigint>;
1790
+ newPrice: _lucid_evolution_lucid.TObject<{
1791
+ getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1792
+ }>;
1793
+ }>;
1794
+ type PriceOracleRedeemer = Data.Static<typeof PriceOracleRedeemerSchema>;
1795
+ declare function serialisePriceOracleRedeemer(r: PriceOracleRedeemer): Redeemer;
1232
1796
  declare function parsePriceOracleDatum(datum: Datum): PriceOracleDatum;
1233
1797
  declare function serialisePriceOracleDatum(datum: PriceOracleDatum): Datum;
1234
1798
  declare function castPriceOracleParams(params: PriceOracleParams): Data;
1235
1799
 
1800
+ declare const ActionReturnDatumSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
1801
+ IndigoStabilityPoolAccountAdjustment: _lucid_evolution_lucid.TObject<{
1802
+ spent_account: _lucid_evolution_lucid.TObject<{
1803
+ txHash: _lucid_evolution_lucid.TObject<{
1804
+ hash: _lucid_evolution_lucid.TUnsafe<string>;
1805
+ }>;
1806
+ outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
1807
+ }>;
1808
+ }>;
1809
+ }> | _lucid_evolution_lucid.TObject<{
1810
+ IndigoStabilityPoolAccountClosure: _lucid_evolution_lucid.TObject<{
1811
+ closed_account: _lucid_evolution_lucid.TObject<{
1812
+ txHash: _lucid_evolution_lucid.TObject<{
1813
+ hash: _lucid_evolution_lucid.TUnsafe<string>;
1814
+ }>;
1815
+ outputIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
1816
+ }>;
1817
+ }>;
1818
+ }>)[]>;
1819
+ type ActionReturnDatum = Data.Static<typeof ActionReturnDatumSchema>;
1820
+ declare const ActionReturnDatum: ActionReturnDatum;
1821
+ /** SP Parameters */
1822
+ declare const StabilityPoolParamsSchema: _lucid_evolution_lucid.TObject<{
1823
+ assetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
1824
+ stabilityPoolToken: _lucid_evolution_lucid.TObject<{
1825
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1826
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1827
+ }>;
1828
+ snapshotEpochToScaleToSumToken: _lucid_evolution_lucid.TObject<{
1829
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1830
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1831
+ }>;
1832
+ accountToken: _lucid_evolution_lucid.TObject<{
1833
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1834
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1835
+ }>;
1836
+ cdpToken: _lucid_evolution_lucid.TObject<{
1837
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1838
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1839
+ }>;
1840
+ iAssetAuthToken: _lucid_evolution_lucid.TObject<{
1841
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1842
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1843
+ }>;
1844
+ versionRecordToken: _lucid_evolution_lucid.TObject<{
1845
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1846
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1847
+ }>;
1848
+ collectorValHash: _lucid_evolution_lucid.TUnsafe<string>;
1849
+ govNFT: _lucid_evolution_lucid.TObject<{
1850
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
1851
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1852
+ }>;
1853
+ accountCreateFeeLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
1854
+ accountAdjustmentFeeLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
1855
+ requestCollateralLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
1856
+ }>;
1857
+ type StabilityPoolParams = Data.Static<typeof StabilityPoolParamsSchema>;
1858
+ declare const StabilityPoolParams: StabilityPoolParams;
1859
+ declare function castStabilityPoolParams(params: StabilityPoolParams): Data;
1860
+
1236
1861
  declare const LRPParamsSchema: _lucid_evolution_lucid.TObject<{
1237
1862
  versionRecordToken: _lucid_evolution_lucid.TObject<{
1238
1863
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
@@ -1288,12 +1913,7 @@ declare function serialiseLrpDatum(datum: LRPDatum): Datum;
1288
1913
  declare function serialiseLrpRedeemer(redeemer: LRPRedeemer): Redeemer;
1289
1914
  declare function castLrpParams(params: LRPParams): Data;
1290
1915
 
1291
- declare const OnChainDecimalSchema: _lucid_evolution_lucid.TObject<{
1292
- getOnChainInt: _lucid_evolution_lucid.TUnsafe<bigint>;
1293
- }>;
1294
- type OnChainDecimal = Data.Static<typeof OnChainDecimalSchema>;
1295
-
1296
- declare function openLrp(assetTokenName: string, lovelacesAmt: bigint, maxPrice: OnChainDecimal, lucid: LucidEvolution, lrpScriptHash: ScriptHash, network: Network, lrpStakeCredential?: Credential$1): Promise<TxBuilder>;
1916
+ declare function openLrp(assetTokenName: string, lovelacesAmt: bigint, maxPrice: OnChainDecimal, lucid: LucidEvolution, lrpScriptHash: ScriptHash, network: Network, lrpStakeCredential?: Credential): Promise<TxBuilder>;
1297
1917
  declare function cancelLrp(lrpOutRef: OutRef, lrpRefScriptOutRef: OutRef, lucid: LucidEvolution): Promise<TxBuilder>;
1298
1918
  declare function redeemLrp(
1299
1919
  /** The tuple represents the LRP outref and the amount of iAssets to redeem against it. */
@@ -1316,6 +1936,7 @@ declare const mkLrpValidator: (params: LRPParams) => SpendingValidator;
1316
1936
  declare const mkLrpValidatorFromSP: (params: LrpParamsSP) => SpendingValidator;
1317
1937
 
1318
1938
  /**
1939
+ * TODO: remove this, it should be part of the testsuite only
1319
1940
  * Uses an always fail validator for the destination address.
1320
1941
  */
1321
1942
  declare function runCreateScriptRefTx(lucid: LucidEvolution, scriptRefValidator: SpendingValidator, network: Network): Promise<OutRef>;
@@ -1335,4 +1956,12 @@ type OneShotParams = Data.Static<typeof OneShotParamsSchema>;
1335
1956
  declare function oneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<[TxBuilder, PolicyId]>;
1336
1957
  declare function runOneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<PolicyId>;
1337
1958
 
1338
- export { AccountAction, AccountActionSchema, AccountContent, AccountContentSchema, ActionReturnDatum, ActionReturnDatumSchema, Address, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AddressSchema, type Amount, type AssetClass, type AssetClassSP, AssetClassSchema, type AuthTokenPolicies, type CDPContent, CDPContentSchema, CDPContract, type CDPCreatorParamsSP, type CDPDatum, CDPDatumSchema, type CDPFees, CDPFeesSchema, type CdpParams, CollectorContract, type CollectorParams, Credential, CredentialSchema, type CurrencySymbol, type DistributionParams, EpochToScaleToSum, EpochToScaleToSumSchema, ExecuteParams, type ExecuteParamsSP, type FeedInterestOracleRedeemer, FeedInterestOracleRedeemerSchema, GovContract, type GovDatum, GovParams, type GovParamsSP, type IAssetContent, IAssetContentSchema, IAssetHelpers, type IAssetOutput, type Input, InterestOracleContract, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type LRPDatum, LRPDatumSchema, type LRPParams, LRPParamsSchema, type LRPRedeemer, LRPRedeemerSchema, type LrpParamsSP, ONE_SECOND, type OracleAssetNft, OracleAssetNftSchema, type Output, type OutputReference, OutputReferenceSchema, PollManagerParams, type PollManagerParamsSP, PollShardParams, type PollShardParamsSP, type PriceOracleDatum, PriceOracleDatumSchema, type PriceOracleParams, PriceOracleParamsSchema, type PubKeyHash, SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolContract, StabilityPoolDatum, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, StabilityPoolRedeemer, StabilityPoolRedeemerSchema, StabilityPoolSnapshot, StakingContract, type StakingParams, type StartTime, type SystemParams, type TokenName, TreasuryContract, type TreasuryParams, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, _cdpValidator, _collectorValidator, _treasuryValidator, addrDetails, addressFromBech32, addressToBech32, adjust, adjustLrp, adjustmentHelper, balance, calculateFeeFromPercentage, cancelLrp, castExecuteParams, castGovParams, castInterestOracleParams, castLrpParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castStabilityPoolParams, cdpCreatorValidator, claimLrp, createScriptAddress, fromSPInteger, fromSystemParamsAsset, getAccountFund, getAccountReward, getInlineDatumOrThrow, getRandomElement, getSumFromEpochToScaleToSum, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkInterestOracleValidator, mkLrpValidator, mkLrpValidatorFromSP, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkSPInteger, oneDay, oneHour, oneShotMintTx, oneYear, openLrp, parseAccountDatum, parseCDPDatum, parseGovDatum, parseIAssetDatum, parseInterestOracleDatum, parseLrpDatum, parsePriceOracleDatum, parseSnapshotEpochToScaleToSumDatum, parseStabilityPoolDatum, redeemLrp, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseCDPDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseIAssetDatum, serialiseInterestOracleDatum, serialiseLrpDatum, serialiseLrpRedeemer, serialisePriceOracleDatum, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, setSumInEpochToScaleToSum, spAdd, spDiv, spMul, spSub, toSystemParamsAsset, updatePoolSnapshotWithdrawalFee };
1959
+ declare function mkLovelacesOf(amount: bigint): Assets;
1960
+ declare function lovelacesAmt(assets: Assets): bigint;
1961
+ declare function assetClassToUnit(ac: AssetClass): Unit;
1962
+ declare function mkAssetsOf(assetClass: AssetClass, amount: bigint): Assets;
1963
+ declare function assetClassValueOf(assets: Assets, assetClass: AssetClass): bigint;
1964
+ declare function negateAssets(assets: Assets): Assets;
1965
+ declare function isAssetsZero(assets: Assets): boolean;
1966
+
1967
+ export { type AccountAction, type AccountContent, AccountContentSchema, ActionReturnDatum, ActionReturnDatumSchema, type AddressCredential, type AddressCredentialOrDatum, AddressD, type AddressSP, AddressSchema, type Amount, type AssetClass, type AssetClassSP, AssetClassSchema, type AuthTokenPolicies, type CDPContent, CDPContentSchema, CDPCreatorParams, type CDPCreatorParamsSP, CDPCreatorRedeemer, type CDPDatum, CDPDatumSchema, type CDPFees, CDPFeesSchema, type CDPRedeemer, type CdpParams, type CdpParamsSP, type CollectorParamsSP, CredentialD, CredentialSchema, type CurrencySymbol, type DistributionParams, type EpochToScaleToSum, EpochToScaleToSumSchema, ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type FeedInterestOracleRedeemer, FeedInterestOracleRedeemerSchema, type GovDatum, GovParams, type GovParamsSP, GovRedeemer, type IAssetContent, IAssetContentSchema, type IAssetOutput, IAssetPriceInfoSchema, type Input, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type LRPDatum, LRPDatumSchema, type LRPParams, LRPParamsSchema, type LRPRedeemer, LRPRedeemerSchema, type LrpParamsSP, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleAssetNft, OracleAssetNftSchema, type Output, type OutputReference, OutputReferenceSchema, PollManagerParams, type PollManagerParamsSP, PollManagerRedeemer, PollShardParams, type PollShardParamsSP, PollShardRedeemer, type PriceOracleDatum, PriceOracleDatumSchema, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PubKeyHash, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StabilityPoolSnapshot, StakeCredentialSchema, type StakingParamsSP, type StartTime, type SystemParams, type TokenName, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, addressFromBech32, addressToBech32, adjust, adjustLrp, adjustSpAccount, adjustStakingPosition, adjustmentHelper, assetClassToUnit, assetClassValueOf, balance, burnCdp, calculateIAssetRedemptionAmt, calculateMinCollateralCappedIAssetRedemptionAmt, cancelLrp, castCDPCreatorParams, castCdpParams, castExecuteParams, castGovParams, castInterestOracleParams, castLrpParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castStabilityPoolParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimLrp, closeCdp, closeSpAccount, closeStakingPosition, collectorFeeTx, createProposal, createScriptAddress, createShardsChunks, createSpAccount, depositCdp, endProposal, executeProposal, feedInterestOracle, freezeCdp, fromSPInteger, fromSysParamsScriptCredential, fromSystemParamsAsset, fromSystemParamsScriptRef, getAccountFund, getAccountReward, getInlineDatumOrThrow, getRandomElement, getSumFromEpochToScaleToSum, initEpochToScaleToSumMap, initSpSnapshot, isAssetsZero, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, lovelacesAmt, matchSingle, mergeCdps, mergeShards, mintCdp, mkAssetsOf, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkInterestOracleValidator, mkLovelacesOf, mkLrpValidator, mkLrpValidatorFromSP, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkSPInteger, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, negateAssets, oneShotMintTx, openCdp, openLrp, openStakingPosition, parseAccountDatum, parseCdpDatum, parseCdpDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestOracleDatum, parseLrpDatum, parsePriceOracleDatum, parseSnapshotEpochToScaleToSumDatum, parseStabilityPoolDatum, processSpRequest, redeemCdp, redeemLrp, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseCDPCreatorDatum, serialiseCDPCreatorRedeemer, serialiseCdpDatum, serialiseCdpRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseInterestOracleDatum, serialiseLrpDatum, serialiseLrpRedeemer, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, setSumInEpochToScaleToSum, spAdd, spDiv, spMul, spSub, startInterestOracle, toSystemParamsAsset, treasuryFeeTx, updatePoolSnapshotWithdrawalFee, vote, withdrawCdp };