

def asset_asset_swap(self, asset1_id, asset1_transfer_spec, asset2_id, asset2_transfer_spec, fees):
    '\n        Creates a transaction for swapping an asset for another asset.\n\n        :param bytes asset1_id: The ID of the first asset.\n        :param TransferParameters asset1_transfer_spec: The parameters of the first asset being transferred.\n            It is also used for paying fees and/or receiving change if any.\n        :param bytes asset2_id: The ID of the second asset.\n        :param TransferDetails asset2_transfer_spec: The parameters of the second asset being transferred.\n        :param int fees: The fees to include in the transaction.\n        :return: The resulting unsigned transaction.\n        :rtype: CTransaction\n        '
    btc_transfer_spec = TransferParameters(asset1_transfer_spec.unspent_outputs, asset1_transfer_spec.to_script, asset1_transfer_spec.change_script, 0)
    return self.transfer([(asset1_id, asset1_transfer_spec), (asset2_id, asset2_transfer_spec)], btc_transfer_spec, fees)

dataset/ETHPy150Open OpenAssets/openassets/openassets/transactions.py TransactionBuilder.asset_asset_swap/original