async def serialize_rctsig_prunable(self, ar, type, inputs, outputs, mixin):
if type == RctType.Null:<EOL><INDENT>return True<EOL><DEDENT>if type != RctType.Full and type != RctType.Bulletproof andtype != RctType.Simple and type != RctType.Bulletproof2:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if is_rct_bp(type):<EOL><INDENT>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>bps = [<NUM_LIT:0>]<EOL>if ar.writing:<EOL><INDENT>bps[<NUM_LIT:0>] = len(self.bulletproofs)<EOL><DEDENT>if type == RctType.Bulletproof2:<EOL><INDENT>await ar.field(elem=eref(bps, <NUM_LIT:0>), elem_type=x.UVarintType)<EOL><DEDENT>else:<EOL><INDENT>await ar.field(elem=eref(bps, <NUM_LIT:0>), elem_type=x.UInt32)<EOL><DEDENT>await ar.prepare_container(bps[<NUM_LIT:0>], eref(self, '<STR_LIT>'), elem_type=Bulletproof)<EOL>for i in range(bps[<NUM_LIT:0>]):<EOL><INDENT>await ar.field(elem=eref(self.bulletproofs, i), elem_type=Bulletproof)<EOL><DEDENT>await ar.end_array()<EOL><DEDENT>else:<EOL><INDENT>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>await ar.prepare_container(outputs, eref(self, '<STR_LIT>'), elem_type=RangeSig)<EOL>if len(self.rangeSigs) != outputs:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for i in range(len(self.rangeSigs)):<EOL><INDENT>await ar.field(elem=eref(self.rangeSigs, i), elem_type=RangeSig)<EOL><DEDENT>await ar.end_array()<EOL><DEDENT>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>is_full = type == RctType.Full<EOL>mg_elements = inputs if not is_full else <NUM_LIT:1><EOL>await ar.prepare_container(mg_elements, eref(self, '<STR_LIT>'), elem_type=MgSig)<EOL>if len(self.MGs) != mg_elements:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for i in range(mg_elements):<EOL><INDENT>await ar.begin_object()<EOL>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>await ar.prepare_container(mixin + <NUM_LIT:1>, eref(self.MGs[i], '<STR_LIT>'), elem_type=KeyM)<EOL>if ar.writing and len(self.MGs[i].ss) != mixin + <NUM_LIT:1>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for j in range(mixin + <NUM_LIT:1>):<EOL><INDENT>await ar.begin_array()<EOL>mg_ss2_elements = <NUM_LIT:1> + (<NUM_LIT:1> if not is_full else inputs)<EOL>await ar.prepare_container(mg_ss2_elements, eref(self.MGs[i].ss, j), elem_type=KeyM.ELEM_TYPE)<EOL>if ar.writing and len(self.MGs[i].ss[j]) != mg_ss2_elements:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for k in range(mg_ss2_elements):<EOL><INDENT>await ar.field(eref(self.MGs[i].ss[j], k), elem_type=KeyV.ELEM_TYPE)<EOL><DEDENT>await ar.end_array()<EOL><DEDENT>await ar.tag('<STR_LIT>')<EOL>await ar.field(eref(self.MGs[i], '<STR_LIT>'), elem_type=ECKey)<EOL>await ar.end_object()<EOL><DEDENT>await ar.end_array()<EOL>if type in (RctType.Bulletproof, RctType.Bulletproof2):<EOL><INDENT>await ar.begin_array()<EOL>await ar.prepare_container(inputs, eref(self, '<STR_LIT>'), elem_type=KeyV)<EOL>if ar.writing and len(self.pseudoOuts) != inputs:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for i in range(inputs):<EOL><INDENT>await ar.field(eref(self.pseudoOuts, i), elem_type=KeyV.ELEM_TYPE)<EOL><DEDENT>await ar.end_array()<EOL><DEDENT>
Serialize rct sig
:param ar:
:type ar: x.Archive
:param type:
:param inputs:
:param outputs:
:param mixin:
:return: