@@ -8,14 +8,14 @@ import { checkForOutput } from 'bip174/src/lib/utils';
8
8
9
9
import {
10
10
addPayGoAddressProof ,
11
- createPayGoAttestationBuffer ,
12
11
getPayGoAddressProofOutputIndex ,
13
12
psbtOutputIncludesPaygoAddressProof ,
14
13
verifyPayGoAddressProof ,
15
- } from '../../../src/paygo/psbt/PayGoUtils ' ;
14
+ } from '../../../src/paygo/psbt/payGoAddressProof ' ;
16
15
import { generatePayGoAttestationProof } from '../../../src/testutil/generatePayGoAttestationProof.utils' ;
17
16
import { parseVaspProof } from '../../../src/testutil/parseVaspProof' ;
18
17
import { signMessage } from '../../../src/bip32utils' ;
18
+ import { createPayGoAttestationBuffer , NILL_UUID } from '../../../src/paygo/attestation' ;
19
19
20
20
// To construct our PSBTs
21
21
const network = utxolib . networks . bitcoin ;
@@ -37,9 +37,6 @@ const dummyPub1 = rootWalletKeys.deriveForChainAndIndex(50, 200);
37
37
const attestationPubKey = dummyPub1 . user . publicKey ;
38
38
const attestationPrvKey = dummyPub1 . user . privateKey ! ;
39
39
40
- // UUID structure
41
- const nillUUID = '00000000-0000-0000-0000-000000000000' ;
42
-
43
40
// our xpub converted to base58 address
44
41
const addressToVerify = utxolib . address . toBase58Check (
45
42
utxolib . crypto . hash160 ( Buffer . from ( dummyPub1 . backup . publicKey ) ) ,
@@ -48,7 +45,7 @@ const addressToVerify = utxolib.address.toBase58Check(
48
45
) ;
49
46
50
47
// this should be retuning a Buffer
51
- const addressProofBuffer = generatePayGoAttestationProof ( nillUUID , Buffer . from ( addressToVerify ) ) ;
48
+ const addressProofBuffer = generatePayGoAttestationProof ( NILL_UUID , Buffer . from ( addressToVerify ) ) ;
52
49
const addressProofMsgBuffer = parseVaspProof ( addressProofBuffer ) ;
53
50
// We know that that the entropy is a set 64 bytes.
54
51
const addressProofEntropy = addressProofMsgBuffer . subarray ( 0 , 65 ) ;
0 commit comments