 
   channelId: undefined
   timeLock: undefined
-  pubkeyK1: undefined
+  pubkeyHashK1: undefined
   privkeyK1: undefined
   serverPubkeyK2: undefined
-  maxPayment: undefined
+  maxPaymentSatoshi: undefined
   agreementTxT1: undefined
   agreementTxT1Unbuilt: undefined
   agreementTxT1ScriptPubkey: undefined
   refundTxT2: undefined
   paymentTotalTx3: 0
 
-  constructor: (@pubkeyK1, @privkeyK1, @maxPayment) ->
+  constructor: (@pubkeyHashK1, @privkeyK1, @maxPaymentSatoshi) ->
 
   createAndCommit: (callback) ->
 


        params =
          "channel.id": @channelId # The id returned from "channel.open"
          pubkey: @pubkeyK1 # pubkey of client
          tx: @refundTxT2.serialize().toString('hex') # the refund transaction, hex encoded (unsigned)
          txInIdx: refundTxInfo.t1InIdx # the input id of the T1 transaction (that the server doesn't yet know about)




  _createRefundTxT2: (timeToLock) ->
    return CoinUtils.buildRollingRefundTxFromMultiSigOutput @agreementTxT1, @agreementTxT1Unbuilt.valueOutSat, @pubkeyHashK1, 0, undefined, timeToLock

  _verifyServerSignedT2: (signature) ->
    return CoinUtils.verifyTxSig @refundTxT2, signature

  _createPayTxT3: (amount, serverPubKey) ->
    return CoinUtils.buildRollingRefundTxFromMultiSigOutput @agreementTxT1, @agreementTxT1Unbuilt.valueOutSat, @pubkeyHashK1, amount, serverPubKey, 0

