@@ -316,7 +316,9 @@ def __post_init__(self):
316316 self ._TYPE = self .script .version
317317
318318 @classmethod
319- def from_primitive (cls : Type [_Script ], values : List [Primitive ]) -> _Script :
319+ def from_primitive (
320+ cls : Type [_Script ], values : List [Primitive ], type_args : Optional [tuple ] = None
321+ ) -> _Script :
320322 if values [0 ] == 0 :
321323 return cls (NativeScript .from_primitive (values [1 ]))
322324 assert isinstance (values [1 ], bytes )
@@ -346,7 +348,9 @@ def to_shallow_primitive(self) -> Primitive:
346348
347349 @classmethod
348350 def from_primitive (
349- cls : Type [_DatumOption ], values : List [Primitive ]
351+ cls : Type [_DatumOption ],
352+ values : List [Primitive ],
353+ type_args : Optional [tuple ] = None ,
350354 ) -> _DatumOption :
351355 if values [0 ] == 0 :
352356 assert isinstance (values [1 ], bytes )
@@ -368,7 +372,9 @@ def to_primitive(self) -> Primitive:
368372 return CBORTag (24 , cbor2 .dumps (self .script , default = default_encoder ))
369373
370374 @classmethod
371- def from_primitive (cls : Type [_ScriptRef ], value : Primitive ) -> _ScriptRef :
375+ def from_primitive (
376+ cls : Type [_ScriptRef ], value : List [Primitive ], type_args : Optional [tuple ] = None
377+ ) -> _ScriptRef :
372378 assert isinstance (value , CBORTag )
373379 return cls (_Script .from_primitive (cbor2 .loads (value .value )))
374380
@@ -461,7 +467,9 @@ def to_primitive(self) -> Primitive:
461467
462468 @classmethod
463469 def from_primitive (
464- cls : Type [TransactionOutput ], value : Primitive
470+ cls : Type [TransactionOutput ],
471+ value : List [Primitive ],
472+ type_args : Optional [tuple ] = None ,
465473 ) -> TransactionOutput :
466474 if isinstance (value , list ):
467475 output = _TransactionOutputLegacy .from_primitive (value )
0 commit comments