10gic / vanitygen-plusplus

A vanity address generator for BTC, ETH, LTC, TRX and 100+ more crypto currencies.
GNU Affero General Public License v3.0
254 stars 90 forks source link

vanitygen for MOONcoin #13

Open bobkasho opened 3 years ago

bobkasho commented 3 years ago

I would like to use the program for the mooncoin [MOON]. Thank you

sources: site: https://mooncoin.eco/ wallet: 0.17.1.0 https://github.com/mooncoincore/wallet/releases

prefix: "M" and "2"

10gic commented 3 years ago

You can just add its configuration into file base58prefix.txt. Format is:

Symbol, Coin name, Address prefix, Address base58 version (prefix), Private key base58 version (prefix)

You need to know the ‘address base58 version’ and ‘private key base58 version’.

bobkasho commented 3 years ago

tnks!

10gic commented 3 years ago

@bobkasho Have you found ‘address base58 version’ and ‘private key base58 version’ for Mooncoin? It should be 3 and 131 respectively, refer: https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L122

bobkasho commented 3 years ago

@bobkasho Have you found ‘address base58 version’ and ‘private key base58 version’ for Mooncoin? It should be 3 and 131 respectively, refer: https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L122

unfortunately I don't quite understand this question :(

10gic commented 3 years ago

@bobkasho I have commit the code, help me to verify it. Here is an example:

$ ./vanitygen++ -C MOON 2abcd
Generating MOON Address
Difficulty: 4553521
MOON Pattern: 2abcd
MOON Address: 2abcdz7jEQUXNxFhqoqNX4duPw8LUkR2G8
MOON Privkey: 5RVcaVev4ZvyksMmqnJLz9NSD8LytPiCsQmGoVFqSX6GaAW7pmC
bobkasho commented 3 years ago

2abcdz7jEQUXNxFhqoqNX4duPw8LUkR2G8

https://chainz.cryptoid.info/moon/address.dws?2abcdz7jEQUXNxFhqoqNX4duPw8LUkR2G8.htm

bobkasho commented 3 years ago

The coin also has a prefix "M" - it is more modern. "2" is already deprecated

10gic commented 3 years ago

I am not very familiar with Mooncoin.

$ ./vanitygen++ -C MOON -F script -X 50 -Y 131 MMMM
Generating MOON Address
Difficulty: 78508
MOON Pattern: MMMM                                                             
P2SHMOON  Address: MMMM7ER6NgC5Puv7W5gjhizDUJvEiWuAuU
MOON Address: MLE5FsAi6cpUDxq8URz12WPvCzNAXxp5j2
MOON Privkey: 5Pv7zZZisUyCrAEW87c42iebZvQmeunqQ1ZsShJS3vEBEFAVAR9

The value -X 50 -Y 131 comes from https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L124

You can customize prefix MMMM, please don't send too much coin to the generated address before you verified. All coins may be lost forever. Use as your own risk.

bobkasho commented 3 years ago

I am not very familiar with Mooncoin.

$ ./vanitygen++ -C MOON -F script -X 50 -Y 131 MMMM
Generating MOON Address
Difficulty: 78508
MOON Pattern: MMMM                                                             
P2SHMOON  Address: MMMM7ER6NgC5Puv7W5gjhizDUJvEiWuAuU
MOON Address: MLE5FsAi6cpUDxq8URz12WPvCzNAXxp5j2
MOON Privkey: 5Pv7zZZisUyCrAEW87c42iebZvQmeunqQ1ZsShJS3vEBEFAVAR9

The value -X 50 -Y 131 comes from https://github.com/mooncoincore/wallet/blob/master/src/chainparams.cpp#L124

You can customize prefix MMMM, please don't send too much coin to the generated address before you verified. All coins may be lost forever. Use as your own risk.

but what is correct for Windows? that's how it works for me :

"C:\vangen152>vanitygen.exe -C MOON -F script -X 50 -Y 131 Moon Prefix 'Moon' not possible Hint: Run vanitygen with "-C LIST" for a list of valid prefixes. Also note that many coin s only allow certain characters as the second character in the prefix.

C:\vangen152>"

10gic commented 3 years ago

@bobkasho Have you see any Mooncoin address starts with 'Moon' ? May be it's impossible, you can try another prefix:

$ ./vanitygen++ -C MOON -F script -X 50 -Y 131 MMoon
Generating MOON Address
Difficulty: 4553521
MOON Pattern: MMoon
P2SHMOON  Address: MMoonoitKan6uXCGf9ug9KXYTCN9Ghttdd
MOON Address: MFpbov7KAYQYnRbwMCVFqJSh9WC5FMDTZ9
MOON Privkey: 5QAuMvoFW3ZgB4gPkxB15d3CdshDRZwzTwSy4XK6eqTxsz3vamh
bobkasho commented 3 years ago

@10gic C:\vangen152>vanitygen.exe -C MOON -F script -X 50 -Y 131 Mmoon Prefix 'Mmoon' not possible Hint: Run vanitygen with "-C LIST" for a list of valid prefixes. Also note that many coin s only allow certain characters as the second character in the prefix.

C:\vangen152>vanitygen.exe -C MOON -F script -X 50 -Y 131 Mmnm Prefix 'Mmnm' not possible Hint: Run vanitygen with "-C LIST" for a list of valid prefixes. Also note that many coin s only allow certain characters as the second character in the prefix.

C:\vangen152>

10gic commented 3 years ago

@bobkasho There is no vanitygen.exe in this project, only vanitygen++.exe. How did you get this program?

bobkasho commented 3 years ago

@10gic please link

10gic commented 3 years ago

I don't use Windows. You can build it by yourself, or download a prebuilt https://github.com/10gic/vanitygen-plusplus/releases/download/v0.1.0/prebuilt.win32.v0.1.0.zip

As file base58prefix.txt is not shipped in package, you can't use -C MOON, it don't matter, just ignore it: vanitygen++.exe -F script -X 50 -Y 131 Mmoon

bobkasho commented 3 years ago

@10gic COOL! "C:\vangen>vanitygen++.exe -F script -X 50 -Y 131 MM Difficulty: 23 Pattern: MM P2SH Address: MMZ1S3jhWtVpJfqK411L9FvMbaHquG7a7R Address: M9H6iPY2gijF8HrZfQpuSpSyX56fHyFKbh Privkey: 5QeyCBXyex46mNyQkaC98ZwUBviid4yo5uC8zYx3DgukaUmspe1"

dont cool :( "C:\vangen>oclvanitygen++.exe -F script -X 50 -131 MMMMM Invalid format 'script'"

bobkasho commented 3 years ago

@10gic and why the second character of the prefix must necessarily be "M" - addresses come with one "M" at the beginning. example: MTGTA72cSCwUJNu1TuQzkGBvoqpft2HLSV

10gic commented 3 years ago

@bobkasho The second character doesn't required be "M", it's just an example. You can use another prefix:

./vanitygen++ -F script -X 50 -Y 131 MTG
Difficulty: 1353
Pattern: MTG
P2SH Address: MTGWPq2EVdNojrVFmXRuJ5koo3MNBmCr3A
Address: MNS1VbY2dXPwqVA6ysChDbaJpY2pqfC5ML
Privkey: 5QUqAKNqTbVe8PAsGrUEhQHa7TefbXMYF8SFs5xauZQTbNvbca6

Again, I am not familiar with Mooncoin, use as your own risk. You need verify the generated private key.

10gic commented 3 years ago

@10gic COOL! "C:\vangen>vanitygen++.exe -F script -X 50 -Y 131 MM Difficulty: 23 Pattern: MM P2SH Address: MMZ1S3jhWtVpJfqK411L9FvMbaHquG7a7R Address: M9H6iPY2gijF8HrZfQpuSpSyX56fHyFKbh Privkey: 5QeyCBXyex46mNyQkaC98ZwUBviid4yo5uC8zYx3DgukaUmspe1"

dont cool :( "C:\vangen>oclvanitygen++.exe -F script -X 50 -131 MMMMM Invalid format 'script'"

Currently, -F script is not implemented for oclvanitygen++.exe.

Many people report that oclvanitygen++.exe doesn't work in Windows. Could you help me check if oclvanitygen++.exe works for legacy mooncoin address? Just run:

oclvanitygen++.exe -X 3 -Y 131  2abcd

See what happens?

bobkasho commented 3 years ago

@10gic C:\vangen>oclvanitygen++.exe -X 3 -Y 131 -p 0 -d 0 2bobKash Difficulty: 888446610538 Error loading kernel file 'calc_addrs.cl': No such file or directory Could not open any device Available OpenCL platforms: 0: [NVIDIA Corporation] NVIDIA CUDA 0: [NVIDIA Corporation] GeForce GTX 1060 6GB, endian little: true 1: [Intel(R) Corporation] Intel(R) OpenCL 0: [Intel(R) Corporation] Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz, endian little: true 1: [Intel(R) Corporation] Intel(R) HD Graphics 4600, endian little: true 2: [Advanced Micro Devices, Inc.] AMD Accelerated Parallel Processing clGetDeviceIDs(0): CL_DEVICE_NOT_FOUND

10gic commented 3 years ago

@10gic C:\vangen>oclvanitygen++.exe -X 3 -Y 131 -p 0 -d 0 2bobKash Difficulty: 888446610538 Error loading kernel file 'calc_addrs.cl': No such file or directory Could not open any device Available OpenCL platforms: 0: [NVIDIA Corporation] NVIDIA CUDA 0: [NVIDIA Corporation] GeForce GTX 1060 6GB, endian little: true 1: [Intel(R) Corporation] Intel(R) OpenCL 0: [Intel(R) Corporation] Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz, endian little: true 1: [Intel(R) Corporation] Intel(R) HD Graphics 4600, endian little: true 2: [Advanced Micro Devices, Inc.] AMD Accelerated Parallel Processing clGetDeviceIDs(0): CL_DEVICE_NOT_FOUND

It seems calc_addrs.cl is missing. Could you download file https://raw.githubusercontent.com/10gic/vanitygen-plusplus/master/calc_addrs.cl into the same directory of oclvanitygen++.exe, and run it again?

bobkasho commented 3 years ago

10042021-21 @10gic crash )) 10042021-2

