@indigo-labs/indigo-sdk 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -784,6 +784,10 @@ declare function rationalMul(a: Rational, b: Rational): Rational;
784
784
  declare function rationalDiv(a: Rational, b: Rational): Rational;
785
785
  declare function rationalToFloat(a: Rational): number;
786
786
 
787
+ /**
788
+ * Amount of iasset equal in value to the given number of collateral amount.
789
+ */
790
+ declare function iassetValueOfCollateral(collateralAmt: bigint, oraclePrice: Rational): bigint;
787
791
  /**
788
792
  * This is mostly for debugging purposes.
789
793
  */
@@ -862,746 +866,111 @@ declare const CdpRedeemParamsSchema: _lucid_evolution_lucid.TObject<{
862
866
  }>;
863
867
  collateral_asset_auth_token: _lucid_evolution_lucid.TObject<{
864
868
  currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
865
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
866
- }>;
867
- interest_collector_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
868
- iasset_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
869
- treasury_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
870
- gov_nft: _lucid_evolution_lucid.TObject<{
871
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
872
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
873
- }>;
874
- partial_redemption_extra_fee_lovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
875
- bias_time: _lucid_evolution_lucid.TUnsafe<bigint>;
876
- }>;
877
- type CdpRedeemParams = Data.Static<typeof CdpRedeemParamsSchema>;
878
- declare function castCdpRedeemParams(params: CdpRedeemParams): Data;
879
-
880
- declare const mkCdpValidatorFromSP: (params: CdpParamsSP) => SpendingValidator;
881
- declare const mkCdpRedeemValidatorFromSP: (params: CdpRedeemParamsSP) => WithdrawalValidator;
882
-
883
- declare const CDPCreatorParamsSchema: _lucid_evolution_lucid.TObject<{
884
- cdpCreatorNft: _lucid_evolution_lucid.TObject<{
885
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
886
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
887
- }>;
888
- cdpAssetCs: _lucid_evolution_lucid.TUnsafe<string>;
889
- cdpAuthTk: _lucid_evolution_lucid.TObject<{
890
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
891
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
892
- }>;
893
- iAssetAuthTk: _lucid_evolution_lucid.TObject<{
894
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
895
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
896
- }>;
897
- collateralAssetAuthTk: _lucid_evolution_lucid.TObject<{
898
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
899
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
900
- }>;
901
- upgradeToken: _lucid_evolution_lucid.TObject<{
902
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
903
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
904
- }>;
905
- versionRecordToken: _lucid_evolution_lucid.TObject<{
906
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
907
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
908
- }>;
909
- cdpScriptHash: _lucid_evolution_lucid.TUnsafe<string>;
910
- treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
911
- iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
912
- biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
913
- }>;
914
- type CDPCreatorParams = Data.Static<typeof CDPCreatorParamsSchema>;
915
- declare const CDPCreatorParams: CDPCreatorParams;
916
- declare function castCDPCreatorParams(params: CDPCreatorParams): Data;
917
-
918
- declare const mkCDPCreatorValidator: (params: CDPCreatorParams) => SpendingValidator;
919
- declare const mkCDPCreatorValidatorFromSP: (params: CDPCreatorParamsSP) => SpendingValidator;
920
-
921
- declare const PollManagerParamsSchema: _lucid_evolution_lucid.TObject<{
922
- govNFT: _lucid_evolution_lucid.TObject<{
923
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
924
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
925
- }>;
926
- pollToken: _lucid_evolution_lucid.TObject<{
927
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
928
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
929
- }>;
930
- upgradeToken: _lucid_evolution_lucid.TObject<{
931
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
932
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
933
- }>;
934
- indyAsset: _lucid_evolution_lucid.TObject<{
935
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
936
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
937
- }>;
938
- govExecuteValHash: _lucid_evolution_lucid.TUnsafe<string>;
939
- pBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
940
- shardValHash: _lucid_evolution_lucid.TUnsafe<string>;
941
- treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
942
- }>;
943
- type PollManagerParams = Data.Static<typeof PollManagerParamsSchema>;
944
- declare const PollManagerParams: PollManagerParams;
945
- declare function castPollManagerParams(params: PollManagerParams): Data;
946
-
947
- declare const PollShardParamsSchema: _lucid_evolution_lucid.TObject<{
948
- pollToken: _lucid_evolution_lucid.TObject<{
949
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
950
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
951
- }>;
952
- stakingToken: _lucid_evolution_lucid.TObject<{
953
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
954
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
955
- }>;
956
- indyAsset: _lucid_evolution_lucid.TObject<{
957
- currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
958
- tokenName: _lucid_evolution_lucid.TUnsafe<string>;
959
- }>;
960
- stakingValHash: _lucid_evolution_lucid.TUnsafe<string>;
961
- }>;
962
- type PollShardParams = Data.Static<typeof PollShardParamsSchema>;
963
- declare const PollShardParams: PollShardParams;
964
- declare function castPollShardParams(params: PollShardParams): Data;
965
-
966
- declare const mkPollManagerValidator: (params: PollManagerParams) => SpendingValidator;
967
- declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => SpendingValidator;
968
- declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
969
- declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;
970
-
971
- declare const PollStatusSchema: TSchema.Struct<{
972
- yesVotes: TSchema.Integer;
973
- noVotes: TSchema.Integer;
974
- }>;
975
- type PollStatus = typeof PollStatusSchema.Type;
976
- declare const PollManagerContentSchema: TSchema.Struct<{
977
- pollId: TSchema.Integer;
978
- pollOwner: TSchema.ByteArray;
979
- content: TSchema.Union<[TSchema.Struct<{
980
- ProposeIAsset: TSchema.Struct<{
981
- asset: TSchema.ByteArray;
982
- debtMintingFeeRatio: TSchema.Struct<{
983
- numerator: TSchema.Integer;
984
- denominator: TSchema.Integer;
985
- }>;
986
- liquidationProcessingFeeRatio: TSchema.Struct<{
987
- numerator: TSchema.Integer;
988
- denominator: TSchema.Integer;
989
- }>;
990
- stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
991
- numerator: TSchema.Integer;
992
- denominator: TSchema.Integer;
993
- }>;
994
- redemptionReimbursementRatio: TSchema.Struct<{
995
- numerator: TSchema.Integer;
996
- denominator: TSchema.Integer;
997
- }>;
998
- redemptionProcessingFeeRatio: TSchema.Struct<{
999
- numerator: TSchema.Integer;
1000
- denominator: TSchema.Integer;
1001
- }>;
1002
- }>;
1003
- }>, TSchema.Struct<{
1004
- ModifyIAsset: TSchema.Struct<{
1005
- asset: TSchema.ByteArray;
1006
- newDebtMintingFeeRatio: TSchema.Struct<{
1007
- numerator: TSchema.Integer;
1008
- denominator: TSchema.Integer;
1009
- }>;
1010
- newLiquidationProcessingFeeRatio: TSchema.Struct<{
1011
- numerator: TSchema.Integer;
1012
- denominator: TSchema.Integer;
1013
- }>;
1014
- newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
1015
- numerator: TSchema.Integer;
1016
- denominator: TSchema.Integer;
1017
- }>;
1018
- newRedemptionReimbursementRatio: TSchema.Struct<{
1019
- numerator: TSchema.Integer;
1020
- denominator: TSchema.Integer;
1021
- }>;
1022
- newRedemptionProcessingFeeRatio: TSchema.Struct<{
1023
- numerator: TSchema.Integer;
1024
- denominator: TSchema.Integer;
1025
- }>;
1026
- }>;
1027
- }>, TSchema.Struct<{
1028
- AddCollateralAsset: TSchema.Struct<{
1029
- correspondingIAsset: TSchema.ByteArray;
1030
- collateralAsset: TSchema.Struct<{
1031
- currencySymbol: TSchema.ByteArray;
1032
- tokenName: TSchema.ByteArray;
1033
- }>;
1034
- assetExtraDecimals: TSchema.Integer;
1035
- assetPriceInfo: TSchema.Union<[TSchema.Struct<{
1036
- Delisted: TSchema.Struct<{
1037
- price: TSchema.Struct<{
1038
- numerator: TSchema.Integer;
1039
- denominator: TSchema.Integer;
1040
- }>;
1041
- }>;
1042
- }>, TSchema.Struct<{
1043
- OracleNft: TSchema.Struct<{
1044
- currencySymbol: TSchema.ByteArray;
1045
- tokenName: TSchema.ByteArray;
1046
- }>;
1047
- }>, TSchema.Struct<{
1048
- DeferredValidation: TSchema.Struct<{
1049
- feedValHash: TSchema.ByteArray;
1050
- }>;
1051
- }>]>;
1052
- interestOracleNft: TSchema.Struct<{
1053
- currencySymbol: TSchema.ByteArray;
1054
- tokenName: TSchema.ByteArray;
1055
- }>;
1056
- redemptionRatio: TSchema.Struct<{
1057
- numerator: TSchema.Integer;
1058
- denominator: TSchema.Integer;
1059
- }>;
1060
- maintenanceRatio: TSchema.Struct<{
1061
- numerator: TSchema.Integer;
1062
- denominator: TSchema.Integer;
1063
- }>;
1064
- liquidationRatio: TSchema.Struct<{
1065
- numerator: TSchema.Integer;
1066
- denominator: TSchema.Integer;
1067
- }>;
1068
- minCollateralAmt: TSchema.Integer;
1069
- }>;
1070
- }>, TSchema.Struct<{
1071
- UpdateCollateralAsset: TSchema.Struct<{
1072
- correspondingIAsset: TSchema.ByteArray;
1073
- collateralAsset: TSchema.Struct<{
1074
- currencySymbol: TSchema.ByteArray;
1075
- tokenName: TSchema.ByteArray;
1076
- }>;
1077
- newAssetExtraDecimals: TSchema.Integer;
1078
- newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
1079
- Delisted: TSchema.Struct<{
1080
- price: TSchema.Struct<{
1081
- numerator: TSchema.Integer;
1082
- denominator: TSchema.Integer;
1083
- }>;
1084
- }>;
1085
- }>, TSchema.Struct<{
1086
- OracleNft: TSchema.Struct<{
1087
- currencySymbol: TSchema.ByteArray;
1088
- tokenName: TSchema.ByteArray;
1089
- }>;
1090
- }>, TSchema.Struct<{
1091
- DeferredValidation: TSchema.Struct<{
1092
- feedValHash: TSchema.ByteArray;
1093
- }>;
1094
- }>]>;
1095
- newInterestOracleNft: TSchema.Struct<{
1096
- currencySymbol: TSchema.ByteArray;
1097
- tokenName: TSchema.ByteArray;
1098
- }>;
1099
- newRedemptionRatio: TSchema.Struct<{
1100
- numerator: TSchema.Integer;
1101
- denominator: TSchema.Integer;
1102
- }>;
1103
- newMaintenanceRatio: TSchema.Struct<{
1104
- numerator: TSchema.Integer;
1105
- denominator: TSchema.Integer;
1106
- }>;
1107
- newLiquidationRatio: TSchema.Struct<{
1108
- numerator: TSchema.Integer;
1109
- denominator: TSchema.Integer;
1110
- }>;
1111
- newMinCollateralAmt: TSchema.Integer;
1112
- }>;
1113
- }>, TSchema.Struct<{
1114
- ProposeStableswapPool: TSchema.Struct<{
1115
- iasset: TSchema.ByteArray;
1116
- collateralAsset: TSchema.Struct<{
1117
- currencySymbol: TSchema.ByteArray;
1118
- tokenName: TSchema.ByteArray;
1119
- }>;
1120
- collateralToIassetRatio: TSchema.Struct<{
1121
- numerator: TSchema.Integer;
1122
- denominator: TSchema.Integer;
1123
- }>;
1124
- mintingFeeRatio: TSchema.Struct<{
1125
- numerator: TSchema.Integer;
1126
- denominator: TSchema.Integer;
1127
- }>;
1128
- redemptionFeeRatio: TSchema.Struct<{
1129
- numerator: TSchema.Integer;
1130
- denominator: TSchema.Integer;
1131
- }>;
1132
- feeManager: TSchema.NullOr<TSchema.ByteArray>;
1133
- minMintingAmount: TSchema.Integer;
1134
- minRedemptionAmount: TSchema.Integer;
1135
- stableswapValHash: TSchema.ByteArray;
1136
- }>;
1137
- }>, TSchema.Struct<{
1138
- ModifyStableswapPool: TSchema.Struct<{
1139
- iasset: TSchema.ByteArray;
1140
- collateralAsset: TSchema.Struct<{
1141
- currencySymbol: TSchema.ByteArray;
1142
- tokenName: TSchema.ByteArray;
1143
- }>;
1144
- newCollateralToIassetRatio: TSchema.Struct<{
1145
- numerator: TSchema.Integer;
1146
- denominator: TSchema.Integer;
1147
- }>;
1148
- newMintingFeeRatio: TSchema.Struct<{
1149
- numerator: TSchema.Integer;
1150
- denominator: TSchema.Integer;
1151
- }>;
1152
- newRedemptionFeeRatio: TSchema.Struct<{
1153
- numerator: TSchema.Integer;
1154
- denominator: TSchema.Integer;
1155
- }>;
1156
- newMintingEnabled: TSchema.Boolean;
1157
- newRedemptionEnabled: TSchema.Boolean;
1158
- newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
1159
- newMinMintingAmount: TSchema.Integer;
1160
- newMinRedemptionAmount: TSchema.Integer;
1161
- newStableswapValHash: TSchema.ByteArray;
1162
- }>;
1163
- }>, TSchema.Struct<{
1164
- ModifyProtocolParams: TSchema.Struct<{
1165
- newParams: TSchema.Struct<{
1166
- proposalDeposit: TSchema.Integer;
1167
- votingPeriod: TSchema.Integer;
1168
- effectiveDelay: TSchema.Integer;
1169
- expirationPeriod: TSchema.Integer;
1170
- proposingPeriod: TSchema.Integer;
1171
- totalShards: TSchema.Integer;
1172
- minimumQuorum: TSchema.Integer;
1173
- maxTreasuryLovelaceSpend: TSchema.Integer;
1174
- maxTreasuryIndySpend: TSchema.Integer;
1175
- cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
1176
- electorate: TSchema.Integer;
1177
- foundationMultisig: TSchema.Union<[TSchema.Struct<{
1178
- Signature: TSchema.Struct<{
1179
- keyHash: TSchema.ByteArray;
1180
- }>;
1181
- }>, TSchema.Struct<{
1182
- AtLeast: TSchema.Struct<{
1183
- required: TSchema.Integer;
1184
- authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
1185
- }>;
1186
- }>]>;
1187
- }>;
1188
- }>;
1189
- }>, TSchema.Struct<{
1190
- UpgradeProtocol: TSchema.Struct<{
1191
- content: TSchema.Struct<{
1192
- upgradeId: TSchema.Integer;
1193
- upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
1194
- upgradeSymbol: TSchema.ByteArray;
1195
- }>]>>;
1196
- }>;
1197
- }>;
1198
- }>, TSchema.Struct<{
1199
- TextProposal: TSchema.ByteArray;
1200
- }>]>;
1201
- treasuryWithdrawal: TSchema.NullOr<TSchema.Struct<{
1202
- destination: TSchema.Struct<{
1203
- paymentCredential: TSchema.Union<[TSchema.Struct<{
1204
- PublicKeyCredential: TSchema.ByteArray;
1205
- }>, TSchema.Struct<{
1206
- ScriptCredential: TSchema.ByteArray;
1207
- }>]>;
1208
- stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
1209
- Inline: TSchema.Union<[TSchema.Struct<{
1210
- PublicKeyCredential: TSchema.ByteArray;
1211
- }>, TSchema.Struct<{
1212
- ScriptCredential: TSchema.ByteArray;
1213
- }>]>;
1214
- }>, TSchema.Struct<{
1215
- Pointer: TSchema.Struct<{
1216
- slotNumber: TSchema.Integer;
1217
- transactionIndex: TSchema.Integer;
1218
- certificateIndex: TSchema.Integer;
1219
- }>;
1220
- }>]>>;
1221
- }>;
1222
- value: TSchema.Array<TSchema.Struct<{
1223
- currencySymbol: TSchema.ByteArray;
1224
- tokenName: TSchema.ByteArray;
1225
- amount: TSchema.Integer;
1226
- }>>;
1227
- }>>;
1228
- status: TSchema.Struct<{
1229
- yesVotes: TSchema.Integer;
1230
- noVotes: TSchema.Integer;
1231
- }>;
1232
- votingEndTime: TSchema.Integer;
1233
- createdShardsCount: TSchema.Integer;
1234
- talliedShardsCount: TSchema.Integer;
1235
- totalShardsCount: TSchema.Integer;
1236
- proposingEndTime: TSchema.Integer;
1237
- expirationTime: TSchema.Integer;
1238
- protocolVersion: TSchema.Integer;
1239
- minimumQuorum: TSchema.Integer;
1240
- }>;
1241
- type PollManagerContent = typeof PollManagerContentSchema.Type;
1242
- declare const PollShardContentSchema: TSchema.Struct<{
1243
- pollId: TSchema.Integer;
1244
- status: TSchema.Struct<{
1245
- yesVotes: TSchema.Integer;
1246
- noVotes: TSchema.Integer;
1247
- }>;
1248
- votingEndTime: TSchema.Integer;
1249
- managerAddress: TSchema.Struct<{
1250
- paymentCredential: TSchema.Union<[TSchema.Struct<{
1251
- PublicKeyCredential: TSchema.ByteArray;
1252
- }>, TSchema.Struct<{
1253
- ScriptCredential: TSchema.ByteArray;
1254
- }>]>;
1255
- stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
1256
- Inline: TSchema.Union<[TSchema.Struct<{
1257
- PublicKeyCredential: TSchema.ByteArray;
1258
- }>, TSchema.Struct<{
1259
- ScriptCredential: TSchema.ByteArray;
1260
- }>]>;
1261
- }>, TSchema.Struct<{
1262
- Pointer: TSchema.Struct<{
1263
- slotNumber: TSchema.Integer;
1264
- transactionIndex: TSchema.Integer;
1265
- certificateIndex: TSchema.Integer;
1266
- }>;
1267
- }>]>>;
1268
- }>;
1269
- }>;
1270
- type PollShardContent = typeof PollShardContentSchema.Type;
1271
- declare const PollDatumSchema: TSchema.Union<[TSchema.Struct<{
1272
- PollManager: TSchema.Struct<{
1273
- pollId: TSchema.Integer;
1274
- pollOwner: TSchema.ByteArray;
1275
- content: TSchema.Union<[TSchema.Struct<{
1276
- ProposeIAsset: TSchema.Struct<{
1277
- asset: TSchema.ByteArray;
1278
- debtMintingFeeRatio: TSchema.Struct<{
1279
- numerator: TSchema.Integer;
1280
- denominator: TSchema.Integer;
1281
- }>;
1282
- liquidationProcessingFeeRatio: TSchema.Struct<{
1283
- numerator: TSchema.Integer;
1284
- denominator: TSchema.Integer;
1285
- }>;
1286
- stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
1287
- numerator: TSchema.Integer;
1288
- denominator: TSchema.Integer;
1289
- }>;
1290
- redemptionReimbursementRatio: TSchema.Struct<{
1291
- numerator: TSchema.Integer;
1292
- denominator: TSchema.Integer;
1293
- }>;
1294
- redemptionProcessingFeeRatio: TSchema.Struct<{
1295
- numerator: TSchema.Integer;
1296
- denominator: TSchema.Integer;
1297
- }>;
1298
- }>;
1299
- }>, TSchema.Struct<{
1300
- ModifyIAsset: TSchema.Struct<{
1301
- asset: TSchema.ByteArray;
1302
- newDebtMintingFeeRatio: TSchema.Struct<{
1303
- numerator: TSchema.Integer;
1304
- denominator: TSchema.Integer;
1305
- }>;
1306
- newLiquidationProcessingFeeRatio: TSchema.Struct<{
1307
- numerator: TSchema.Integer;
1308
- denominator: TSchema.Integer;
1309
- }>;
1310
- newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
1311
- numerator: TSchema.Integer;
1312
- denominator: TSchema.Integer;
1313
- }>;
1314
- newRedemptionReimbursementRatio: TSchema.Struct<{
1315
- numerator: TSchema.Integer;
1316
- denominator: TSchema.Integer;
1317
- }>;
1318
- newRedemptionProcessingFeeRatio: TSchema.Struct<{
1319
- numerator: TSchema.Integer;
1320
- denominator: TSchema.Integer;
1321
- }>;
1322
- }>;
1323
- }>, TSchema.Struct<{
1324
- AddCollateralAsset: TSchema.Struct<{
1325
- correspondingIAsset: TSchema.ByteArray;
1326
- collateralAsset: TSchema.Struct<{
1327
- currencySymbol: TSchema.ByteArray;
1328
- tokenName: TSchema.ByteArray;
1329
- }>;
1330
- assetExtraDecimals: TSchema.Integer;
1331
- assetPriceInfo: TSchema.Union<[TSchema.Struct<{
1332
- Delisted: TSchema.Struct<{
1333
- price: TSchema.Struct<{
1334
- numerator: TSchema.Integer;
1335
- denominator: TSchema.Integer;
1336
- }>;
1337
- }>;
1338
- }>, TSchema.Struct<{
1339
- OracleNft: TSchema.Struct<{
1340
- currencySymbol: TSchema.ByteArray;
1341
- tokenName: TSchema.ByteArray;
1342
- }>;
1343
- }>, TSchema.Struct<{
1344
- DeferredValidation: TSchema.Struct<{
1345
- feedValHash: TSchema.ByteArray;
1346
- }>;
1347
- }>]>;
1348
- interestOracleNft: TSchema.Struct<{
1349
- currencySymbol: TSchema.ByteArray;
1350
- tokenName: TSchema.ByteArray;
1351
- }>;
1352
- redemptionRatio: TSchema.Struct<{
1353
- numerator: TSchema.Integer;
1354
- denominator: TSchema.Integer;
1355
- }>;
1356
- maintenanceRatio: TSchema.Struct<{
1357
- numerator: TSchema.Integer;
1358
- denominator: TSchema.Integer;
1359
- }>;
1360
- liquidationRatio: TSchema.Struct<{
1361
- numerator: TSchema.Integer;
1362
- denominator: TSchema.Integer;
1363
- }>;
1364
- minCollateralAmt: TSchema.Integer;
1365
- }>;
1366
- }>, TSchema.Struct<{
1367
- UpdateCollateralAsset: TSchema.Struct<{
1368
- correspondingIAsset: TSchema.ByteArray;
1369
- collateralAsset: TSchema.Struct<{
1370
- currencySymbol: TSchema.ByteArray;
1371
- tokenName: TSchema.ByteArray;
1372
- }>;
1373
- newAssetExtraDecimals: TSchema.Integer;
1374
- newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
1375
- Delisted: TSchema.Struct<{
1376
- price: TSchema.Struct<{
1377
- numerator: TSchema.Integer;
1378
- denominator: TSchema.Integer;
1379
- }>;
1380
- }>;
1381
- }>, TSchema.Struct<{
1382
- OracleNft: TSchema.Struct<{
1383
- currencySymbol: TSchema.ByteArray;
1384
- tokenName: TSchema.ByteArray;
1385
- }>;
1386
- }>, TSchema.Struct<{
1387
- DeferredValidation: TSchema.Struct<{
1388
- feedValHash: TSchema.ByteArray;
1389
- }>;
1390
- }>]>;
1391
- newInterestOracleNft: TSchema.Struct<{
1392
- currencySymbol: TSchema.ByteArray;
1393
- tokenName: TSchema.ByteArray;
1394
- }>;
1395
- newRedemptionRatio: TSchema.Struct<{
1396
- numerator: TSchema.Integer;
1397
- denominator: TSchema.Integer;
1398
- }>;
1399
- newMaintenanceRatio: TSchema.Struct<{
1400
- numerator: TSchema.Integer;
1401
- denominator: TSchema.Integer;
1402
- }>;
1403
- newLiquidationRatio: TSchema.Struct<{
1404
- numerator: TSchema.Integer;
1405
- denominator: TSchema.Integer;
1406
- }>;
1407
- newMinCollateralAmt: TSchema.Integer;
1408
- }>;
1409
- }>, TSchema.Struct<{
1410
- ProposeStableswapPool: TSchema.Struct<{
1411
- iasset: TSchema.ByteArray;
1412
- collateralAsset: TSchema.Struct<{
1413
- currencySymbol: TSchema.ByteArray;
1414
- tokenName: TSchema.ByteArray;
1415
- }>;
1416
- collateralToIassetRatio: TSchema.Struct<{
1417
- numerator: TSchema.Integer;
1418
- denominator: TSchema.Integer;
1419
- }>;
1420
- mintingFeeRatio: TSchema.Struct<{
1421
- numerator: TSchema.Integer;
1422
- denominator: TSchema.Integer;
1423
- }>;
1424
- redemptionFeeRatio: TSchema.Struct<{
1425
- numerator: TSchema.Integer;
1426
- denominator: TSchema.Integer;
1427
- }>;
1428
- feeManager: TSchema.NullOr<TSchema.ByteArray>;
1429
- minMintingAmount: TSchema.Integer;
1430
- minRedemptionAmount: TSchema.Integer;
1431
- stableswapValHash: TSchema.ByteArray;
1432
- }>;
1433
- }>, TSchema.Struct<{
1434
- ModifyStableswapPool: TSchema.Struct<{
1435
- iasset: TSchema.ByteArray;
1436
- collateralAsset: TSchema.Struct<{
1437
- currencySymbol: TSchema.ByteArray;
1438
- tokenName: TSchema.ByteArray;
1439
- }>;
1440
- newCollateralToIassetRatio: TSchema.Struct<{
1441
- numerator: TSchema.Integer;
1442
- denominator: TSchema.Integer;
1443
- }>;
1444
- newMintingFeeRatio: TSchema.Struct<{
1445
- numerator: TSchema.Integer;
1446
- denominator: TSchema.Integer;
1447
- }>;
1448
- newRedemptionFeeRatio: TSchema.Struct<{
1449
- numerator: TSchema.Integer;
1450
- denominator: TSchema.Integer;
1451
- }>;
1452
- newMintingEnabled: TSchema.Boolean;
1453
- newRedemptionEnabled: TSchema.Boolean;
1454
- newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
1455
- newMinMintingAmount: TSchema.Integer;
1456
- newMinRedemptionAmount: TSchema.Integer;
1457
- newStableswapValHash: TSchema.ByteArray;
1458
- }>;
1459
- }>, TSchema.Struct<{
1460
- ModifyProtocolParams: TSchema.Struct<{
1461
- newParams: TSchema.Struct<{
1462
- proposalDeposit: TSchema.Integer;
1463
- votingPeriod: TSchema.Integer;
1464
- effectiveDelay: TSchema.Integer;
1465
- expirationPeriod: TSchema.Integer;
1466
- proposingPeriod: TSchema.Integer;
1467
- totalShards: TSchema.Integer;
1468
- minimumQuorum: TSchema.Integer;
1469
- maxTreasuryLovelaceSpend: TSchema.Integer;
1470
- maxTreasuryIndySpend: TSchema.Integer;
1471
- cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
1472
- electorate: TSchema.Integer;
1473
- foundationMultisig: TSchema.Union<[TSchema.Struct<{
1474
- Signature: TSchema.Struct<{
1475
- keyHash: TSchema.ByteArray;
1476
- }>;
1477
- }>, TSchema.Struct<{
1478
- AtLeast: TSchema.Struct<{
1479
- required: TSchema.Integer;
1480
- authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
1481
- }>;
1482
- }>]>;
1483
- }>;
1484
- }>;
1485
- }>, TSchema.Struct<{
1486
- UpgradeProtocol: TSchema.Struct<{
1487
- content: TSchema.Struct<{
1488
- upgradeId: TSchema.Integer;
1489
- upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
1490
- upgradeSymbol: TSchema.ByteArray;
1491
- }>]>>;
1492
- }>;
1493
- }>;
1494
- }>, TSchema.Struct<{
1495
- TextProposal: TSchema.ByteArray;
1496
- }>]>;
1497
- treasuryWithdrawal: TSchema.NullOr<TSchema.Struct<{
1498
- destination: TSchema.Struct<{
1499
- paymentCredential: TSchema.Union<[TSchema.Struct<{
1500
- PublicKeyCredential: TSchema.ByteArray;
1501
- }>, TSchema.Struct<{
1502
- ScriptCredential: TSchema.ByteArray;
1503
- }>]>;
1504
- stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
1505
- Inline: TSchema.Union<[TSchema.Struct<{
1506
- PublicKeyCredential: TSchema.ByteArray;
1507
- }>, TSchema.Struct<{
1508
- ScriptCredential: TSchema.ByteArray;
1509
- }>]>;
1510
- }>, TSchema.Struct<{
1511
- Pointer: TSchema.Struct<{
1512
- slotNumber: TSchema.Integer;
1513
- transactionIndex: TSchema.Integer;
1514
- certificateIndex: TSchema.Integer;
1515
- }>;
1516
- }>]>>;
1517
- }>;
1518
- value: TSchema.Array<TSchema.Struct<{
1519
- currencySymbol: TSchema.ByteArray;
1520
- tokenName: TSchema.ByteArray;
1521
- amount: TSchema.Integer;
1522
- }>>;
1523
- }>>;
1524
- status: TSchema.Struct<{
1525
- yesVotes: TSchema.Integer;
1526
- noVotes: TSchema.Integer;
1527
- }>;
1528
- votingEndTime: TSchema.Integer;
1529
- createdShardsCount: TSchema.Integer;
1530
- talliedShardsCount: TSchema.Integer;
1531
- totalShardsCount: TSchema.Integer;
1532
- proposingEndTime: TSchema.Integer;
1533
- expirationTime: TSchema.Integer;
1534
- protocolVersion: TSchema.Integer;
1535
- minimumQuorum: TSchema.Integer;
869
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1536
870
  }>;
