Post
Topic
Board Development & Technical Discussion
Re: VanitySearch (Yet another address prefix finder)
by
DarkStar_
on 02/04/2019, 22:07:35 UTC
Just curious, why P2SH? AFAIK there's no benefits of P2SH over legacy addresses if it's only 1 on 1, and you pay more fees. P2SH with Segwit would be great though  Cheesy

It is a first attempt, this is just to allow to run VanitySearch like this (for those who want a private address starting with 3).

Code:
-snip-
Pub Addr: 3PrivG5uq7hwXLyAHbYkFTnFkzx1FEWQdf
Priv (WIF): p2wpkh-p2sh:L2wAVD273GwAxGuEDHvrCqPfuWg5wWLZWy6H3hjsmhCvNVuCERAQ
Priv (HEX): 0xAA83217B3A11FCCFF8142EF0681AD774D7AB6822F574C4BB99CBF9B9DD01E7F2

For 2to2 segwit, I need to implement split private keys then generate a 2to2 address from 2 given public key, this is more complex but I will try to do it. That has no sense that VanitySearch output 2 full private keys in the same file, no ?

One question, 2to2 segwit is possible only with BECH32 format (bc1...) or it is also possible with Base58 (3...) ?



Ah, you meant a P2SH SegWit address. That makes more sense, I thought you were talking about a P2SH address without SegWit. I agree, there's really no point for supporting 2 of 2 multisig or any other multisig option because of how vanitygen works. If you want a challenge, trying to get split key verification working would be nice and probably more useful  Cheesy

2 of 2 SegWit should be possible with Base58 I believe. You can do 2 of 3 SegWit as shown in this transaction, so it makes sense that 2 of 2 is doable.