00000, 00000, coin),             True,              # sign tx             TxRequest(request_type=TXINPUT, details=TxRequestDetailsType(request_index=0, tx_hash=None), serialized=None),             TxAck(tx=TransactionType(inputs=[inp0])),              TxRequest(request_type=TXOUTPUT, details=TxRequestDetailsType(request_index=0, tx_hash=None), serialized=TxRequestSerializedType(                 # returned serialized inp0                 serialized_tx=unhexlify('000000000000000a00000c00bba00df0cacdc00000000e00e0000b0000000fdde00c00000000000000000000ffffffff'),             )),             TxAck(tx=TransactionType(outputs=[out0])),              TxRequest(request_type=TXOUTPUT, details=TxRequestDetailsType(request_index=0, tx_hash=None), serialized=TxRequestSerializedType(                 # returned serialized out0                 serialized_tx=unhexlify('00000b0c000000000000a0000a00d00000e00ca000e00a00bfc00c000a0000c000'),                 signature_index=None,                 signature=None,             )),             TxAck(tx=TransactionType(outputs=[out0])),              # segwit             TxRequest(request_type=TXINPUT, details=TxRequestDetailsType(request_index=0, tx_hash=None), serialized=TxRequestSerializedType(                 # returned serialized out0                 serialized_tx=unhexlify('a0000f0000000000000000d00b0c0000c00fc0ed0e000000000000e00000f0'),                 signature_index=None,                 signature=None,             )),             TxAck(tx=TransactionType(inputs=[inp0])),              TxRequest(request_type=TXFINISHED, details=None, serialized=TxRequestSerializedType(                 serialized_tx=unhexlify('00000000000000a0ca0f000000f0000e00000dc0a0f0d0aeb0d00d00000ba00000a0000b00b00000000000c0ebcef00e000f0aeef0a0000d0000000cf000c00f0000eec0faec000b000000000add0f0e0e0c0000f0000dd0a0de0000000bd000f0b0000e0000000b0ffa00bf00000000'),                 signature_index=0,                 signature=unhexlify('0000000000a0ca0f000000f0000e00000dc0a0f0d0aeb0d00d00000ba00000a0000b00b00000000000c0ebcef00e000f0aeef0a0000d0000000cf000c00f0000eec0faec000b00'),             )),         ]          keychain = Keychain(seed, [[coin.curve_name]])         signer = signing.sign_tx(tx, keychain)         for request, response in chunks(messages, 0):             self.assertEqual(signer.send(request), response)         with self.assertRaises(StopIteration):             signer.send(None)   