1537
- }>, TSchema.Struct<{
1538
- PollShard: TSchema.Struct<{
1539
- pollId: TSchema.Integer;
1540
- status: TSchema.Struct<{
1541
- yesVotes: TSchema.Integer;
1542
- noVotes: TSchema.Integer;
1543
- }>;
1544
- votingEndTime: TSchema.Integer;
1545
- managerAddress: TSchema.Struct<{
1546
- paymentCredential: TSchema.Union<[TSchema.Struct<{
1547
- PublicKeyCredential: TSchema.ByteArray;
1548
- }>, TSchema.Struct<{
1549
- ScriptCredential: TSchema.ByteArray;
1550
- }>]>;
1551
- stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
1552
- Inline: TSchema.Union<[TSchema.Struct<{
1553
- PublicKeyCredential: TSchema.ByteArray;
1554
- }>, TSchema.Struct<{
1555
- ScriptCredential: TSchema.ByteArray;
1556
- }>]>;
1557
- }>, TSchema.Struct<{
1558
- Pointer: TSchema.Struct<{
1559
- slotNumber: TSchema.Integer;
1560
- transactionIndex: TSchema.Integer;
1561
- certificateIndex: TSchema.Integer;
1562
- }>;
1563
- }>]>>;
1564
- }>;
871
+ interest_collector_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
872
+ iasset_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
873
+ treasury_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
874
+ gov_nft: _lucid_evolution_lucid.TObject<{
875
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
876
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1565
877
  }>;
