I'm using getnewaddress bitcoin-cli function to generate wallet addresses but i need one address per token.
Is it possible to use a parameter like seed for random numbers to get the same address when i use the same token?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
I finally found a solution. here is the function to get tone address per token:
try: addressjson=gateway.getaddressesbylabel(token) address=list(addressjson.keys()) except: address=gateway.getnewaddress(token) return address
this way if an address assiciated to the label: token exists we use. Otherwise we generate a new address with label token.