Skip to content

Commit

Permalink
Merge pull request #248 from yusufidimaina9989/master
Browse files Browse the repository at this point in the history
Fix bugs
  • Loading branch information
yusufidimaina9989 authored Mar 27, 2024
2 parents fda1660 + 77f7d63 commit 8f9bbc3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/bitcoin-basics/bsv.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8f9bbc3

Please sign in to comment.