samr7 / vanitygen

GNU Affero General Public License v3.0
1.23k stars 632 forks source link

SegWit compliant? #100

Open mautematico opened 7 years ago

mautematico commented 7 years ago

Are addresses generated by vanitygen compatible with SegWit?

reppolice commented 7 years ago

Apparently much new code will be needed for SegWit, addresses for now begin with 3 and will begin with bc https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#Examples

markasoftware commented 6 years ago

Vanitygen cannot currently generate SegWit (or anything but P2PKH) addresses. To support P2SH-wrapped SegWit addresses, which are what most people want when they say "SegWit" address, vanitygen will need to be changed from simply generating an ECDSA keypair to being able to generate a small Bitcoin Script which involves the random keypair, which is a significant, but not massive, change.

jaonoctus commented 6 years ago

@mautematico run ./vanitygen -F script -i 3[YOUR-PATTERN]

$ ./vanitygen -F script -i 3eg

Difficulty: 676
Pattern: 3eg                                                                   
P2SHAddress: 3EgkNY8517wuHuEf7GKfj2tFaBZJDaqTUx
Address: 15T3zQvPup9qRSvzCJx6oSubzCPuKUN4bY
Privkey: 5KeeNxS365Lejte1UticG4C9zPjTq48ShV58ws5mzodk2Ahv7mj
reppolice commented 6 years ago

I've been asking around what to do with this output @jaonoctus , cant get any answers. Straight importing this privkey in Electrum gives me the 1xx address. Are these 3xx addresses known to work, and how?

AngelTs commented 6 years ago

oclVanitygen doesn't have "script"

tosscoin commented 6 years ago

@reppolice here is a way to access the generated P2SH address

tosscoin commented 6 years ago

https://bitcointalk.org/index.php?topic=25804.msg35345519#msg35345519