1
0
mirror of https://github.com/GOSTSec/vanitygen synced 2025-02-07 04:14:15 +00:00

G prefix for gostcoin

This commit is contained in:
orignal 2017-12-19 13:57:24 -05:00
parent cd1a728243
commit 0034885bb4
2 changed files with 11 additions and 2 deletions

View File

@ -708,7 +708,6 @@ get_prefix_ranges(int addrtype, const char *pfx, BIGNUM **result,
BN_set_word(&bnbase, 58);
p = strlen(pfx);
for (i = 0; i < p; i++) {
c = vg_b58_reverse_map[(int)pfx[i]];
if (c == -1) {
@ -1401,6 +1400,10 @@ vg_prefix_context_add_patterns(vg_context_t *vcp,
ats = "namecoin";
bw = "\"M\" or \"N\"";
break;
case 38:
ats = "gostcoin";
bw = "\"G\"";
break;
default:
break;
}

View File

@ -312,6 +312,7 @@ usage(const char *name)
"-k Keep pattern and continue search after finding a match\n"
"-1 Stop after first match\n"
"-N Generate namecoin address\n"
"-G Generate gostcoin address\n"
"-T Generate bitcoin testnet address\n"
"-X <version> Generate address with the given version\n"
"-F <format> Generate address with the given format (pubkey or script)\n"
@ -361,7 +362,7 @@ main(int argc, char **argv)
int i;
while ((opt = getopt(argc, argv, "vqnrik1eE:P:NTX:F:t:h?f:o:s:")) != -1) {
while ((opt = getopt(argc, argv, "vqnrik1eE:P:NGTX:F:t:h?f:o:s:")) != -1) {
switch (opt) {
case 'v':
verbose = 2;
@ -389,6 +390,11 @@ main(int argc, char **argv)
privtype = 180;
scriptaddrtype = -1;
break;
case 'G':
addrtype = 38;
privtype = 128 + addrtype;
scriptaddrtype = addrtype;
break;
case 'T':
addrtype = 111;
privtype = 239;