File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,34 @@ def gen_registration_cert(
211211
212212 return out_file
213213
214+ def gen_dereg_cert (
215+ self ,
216+ * ,
217+ name : str ,
218+ params : structs .CompatPoolDeregParams ,
219+ destination_dir : itp .FileType = "." ,
220+ ) -> pl .Path :
221+ """Generate a compatible stake pool deregistration certificate."""
222+ destination_dir_path = pl .Path (destination_dir ).expanduser ()
223+ out_file = destination_dir_path / f"{ name } _pool_dereg.cert"
224+ clusterlib_helpers ._check_files_exist (out_file , clusterlib_obj = self ._clusterlib_obj )
225+
226+ cmd = [
227+ * self ._base ,
228+ "deregistration-certificate" ,
229+ "--cold-verification-key-file" ,
230+ str (params .cold_vkey_file ),
231+ "--epoch" ,
232+ str (params .epoch ),
233+ "--out-file" ,
234+ str (out_file ),
235+ ]
236+
237+ self ._clusterlib_obj .cli (cmd , add_default_args = False )
238+ helpers ._check_outfiles (out_file )
239+
240+ return out_file
241+
214242
215243class GovernanceActionGroup :
216244 """Governance action subcommands for compatible eras."""
Original file line number Diff line number Diff line change @@ -244,6 +244,12 @@ class CompatPoolParams:
244244 check_metadata_hash : bool = False
245245
246246
247+ @dataclasses .dataclass (frozen = True )
248+ class CompatPoolDeregParams :
249+ cold_vkey_file : itp .FileType
250+ epoch : int
251+
252+
247253@dataclasses .dataclass (frozen = True , order = True )
248254class TxRawOutput :
249255 txins : list [UTXOData ] # UTXOs used as inputs
You can’t perform that action at this time.
0 commit comments