{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Use camelCase" #-}
{-# HLINT ignore "Evaluate" #-}
module Test.Cardano.Ledger.Shelley.CDDL (
module Test.Cardano.Ledger.Core.Binary.CDDL,
module Test.Cardano.Ledger.Shelley.CDDL,
) where
import Codec.CBOR.Cuddle.Huddle
import Data.Function (($))
import Data.Word (Word64)
import GHC.Num (Integer)
import Test.Cardano.Ledger.Core.Binary.CDDL
import Text.Heredoc
shelleyCDDL :: Huddle
shelleyCDDL :: Huddle
shelleyCDDL = [Rule] -> Huddle
collectFrom [Item [Rule]
Rule
block, Item [Rule]
Rule
transaction, Item [Rule]
Rule
signkeyKES]
block :: Rule
block :: Rule
block =
Text
"block"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
header
, Key
"transaction_bodies" Key -> ArrayChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_body]
, Key
"transaction_witness_sets" Key -> ArrayChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_witness_set]
, Key
"transaction_metadata_set" Key -> MapChoice -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
transaction_index Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
transaction_metadata]
]
transaction :: Rule
transaction :: Rule
transaction =
Text
"transaction"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_body
, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_witness_set
, Type0 -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Rule
transaction_metadata Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)
]
transaction_index :: Rule
transaction_index :: Rule
transaction_index = Text
"transaction_index" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Int
VUInt Value Int -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
2 :: Word64)
header :: Rule
= Text
"header" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
header_body, Key
"body_signature" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
kes_signature]
header_body :: Rule
header_body :: Rule
header_body =
Text
"header_body"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"block_number" Key -> Value Int -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt
, Key
"slot" Key -> Value Int -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt
, Key
"prev_hash" Key -> Type0 -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Rule
hash32 Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)
, Key
"issuer_vkey" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vkey
, Key
"vrf_vkey" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vrf_vkey
, Key
"nonce_vrf" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vrf_cert
, Key
"leader_vrf" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vrf_cert
, Key
"block_body_size" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
4 :: Word64))
, Key
"block_body_hash" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
hash32
, Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
operational_cert
, Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
protocol_version
]
operational_cert :: Named Group
operational_cert :: Named Group
operational_cert =
Text -> Named Group -> Named Group
forall a. Text -> Named a -> Named a
comment
Text
[str| kes_vkey: hot_vkey
| uint: sequence_number
| uint: key_period
|signature: sigma
|]
(Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$ Text
"operational_cert"
Text -> Group -> Named Group
=:~ Group -> Group
grp
[ Key
"hot_vkey" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
kes_vkey
, Key
"sequence_number" Key -> Value Int -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt
, Key
"kes_period" Key -> Value Int -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt
, Key
"sigma" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
signature
]
next_major_protocol_version :: Integer
next_major_protocol_version :: Integer
next_major_protocol_version = Integer
3
major_protocol_version :: Rule
major_protocol_version :: Rule
major_protocol_version = Text
"major_protocol_version" Text -> Ranged -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= (Integer
1 :: Integer) Integer -> Integer -> Ranged
... Integer
next_major_protocol_version
protocol_version :: Named Group
protocol_version :: Named Group
protocol_version = Text
"protocol_version" Text -> Group -> Named Group
=:~ Group -> Group
grp [Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
major_protocol_version, Value Int -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Value Int
VUInt]
transaction_body :: Rule
transaction_body :: Rule
transaction_body =
Text
"transaction_body"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ Word64 -> Key
idx Word64
0 Key -> GRuleCall -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall t0. IsType0 t0 => t0 -> GRuleCall
set Rule
transaction_input
, Word64 -> Key
idx Word64
1 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_output]
, Word64 -> Key
idx Word64
2 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin
, Word64 -> Key
idx Word64
3 Key -> Value Int -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
4 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
certificate])
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
5 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
withdrawals)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
6 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
update)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
7 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
metadata_hash)
]
transaction_input :: Rule
transaction_input :: Rule
transaction_input =
Text
"transaction_input"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"transaction_id" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
hash32
, Key
"index" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt Value Int -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
2 :: Word64)
]
transaction_output :: Rule
transaction_output :: Rule
transaction_output = Text
"transaction_output" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
address, Key
"amount" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin]
certificate :: Rule
certificate :: Rule
certificate =
Text
"certificate"
Text -> Choice ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
stake_registration]
ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
stake_deregistration]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
stake_delegation]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
pool_registration]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
pool_retirement]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
genesis_key_delegation]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
move_instantaneous_rewards_cert]
stake_registration :: Named Group
stake_registration :: Named Group
stake_registration =
Text -> Named Group -> Named Group
forall a. Text -> Named a -> Named a
comment Text
"This will be deprecated in a future era" (Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$
Text
"stake_registration" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
0, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential]
stake_deregistration :: Named Group
stake_deregistration :: Named Group
stake_deregistration =
Text -> Named Group -> Named Group
forall a. Text -> Named a -> Named a
comment Text
"This will be deprecated in a future era" (Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$
Text
"stake_deregistration" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
1, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential]
stake_delegation :: Named Group
stake_delegation :: Named Group
stake_delegation = Text
"stake_delegation" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
2, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
stake_credential, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
pool_keyhash]
pool_registration :: Named Group
pool_registration :: Named Group
pool_registration = Text
"pool_registration" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
3, Named Group -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
pool_params]
pool_retirement :: Named Group
pool_retirement :: Named Group
pool_retirement = Text
"pool_retirement" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
4, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
pool_keyhash, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
epoch]
genesis_key_delegation :: Named Group
genesis_key_delegation :: Named Group
genesis_key_delegation =
Text
"genesis_key_delegation"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
5, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
genesis_hash, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
genesis_delegate_hash, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
vrf_keyhash]
move_instantaneous_rewards_cert :: Named Group
move_instantaneous_rewards_cert :: Named Group
move_instantaneous_rewards_cert =
Text
"move_instantaneous_rewards_cert"
Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
6, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
move_instantaneous_reward]
move_instantaneous_reward :: Rule
move_instantaneous_reward :: Rule
move_instantaneous_reward =
Text -> Rule -> Rule
forall a. Text -> Named a -> Named a
comment
Text
[str|The first field determines where the funds are drawn from.
| 0 denotes the reserves,
| 1 denotes the treasury.
|If the second field is a map, funds are moved to stake credentials.
|Otherwise, the funds are given to the other accounting pot.
|NOTE:
| This has been safely backported to Shelley from Alonzo.
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"move_instantaneous_reward"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Type0 -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Integer -> Literal
int Integer
0 Literal -> Literal -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Integer -> Literal
int Integer
1)
, Type0 -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (MapChoice -> Seal Map
smp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
stake_credential Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
delta_coin] Seal Map -> Rule -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Rule
coin)
]
delta_coin :: Rule
delta_coin :: Rule
delta_coin =
Text -> Rule -> Rule
forall a. Text -> Named a -> Named a
comment
Text
[str|This too has been introduced in Shelley as a backport from Alonzo.
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"delta_coin" Text -> Value Int -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Int
VInt
stake_credential :: Rule
stake_credential :: Rule
stake_credential = Text
"stake_credential" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
credential
credential :: Rule
credential :: Rule
credential = Text
"credential" Text -> Choice ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
0, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
addr_keyhash] ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
1, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
script_hash]
pool_params :: Named Group
pool_params :: Named Group
pool_params =
Text -> Named Group -> Named Group
forall a. Text -> Named a -> Named a
comment
Text
[str| pool_keyhash: operator
| coin: pledge
| coin: cost
| unit_interval: margin
| set<addr_keyhash>: pool_owners
|]
(Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$ Text
"pool_params"
Text -> Group -> Named Group
=:~ Group -> Group
grp
[ Key
"operator" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
pool_keyhash
, Key
"vrf_keyhash" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vrf_keyhash
, Key
"pledge" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin
, Key
"cost" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin
, Key
"margin" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
unit_interval
, Key
"reward_account" Key -> Rule -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
reward_account
, Key
"pool_owners" Key -> GRuleCall -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule -> GRuleCall
forall t0. IsType0 t0 => t0 -> GRuleCall
set Rule
addr_keyhash
, Key
"relays" Key -> ArrayChoice -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
relay]
, Key
"pool_metadata" Key -> Type0 -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Rule
pool_metadata Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil)
]
port :: Rule
port :: Rule
port = Text
"port" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Int
VUInt Value Int -> Word64 -> Constrained
`le` Word64
65535
ipv4 :: Rule
ipv4 :: Rule
ipv4 = Text
"ipv4" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value ByteString
VBytes Value ByteString -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
4 :: Word64)
ipv6 :: Rule
ipv6 :: Rule
ipv6 = Text
"ipv6" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value ByteString
VBytes Value ByteString -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
16 :: Word64)
dns_name :: Rule
dns_name :: Rule
dns_name = Text
"dns_name" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Text
VText Value Text -> (Word64, Word64) -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
0 :: Word64, Word64
64 :: Word64)
single_host_addr :: Named Group
single_host_addr :: Named Group
single_host_addr =
Text
"single_host_addr" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
0, Rule
port Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil, Rule
ipv4 Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil, Rule
ipv6 Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil]
single_host_name :: Named Group
single_host_name :: Named Group
single_host_name =
Text -> Named Group -> Named Group
forall a. Text -> Named a -> Named a
comment
Text
[str|dns_name: An A or AAAA DNS record
|]
(Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$ Text
"single_host_name" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
1, Rule
port Rule -> Value Void -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Void
VNil, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
dns_name]
multi_host_name :: Named Group
multi_host_name :: Named Group
multi_host_name =
Text -> Named Group -> Named Group
forall a. Text -> Named a -> Named a
comment
Text
[str|dns_name: An SRV DNS record
|]
(Named Group -> Named Group) -> Named Group -> Named Group
forall a b. (a -> b) -> a -> b
$ Text
"multi_host_name" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
2, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
dns_name]
relay :: Rule
relay :: Rule
relay =
Text
"relay"
Text -> Choice ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
single_host_addr]
ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
single_host_name]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
multi_host_name]
pool_metadata :: Rule
pool_metadata :: Rule
pool_metadata = Text
"pool_metadata" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
url, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
metadata_hash]
url :: Rule
url :: Rule
url = Text
"url" Text -> Constrained -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Text
VText Value Text -> (Word64, Word64) -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
0 :: Word64, Word64
64 :: Word64)
withdrawals :: Rule
withdrawals :: Rule
withdrawals = Text
"withdrawals" Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
reward_account Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin]
update :: Rule
update :: Rule
update = Text
"update" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
proposed_protocol_parameter_updates, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
epoch]
proposed_protocol_parameter_updates :: Rule
proposed_protocol_parameter_updates :: Rule
proposed_protocol_parameter_updates =
Text
"proposed_protocol_parameter_updates"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
genesis_hash Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
protocol_param_update]
protocol_param_update :: Rule
protocol_param_update :: Rule
protocol_param_update =
Text -> Rule -> Rule
forall a. Text -> Named a -> Named a
comment
Text
[str| 0: minfee A
| 1: minfee B
| 2: max block body size
| 3: max transaction size
| 4: max block header size
| 5: key deposit
| 6: pool deposit
| 7: maximum epoch
| 8: n_opt: desired number of stake pools
| 9: pool pledge influence
|10: expansion rate
|11: treasury growth rate
|12: decentralization constant
|13: extra entropy
|14: protocol version
|15: min utxo value
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"protocol_param_update"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
0 Key -> Value Int -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
1 Key -> Value Int -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
2 Key -> Value Int -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
3 Key -> Value Int -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
4 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value Int
VUInt Value Int -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
2 :: Word64)))
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
5 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
6 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
7 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
epoch)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
8 Key -> Constrained -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt Value Int -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
2 :: Word64))
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
9 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonnegative_interval)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
10 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
unit_interval)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
11 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
unit_interval)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
12 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
unit_interval)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
13 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
nonce)
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
14 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
protocol_version])
, MapEntry -> MapEntry
forall a. CanQuantify a => a -> a
opt (Word64 -> Key
idx Word64
15 Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
coin)
]
transaction_witness_set :: Rule
transaction_witness_set :: Rule
transaction_witness_set =
Text
"transaction_witness_set"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp
[ Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
0 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
vkeywitness]
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
1 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
multisig_script]
, Item MapChoice -> Item MapChoice
forall a. CanQuantify a => a -> a
opt (Item MapChoice -> Item MapChoice)
-> Item MapChoice -> Item MapChoice
forall a b. (a -> b) -> a -> b
$ Word64 -> Key
idx Word64
2 Key -> ArrayChoice -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
bootstrap_witness]
]
transaction_metadatum :: Rule
transaction_metadatum :: Rule
transaction_metadatum =
Text
"transaction_metadatum"
Text -> Type0 -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> Seal Map
smp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
transaction_metadatum Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
transaction_metadatum]
Seal Map -> Seal (Choice ArrayChoice) -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> Seal (Choice ArrayChoice)
sarr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
transaction_metadatum]
Type0 -> Value Int -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ Value Int
VInt
Type0 -> Constrained -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Value ByteString
VBytes Value ByteString -> (Word64, Word64) -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
0 :: Word64, Word64
64 :: Word64))
Type0 -> Constrained -> Type0
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ (Value Text
VText Value Text -> (Word64, Word64) -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
0 :: Word64, Word64
64 :: Word64))
transaction_metadatum_label :: Rule
transaction_metadatum_label :: Rule
transaction_metadatum_label = Text
"transaction_metadatum_label" Text -> Value Int -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Int
VUInt
transaction_metadata :: Rule
transaction_metadata :: Rule
transaction_metadata =
Text
"transaction_metadata"
Text -> MapChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= MapChoice -> MapChoice
mp [Word64
0 Word64 -> MapEntry -> MapEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> Key
forall r. IsType0 r => r -> Key
asKey Rule
transaction_metadatum_label Key -> Rule -> MapEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
transaction_metadatum]
vkeywitness :: Rule
vkeywitness :: Rule
vkeywitness = Text
"vkeywitness" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
vkey, Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
signature]
bootstrap_witness :: Rule
bootstrap_witness :: Rule
bootstrap_witness =
Text
"bootstrap_witness"
Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr
[ Key
"public_key" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
vkey
, Key
"signature" Key -> Rule -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Rule
signature
, Key
"chain_code" Key -> Constrained -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> (Value ByteString
VBytes Value ByteString -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
32 :: Word64))
, Key
"attributes" Key -> Value ByteString -> ArrayEntry
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value ByteString
VBytes
]
multisig_script :: Rule
multisig_script :: Rule
multisig_script =
Text
"multisig_script"
Text -> Choice ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
multisig_pubkey]
ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
multisig_all]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
multisig_any]
Choice ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Named Group -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Named Group
multisig_n_of_k]
multisig_pubkey :: Named Group
multisig_pubkey :: Named Group
multisig_pubkey = Text
"multisig_pubkey" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
0, Rule -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
addr_keyhash]
multisig_all :: Named Group
multisig_all :: Named Group
multisig_all = Text
"multisig_all" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
1, ArrayChoice -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
multisig_script])]
multisig_any :: Named Group
multisig_any :: Named Group
multisig_any = Text
"multisig_any" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
2, ArrayChoice -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
multisig_script])]
multisig_n_of_k :: Named Group
multisig_n_of_k :: Named Group
multisig_n_of_k = Text
"multisig_n_of_k" Text -> Group -> Named Group
=:~ Group -> Group
grp [Item Group
Type0
3, Key
"n" Key -> Value Int -> Type0
forall a me. (IsType0 a, IsEntryLike me) => Key -> a -> me
==> Value Int
VUInt, ArrayChoice -> Type0
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ Rule -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a Rule
multisig_script])]
epoch :: Rule
epoch :: Rule
epoch = Text
"epoch" Text -> Value Int -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Value Int
VUInt
genesis_delegate_hash :: Rule
genesis_delegate_hash :: Rule
genesis_delegate_hash = Text
"genesis_delegate_hash" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
hash28
genesis_hash :: Rule
genesis_hash :: Rule
genesis_hash = Text
"genesis_hash" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
hash28
script_hash :: Rule
script_hash :: Rule
script_hash =
Text -> Rule -> Rule
forall a. Text -> Named a -> Named a
comment
Text
[str|To compute a script hash, note that you must prepend
|a tag to the bytes of the script before hashing.
|The tag is determined by the language.
|The tags in the Conway era are:
| "\x00" for multisig scripts
| "\x01" for Plutus V1 scripts
| "\x02" for Plutus V2 scripts
| "\x03" for Plutus V3 scripts
|]
(Rule -> Rule) -> Rule -> Rule
forall a b. (a -> b) -> a -> b
$ Text
"script_hash" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
hash28
metadata_hash :: Rule
metadata_hash :: Rule
metadata_hash = Text
"metadata_hash" Text -> Rule -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= Rule
hash32
nonce :: Rule
nonce :: Rule
nonce = Text
"nonce" Text -> Choice ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
0] ArrayChoice -> ArrayChoice -> Choice ArrayChoice
forall a c b.
(IsChoosable a c, IsChoosable b c) =>
a -> b -> Choice c
/ ArrayChoice -> ArrayChoice
arr [Item ArrayChoice
ArrayEntry
1, Constrained -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a (Value ByteString
VBytes Value ByteString -> Word64 -> Constrained
forall a s. (IsSizeable a, IsSize s) => Value a -> s -> Constrained
`sized` (Word64
32 :: Word64))]
set :: IsType0 t0 => t0 -> GRuleCall
set :: forall t0. IsType0 t0 => t0 -> GRuleCall
set = (GRef -> Rule) -> t0 -> GRuleCall
forall t0. IsType0 t0 => (GRef -> Rule) -> t0 -> GRuleCall
binding ((GRef -> Rule) -> t0 -> GRuleCall)
-> (GRef -> Rule) -> t0 -> GRuleCall
forall a b. (a -> b) -> a -> b
$ \GRef
x -> Text
"set" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Word64
0 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ GRef -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a GRef
x]
nonempty_set :: IsType0 t0 => t0 -> GRuleCall
nonempty_set :: forall t0. IsType0 t0 => t0 -> GRuleCall
nonempty_set = (GRef -> Rule) -> t0 -> GRuleCall
forall t0. IsType0 t0 => (GRef -> Rule) -> t0 -> GRuleCall
binding ((GRef -> Rule) -> t0 -> GRuleCall)
-> (GRef -> Rule) -> t0 -> GRuleCall
forall a b. (a -> b) -> a -> b
$ \GRef
x -> Text
"nonempty_set" Text -> ArrayChoice -> Rule
forall a. IsType0 a => Text -> a -> Rule
=:= ArrayChoice -> ArrayChoice
arr [Word64
1 Word64 -> ArrayEntry -> ArrayEntry
forall a. CanQuantify a => Word64 -> a -> a
<+ GRef -> ArrayEntry
forall a e. (IsType0 a, IsGroupOrArrayEntry e) => a -> e
a GRef
x]