1566
- }>]>;
1567
- type PollDatum = typeof PollDatumSchema.Type;
1568
- declare const VoteOptionSchema: TSchema.Union<[TSchema.Literal<["Yes"]>, TSchema.Literal<["No"]>]>;
1569
- type VoteOption = typeof VoteOptionSchema.Type;
1570
- declare const PollShardRedeemerSchema: TSchema.Union<[TSchema.Struct<{
1571
- Vote: TSchema.Union<[TSchema.Literal<["Yes"]>, TSchema.Literal<["No"]>]>;
1572
- }>, TSchema.Struct<{
1573
- MergeShards: TSchema.Struct<{
1574
- currentTime: TSchema.Integer;
1575
- pollManagerRef: TSchema.Struct<{
1576
- txHash: TSchema.ByteArray;
1577
- outputIndex: TSchema.Integer;
1578
- }>;
878
+ partial_redemption_extra_fee_lovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
879
+ bias_time: _lucid_evolution_lucid.TUnsafe<bigint>;
880
+ }>;
881
+ type CdpRedeemParams = Data.Static<typeof CdpRedeemParamsSchema>;
882
+ declare function castCdpRedeemParams(params: CdpRedeemParams): Data;
883
+
884
+ declare const mkCdpValidatorFromSP: (params: CdpParamsSP) => SpendingValidator;
885
+ declare const mkCdpRedeemValidatorFromSP: (params: CdpRedeemParamsSP) => WithdrawalValidator;
886
+
887
+ declare const CDPCreatorParamsSchema: _lucid_evolution_lucid.TObject<{
888
+ cdpCreatorNft: _lucid_evolution_lucid.TObject<{
889
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
890
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1579
891
  }>;
1580
- }>]>;
1581
- type PollShardRedeemer = typeof PollShardRedeemerSchema.Type;
1582
- declare const PollManagerRedeemerSchema: TSchema.Union<[TSchema.Struct<{
1583
- EndPoll: TSchema.Struct<{
1584
- currentTime: TSchema.Integer;
892
+ cdpAssetCs: _lucid_evolution_lucid.TUnsafe<string>;
893
+ cdpAuthTk: _lucid_evolution_lucid.TObject<{
894
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
895
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1585
896
  }>;
1586
- }>, TSchema.Struct<{
1587
- CreateShards: TSchema.Struct<{
1588
- currentTime: TSchema.Integer;
897
+ iAssetAuthTk: _lucid_evolution_lucid.TObject<{
898
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
899
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1589
900
  }>;
1590
- }>, TSchema.Struct<{
1591
- MergeShardsManager: TSchema.Struct<{
1592
- currentTime: TSchema.Integer;
901
+ collateralAssetAuthTk: _lucid_evolution_lucid.TObject<{
902
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
903
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
1593
904
  }>;
1594
- }>]>;
1595
- type PollManagerRedeemer = typeof PollManagerRedeemerSchema.Type;
1596
- declare function serialisePollManagerRedeemer(r: PollManagerRedeemer): string;
1597
- declare function serialisePollShardRedeemer(r: PollShardRedeemer): string;
1598
- declare function parsePollManager(datum: string): option.Option<PollManagerContent>;
1599
- declare function parsePollManagerOrThrow(datum: string): PollManagerContent;
1600
- declare function parsePollShard(datum: string): option.Option<PollShardContent>;
1601
- declare function parsePollShardOrThrow(datum: string): PollShardContent;
1602
- declare function serialisePollDatum(d: PollDatum): string;
905
+ upgradeToken: _lucid_evolution_lucid.TObject<{
906
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
907
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
908
+ }>;
909
+ versionRecordToken: _lucid_evolution_lucid.TObject<{
910
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
911
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
912
+ }>;
913
+ cdpScriptHash: _lucid_evolution_lucid.TUnsafe<string>;
914
+ treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
915
+ iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
916
+ biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
917
+ }>;
918
+ type CDPCreatorParams = Data.Static<typeof CDPCreatorParamsSchema>;
919
+ declare const CDPCreatorParams: CDPCreatorParams;
920
+ declare function castCDPCreatorParams(params: CDPCreatorParams): Data;
921
+
922
+ declare const mkCDPCreatorValidator: (params: CDPCreatorParams) => SpendingValidator;
923
+ declare const mkCDPCreatorValidatorFromSP: (params: CDPCreatorParamsSP) => SpendingValidator;
924
+
925
+ declare const PollManagerParamsSchema: _lucid_evolution_lucid.TObject<{
926
+ govNFT: _lucid_evolution_lucid.TObject<{
927
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
928
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
929
+ }>;
930
+ pollToken: _lucid_evolution_lucid.TObject<{
931
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
932
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
933
+ }>;
934
+ upgradeToken: _lucid_evolution_lucid.TObject<{
935
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
936
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
937
+ }>;
938
+ indyAsset: _lucid_evolution_lucid.TObject<{
939
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
940
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
941
+ }>;
942
+ govExecuteValHash: _lucid_evolution_lucid.TUnsafe<string>;
943
+ pBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
944
+ shardValHash: _lucid_evolution_lucid.TUnsafe<string>;
945
+ treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
946
+ }>;
947
+ type PollManagerParams = Data.Static<typeof PollManagerParamsSchema>;
948
+ declare const PollManagerParams: PollManagerParams;
949
+ declare function castPollManagerParams(params: PollManagerParams): Data;
950
+
951
+ declare const PollShardParamsSchema: _lucid_evolution_lucid.TObject<{
952
+ pollToken: _lucid_evolution_lucid.TObject<{
953
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
954
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
955
+ }>;
956
+ stakingToken: _lucid_evolution_lucid.TObject<{
957
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
958
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
959
+ }>;
960
+ indyAsset: _lucid_evolution_lucid.TObject<{
961
+ currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
962
+ tokenName: _lucid_evolution_lucid.TUnsafe<string>;
963
+ }>;
964
+ stakingValHash: _lucid_evolution_lucid.TUnsafe<string>;
965
+ }>;
966
+ type PollShardParams = Data.Static<typeof PollShardParamsSchema>;
967
+ declare const PollShardParams: PollShardParams;
968
+ declare function castPollShardParams(params: PollShardParams): Data;
1603
969
 
1604
- declare function pollPassQuorum(pollStatus: PollStatus, electorate: bigint, minQuorum: bigint): boolean;
970
+ declare const mkPollManagerValidator: (params: PollManagerParams) => SpendingValidator;
971
+ declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => SpendingValidator;
972
+ declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
973
+ declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;
1605
974
 
1606
975
  /**
1607
976
  * Returns the collector ref script UTXO that was added to ref inputs.
@@ -2314,6 +1683,9 @@ declare function serialiseGovDatum(d: GovDatum): string;
2314
1683
  declare function parseGovDatum(datum: string): option.Option<GovDatum>;
2315
1684
  declare function parseGovDatumOrThrow(datum: string): GovDatum;
2316
1685
 
1686
+ declare const VoteOptionSchema: TSchema.Union<[TSchema.Literal<["Yes"]>, TSchema.Literal<["No"]>]>;
1687
+ type VoteOption = typeof VoteOptionSchema.Type;
1688
+
2317
1689
  /**
2318
1690
  * Returns the new PollId.
2319
1691
  */
@@ -3641,9 +3013,65 @@ type RobOutput = {
3641
3013
  utxo: UTxO;
3642
3014
  };
3643
3015
 
3016
+ declare const OracleIdxSchema: TSchema.Union<[TSchema.Struct<{
3017
+ OracleRefInputIdx: TSchema.Integer;
3018
+ }>, TSchema.Struct<{
3019
+ OracleOutputIdx: TSchema.Integer;
3020
+ }>, TSchema.Literal<["OracleVoid"]>]>;
3021
+ type OracleIdx = typeof OracleIdxSchema.Type;
3022
+ declare const PriceOracleDatumSchema: TSchema.Struct<{
3023
+ price: TSchema.Struct<{
3024
+ numerator: TSchema.Integer;
3025
+ denominator: TSchema.Integer;
3026
+ }>;
3027
+ expirationTime: TSchema.Integer;
3028
+ auxiliaryData: Schema$1.SchemaClass<Data$1.Data, Data$1.Data, never>;
3029
+ }>;
3030
+ type PriceOracleDatum = typeof PriceOracleDatumSchema.Type;
3031
+ declare const PriceOracleRedeemerSchema: TSchema.Struct<{
3032
+ currentTime: TSchema.Integer;
3033
+ newPrice: TSchema.Struct<{
3034
+ numerator: TSchema.Integer;
3035
+ denominator: TSchema.Integer;
3036
+ }>;
3037
+ }>;
3038
+ type PriceOracleRedeemer = typeof PriceOracleRedeemerSchema.Type;
3039
+ declare function serialisePriceOracleRedeemer(r: PriceOracleRedeemer): string;
3040
+ declare function serialisePriceOracleDatum(d: PriceOracleDatum): string;
3041
+ declare function parsePriceOracleDatum(datum: string): PriceOracleDatum;
3042
+
3644
3043
  declare const MIN_ROB_COLLATERAL_AMT = 3000000n;
3645
- declare function robAmountToSpend(utxo: UTxO, datum: RobDatum, sysParams: SystemParams): bigint;
3646
- declare function isFullyRedeemed(utxo: UTxO, datum: RobDatum, sysParams: SystemParams): boolean;
3044
+ /**
3045
+ * The amount of collateral asset available in the ROB when buy order. In case of ADA, take
3046
+ * into account the min UTXO collateral.
3047
+ */
3048
+ declare function robCollateralAmtToSpend(utxo: UTxO, datum: RobDatum): bigint;
3049
+ /**
3050
+ * The amount if iassets available in ROB when sell order.
3051
+ */
3052
+ declare function robIAssetAmtToSpend(utxo: UTxO, datum: RobDatum, iassetCurrencySymbol: CurrencySymbolSP): bigint;
3053
+ /**
3054
+ * Amount to spend from the ROB universal for Buy and sell orders.
3055
+ */
3056
+ declare function robAmtToSpend(utxo: UTxO, datum: RobDatum, iassetCurrencySymbol: CurrencySymbolSP): bigint;
3057
+ declare function robBuyOrderSummary(utxo: UTxO, datum: RobDatum, oraclePrice: Rational): {
3058
+ /**
3059
+ * The amount that can be spent from the ROB.
3060
+ */
3061
+ redeemableCollateral: bigint;
3062
+ /**
3063
+ * The amount paid to the ROB when everything redeemed.
3064
+ */
3065
+ payoutIAsset: bigint;
3066
+ };
3067
+ /**
3068
+ * In case it's applied to a sell order instead, it will throw an error.
3069
+ */
3070
+ declare function isBuyOrderFullyRedeemed(utxo: UTxO, datum: RobDatum, oraclePrice: Rational): boolean;
3071
+ /**
3072
+ * Use the limit prices to decide fully redeemed.
3073
+ */
3074
+ declare function isFullyRedeemed(utxo: UTxO, datum: RobDatum, iassetCurrencySymbol: CurrencySymbolSP): boolean;
3647
3075
  /**
3648
3076
  * Right now we allow multi redemptions when the collateral asset, iasset pair is the same.
3649
3077
  * The on-chain however should allow even other combinations.
@@ -3657,7 +3085,25 @@ redemptions: [UTxO, bigint][], iasset: Uint8Array<ArrayBufferLike>, collateralAs
3657
3085
  /**
3658
3086
  * The number of Tx outputs before these new ones.
3659
3087
  */
3660
- txOutputsBeforeCount: bigint, collateralAssetRefInputIdx: bigint, iassetRefInputIdx: bigint, oracleIdx: bigint | null): TxBuilder;
3088
+ txOutputsBeforeCount: bigint, collateralAssetRefInputIdx: bigint, iassetRefInputIdx: bigint, oracleIdx: OracleIdx): TxBuilder;
3089
+ /**
3090
+ * Given all available LRP UTXOs, calculate total available collateral that can be redeemed.
3091
+ * Taking into account incorrectly initialised LRPs (without base collateral) and max number of ROBs.
3092
+ */
3093
+ declare function calculateTotalCollateralForRedemption(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, iassetPrice: Rational, allRobs: [UTxO, RobDatum][],
3094
+ /**
3095
+ * How many LRPs can be redeemed in a single Tx.
3096
+ */
3097
+ maxRobsInTx: number): bigint;
3098
+ /**
3099
+ * Pick random subset from all the ROBs (it does the necessary filtering) satisfying the target collateral to spend.
3100
+ * It's relevant for BUY orders only.
3101
+ */
3102
+ declare function randomRobsSubsetSatisfyingTargetCollateral(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, targetCollateralToSpend: bigint, iassetPrice: Rational, allLrps: [UTxO, RobDatum][],
3103
+ /**
3104
+ * How many LRPs can be redeemed in a single Tx.
3105
+ */
3106
+ maxLrpsInTx: number, randomiseFn?: (arr: [UTxO, RobDatum][]) => [UTxO, RobDatum][]): [UTxO, RobDatum][];
3661
3107
 
3662
3108
  declare const RobParamsSchema: _lucid_evolution_lucid.TObject<{
3663
3109
  versionRecordToken: _lucid_evolution_lucid.TObject<{
@@ -3724,35 +3170,118 @@ type OneShotParams = Data.Static<typeof OneShotParamsSchema>;
3724
3170
  declare function oneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<[TxBuilder, PolicyId]>;
3725
3171
  declare function runOneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<PolicyId>;
3726
3172
 
3727
- declare function startPriceOracleTx(lucid: LucidEvolution, assetName: string, startPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, refOutRef?: OutRef, auxiliaryData?: Core.Data.Data): Promise<[TxBuilder, AssetClass]>;
3728
- declare function feedPriceOracleTx(lucid: LucidEvolution, oracleOref: OutRef, newPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, auxiliaryData?: Core.Data.Data): Promise<TxBuilder>;
3173
+ declare function leverageCdpWithRob(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, allRobs: [UTxO, RobDatum][], currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
3729
3174
 
3730
- declare const OracleIdxSchema: TSchema.Union<[TSchema.Struct<{
3731
- OracleRefInputIdx: TSchema.Integer;
3732
- }>, TSchema.Struct<{
3733
- OracleOutputIdx: TSchema.Integer;
3734
- }>, TSchema.Literal<["OracleVoid"]>]>;
3735
- type OracleIdx = typeof OracleIdxSchema;
3736
- declare const PriceOracleDatumSchema: TSchema.Struct<{
3737
- price: TSchema.Struct<{
3738
- numerator: TSchema.Integer;
3739
- denominator: TSchema.Integer;
3740
- }>;
3741
- expirationTime: TSchema.Integer;
3742
- auxiliaryData: Schema$1.SchemaClass<Data$1.Data, Data$1.Data, never>;
3743
- }>;
3744
- type PriceOracleDatum = typeof PriceOracleDatumSchema.Type;
3745
- declare const PriceOracleRedeemerSchema: TSchema.Struct<{
3746
- currentTime: TSchema.Integer;
3747
- newPrice: TSchema.Struct<{
3748
- numerator: TSchema.Integer;
3749
- denominator: TSchema.Integer;
3750
- }>;
3175
+ declare const OnChainDecimalSchema: TSchema.Struct<{
3176
+ getOnChainInt: TSchema.Integer;
3751
3177
  }>;
3752
- type PriceOracleRedeemer = typeof PriceOracleRedeemerSchema.Type;
3753
- declare function serialisePriceOracleRedeemer(r: PriceOracleRedeemer): string;
3754
- declare function serialisePriceOracleDatum(d: PriceOracleDatum): string;
3755
- declare function parsePriceOracleDatum(datum: string): PriceOracleDatum;
3178
+ type OnChainDecimal = typeof OnChainDecimalSchema.Type;
3179
+
3180
+ /**
3181
+ * The following is the math related to the leverage calculations.
3182
+ *
3183
+ * Leverage is the multiplier you apply to the base deposit and you get the amount of final collateral
3184
+ * the CDP should have. Additionally, the minted amount is used to pay for fees. The leverage a user picks, is
3185
+ * already taking into account the fees, i.e. the fees are paid from the borrowed assets.
3186
+ *
3187
+ * There's a direct relationship between collateral ratio and leverage multiplier. Each leverage multiplier
3188
+ * results in a single collateral ratio and vice versa. Maximum potential leverage is the leverage that
3189
+ * results in collateral ratio being the maintenance collateral ratio of the corresponding iAsset.
3190
+ *
3191
+ * `d` = base deposit
3192
+ * `b` = total borrowed value (including the fees)
3193
+ * `L` = leverage
3194
+ * `f_m` = debt minting fee
3195
+ * `f_r` = reimbursement fee
3196
+ * `c` = collateral ratio
3197
+ *
3198
+ * The following is a detailed derivation of the math:
3199
+ *
3200
+ * 1. Since the redemption fee is proportional to the borrowed amount,
3201
+ * we can express the ADA we get from the order book as `b'=b*(1-f_r)`,
3202
+ * since some of the borrowed amount goes back to the order book.
3203
+ *
3204
+ * 2. Since all the minted iAsset are used to get borrowed ADA,
3205
+ * the value of the minted asset will be `b`.
3206
+ *
3207
+ * 3. The minting fee is a percentage of the value of the minted iAsset.
3208
+ * Therefore the available ADA to add as collateral is `b''=b' - b*f_m = b*(1 - f_r - f_m)`.
3209
+ *
3210
+ * 4. The collateral ratio can now be expressed as `c = (d + b * (1 - f_r - f_m)) / b`.
3211
+ *
3212
+ * 5. Working out the expression, we can express `b` in terms of everything else: `b = d / (c - 1 + f_r + f_m)`.
3213
+ *
3214
+ * 6. The minted amount will be `b / asset_price`.
3215
+ *
3216
+ * 7. Collateral amount of the CDP is `d + b * (1 - f_r - f_m)`
3217
+ *
3218
+ * 8. Leverage calculation: `L = (d + b * (1 - f_r - f_m)) / d`.
3219
+ *
3220
+ * Plugging in the `b` formula we get: `L = (d + (d / (c - 1 + f_r + f_m)) * (1 - f_r - f_m)) / d`.
3221
+ *
3222
+ * Simplified, yields the following:
3223
+ * `L = 1 + ((1 - f_r - f_m) / (c - 1 + f_r + f_m))`
3224
+ *
3225
+ * 9. `b'' = b * (1 - f_r - f_m)`
3226
+ * Solved for `b` yields the following:
3227
+ * `b = b'' / (1 - f_r - f_m)`
3228
+ *
3229
+ * 10. Having leverage and base deposit, we can find `b''`:
3230
+ * `b’’ = d(L - 1)`
3231
+ */
3232
+
3233
+ /**
3234
+ * How many LRP redemptions can we fit into a TX with CDP open.
3235
+ */
3236
+ declare const MAX_REDEMPTIONS_WITH_CDP_OPEN = 4;
3237
+ type ROBRedemptionDetails = {
3238
+ utxo: UTxO;
3239
+ redeemedCollateral: bigint;
3240
+ /**
3241
+ * The amount of iAssets paid to ROB.
3242
+ */
3243
+ iassetsPayoutAmt: bigint;
3244
+ reimbursementIAssetAmt: bigint;
3245
+ };
3246
+ type ApproximateLeverageRedemptionsResult = {
3247
+ leverage: number;
3248
+ collateralRatio: Rational;
3249
+ redeemedCollateral: bigint;
3250
+ };
3251
+ /**
3252
+ * We assume exact precision. However, actual redemptions include rounding and
3253
+ * the rounding behaviour changes based on the number of redemptions.
3254
+ * This may slightly tweak the numbers and the result can be different.
3255
+ *
3256
+ * The math is described at the top of this code file.
3257
+ */
3258
+ declare function approximateLeverageRedemptions(baseCollateral: bigint, targetLeverage: number, redemptionReimbursementRatio: Rational, debtMintingFeeRatio: Rational): ApproximateLeverageRedemptionsResult;
3259
+ declare function summarizeActualLeverageRedemptions(lovelacesForRedemptionWithReimbursement: bigint, redemptionReimbursementRatio: Rational, iassetPrice: Rational, redemptionLrps: [UTxO, RobDatum][]): {
3260
+ redemptions: ROBRedemptionDetails[];
3261
+ /**
3262
+ * The actual amount received from redemptions (i.e. without the reimbursement fee).
3263
+ */
3264
+ totalRedeemedCollateral: bigint;
3265
+ /**
3266
+ * Total amount of IAssets to cover the reimbursement fee.
3267
+ */
3268
+ totalReimbursedIAsset: bigint;
3269
+ /**
3270
+ * Total amount of IAssets paid to ROBs, including the reimbursement.
3271
+ */
3272
+ totalIAssetPayout: bigint;
3273
+ };
3274
+ /**
3275
+ * The math is described at the top of this code file.
3276
+ */
3277
+ declare function calculateCollateralRatioFromLeverage(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, leverage: number, baseCollateral: bigint, iassetPrice: Rational, debtMintingFeePercentage: OnChainDecimal, redemptionReimbursementPercentage: OnChainDecimal, allLrps: [UTxO, RobDatum][]): OnChainDecimal | undefined;
3278
+ /**
3279
+ * The math is described at the top of this code file.
3280
+ */
3281
+ declare function calculateLeverageFromCollateralRatio(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, collateralRatio: Rational, baseCollateral: bigint, iassetPrice: Rational, debtMintingFeeRatio: Rational, redemptionReimbursementRatio: Rational, allLrps: [UTxO, RobDatum][]): number | undefined;
3282
+
3283
+ declare function startPriceOracleTx(lucid: LucidEvolution, assetName: string, startPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, refOutRef?: OutRef, auxiliaryData?: Core.Data.Data): Promise<[TxBuilder, AssetClass]>;
3284
+ declare function feedPriceOracleTx(lucid: LucidEvolution, oracleOref: OutRef, newPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, auxiliaryData?: Core.Data.Data): Promise<TxBuilder>;
3756
3285
 
3757
3286
  declare function mkPriceOracleValidator(params: PriceOracleParams): SpendingValidator;
3758
3287
 
@@ -3763,7 +3292,6 @@ declare function mkPriceOracleValidator(params: PriceOracleParams): SpendingVali
3763
3292
  declare function matchSingle<T>(xs: T[], mkErr: (xs: T[]) => Error): T;
3764
3293
  declare function loadSystemParamsFromFile(file: string): SystemParams;
3765
3294
  declare function loadSystemParamsFromUrl(url: string): Promise<SystemParams>;
3766
- declare const getRandomElement: <T>(arr: T[]) => T | undefined;
3767
3295
 
3768
3296
  declare function shuffle<T>(arr: T[]): T[];
3769
3297
  /**
@@ -4335,4 +3863,4 @@ declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;
4335
3863
 
4336
3864
  declare const alwaysFailValidator: SpendingValidator;
4337
3865
 
4338
- export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_E2S2S_ENTRIES_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateIAssetRedemptionAmt, calculateMinCollateralCappedIAssetRedemptionAmt, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getRandomElement, getUpdatedAccountDeposit, handleOracleForCollateralAsset, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isFullyRedeemed, isSameEpochToScaleKey, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, partitionEpochToScaleToSums, pollPassQuorum, processSpRequest, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, robAmountToSpend, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
3866
+ export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type ParsedOutput, PollManagerParams, type PollManagerParamsSP, PollShardParams, type PollShardParamsSP, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, partitionEpochToScaleToSums, processSpRequest, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, robAmtToSpend, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };