<p>I found that a library called <code>Bitcoinkit</code> use stealthVersion.<br>
<strong>Network.swift</strong></p>

<pre><code>public class Mainnet: Network {
...
    override var stealthVersion: UInt8 {
        return 0x2A
    }
...
</code></pre>

<p>I tried to search 0x2A,0x2a and 42(decimal from 0x2a) but find nothing in source code.</p>

<p>Is this calculated in bitcoin source code?</p>

<p>PS:<br>
I found some Altcoin have a stealth.cpp which defined stealthversion:<br>
(Verge)</p>

<pre><code>const uint8_t stealth_version_byte = 0x28;
</code></pre>

CC BY-SA 4.0
2019-08-06T15:27:25.833Z
I suspect this is for a feature called stealth addresses, which are not supported by Bitcoin Core, so naturally you wouldn't find it in its source code.
Pieter Wuille
CC BY-SA 4.0
2019-08-06T15:29:14.413Z
I thought it too. But why it is 0x2A instead of something else?
Coel Wu
CC BY-SA 4.0
2019-08-06T15:29:40.587Z
You'll have to ask the person who picked that value.
Pieter Wuille
CC BY-SA 4.0
2019-08-06T16:17:44.957Z
Yeah. I have just noticed that. The value is same as the bitcoin's version. Mainnet is 0x2a, Testnet is 0x2b. I couldn't find these too.
Coel Wu
<source-code><stealth-address>
How can I get stealthVersion from bitcoin's source code?
Coel Wu
# How can I get stealthVersion from bitcoin's source code?

(Asked by: username_0 on 2019-08-06)

I found that a library called Bitcoinkit use stealthVersion.
Network.swift
public class Mainnet: Network {
...
    override var stealthVersion: UInt8 {
        return 0x2A
    }
...

I tried to search 0x2A,0x2a and 42(decimal from 0x2a) but find nothing in source code.
Is this calculated in bitcoin source code?
PS:
I found some Altcoin have a stealth.cpp which defined stealthversion:
(Verge)
const uint8_t stealth_version_byte = 0x28;

**Tags:** source-code, stealth-address

> **Comments:**
> **username_1**: I suspect this is for a feature called stealth addresses, which are not supported by Bitcoin Core, so naturally you wouldn't find it in its source code.  
> **username_0**: I thought it too. But why it is 0x2A instead of something else?  
> **username_1**: You'll have to ask the person who picked that value.  
> **username_0**: Yeah. I have just noticed that. The value is same as the bitcoin's version. Mainnet is 0x2a, Testnet is 0x2b. I couldn't find these too.  

---

## 0 answers

