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

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.
@@ -509,13 +509,6 @@ export interface CostModels {
509
509
 
510
510
 
511
511
  ///AUTOGENERATED
512
-
513
- // Auto-generated TypeScript types from JSON schemas
514
- // Generated at: 2025-12-26T19:20:24.371Z
515
- //
516
- // This file contains exported TypeScript types that can be imported in other modules.
517
- // Large integers (uint64, int64) are represented as bigint for safe handling.
518
-
519
512
  export interface NecessaryInputData {
520
513
  accounts: string[];
521
514
  committeeMembersCold: LocalCredential[];
@@ -1011,11 +1004,15 @@ export type Phase1Error =
1011
1004
  | {
1012
1005
  ScriptDataHashMismatch: {
1013
1006
  /**
1014
- * The expected script data hash
1007
+ * Decomposition of the expected hash computation
1008
+ */
1009
+ expected_decomposition?: ScriptDataHashDecomposition | null;
1010
+ /**
1011
+ * The expected script data hash (computed from witness set)
1015
1012
  */
1016
1013
  expected_hash?: string | null;
1017
1014
  /**
1018
- * The actual script data hash
1015
+ * The provided script data hash (from transaction body)
1019
1016
  */
1020
1017
  provided_hash?: string | null;
1021
1018
  };
@@ -1026,9 +1023,6 @@ export type Phase1Error =
1026
1023
  };
1027
1024
  };
1028
1025
 
1029
- /**
1030
- * Phase 1 validation errors
1031
- */
1032
1026
  export type Phase2Error =
1033
1027
  | "NativeScriptIsReferencedByRedeemer"
1034
1028
  | {
@@ -1238,6 +1232,79 @@ export interface ProtocolVersion {
1238
1232
  * The governance action with zero withdrawals
1239
1233
  */
1240
1234
 
1235
+ /**
1236
+ * Decomposition of script_data_hash computation for debugging.
1237
+ *
1238
+ * The script_data_hash is computed as blake2b256 of concatenated bytes in a specific format.
1239
+ * This structure provides the raw CBOR data and explains the encoding used.
1240
+ *
1241
+ * ## script_data_hash format (Alonzo+ ledger spec):
1242
+ *
1243
+ * Standard: `blake2b256(redeemers || datums || language_views)`
1244
+ * Datums-only: `blake2b256(0xA0 || datums || 0xA0)` (when no redeemers)
1245
+ *
1246
+ * All components must be serialized according to the ledger CDDL specification.
1247
+ *
1248
+ * ### Redeemers
1249
+ * - **Pre-Conway**: array format
1250
+ * - **Conway+**: map format
1251
+ * - Original format from deserialization is preserved
1252
+ *
1253
+ * ### Datums
1254
+ * - For hash: uses CBOR set encoding (tag 258) with deduplication
1255
+ * - May use indefinite length encoding
1256
+ *
1257
+ * ### Cost Models (language_views)
1258
+ *
1259
+ * Language views is a specific serialization format for cost models.
1260
+ *
1261
+ * **Encoding rules:**
1262
+ * - Keys sorted by **length first**, then lexicographically
1263
+ * - **PlutusV1 special case** (cardano-node bug workaround):
1264
+ * - Key `0` serialized as `bytes(0x00)` instead of integer
1265
+ * - Value wrapped in bytestring containing **indefinite length array**
1266
+ * - Format: `{ bytes(0x00): bytes(9F cost1 cost2 ... FF) }`
1267
+ * - **PlutusV2** (key=1) and **PlutusV3** (key=2): standard integer key with array value
1268
+ */
1269
+ export interface ScriptDataHashDecomposition {
1270
+ /**
1271
+ * Cost models CBOR hex (standard map encoding)
1272
+ * Note: for hash computation uses language_views encoding with special PlutusV1 handling
1273
+ */
1274
+ costModelsCbor?: string | null;
1275
+ /**
1276
+ * Datums CBOR hex (standard array encoding)
1277
+ * Note: for hash computation uses set encoding (tag 258 + deduplication)
1278
+ */
1279
+ datumsCbor?: string | null;
1280
+ /**
1281
+ * Number of datums
1282
+ */
1283
+ datumsCount?: number | null;
1284
+ /**
1285
+ * Which encoding format was used for script_data_hash
1286
+ * - "standard": redeemers || datums || language_views
1287
+ * - "datums_only": 0xA0 || datums || 0xA0 (when no redeemers but has datums)
1288
+ */
1289
+ encodingFormat: string;
1290
+ /**
1291
+ * Description of what is actually concatenated for hashing
1292
+ */
1293
+ hashInputDescription: string;
1294
+ /**
1295
+ * Plutus versions used (e.g. ["PlutusV1", "PlutusV2", "PlutusV3"])
1296
+ */
1297
+ plutusVersionsUsed: string[];
1298
+ /**
1299
+ * Redeemers CBOR hex (serialized per CDDL, preserves original Map or Array format)
1300
+ */
1301
+ redeemersCbor?: string | null;
1302
+ /**
1303
+ * Number of redeemers
1304
+ */
1305
+ redeemersCount: number;
1306
+ }
1307
+
1241
1308
  export interface EvalRedeemerResult {
1242
1309
  calculated_ex_units: ExUnits;
1243
1310
  error?: string | null;
@@ -1404,6 +1471,7 @@ export interface ProtocolParameters {
1404
1471
  */
1405
1472
  stakePoolDeposit: bigint;
1406
1473
  }
1474
+
1407
1475
  /**
1408
1476
  * Price of execution units for script execution
1409
1477
  */
@@ -1415,15 +1483,22 @@ export interface SubCoin {
1415
1483
  denominator: bigint;
1416
1484
  numerator: bigint;
1417
1485
  }
1418
- /**
1419
- * Maximum execution units allowed for a transaction
1420
- */
1421
-
1422
- /**
1423
- * Coins per byte for reference scripts
1424
- */
1425
1486
 
1426
1487
  export interface UtxoInputContext {
1427
1488
  isSpent: boolean;
1428
1489
  utxo: UTxO;
1429
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
+