Beispiel #1
0
 def get(
     participants_to_sign: HexAddress,
     channel_identifier: ChannelID,
     participant1_address: HexAddress,
     participant1_balance: TokenAmount,
     participant2_address: HexAddress,
     participant2_balance: TokenAmount,
     v: int = 27,
     other_token_network: Optional[Contract] = None,
 ) -> List[bytes]:
     _token_network = other_token_network or token_network
     signatures = []
     for participant in participants_to_sign:
         private_key = get_private_key(participant)
         signature = sign_cooperative_settle_message(
             private_key,
             _token_network.address,
             _token_network.functions.chain_id().call(),
             channel_identifier,
             participant1_address,
             participant1_balance,
             participant2_address,
             participant2_balance,
             v,
         )
         signatures.append(signature)
     return signatures
Beispiel #2
0
 def get(
     participants_to_sign,
     channel_identifier,
     participant1_address,
     participant1_balance,
     participant2_address,
     participant2_balance,
     v=27,
     other_token_network=None,
 ):
     _token_network = other_token_network or token_network
     signatures = []
     for participant in participants_to_sign:
         private_key = get_private_key(participant)
         signature = sign_cooperative_settle_message(
             private_key,
             _token_network.address,
             int(_token_network.functions.chain_id().call()),
             channel_identifier,
             participant1_address,
             participant1_balance,
             participant2_address,
             participant2_balance,
             v,
         )
         signatures.append(signature)
     return signatures