Skip to content

Commit 72e344d

Browse files
chore(utxo-core): added exports to utxo-lib for varuint
Issue: BTC-2150 TICKET: BTC-2150
1 parent 1cc2a87 commit 72e344d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/utxo-core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ export * as testutil from './testutil';
44
export * from './dustThreshold';
55
export * from './Output';
66
export * from './xOnlyPubkey';
7-
export * from './ExtractAddressPayGoAttestation';
7+
export * from './paygo/ExtractAddressPayGoAttestation';

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

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

3-
import { varuint } from 'bitcoinjs-lib/src/bufferutils';
3+
import * as utxolib from '@bitgo/utxo-lib';
44

55
// The signed address will always have the following structure:
66
// 0x18Bitcoin Signed Message:\n<varint_length><ENTROPY><ADDRESS><UUID>
@@ -32,7 +32,7 @@ export function extractAddressBufferFromPayGoAttestationProof(message: Buffer):
3232

3333
// we decode the varint of the message which is uint32
3434
// https://en.bitcoin.it/wiki/Protocol_documentation
35-
const varInt = varuint.decode(message, offset);
35+
const varInt = utxolib.varuint.varuint.decode(message, offset);
3636
assert(varInt);
3737
offset += 1;
3838

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as assert from 'assert';
22

33
import * as utxolib from '@bitgo/utxo-lib';
44

5-
import { extractAddressBufferFromPayGoAttestationProof } from '../src/ExtractAddressPayGoAttestation';
5+
import { extractAddressBufferFromPayGoAttestationProof } from '../../src/paygo/ExtractAddressPayGoAttestation';
66

77
const addressFromPubKeyBase58 = 'bitgoAddressToExtract';
88
const bufferAddressPubKeyB58 = Buffer.from(addressFromPubKeyBase58);

0 commit comments

Comments
 (0)