channelOpenProofMessage function

String channelOpenProofMessage({
  1. required String chain,
  2. required String txHash,
  3. required String payer,
  4. required num amountUsd,
})

The exact text the paying wallet signs.

Implementation

String channelOpenProofMessage({
  required String chain,
  required String txHash,
  required String payer,
  required num amountUsd,
}) {
  return [
    '$payerProofDomain/v$payerProofVersion',
    'purpose:$payerProofChannelOpen',
    'chain:${canonicalProofChain(chain)}',
    'tx:${canonicalProofTxHash(txHash)}',
    'payer:${canonicalProofPayer(payer)}',
    'amount_cents:${canonicalProofAmountCents(amountUsd)}',
  ].join('\n');
}