Draft a few more core types for ScriptContext / Transaction
Interesting points: - We don't have tuples yet, so we fake it until we make it. - Aliases are 'order-sensitive', especially if an alias uses another not-yet-declared alias.
This commit is contained in:
parent
771e011630
commit
f63da1a367
|
@ -4,14 +4,44 @@ pub type ScriptContext(purpose) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Transaction {
|
pub type Transaction {
|
||||||
inputs: List(Nil),
|
inputs: List(Input),
|
||||||
|
reference_inputs: List(Input),
|
||||||
outputs: List(Nil),
|
outputs: List(Nil),
|
||||||
fee: Nil,
|
fee: Value,
|
||||||
mint: Nil,
|
mint: Value,
|
||||||
certificates: List(Nil),
|
certificates: List(Nil),
|
||||||
withdrawals: List(Nil),
|
withdrawals: List(Nil),
|
||||||
validity_range: Nil,
|
validity_range: Nil,
|
||||||
extra_signatories: Nil,
|
extra_signatories: Nil,
|
||||||
|
redeemers: List(Nil),
|
||||||
datums: List(Nil),
|
datums: List(Nil),
|
||||||
id: ByteArray,
|
id: TransactionId,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub type TransactionId =
|
||||||
|
ByteArray
|
||||||
|
|
||||||
|
pub type Input {
|
||||||
|
output_reference: OutputReference,
|
||||||
|
output: Output,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub type OutputReference {
|
||||||
|
transction_id: TransactionId,
|
||||||
|
output_index: Int,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub type PolicyId =
|
||||||
|
ByteArray
|
||||||
|
|
||||||
|
pub type Output =
|
||||||
|
Nil
|
||||||
|
|
||||||
|
pub type AssetName =
|
||||||
|
ByteArray
|
||||||
|
|
||||||
|
pub type Pair(a, b) =
|
||||||
|
Nil
|
||||||
|
|
||||||
|
pub type Value =
|
||||||
|
List(Pair(PolicyId, List(Pair(AssetName, Int))))
|
||||||
|
|
Loading…
Reference in New Issue