From 77f7d637a4f8f380320bd2d430b2761cc8ea0d8b Mon Sep 17 00:00:00 2001 From: Yusuf Idi Maina <120538505+yusufidimaina9989@users.noreply.github.com> Date: Mon, 25 Mar 2024 08:40:15 +0100 Subject: [PATCH] Update bsv.md --- docs/bitcoin-basics/bsv.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/bitcoin-basics/bsv.md b/docs/bitcoin-basics/bsv.md index c2b54d371..4be447d05 100644 --- a/docs/bitcoin-basics/bsv.md +++ b/docs/bitcoin-basics/bsv.md @@ -76,12 +76,12 @@ You can get a Bitcoin address from either the private key or the public key: ```ts const privKey = bsv.PrivateKey.fromRandom(bsv.Networks.testnet) -const pubKey = privKey.toPublicKey() + const pubKey = privKey.toPublicKey() -console.log(privKey.toAddress()) -// mxRjX2uxHHmS4rdSYcmCcp2G91eseb5PpF -console.log(pubKey.toAddress()) -// mxRjX2uxHHmS4rdSYcmCcp2G91eseb5PpF + console.log(privKey.toAddress().toString()) + // mxRjX2uxHHmS4rdSYcmCcp2G91eseb5PpF + console.log(pubKey.toAddress().toString()) + // mxRjX2uxHHmS4rdSYcmCcp2G91eseb5PpF ``` Read [this wiki page](https://wiki.bitcoinsv.io/index.php/Bitcoin_address) for more information on how Bitcoin addresses get constructed.