Open klntsky opened 8 months ago
Looks like these two functions could have been combined into one that returns an optional OutputDatum:
OutputDatum
declare export class TransactionOutput { ... /** * @returns {DataHash | void} */ data_hash(): DataHash | void; /** * @returns {PlutusData | void} */ plutus_data(): PlutusData | void;
OutputDatum definition for context:
declare export class OutputDatum { free(): void; /** * @param {DataHash} data_hash * @returns {OutputDatum} */ static new_data_hash(data_hash: DataHash): OutputDatum; /** * @param {PlutusData} data * @returns {OutputDatum} */ static new_data(data: PlutusData): OutputDatum; /** * @returns {DataHash | void} */ data_hash(): DataHash | void; /** * @returns {PlutusData | void} */ data(): PlutusData | void; }
Hi @klntsky ! It's good point but it leads API breaking changes, we might consider it but it's not priority now.
Looks like these two functions could have been combined into one that returns an optional
OutputDatum
:OutputDatum
definition for context: