diff --git a/jni/src/main/kotlin/fr/acinq/secp256k1/NativeSecp256k1.kt b/jni/src/main/kotlin/fr/acinq/secp256k1/NativeSecp256k1.kt index b0d3a95..5c704d8 100644 --- a/jni/src/main/kotlin/fr/acinq/secp256k1/NativeSecp256k1.kt +++ b/jni/src/main/kotlin/fr/acinq/secp256k1/NativeSecp256k1.kt @@ -145,10 +145,27 @@ public object NativeSecp256k1 : Secp256k1 { totalSigners, ids33 ) + val shares = Array(totalSigners) { index -> + val startIndex = 0 + (index*32); + val endIndex = 32 + (index*32); + + result.sliceArray( + startIndex..endIndex + ) + } + + val vssCommitment = Array(totalSigners) { index -> + val startIndex = 0 + (index*65); + val endIndex = 65 + (index*65); + + result.sliceArray( + startIndex..endIndex + ) + } return Triple( - emptyArray(), - emptyArray(), + shares, + vssCommitment, pok64 ) }