Closed kevinfaveri closed 2 weeks ago
Here's an example impl from xverse: https://github.com/secretkeylabs/xverse-core/blob/b679bc726eea6bf457ba42f6f9cc43e94f99878f/connect/bip322Signature.ts#L75
I would argue it's out of scope for the library.
We have http://github.com/paulmillr/scure-bip32 and http://github.com/paulmillr/scure-bip39 - separate well-known libraries. We don't want btc-signer to depend on bip32 and bip39.
Makes sense.. Maybe a new lib is needed for bip322?
Bip322 message signing is a common usage among Ordinals/Runes marketplaces in the ecosystem. It is normal to assume that usage of this will only grow as methods of authentication among APIs.
I think the library could provide a feature that allows for signing a Bip322 message as simple as
.signBip322(pvtkey, message)
returning the Buffer/UInt8Array