-
Notifications
You must be signed in to change notification settings - Fork 15
/
supported.cddl
133 lines (105 loc) · 2.98 KB
/
supported.cddl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
unit_interval = #6.30([uint, uint])
coin = uint
epoch = uint
vkey = bytes
signature = bytes
hash28 = [uint]
hash32 = [uint]
addr_keyhash = hash28
scripthash = hash28
genesis_delegate_hash = hash32
pool_keyhash = hash32
genesishash = hash32
metadata_hash = hash32
vrf_keyhash = hash32
vkeywitness = [ vkey, signature ]
msig_pubkey = [0, addr_keyhash]
msig_all = [1, [ * multisig_script ]]
msig_any = [2, [ * multisig_script ]]
msig_n_of_k = [3, n: uint, [ * multisig_script ]]
multisig_script =
[ msig_pubkey
// msig_all
// msig_any
// msig_n_of_k
]
transaction_index = uint
transaction_input = [ transaction_id : $hash32
, index : uint
]
transaction_output = [address, amount : uint]
stake_credential =
[ 0, addr_keyhash
// 1, scripthash
]
withdrawals = { * stake_credential => coin }
; we'll remove this later
address = bytes
move_instantaneous_reward = { * stake_credential => coin }
relay =
[ single_host_addr
// single_host_name
// multi_host_name
]
pool_params = ( operator: pool_keyhash
, vrf_keyhash: vrf_keyhash
, pledge: coin
, cost: coin
, margin: unit_interval
, reward_account: stake_credential
, pool_owners: [addr_keyhash]
, relays: [* relay]
, pool_metadata: pool_metadata / null
)
port = uint .le 65535
ipv4 = bytes .size 4
ipv6 = bytes .size 16
dns_name = tstr .size (0..64)
single_host_addr = ( 0
, port / null
, ipv4 / null
, ipv6 / null
)
single_host_name = ( 1
, port / null
, dns_name ; An A or AAAA DNS record
)
multi_host_name = ( 2
, port / null
, dns_name ; A SRV DNS record
)
pool_metadata = [url, metadata_hash]
url = tstr .size (0..64)
stake_registration = [0, stake_credential]
stake_deregistration = [1, stake_credential]
stake_delegation = [2, stake_credential, pool_keyhash]
pool_registration = [3, pool_params]
pool_retirement = [4, pool_keyhash, epoch]
genesis_key_delegation = [5, genesishash, genesis_delegate_hash]
move_instantaneous_rewards_cert = [6, move_instantaneous_reward]
certificate =
[ stake_registration
// stake_deregistration
// stake_delegation
// pool_registration
// pool_retirement
// genesis_key_delegation
// move_instantaneous_rewards_cert
]
transaction_body =
{ 0 : [transaction_input]
, 1 : [* transaction_output]
, 2 : coin ; fee
, 3 : uint ; ttl
, ? 4 : [* certificate]
, ? 5 : withdrawals
; , ? 6 : update
; , ? 7 : metadata_hash
}
transaction_witness_set =
{ ?0 => [* vkeywitness ]
, ?1 => [* multisig_script ]
; In the future, new kinds of witnesses can be added like this:
; , ?2 => [* monetary_policy_script ]
; , ?3 => [* plutus_script ]
}