Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to parse / serialize nonces / partial signatures to do collaborative musig operations #697

Open
RubenWaterman opened this issue Mar 21, 2025 · 1 comment
Labels
🔏 enhancement New feature or request

Comments

@RubenWaterman
Copy link
Contributor

As discussed in #696, this library currently does not provide the functionality to aggregate serialized nonces / parial signatures, which is useful if not all the signing happens within the same Swift app (i.e. a collaborative signing ceremony), such as in Boltz claims (or refunds).

I did an attempt of achieving this https://github.com/RubenWaterman/swift-secp256k1/pull/1/files but not sure it's the right way.

@csjones
Copy link
Contributor

csjones commented Mar 22, 2025

Hey @RubenWaterman 👋

Thanks for creating the thread and sharing your attempt. I've been reviewing the changes in your fork and have a question regarding your creation of secp256k1.Schnorr.Nonce(hexString: String) and secp256k1.Schnorr.Nonce(serializedNonce: Data). Is there a specific reason for choosing these initializations over the default one?

This package internally converts hexadecimal strings through the String extension and its bytes property which can be used to initialize a Data object directly. Could you clarify if this approach works for your use case?

Example:

let stringNonce = "2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90"

let nonceBytes = try! stringNonce.bytes

let pubnonce = secp256k1.Schnorr.Nonce(pubnonce: Data(nonceBytes))

@csjones csjones added the 🔏 enhancement New feature or request label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔏 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants