paulmillr / scure-btc-signer

Audited & minimal library for creating, signing & decoding Bitcoin transactions.
https://paulmillr.com/noble/#scure
MIT License
134 stars 33 forks source link

Support for Bip322 Message Signing #95

Closed kevinfaveri closed 2 weeks ago

kevinfaveri commented 3 weeks ago

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

kevinfaveri commented 3 weeks ago

Here's an example impl from xverse: https://github.com/secretkeylabs/xverse-core/blob/b679bc726eea6bf457ba42f6f9cc43e94f99878f/connect/bip322Signature.ts#L75

paulmillr commented 2 weeks ago

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.

kevinfaveri commented 2 weeks ago

Makes sense.. Maybe a new lib is needed for bip322?