Skip to content

Commit

Permalink
Make functions JvmStatic (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bast authored Feb 1, 2024
1 parent 73b455b commit 0a5cf46
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,15 @@ public object Musig2 {
*
* @param publicKeys public keys of all participants: callers must verify that all public keys are valid.
*/
@JvmStatic
public fun aggregateKeys(publicKeys: List<PublicKey>): XonlyPublicKey = KeyAggCache.create(publicKeys).first

/**
* @param sessionId a random, unique session ID.
* @param privateKey signer's private key.
* @param publicKeys public keys of all participants: callers must verify that all public keys are valid.
*/
@JvmStatic
public fun generateNonce(sessionId: ByteVector32, privateKey: PrivateKey, publicKeys: List<PublicKey>): Pair<SecretNonce, IndividualNonce> {
val (_, keyAggCache) = KeyAggCache.create(publicKeys)
return SecretNonce.generate(sessionId, privateKey, privateKey.publicKey(), message = null, keyAggCache, extraInput = null)
Expand Down Expand Up @@ -252,6 +254,7 @@ public object Musig2 {
* @param publicNonces public nonces of all participants of the musig2 session.
* @param scriptTree tapscript tree of the taproot input, if it has script paths.
*/
@JvmStatic
public fun signTaprootInput(
privateKey: PrivateKey,
tx: Transaction,
Expand Down

0 comments on commit 0a5cf46

Please sign in to comment.