MCPcopy Create free account
hub / github.com/raiden-network/raiden / flatten_transfer

Function flatten_transfer

raiden/api/python.py:129–140  ·  view source on GitHub ↗
(transfer: LockedTransferType, role: TransferRole)

Source from the content-addressed store, hash-verified

127
128
129def flatten_transfer(transfer: LockedTransferType, role: TransferRole) -> Dict[str, Any]:
130 return {
131 "payment_identifier": str(transfer.payment_identifier),
132 "token_address": to_checksum_address(transfer.token),
133 "token_network_address": to_checksum_address(transfer.balance_proof.token_network_address),
134 "channel_identifier": str(transfer.balance_proof.channel_identifier),
135 "initiator": to_checksum_address(transfer.initiator),
136 "target": to_checksum_address(transfer.target),
137 "transferred_amount": str(transfer.balance_proof.transferred_amount),
138 "locked_amount": str(transfer.balance_proof.locked_amount),
139 "role": role.value,
140 }
141
142
143def get_transfer_from_task(

Callers 1

transfer_tasks_viewFunction · 0.85

Calls 1

to_checksum_addressFunction · 0.90

Tested by

no test coverage detected