@cardananium/cquisitor-lib 0.1.0-beta.38 → 0.1.0-beta.39

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.
@@ -1240,7 +1240,7 @@ export interface ProtocolVersion {
1240
1240
  *
1241
1241
  * ## script_data_hash format (Alonzo+ ledger spec):
1242
1242
  *
1243
- * Standard: `blake2b256(redeemers || datums || language_views)`
1243
+ * Standard: `blake2b256(redeemers || datums || used_cost_models)`
1244
1244
  * Datums-only: `blake2b256(0xA0 || datums || 0xA0)` (when no redeemers)
1245
1245
  *
1246
1246
  * All components must be serialized according to the ledger CDDL specification.
@@ -1254,9 +1254,7 @@ export interface ProtocolVersion {
1254
1254
  * - For hash: uses CBOR set encoding (tag 258) with deduplication
1255
1255
  * - May use indefinite length encoding
1256
1256
  *
1257
- * ### Cost Models (language_views)
1258
- *
1259
- * Language views is a specific serialization format for cost models.
1257
+ * ### Cost Models
1260
1258
  *
1261
1259
  * **Encoding rules:**
1262
1260
  * - Keys sorted by **length first**, then lexicographically
@@ -1269,7 +1267,6 @@ export interface ProtocolVersion {
1269
1267
  export interface ScriptDataHashDecomposition {
1270
1268
  /**
1271
1269
  * Cost models CBOR hex (standard map encoding)
1272
- * Note: for hash computation uses language_views encoding with special PlutusV1 handling
1273
1270
  */
1274
1271
  costModelsCbor?: string | null;
1275
1272
  /**
@@ -1283,7 +1280,7 @@ export interface ScriptDataHashDecomposition {
1283
1280
  datumsCount?: number | null;
1284
1281
  /**
1285
1282
  * Which encoding format was used for script_data_hash
1286
- * - "standard": redeemers || datums || language_views
1283
+ * - "standard": redeemers || datums || used_cost_models
1287
1284
  * - "datums_only": 0xA0 || datums || 0xA0 (when no redeemers but has datums)
1288
1285
  */
1289
1286
  encodingFormat: string;
@@ -1487,18 +1484,4 @@ export interface SubCoin {
1487
1484
  export interface UtxoInputContext {
1488
1485
  isSpent: boolean;
1489
1486
  utxo: UTxO;
1490
- }
1491
- export interface UTxO {
1492
- input: TxInput;
1493
- output: TxOutput;
1494
- }
1495
- export interface TxInput {
1496
- outputIndex: number;
1497
- txHash: string;
1498
- }
1499
-
1500
- export interface Asset {
1501
- quantity: string;
1502
- unit: string;
1503
- }
1504
-
1487
+ }
@@ -1154,132 +1154,74 @@ function handleError(f, args) {
1154
1154
  }
1155
1155
  }
1156
1156
  /**
1157
- * Each new language uses a different namespace for hashing its script
1158
- * This is because you could have a language where the same bytes have different semantics
1159
- * So this avoids scripts in different languages mapping to the same hash
1160
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
1157
+ * Used to choosed the schema for a script JSON string
1161
1158
  */
1162
- export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1159
+ export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1163
1160
  /**
1164
1161
  */
1165
- export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1162
+ export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1166
1163
  /**
1167
1164
  */
1168
- export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1165
+ export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1169
1166
  /**
1170
- * JSON <-> PlutusData conversion schemas.
1171
- * Follows ScriptDataJsonSchema in cardano-cli defined at:
1172
- * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
1173
- *
1174
- * All methods here have the following restrictions due to limitations on dependencies:
1175
- * * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
1176
- * * Hex strings for bytes don't accept odd-length (half-byte) strings.
1177
- * cardano-cli seems to support these however but it seems to be different than just 0-padding
1178
- * on either side when tested so proceed with caution
1179
1167
  */
1180
- export const PlutusDatumSchema = Object.freeze({
1168
+ export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1181
1169
  /**
1182
- * ScriptDataJsonNoSchema in cardano-node.
1183
- *
1184
- * This is the format used by --script-data-value in cardano-cli
1185
- * This tries to accept most JSON but does not support the full spectrum of Plutus datums.
1186
- * From JSON:
1187
- * * null/true/false/floats NOT supported
1188
- * * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
1189
- * To JSON:
1190
- * * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
1191
- * * Lists not supported in keys
1192
- * * Maps not supported in keys
1193
1170
  */
1194
- BasicConversions:0,"0":"BasicConversions",
1171
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1195
1172
  /**
1196
- * ScriptDataJsonDetailedSchema in cardano-node.
1197
- *
1198
- * This is the format used by --script-data-file in cardano-cli
1199
- * This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
1200
- * The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
1201
- * 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
1202
- * e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
1203
- * 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
1204
- * Integer's value is a JSON number e.g. {"int": 100}
1205
- * Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
1206
- * Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
1207
- * Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
1208
- * respectively with their values being the plutus datum encoded via this same schema
1209
- * e.g. {"map": [
1210
- * {"k": {"int": 2}, "v": {"int": 5}},
1211
- * {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
1212
- * ]}
1213
- * From JSON:
1214
- * * null/true/false/floats NOT supported
1215
- * * the JSON must conform to a very specific schema
1216
- * To JSON:
1217
- * * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
1218
1173
  */
1219
- DetailedSchema:1,"1":"DetailedSchema", });
1174
+ export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1220
1175
  /**
1221
1176
  */
1222
- export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1177
+ export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1223
1178
  /**
1224
1179
  */
1225
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1180
+ export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1226
1181
  /**
1227
1182
  */
1228
1183
  export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1229
1184
  /**
1230
- * Used to choosed the schema for a script JSON string
1231
1185
  */
1232
- export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1186
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1233
1187
  /**
1234
1188
  */
1235
- export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1189
+ export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1236
1190
  /**
1237
1191
  */
1238
1192
  export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1239
1193
  /**
1240
1194
  */
1241
- export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1195
+ export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1242
1196
  /**
1243
1197
  */
1244
- export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1198
+ export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1245
1199
  /**
1246
1200
  */
1247
- export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1201
+ export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1248
1202
  /**
1249
1203
  */
1250
- export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1204
+ export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1251
1205
  /**
1252
1206
  */
1253
- export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1207
+ export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1254
1208
  /**
1255
1209
  */
1256
- export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1210
+ export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1257
1211
  /**
1258
1212
  */
1259
- export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1213
+ export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1260
1214
  /**
1261
1215
  */
1262
- export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1216
+ export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1263
1217
  /**
1264
1218
  */
1265
1219
  export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1266
1220
  /**
1267
1221
  */
1268
- export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1269
- /**
1270
- */
1271
- export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1272
- /**
1273
- */
1274
1222
  export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1275
1223
  /**
1276
1224
  */
1277
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1278
- /**
1279
- */
1280
- export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1281
- /**
1282
- */
1283
1225
  export const CoinSelectionStrategyCIP2 = Object.freeze({
1284
1226
  /**
1285
1227
  * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
@@ -1298,8 +1240,66 @@ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1298
1240
  */
1299
1241
  RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1300
1242
  /**
1243
+ * JSON <-> PlutusData conversion schemas.
1244
+ * Follows ScriptDataJsonSchema in cardano-cli defined at:
1245
+ * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
1246
+ *
1247
+ * All methods here have the following restrictions due to limitations on dependencies:
1248
+ * * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
1249
+ * * Hex strings for bytes don't accept odd-length (half-byte) strings.
1250
+ * cardano-cli seems to support these however but it seems to be different than just 0-padding
1251
+ * on either side when tested so proceed with caution
1301
1252
  */
1302
- export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1253
+ export const PlutusDatumSchema = Object.freeze({
1254
+ /**
1255
+ * ScriptDataJsonNoSchema in cardano-node.
1256
+ *
1257
+ * This is the format used by --script-data-value in cardano-cli
1258
+ * This tries to accept most JSON but does not support the full spectrum of Plutus datums.
1259
+ * From JSON:
1260
+ * * null/true/false/floats NOT supported
1261
+ * * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
1262
+ * To JSON:
1263
+ * * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
1264
+ * * Lists not supported in keys
1265
+ * * Maps not supported in keys
1266
+ */
1267
+ BasicConversions:0,"0":"BasicConversions",
1268
+ /**
1269
+ * ScriptDataJsonDetailedSchema in cardano-node.
1270
+ *
1271
+ * This is the format used by --script-data-file in cardano-cli
1272
+ * This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
1273
+ * The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
1274
+ * 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
1275
+ * e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
1276
+ * 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
1277
+ * Integer's value is a JSON number e.g. {"int": 100}
1278
+ * Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
1279
+ * Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
1280
+ * Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
1281
+ * respectively with their values being the plutus datum encoded via this same schema
1282
+ * e.g. {"map": [
1283
+ * {"k": {"int": 2}, "v": {"int": 5}},
1284
+ * {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
1285
+ * ]}
1286
+ * From JSON:
1287
+ * * null/true/false/floats NOT supported
1288
+ * * the JSON must conform to a very specific schema
1289
+ * To JSON:
1290
+ * * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
1291
+ */
1292
+ DetailedSchema:1,"1":"DetailedSchema", });
1293
+ /**
1294
+ */
1295
+ export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1296
+ /**
1297
+ * Each new language uses a different namespace for hashing its script
1298
+ * This is because you could have a language where the same bytes have different semantics
1299
+ * So this avoids scripts in different languages mapping to the same hash
1300
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1301
+ */
1302
+ export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1303
1303
 
1304
1304
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1305
1305
  ? { register: () => {}, unregister: () => {} }
Binary file
@@ -1240,7 +1240,7 @@ export interface ProtocolVersion {
1240
1240
  *
1241
1241
  * ## script_data_hash format (Alonzo+ ledger spec):
1242
1242
  *
1243
- * Standard: `blake2b256(redeemers || datums || language_views)`
1243
+ * Standard: `blake2b256(redeemers || datums || used_cost_models)`
1244
1244
  * Datums-only: `blake2b256(0xA0 || datums || 0xA0)` (when no redeemers)
1245
1245
  *
1246
1246
  * All components must be serialized according to the ledger CDDL specification.
@@ -1254,9 +1254,7 @@ export interface ProtocolVersion {
1254
1254
  * - For hash: uses CBOR set encoding (tag 258) with deduplication
1255
1255
  * - May use indefinite length encoding
1256
1256
  *
1257
- * ### Cost Models (language_views)
1258
- *
1259
- * Language views is a specific serialization format for cost models.
1257
+ * ### Cost Models
1260
1258
  *
1261
1259
  * **Encoding rules:**
1262
1260
  * - Keys sorted by **length first**, then lexicographically
@@ -1269,7 +1267,6 @@ export interface ProtocolVersion {
1269
1267
  export interface ScriptDataHashDecomposition {
1270
1268
  /**
1271
1269
  * Cost models CBOR hex (standard map encoding)
1272
- * Note: for hash computation uses language_views encoding with special PlutusV1 handling
1273
1270
  */
1274
1271
  costModelsCbor?: string | null;
1275
1272
  /**
@@ -1283,7 +1280,7 @@ export interface ScriptDataHashDecomposition {
1283
1280
  datumsCount?: number | null;
1284
1281
  /**
1285
1282
  * Which encoding format was used for script_data_hash
1286
- * - "standard": redeemers || datums || language_views
1283
+ * - "standard": redeemers || datums || used_cost_models
1287
1284
  * - "datums_only": 0xA0 || datums || 0xA0 (when no redeemers but has datums)
1288
1285
  */
1289
1286
  encodingFormat: string;
@@ -1487,18 +1484,4 @@ export interface SubCoin {
1487
1484
  export interface UtxoInputContext {
1488
1485
  isSpent: boolean;
1489
1486
  utxo: UTxO;
1490
- }
1491
- export interface UTxO {
1492
- input: TxInput;
1493
- output: TxOutput;
1494
- }
1495
- export interface TxInput {
1496
- outputIndex: number;
1497
- txHash: string;
1498
- }
1499
-
1500
- export interface Asset {
1501
- quantity: string;
1502
- unit: string;
1503
- }
1504
-
1487
+ }
@@ -1150,54 +1150,66 @@ function handleError(f, args) {
1150
1150
  }
1151
1151
  /**
1152
1152
  */
1153
- module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1153
+ module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1154
+ /**
1155
+ */
1156
+ module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1157
+ /**
1158
+ */
1159
+ module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1160
+ /**
1161
+ */
1162
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1154
1163
  /**
1155
1164
  */
1156
1165
  module.exports.GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1157
1166
  /**
1158
- * Used to choosed the schema for a script JSON string
1159
1167
  */
1160
- module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1168
+ module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1161
1169
  /**
1170
+ * Each new language uses a different namespace for hashing its script
1171
+ * This is because you could have a language where the same bytes have different semantics
1172
+ * So this avoids scripts in different languages mapping to the same hash
1173
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1162
1174
  */
1163
- module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1175
+ module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1164
1176
  /**
1165
1177
  */
1166
- module.exports.RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1178
+ module.exports.BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1167
1179
  /**
1180
+ * Used to choosed the schema for a script JSON string
1168
1181
  */
1169
- module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1182
+ module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1170
1183
  /**
1171
1184
  */
1172
- module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
1185
+ module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1173
1186
  /**
1174
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1175
1187
  */
1176
- LargestFirst:0,"0":"LargestFirst",
1188
+ module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1177
1189
  /**
1178
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1179
1190
  */
1180
- RandomImprove:1,"1":"RandomImprove",
1191
+ module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1181
1192
  /**
1182
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1183
1193
  */
1184
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1194
+ module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1185
1195
  /**
1186
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1187
1196
  */
1188
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1197
+ module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1189
1198
  /**
1190
1199
  */
1191
- module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1200
+ module.exports.TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1192
1201
  /**
1193
1202
  */
1194
- module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1203
+ module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1195
1204
  /**
1196
1205
  */
1197
- module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1206
+ module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1198
1207
  /**
1199
1208
  */
1200
- module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1209
+ module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1210
+ /**
1211
+ */
1212
+ module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1201
1213
  /**
1202
1214
  * JSON <-> PlutusData conversion schemas.
1203
1215
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -1251,50 +1263,38 @@ BasicConversions:0,"0":"BasicConversions",
1251
1263
  DetailedSchema:1,"1":"DetailedSchema", });
1252
1264
  /**
1253
1265
  */
1254
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1255
- /**
1256
- */
1257
- module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1258
- /**
1259
- */
1260
- module.exports.TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1261
- /**
1262
- */
1263
1266
  module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1264
1267
  /**
1265
1268
  */
1266
- module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1267
- /**
1268
- */
1269
- module.exports.BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1269
+ module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1270
1270
  /**
1271
1271
  */
1272
- module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1272
+ module.exports.RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1273
1273
  /**
1274
1274
  */
1275
- module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1275
+ module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1276
1276
  /**
1277
1277
  */
1278
- module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1278
+ module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1279
1279
  /**
1280
1280
  */
1281
- module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1281
+ module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
1282
1282
  /**
1283
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1283
1284
  */
1284
- module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1285
+ LargestFirst:0,"0":"LargestFirst",
1285
1286
  /**
1287
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1286
1288
  */
1287
- module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1289
+ RandomImprove:1,"1":"RandomImprove",
1288
1290
  /**
1289
- * Each new language uses a different namespace for hashing its script
1290
- * This is because you could have a language where the same bytes have different semantics
1291
- * So this avoids scripts in different languages mapping to the same hash
1292
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
1291
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1293
1292
  */
1294
- module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1293
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1295
1294
  /**
1295
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1296
1296
  */
1297
- module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1297
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1298
1298
 
1299
1299
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1300
1300
  ? { register: () => {}, unregister: () => {} }
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Evgenii Lisitskii <evgeniilisitskii@gmail.com>"
5
5
  ],
6
6
  "description": "Cardano transaction validation library",
7
- "version": "0.1.0-beta.38",
7
+ "version": "0.1.0-beta.39",
8
8
  "license": "Apache-2.0",
9
9
  "files": [
10
10
  "node/cquisitor_lib_bg.wasm",