ExodusMovement / exodus-oss

MIT License
5 stars 5 forks source link

feat: allow to inject mock xpubs #41

Open fboucquez opened 7 months ago

fboucquez commented 7 months ago

For troubleshooting, allow a dev wallet to inject pubs (like customers, from safe report) to reproduce a third-party wallet behavior.

Although easier for other networks, mocking just the address is not good enough for bitcoin-likes

Unsure if this is a keychain module change, a forked keychain module a different one. What do you think?

Example of mocked data:

const xpubs = {
  bitcoin: {
    0: { // account index
      bip44: 'xpub6BsgE...',
      bip84: 'xpub6CP7S...',
      bip86: 'xpub6CMS5p...',
    },
  },
}

Falling back to the seed if the asset or the wallet account are not mocked

mvayngrib commented 7 months ago

@kewde will be working on a publicKeyProvider, which may be a better fit for reproducing customer issues (given we only have their public keys)