exchanges – Assist about HD pockets with python

on

|

views

and

comments


I am creating easy small change with python flask this change goes for use by our small group with about 500 individuals to commerce our personal coin with bitcoin ( Our personal coin is sprint fork).

Query is about HD wallets

class WalletBTC():
    def __init__(self):
        self.pockets = HDWallet(image=BTC, use_default_path=False)
        self.pockets.from_seed(seed=BTC_KEY)
    def main_address(self):
        path = self.pockets.from_path("m/44'/0'/0'/0/0")
        return self.pockets.p2wsh_in_p2sh_address()
    def id_to_address(self, id):
        path = self.pockets.from_path("m/44'/0'/0'/0/" + str(id))
        return self.pockets.p2wsh_in_p2sh_address()

Each person has ID, I coded this code to get handle for every person,
I’ve few questions.

Can I hold monitor of the deposits by way of these id to addresses and have person steadiness in db then on trades simply change the steadiness in db and withdraw from the principle handle eg 0 path.

Thanks for any response 🙂

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here