@@ -19,6 +19,7 @@ import {
1919 * @param psbt - PSBT that we need to encode our paygo address into
2020 * @param outputIndex - the index of the address in our output
2121 * @param sig - the signature that we want to encode
22+ * @param entropy - the arbitrary entropy bytes from our vasp proof
2223 */
2324export function addPayGoAddressProof (
2425 psbt : utxolib . bitgo . UtxoPsbt ,
@@ -40,7 +41,7 @@ export function addPayGoAddressProof(
4041 *
4142 * @param psbt - PSBT we want to verify that the paygo address is in
4243 * @param outputIndex - we have the output index that address is in
43- * @param uuid
44+ * @param verificationPubkey - the pubkey signed by the HSM to verify our message
4445 * @returns
4546 */
4647export function verifyPayGoAddressProof (
@@ -76,7 +77,8 @@ export function verifyPayGoAddressProof(
7677 // We construct our message <ENTROPY><ADDRESS><UUID>
7778 const message = createPayGoAttestationBuffer ( addressFromOutput , entropy , psbt . network ) ;
7879
79- if ( ! verifyMessage ( message . toString ( ) , verificationPubkey , signature , utxolib . networks . bitcoin ) ) {
80+ // bip32utils.verifyMessage now takes in message as a Buffer
81+ if ( ! verifyMessage ( message , verificationPubkey , signature , utxolib . networks . bitcoin ) ) {
8082 throw new ErrorPayGoAddressProofFailedVerification ( ) ;
8183 }
8284}
0 commit comments