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


  _createAgreementTxT1: (serverPubkeyK2) ->
    console.info "building 2of 2"
    multiSigTxBuilder = CoinUtils.build2of2MultiSigTx @pubkeyK1, serverPubkeyK2, @maxPayment
    console.info "built 2of 2"
    # TODO: What about all the input transactions? What are they signed with?
    multiSigTx = multiSigTxBuilder.sign([@privkeyK1])


  channelId: undefined
  timeLock: undefined
  pubkeyHashK1: undefined
  privkeyK1: undefined
  serverPubkeyK2: undefined
  maxPaymentSatoshi: undefined
  agreementTxT1: undefined
  agreementTxT1Unbuilt: undefined
  agreementTxT1ScriptPubkey: undefined
  refundTxT2: undefined
  paymentTotalTx3: 0

  constructor: (@pubkeyHashK1, @privkeyK1, @maxPaymentSatoshi) ->

  createAndCommit: (callback) ->

