feat(aiken_stdlib): add Hash alias and ScriptPurpose

This commit is contained in:
rvcas 2022-11-16 12:21:50 -05:00 committed by Lucas
parent f63da1a367
commit 8200afa00e
1 changed files with 11 additions and 2 deletions

View File

@ -3,6 +3,15 @@ pub type ScriptContext(purpose) {
purpose: purpose,
}
pub type Hash(a) =
ByteArray
pub type ScriptPurpose {
Mint(PolicyId)
Spend(OutputReference)
Withdrawal(Nil)
}
pub type Transaction {
inputs: List(Input),
reference_inputs: List(Input),
@ -14,12 +23,12 @@ pub type Transaction {
validity_range: Nil,
extra_signatories: Nil,
redeemers: List(Nil),
datums: List(Nil),
datums: List(Pair(Hash(Data), Data)),
id: TransactionId,
}
pub type TransactionId =
ByteArray
Hash(Transaction)
pub type Input {
output_reference: OutputReference,