 
 
   _createRefundTxT2: (timeToLock) ->
-    return CoinUtils.buildRollingRefundTxFromMultiSigOutput @agreementTxT1, @agreementTxT1Unbuilt.valueOutSat, @pubkeyK1, 0, undefined, 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, @pubkeyK1, amount, serverPubKey, 0
+    return CoinUtils.buildRollingRefundTxFromMultiSigOutput @agreementTxT1, @agreementTxT1Unbuilt.valueOutSat, @pubkeyHashK1, amount, serverPubKey, 0
 


  channelId: undefined
  timeLock: undefined
  pubkeyK1: undefined
  privkeyK1: undefined
  serverPubkeyK2: undefined
  maxPayment: undefined
  agreementTxT1: undefined
  agreementTxT1Unbuilt: undefined
  agreementTxT1ScriptPubkey: undefined
  refundTxT2: undefined
  paymentTotalTx3: 0

  constructor: (@pubkeyK1, @privkeyK1, @maxPayment) ->

  createAndCommit: (callback) ->



        params =
          "channel.id": @channelId # The id returned from "channel.open"
          pubkey: @pubkeyHashK1 # 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)

