Skip to content

Commit f551baf

Browse files
chore(utxo-core): renamed functions + files
TICKET: BTC-2226
1 parent b9d2a45 commit f551baf

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './ExtractAddressPayGoAttestation';
1+
export * from './parsePayGoAttestation';
22
export * from './psbt';

modules/utxo-core/src/paygo/ExtractAddressPayGoAttestation.ts renamed to modules/utxo-core/src/paygo/parsePayGoAttestation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const EntropyLen = 64;
2121
* @param message
2222
* @param adressProofLength
2323
*/
24-
export function extractMsgBufferFromPayGoAttestationProof(message: Buffer): {
24+
export function parsePayGoAttestation(message: Buffer): {
2525
entropy: Buffer;
2626
address: Buffer;
2727
uuid: Buffer;

modules/utxo-core/test/paygo/ExtractAddressPayGoAttestation.ts renamed to modules/utxo-core/test/paygo/parsePayGoAttestation.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as assert from 'assert';
22

3-
import { extractMsgBufferFromPayGoAttestationProof } from '../../src/paygo';
3+
import { parsePayGoAttestation } from '../../src/paygo';
44
import { generatePayGoAttestationProof } from '../../src/testutil';
55

66
const addressFromPubKeyBase58 = 'bitgoAddressToExtract';
@@ -12,7 +12,7 @@ describe('extractAddressBufferFromPayGoAttestationProof', () => {
1212
'00000000-0000-0000-0000-000000000000',
1313
bufferAddressPubKeyB58
1414
);
15-
const { entropy, address, uuid } = extractMsgBufferFromPayGoAttestationProof(paygoAttestationProof);
15+
const { entropy, address, uuid } = parsePayGoAttestation(paygoAttestationProof);
1616
assert.deepStrictEqual(Buffer.compare(address, bufferAddressPubKeyB58), 0);
1717
assert.deepStrictEqual(uuid.toString(), '00000000-0000-0000-0000-000000000000');
1818
assert.deepStrictEqual(entropy.length, 64);
@@ -23,7 +23,7 @@ describe('extractAddressBufferFromPayGoAttestationProof', () => {
2323
'12345678-1234-4567-6890-231928472123',
2424
bufferAddressPubKeyB58
2525
);
26-
const { entropy, address, uuid } = extractMsgBufferFromPayGoAttestationProof(paygoAttestationProof);
26+
const { entropy, address, uuid } = parsePayGoAttestation(paygoAttestationProof);
2727
assert.deepStrictEqual(Buffer.compare(address, bufferAddressPubKeyB58), 0);
2828
assert.deepStrictEqual(uuid.toString(), '12345678-1234-4567-6890-231928472123');
2929
assert.deepStrictEqual(entropy.length, 64);
@@ -34,13 +34,13 @@ describe('extractAddressBufferFromPayGoAttestationProof', () => {
3434
'000000000000000-000000-0000000-000000-0000000000000000',
3535
bufferAddressPubKeyB58
3636
);
37-
const { address } = extractMsgBufferFromPayGoAttestationProof(paygoAttestationProof);
37+
const { address } = parsePayGoAttestation(paygoAttestationProof);
3838
assert.notDeepStrictEqual(Buffer.compare(address, bufferAddressPubKeyB58), 0);
3939
});
4040

4141
it('should throw an error if the paygo attestation proof is too short', () => {
4242
assert.throws(
43-
() => extractMsgBufferFromPayGoAttestationProof(Buffer.from('shortproof-shrug')),
43+
() => parsePayGoAttestation(Buffer.from('shortproof-shrug')),
4444
'PayGo attestation proof is too short to contain a valid address.'
4545
);
4646
});

0 commit comments

Comments
 (0)