closechannel()
内附上自己最新取得的一次 Balance Proof
settle()
将双方的钱都发回
partner_address = recoverAddressFromBalanceProof(
channel_identifier,
balance_hash,
nonce,
additional_hash,
signature
);
function recoverAddressFromBalanceProof(
uint256 channel_identifier,
bytes32 balance_hash,
uint256 nonce,
bytes32 additional_hash,
bytes signature
)
view
internal
returns (address signature_address)
{
bytes32 message_hash = keccak256(
balance_hash,
nonce,
additional_hash,
channel_identifier,
address(this),
chain_id
);
signature_address = ECVerify.ecverify(message_hash, signature);
}
getMerkleRootAndUnlockedAmount()
// 0x4F3c2e6A20c3921192499Bb5eE286B5E8dF8b0Aa