10gic commented 3 years ago

Thanks for share the result.

This is not good news. Currently, I don't have a windows device, and I don't have time to fix this problem. Suggest you use vanitygen++.exe in Windows, or try oclvanitygen++ in CentOS.

The fix of this issue is welcome.

bobkasho commented 3 years ago

@10gic The address is not displayed in the wallet :( after import 10042021-22

10gic commented 3 years ago

There are two common types of P2SH address: MULTISIG and segwit address.

The -F script would generate P2SH (MULTISIG, but in case 1-of-1 ), refer: https://github.com/10gic/vanitygen-plusplus/blob/b48cca34041bc741124cf4183a521122e5f65238/vanitygen.c#L114

Very likely, the "M" address in Mooncoin is the segwit address. If so, you would not get the matched address after import private key.

I will check it later.

10gic commented 3 years ago

@bobkasho Could you help me confirm that the following information matches?

Private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs
Address: MRkY26CMfAbLGB1niZRfML3XX1Ca5ZoWBo
bobkasho commented 3 years ago

@bobkasho Could you help me confirm that the following information matches?

Private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs
Address: MRkY26CMfAbLGB1niZRfML3XX1Ca5ZoWBo

OK! I started importing. it will take up to one hour

bobkasho commented 3 years ago

@bobkasho Could you help me confirm that the following information matches?

Private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs
Address: MRkY26CMfAbLGB1niZRfML3XX1Ca5ZoWBo

@10gic the address is not displayed in the wallet after import 10042021-24 10042021-23

10gic commented 3 years ago

@bobkasho I see a button "Generate native segwit (Bech32) address" in GUI, is the "M" address a native segwit (Bech32) address?

BTW, what's the address derived from private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs ?

I can't find the technical doc about Mooncoin address derivation. The BTC address derivation is very clear: https://en.bitcoin.it/wiki/Invoice_address. I want to find similar technical doc for Mooncoin. Please share me if you known this.

bobkasho commented 3 years ago

@bobkasho I see a button "Generate native segwit (Bech32) address" in GUI, is the "M" address a native segwit (Bech32) address?

BTW, what's the address derived from private key: 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs ?

I didn't get the address in the shossel from this private key 5PiUadgWDWjGcVHCKctSq1RiCRY1Y2CCKZrX8PgaJTwKUBeYnKs

I can't find the technical doc about Mooncoin address derivation. The BTC address derivation is very clear: https://en.bitcoin.it/wiki/Invoice_address. I want to find similar technical doc for Mooncoin. Please share me if you known this.

I will clarify

bobkasho commented 3 years ago

@10gic More than likely there isn't a specific document saying the same thing Mooncoin addresses are generated at time of send/receive/request by the wallet itself.