Post
Topic
Board Development & Technical Discussion
Re: Import New Address BitcoinCore Without Rescan
by
bob123
on 06/09/2020, 13:52:08 UTC
i am using bitcoinjs to generate address that's on my backend server. since i am new using bitcoin node i am insecure to import my private key. i am using bitcoin node just for get all my balances and matching my unspent with my backend

Since i don't know how your backend works, a general how-to would be:
  • Have the xpriv backed up offline
  • Use the xpub on an online server go generate addresses on-the-fly
  • Assign addresses generated from the xpub to customers and save that in the database
  • Use walletnotify and blocknotify with core to check for new blocks/transactions and update database entries based on that (e.g. customer has paid, transaction has X confirmations, ...)

You don't need to import private keys into core.
Either use cores HD wallet or only use core to check for transactions.