Bitcoin Forum
November 06, 2024, 10:41:24 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can you create an address for a user permanently?  (Read 97 times)
hellossy (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
January 03, 2021, 02:54:24 PM
 #1

Hello everybody. How can electrum give a user a top-up address forever? I want the address to be given in my account when requested, and it would be possible to replenish it both today and in a year. How can this be done and is electrum suitable for this?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
January 03, 2021, 02:56:18 PM
 #2

How can this be done and is electrum suitable for this?

Electrum already does it. Your address changes every time you receive a transaction to it for privacy reasons. You are free to reuse addresses as many times as you want. You can also access a list of your addresses by clicking "View -> Show Addresses". You should see the "Addresses" tab once you do it.
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
January 03, 2021, 02:57:06 PM
 #3

Addresses never expires. If tracking invoices is not something that you need, it'll be better for you to just take an addresses from your address tab and give it to the user.

If you want to use invoices, just create but set the expiry to Never. Even if it did expire, it wouldn't matter as the address would still be in your wallet and they're never deleted.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
hellossy (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
January 03, 2021, 03:22:38 PM
 #4

Addresses never expires. If tracking invoices is not something that you need, it'll be better for you to just take an addresses from your address tab and give it to the user.

If you want to use invoices, just create but set the expiry to Never. Even if it did expire, it wouldn't matter as the address would still be in your wallet and they're never deleted.

How do you set an infinite validity period? An example with electrum jsonrpc ?
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
January 03, 2021, 03:32:55 PM
 #5

How do you set an infinite validity period? An example with electrum jsonrpc ?
You'll have to call the method:
Code:
add_request

With the following parameters
Code:
Amount:
memo:
expiration: None

I found the documentation for JSON_RPC but it's a bit outdated since it's method was changed to one with an underscore. If you want to make the invoice never expiring, then you have to specify the expiration and put None as a value, the only other required param is the amount.

https://electrum.readthedocs.io/en/latest/jsonrpc.html

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
khaled0111
Legendary
*
Offline Offline

Activity: 2702
Merit: 3041


Top Crypto Casino


View Profile WWW
January 03, 2021, 06:56:20 PM
 #6

I read your old posts and it looks like you're running a service which has to generate a unique address for each user! If this is what you're asking about then you don't need to request Elctrum to regenerate the address each time a user wants to make a deposit. Instead, you have to use the wallet's master public key to generate a new address for each new user and save both the address and the corresponding username in a sort of database then call it from there when needed.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!