Skip to content

Commit

Permalink
Partial support for PSBT v2
Browse files Browse the repository at this point in the history
Here we only support taproot fields that would allow us to sign BIP86 transactions.
  • Loading branch information
sstone committed Jun 18, 2024
1 parent bc2d1e4 commit aeee80e
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 63 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
val currentOs = org.gradle.internal.os.OperatingSystem.current()

group = "fr.acinq.bitcoin"
version = "0.19.0"
version = "0.20.0-SNAPSHOT"

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,15 @@ public object LexicographicalOrdering {
@JvmStatic
public fun isLessThan(a: PublicKey, b: PublicKey): Boolean = isLessThan(a.value, b.value)

@JvmStatic
public fun isLessThan(a: XonlyPublicKey, b: XonlyPublicKey): Boolean = isLessThan(a.value, b.value)

@JvmStatic
public fun compare(a: PublicKey, b: PublicKey): Int = if (a == b) 0 else if (isLessThan(a, b)) -1 else 1

@JvmStatic
public fun compare(a: XonlyPublicKey, b: XonlyPublicKey): Int = if (a == b) 0 else if (isLessThan(a, b)) -1 else 1

/**
* @param tx input transaction
* @return the input tx with inputs and outputs sorted in lexicographical order
Expand Down
Loading

0 comments on commit aeee80e

Please sign in to comment.