Uniform way to get all incoming transfers (i.e. including recurrent transfers) from account history
Ideally made in a transparent way, so for example an exchange can get list of all transfers as they currently do.
As one of proposed solutions I see operation aliasing mechanism which should just replace original operation with some another entry during storing a history for account.
So we could consider adding a feature to define an account_history_operation_alias
:
account_history_operation_alias={"alias": "asset_transfer", "transform": { "source_operation": "transfer_operation", "accepted_fields": [{"source": "from", "target": "sender"}, {"source": "to", "target": "receiver"}, {"source": "amount" }, {"source": "memo", "target": "description"}]} }
account_history_operation_alias={"alias": "asset_transfer", "transform": { "source_operation": "recurrent_transfer_operation", "accepted_fields": [{"source": "from", "target": "sender"}, {"source": "to", "target": "receiver"}, {"source": "amount" }, {"source": "memo", "target": "description"}]} }
account_history_operation_alias={"alias": "asset_transfer", "transform": { "source_operation": "fill_recurrent_transfer_operation", "accepted_fields": [{"source": "from", "target": "sender"}, {"source": "to", "target": "receiver"}, {"source": "amount" }, {"source": "memo", "target": "description"}]} }
Conversion strips all other fields of source object. Also there is possible short form specific to field transformation:
{"source": "amount" }
where "target" field name is implied from the source one.
Edited by Bartek Wrona