unisat-wallet / wallet-sdk

ISC License
43 stars 26 forks source link

Feature Request: Nostr-Key Import of Non-Standard Taproot Addresses #16

Open dannydeezy opened 3 months ago

dannydeezy commented 3 months ago

Hi there - when ordinals first launched, I created a browser-extension wallet experience utilizing the client's Nostr Key (https://github.com/deezy-inc/deezy-place). Unfortunately we are no longer actively supporting this product, but many people still have ordinals on these wallets. We want them to be able to import their key into Unisat.

The problem is that in my lack of experience and haste of building, our wallets generated non-standard taproot addresses, and therefore the typical private key import/export does not work nicely. In particular, we use a raw public key instead of properly tweaking it, see the mess: https://github.com/deezy-inc/nosft-core/blob/e586d27256c41d91d46f229c6afee976dcae15e2/src/app/psbt.ts#L323

I was wondering - would Unisat team be open to us proposing an additional keyring type, something like nonstandard-taproot-keyring.ts (https://github.com/unisat-wallet/wallet-sdk/tree/master/src/keyring). We can write all the code and propose it both here and then in the unisat browser extension repo. If so, then all our users could safely migrate to unisat easily. We would suggest that this keyring type be hidden from new users, as it is not recommended - only for use of recovering existing assets.

Please let me know what you think - just wanted to check before our team started work on the proposed changes

dannydeezy commented 3 months ago

Actually looking more closely, the better design may be to actually use simple-keyring but add a new address type - will make a proposed PR