@odatano/core 2.0.0-rc.33 → 2.0.0-rc.34

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.
@@ -359,6 +359,7 @@ export declare function _ParsedTransactionAspect<TBase extends new (...args: any
359
359
  currentTreasuryValue?: Lovelace | null
360
360
  requiredSigners?: Array<Blake2b224>
361
361
  scriptDataHash?: Blake2b256 | null
362
+ isValid?: boolean | null
362
363
  witnesses?: ParsedWitnesses | null
363
364
  } & InstanceType<TBase>
364
365
  readonly kind: 'type';
package/db/types.cds CHANGED
@@ -399,6 +399,10 @@ type ParsedTransaction {
399
399
  @description: 'Blake2b-256 hash over datum/redeemer/costmodels section; null if no Plutus data is present'
400
400
  scriptDataHash : Blake2b256;
401
401
 
402
+ @title : 'Validity Flag'
403
+ @description: 'false when the transaction is flagged as failing its scripts; on chain it then spends only the collateral and creates no outputs'
404
+ isValid : Boolean;
405
+
402
406
  @title : 'Witness Counts'
403
407
  @description: 'Shape summary of the witness set (no secret material exposed)'
404
408
  witnesses : ParsedWitnesses;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odatano/core",
3
- "version": "2.0.0-rc.33",
3
+ "version": "2.0.0-rc.34",
4
4
  "description": "SAP CAP plugin for Cardano blockchain OData V4 integration",
5
5
  "imports": {
6
6
  "#cds-models/*": "./@cds-models/*/index.js"
@@ -76,6 +76,8 @@ export interface ParsedTransaction {
76
76
  /** 28-byte Ed25519 key hashes listed in the tx body's required_signers field. */
77
77
  requiredSigners: string[];
78
78
  scriptDataHash: string | null;
79
+ /** `false` when the transaction is flagged as failing its scripts. On chain it then spends only the collateral and creates no outputs. */
80
+ isValid: boolean;
79
81
  witnesses: ParsedWitnesses;
80
82
  }
81
83
  /**
package/srv/cbor/parse.js CHANGED
@@ -51,6 +51,7 @@ function parseTransaction(cborHex) {
51
51
  currentTreasuryValue: raw.currentTreasuryValue,
52
52
  requiredSigners: (body.requiredSigners ?? []).map((s) => s.toString()),
53
53
  scriptDataHash: body.scriptDataHash ? body.scriptDataHash.toString() : null,
54
+ isValid: tx.isScriptValid,
54
55
  witnesses: countWitnesses(tx.witnesses),
55
56
  };
56
57
  }