aiken-lang / stdlib

The Aiken Standard Library
https://aiken-lang.github.io/stdlib
Apache License 2.0
46 stars 26 forks source link

More transaction related helper functions #43

Open KristianBalaj opened 1 year ago

KristianBalaj commented 1 year ago

Currently there are just 3 helper functions in the aiken/transaction module (i.e. find_script_outputs, find_datum, find_input).

I'm proposing to add further helper function inspired by PlutusTx:

I will be adding further items to this list but at least these for now. I will be also adding PRs for those functions over time.

rvcas commented 1 year ago

Something to consider perhaps

https://github.com/aiken-lang/stdlib/issues/45

micahkendall commented 1 year ago

I suggest that

txSignedBy :: [TxInfo] -> [PubKeyHash] -> [Bool]

is instead

signedByAll :: [PubKeyHash] -> [PubKeyHash] -> [Bool]

or some other variant. Once there are type classes etc. it can be an alias for list subset.

micahkendall commented 1 year ago

I don't like getContinuingOutputs/checkOwnOutput as they seem to be unnecessarily limiting in many cases, or encourage bad habits. Maybe we should have a compatibility library for all these ideas, and encourage datum/nft tagging etc. as alternatives.