Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
GregProuty authored and GregProuty committed Nov 22, 2024
1 parent f8bc893 commit 8c78acd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/services/btcKdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ export async function uncompressedHexPointToSegwitAddress(
const ripemd160 = hash.ripemd160().update(Buffer.from(sha256HashOutput)).digest();

const witnessVersion = 0x00; // for P2PWPKH
// @ts-ignore
const words = bech32.toWords(Buffer.from(ripemd160));
words.unshift(witnessVersion);
// @ts-ignore
const address = bech32.encode(networkPrefix, words);

return address;
Expand Down Expand Up @@ -89,7 +87,6 @@ export async function uncompressedHexPointToBtcAddress(
const ripemd160 = hash.ripemd160().update(Buffer.from(sha256HashOutput)).digest();

// Step 3: Adding network byte (0x00 for Bitcoin Mainnet, 0x6f for Testnet)
// @ts-ignore
const networkByteAndRipemd160 = Buffer.concat([networkByte, Buffer.from(ripemd160)]);

// Step 4: Base58Check encoding
Expand Down

0 comments on commit 8c78acd

Please sign in to comment.