async def serialize_rctsig_base(self, ar, inputs, outputs):
await self._msg_field(ar, idx=<NUM_LIT:0>)<EOL>if self.type == RctType.Null:<EOL><INDENT>return<EOL><DEDENT>if self.type != RctType.Full and self.type != RctType.FullBulletproof andself.type != RctType.Simple and self.type != RctType.SimpleBulletproof:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>await self._msg_field(ar, idx=<NUM_LIT:1>)<EOL>if self.type == RctType.Simple:<EOL><INDENT>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>await ar.prepare_container(inputs, eref(self, '<STR_LIT>'), 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), KeyV.ELEM_TYPE)<EOL><DEDENT>await ar.end_array()<EOL><DEDENT>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>await ar.prepare_container(outputs, eref(self, '<STR_LIT>'), EcdhTuple)<EOL>if ar.writing and len(self.ecdhInfo) != outputs:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for i in range(outputs):<EOL><INDENT>if self.type == RctType.Bulletproof2:<EOL><INDENT>am8 = [self.ecdhInfo[i].amount[<NUM_LIT:0>:<NUM_LIT:8>] if ar.writing else bytearray(<NUM_LIT:0>)]<EOL>await ar.field(eref(am8, <NUM_LIT:0>), Hash8)<EOL>if not ar.writing:<EOL><INDENT>x.set_elem(eref(self.ecdhInfo[i], '<STR_LIT>'), am8[<NUM_LIT:0>] + bytearray(<NUM_LIT>))<EOL>x.set_elem(eref(self.ecdhInfo[i], '<STR_LIT>'), bytearray(<NUM_LIT:32>))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>await ar.field(eref(self.ecdhInfo, i), EcdhInfo.ELEM_TYPE)<EOL><DEDENT><DEDENT>await ar.end_array()<EOL>await ar.tag('<STR_LIT>')<EOL>await ar.begin_array()<EOL>await ar.prepare_container((outputs), eref(self, '<STR_LIT>'), CtKey)<EOL>if ar.writing and len(self.outPk) != outputs:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for i in range(outputs):<EOL><INDENT>await ar.field(eref(self.outPk[i], '<STR_LIT>'), ECKey)<EOL><DEDENT>await ar.end_array()<EOL>
Custom serialization
:param ar:
:type ar: x.Archive
:return: