Author

Topic: Generate New BTC address with private key (Read 442 times)

member
Activity: 265
Merit: 14
Nina
January 06, 2019, 05:17:55 PM
#16
you don't need an API for that. An address is (not all, but basically) the hash of a public key. The public key is derived from a private one. The private key is just a random number. In order to have 1000 addresses, you just need to generate 1000 random numbers : it's the whole point of Bitcoin, you don't ask for a Bitcoin account (ask an API or anything), you generate one. I made a quick explanation here if you want to implement it, it just takes about 30 lines of code and you take control over your money  Wink .

Besides, I think you are confused with what is a wallet. A wallet is an interface to the Bitcoin network : it stores your addresses and private keys and uses them to craft transactions. Once you generated your key pairs yourself, you just need an (open source) wallet to interact with the Bitcoin network.
Thanks for this simple nice explanation Smiley

For someone who don't understand the basics of how Bitcoin transactions work, why/how you need 1000 private keys at once? May be you think to create an online wallet (like blockchain.com) and find the way to funds of others (scam them).  What are you trying to accomplish?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
January 06, 2019, 08:29:12 AM
#15
I'm looking for API to create/generate new BTC address and download its private key.
But when I get the addresses how can I send them to bitcoin network?
I got Address and PrivateKey from VanityGen and it's enough?
How Can I spend my coins? Where can I import my key string?
Can you start by explaining what you're trying to accomplish? If I read between the lines, I don't think you understand the basics of how Bitcoin transactions work, and if that's the case, messing around with private keys is likely to lose your funds one way or another.

So: what are you trying to accomplish? Let's start from there, see how we can help you get there.
sr. member
Activity: 279
Merit: 435
January 03, 2019, 07:58:45 AM
#14
Hello.
Please, help me.
I'm looking for API to create/generate new BTC address and download its private key.
Thanks a lot!

I need 1000 wallets.


Hi,

you don't need an API for that. An address is (not all, but basically) the hash of a public key. The public key is derived from a private one. The private key is just a random number. In order to have 1000 addresses, you just need to generate 1000 random numbers : it's the whole point of Bitcoin, you don't ask for a Bitcoin account (ask an API or anything), you generate one. I made a quick explanation here if you want to implement it, it just takes about 30 lines of code and you take control over your money  Wink .

Besides, I think you are confused with what is a wallet. A wallet is an interface to the Bitcoin network : it stores your addresses and private keys and uses them to craft transactions. Once you generated your key pairs yourself, you just need an (open source) wallet to interact with the Bitcoin network.
legendary
Activity: 2170
Merit: 1789
January 02, 2019, 10:48:01 PM
#13
vanitygen - yes, it is. I'm looking for this tool.

Why did you need to use vanitygen? Do you want those 1000 address to have custom prefixes?
If you're fine with random address then imo it's fine to use Electrum or Core to get your addresses.
legendary
Activity: 2772
Merit: 3114
Top Crypto Casino
January 02, 2019, 08:54:37 PM
#12
Make sure to download the latest version of Electum from their official website.
Link: check the post above
legendary
Activity: 2758
Merit: 6830
January 02, 2019, 08:35:52 PM
#11
So.
I got Address and PrivateKey from VanityGen and it's enough?
How Can I spend my coins? Where can I import my key string?
Just import the address' private-key in a wallet like Electrum[1] and spend the coins[2].

[1] https://electrum.org
[2] https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/
newbie
Activity: 4
Merit: 0
January 02, 2019, 08:31:32 PM
#10
So.
I got Address and PrivateKey from VanityGen and it's enough?
How Can I spend my coins? Where can I import my key string?
legendary
Activity: 2758
Merit: 6830
January 02, 2019, 07:43:22 PM
#9
vanitygen - yes, it is. I'm looking for this tool.
But when I get the addresses how can I send them to bitcoin network?
You don't have to. That's not how Bitcoin works.

All you need is the Bitcoin address and the private key. With the address, you receive the coins - which can be spent with the private key. There is no need to "tell" any server that you generated them.
newbie
Activity: 4
Merit: 0
January 02, 2019, 07:38:46 PM
#8
vanitygen - yes, it is. I'm looking for this tool.
But when I get the addresses how can I send them to bitcoin network?
legendary
Activity: 2772
Merit: 3114
Top Crypto Casino
January 02, 2019, 07:15:42 PM
#7
You can use vanitygen to generate as many addresses as you want and save the output into a file.
hero member
Activity: 1241
Merit: 623
OGRaccoon
January 02, 2019, 07:00:52 PM
#6
I want 1000 different addresses with different keys.

Are there any APIs except BitCoin Core (it's too large)?

You could create 1000 in electrum wallet by a similar process.

For a single wallet type in electrum console:

Code:
wallet.create_new_address(False)

For 1000 new wallets type in electrum-console:
Code:
for i in range(0, 1000): print wallet.create_new_address(False)

or just (effect after restart application):
Code:
wallet.storage.put('gap_limit',1000)

I would stay away from online services for this kind of thing you don't want to use a website to generate keys and addresses I doubt your coins would stay in them for long.

hero member
Activity: 1008
Merit: 515
January 02, 2019, 07:00:02 PM
#5
you can use bitaddress.org to generate large amounts of addresses with private keys.

edit: I read the comment from the guy below who advised not to use online services. I do agree with him, but you can use the website above offline as well after you've opened the page.
newbie
Activity: 4
Merit: 0
January 02, 2019, 06:49:52 PM
#4
I want 1000 different addresses with different keys.

Are there any APIs except BitCoin Core (it's too large)?
hero member
Activity: 1241
Merit: 623
OGRaccoon
January 02, 2019, 06:37:53 PM
#3
Hello.
Please, help me.
I'm looking for API to create/generate new BTC address and download its private key.
Thanks a lot!

I need 1000 wallets.



If you use bitcoin core wallet you can specify in bitcoin.conf file

keypool=1000

This would mean 1000 keys have been generated and added to your wallet.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
January 02, 2019, 06:34:42 PM
#2
I need 1000 wallets.

What would you call a wallet?

Aas far as I know, a wallet is a software that can generate new addresses from a seed.

Maybe you want 1000 addresses?
newbie
Activity: 4
Merit: 0
January 02, 2019, 06:23:12 PM
#1
Hello.
Please, help me.
I'm looking for API to create/generate new BTC address and download its private key.
Thanks a lot!

I need 1000 wallets.

Jump to: