@@ -323,11 +323,11 @@ class Musig2TestsCommon {
323323
324324 // the redeem script is just the refund script. it is generated from this policy: and_v(v:pk(user),older(refundDelay))
325325 // it does not depend upon the user's or server's key, just the user's refund key and the refund delay
326- val redeemScript = listOf (OP_PUSHDATA (userRefundPrivateKey.publicKey().xOnly ()), OP_CHECKSIGVERIFY , OP_PUSHDATA (Script .encodeNumber(refundDelay)), OP_CHECKSEQUENCEVERIFY )
326+ val redeemScript = listOf (OP_PUSHDATA (userRefundPrivateKey.xOnlyPublicKey ()), OP_CHECKSIGVERIFY , OP_PUSHDATA (Script .encodeNumber(refundDelay)), OP_CHECKSEQUENCEVERIFY )
327327 val scriptTree = ScriptTree .Leaf (0 , redeemScript)
328328
329329 // the internal pubkey is the musig2 aggregation of the user's and server's public keys: it does not depend upon the user's refund's key
330- val aggregatedKey = Musig2 .keyAgg(listOf (userPrivateKey.publicKey(), serverPrivateKey.publicKey() )).xOnly()
330+ val aggregatedKey = Musig2 .keyAgg(listOf (userPublicKey, serverPublicKey )).xOnly()
331331 val pubkeyScript = Script .pay2tr(aggregatedKey, scriptTree)
332332
333333 val swapInTx = Transaction (
@@ -366,7 +366,7 @@ class Musig2TestsCommon {
366366 val tx = Transaction (
367367 version = 2 ,
368368 txIn = listOf (TxIn (OutPoint (swapInTx, 0 ), sequence = refundDelay.toLong())),
369- txOut = listOf (TxOut (Satoshi (10000 ), Script .pay2wpkh(userPrivateKey.publicKey() ))),
369+ txOut = listOf (TxOut (Satoshi (10000 ), Script .pay2wpkh(userPublicKey ))),
370370 lockTime = 0
371371 )
372372 val sig = Crypto .signTaprootScriptPath(userRefundPrivateKey, tx, 0 , swapInTx.txOut, SigHash .SIGHASH_DEFAULT , scriptTree.hash())
0 commit comments