Open thomaseizinger opened 3 years ago
If a zpub is provided it is assumed to belong to a wallet controlled by the asb user. The zpub is used for deriving bitcoin receive addresses and pubkeys required during key generation.
If a zpub is provided it is assumed to belong to a wallet controlled by the asb user. The zpub is used for deriving bitcoin receive addresses and pubkeys required during key generation.
I've added some information in this regard to the original issue description.
A minor correction: only receive addresses will be derived from this zpub. Keys used in the protocol like S_a_bitcoin
need to be generated by our software because it needs to be in control of the private key associated with it in order to generate the correct signatures.
If someone ever picks this up read this: https://github.com/comit-network/xmr-btc-swap/pull/507#discussion_r633953991
This can easily be achieved by having a separate
bdk
wallet instance that is initialized from the zpub and keeps track of the funds and used addresses.