# What is a BSV Address and a WIF?

&#x20;

<figure><img src="/files/dLJ973TpKYqLXlFes20b" alt=""><figcaption></figcaption></figure>

## What is a BSV Address and a WIF?

#### What is a BSV Address?

A **BSV address** is simply a **human-readable identifier** that represents where satoshis can be sent.

Technically, it is built as follows:

1. Start with the **public key** from an ECDSA key pair.
2. Take the **compressed x-coordinate** of that public key.
3. Apply **SHA-256**, then **RIPEMD-160** → this gives the **Public-Key-Hash**.
4. Add a **version byte**.
5. Encode using **Base58Check** to make it shorter, readable, and error-checked.

👉 In **Pay-to-Public-Key-Hash (P2PKH)** transactions, the BSV address is the **message digest** (the “Public-Key-Hash”) to which satoshis are locked.

***

#### What is a WIF?

A **WIF (Wallet Import Format) key** is a way to **encode private keys** for easy transfer between wallets.

* Like addresses, WIFs also use **Base58Check encoding**.
* Instead of a public key hash, a WIF encodes the **private key’s serialised value (d)**.
* Unlike addresses, WIFs do **not use HASH-160**.

👉 **Key takeaway:**

* **Addresses** = Public side (where funds are received).
* **WIFs** = Private side (used to import/export keys securely).

***

#### Example: Generating a Key Pair in GoLang

Using the **libsv libraries**, you can generate a Bitcoin ECDSA public-private key pair:

```
package main 

import ( 
    "fmt" 
    "github.com/libsv/go-bk/bec" 
    "github.com/libsv/go-bt/v2/bscript" 
) 

func main() { 
    privKey, _ := bec.NewPrivateKey(bec.S256()) 
    pubKey := privKey.PubKey() 
    fmt.Println("Private Key:", privKey) 
    fmt.Println("Public Key:", pubKey) 
}
```

&#x20;

✅ **Summary:**

* A **BSV address** = **HASH-160 of the public key**, formatted with Base58Check, used in transactions.
* A **WIF** = Base58Check encoding of the **private key**, making wallets portable and user-friendly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-primitives-hash-functions/ripemd-160-overview/what-is-a-bsv-address-and-a-wif.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
