-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
74 changed files
with
318 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
plugins { | ||
id "application" | ||
} | ||
allprojects { | ||
apply plugin: 'java' | ||
apply plugin: 'groovy' | ||
//apply plugin: 'test-report-aggregation' | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.toVersion("21") | ||
targetCompatibility = JavaVersion.toVersion("21") | ||
} | ||
version = secp256k1Version // set in gradle.properties | ||
group = 'org.bitcoinj.secp256k1' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
group = 'org.consensusj' | ||
dependencies { | ||
implementation 'org.bouncycastle:bcprov-jdk18on:1.77' // Bouncy & EggCC-only | ||
|
||
dependencies { | ||
implementation 'org.bouncycastle:bcprov-jdk18on:1.77' // Bouncy & EggCC-only | ||
testImplementation("org.bitcoinj:bitcoinj-core:0.17-alpha3"); | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.0" | ||
testImplementation "org.junit.jupiter:junit-jupiter-params:5.10.0" | ||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.0" | ||
} | ||
|
||
testImplementation("org.bitcoinj:bitcoinj-core:0.17-alpha3"); | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.0" | ||
testImplementation "org.junit.jupiter:junit-jupiter-params:5.10.0" | ||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.0" | ||
} | ||
java { | ||
sourceCompatibility = JavaVersion.toVersion("21") | ||
targetCompatibility = JavaVersion.toVersion("21") | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.release = 21 | ||
options.compilerArgs += ['--enable-preview'] | ||
} | ||
test { | ||
useJUnitPlatform() | ||
systemProperty "java.library.path", findProperty("javaPath") ?: "/nix/store/j9mf1fh4wbb8c3x1zwqfs218bhml1rbw-secp256k1-0.4.0/lib/" | ||
jvmArgs += '--enable-preview' | ||
jvmArgs += '--enable-native-access=ALL-UNNAMED' | ||
} | ||
|
||
tasks.withType(JavaExec) { | ||
jvmArgs += '--enable-preview' | ||
jvmArgs += '--enable-native-access=ALL-UNNAMED' | ||
} | ||
tasks.withType(JavaCompile).configureEach { | ||
options.release = 21 | ||
options.compilerArgs += ['--enable-preview'] | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
systemProperty "java.library.path", findProperty("javaPath") ?: "/nix/store/j9mf1fh4wbb8c3x1zwqfs218bhml1rbw-secp256k1-0.4.0/lib/" | ||
jvmArgs += '--enable-preview' | ||
jvmArgs += '--enable-native-access=ALL-UNNAMED' | ||
tasks.withType(JavaExec) { | ||
jvmArgs += '--enable-preview' | ||
jvmArgs += '--enable-native-access=ALL-UNNAMED' | ||
} | ||
} | ||
|
||
application { | ||
// mainClass = 'org.consensusj.secp256k1.examples.Ecdsa' | ||
mainClass = 'org.consensusj.secp256k1.examples.Schnorr' | ||
} | ||
// Currently only Tests are in the root module | ||
// TODO: Move the tests to various submodules | ||
|
||
run { | ||
systemProperty "java.library.path", findProperty("javaPath") ?: "" | ||
dependencies { | ||
implementation project(':secp256k1-api') | ||
implementation project(':secp256k1-bouncy') | ||
implementation project(':secp256k1-foreign') | ||
implementation project(':secp256k1-sandbox') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
secp256k1Version = 0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
id 'java-library' | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
//options.release = 9 | ||
} | ||
|
||
ext.moduleName = 'org.bitcoinj.secp256k1.api' | ||
|
||
jar { | ||
inputs.property("moduleName", moduleName) | ||
manifest { | ||
attributes 'Implementation-Title': 'Secp256k1 API', | ||
'Automatic-Module-Name': moduleName, | ||
'Implementation-Version': archiveVersion.get() | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...j/secp256k1/api/CompressedPubKeyData.java → ...j/secp256k1/api/CompressedPubKeyData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.consensusj.secp256k1.api; | ||
package org.bitcoinj.secp256k1.api; | ||
|
||
/** | ||
* | ||
|
2 changes: 1 addition & 1 deletion
2
...ecp256k1/api/CompressedSignatureData.java → ...ecp256k1/api/CompressedSignatureData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.consensusj.secp256k1.api; | ||
package org.bitcoinj.secp256k1.api; | ||
|
||
/** | ||
* | ||
|
2 changes: 1 addition & 1 deletion
2
...nsensusj/secp256k1/api/P256K1KeyPair.java → ...bitcoinj/secp256k1/api/P256K1KeyPair.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...susj/secp256k1/api/P256K1XOnlyPubKey.java → ...oinj/secp256k1/api/P256K1XOnlyPubKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nsensusj/secp256k1/api/P256k1PrivKey.java → ...bitcoinj/secp256k1/api/P256k1PrivKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...onsensusj/secp256k1/api/P256k1PubKey.java → .../bitcoinj/secp256k1/api/P256k1PubKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/consensusj/secp256k1/api/Secp256k1.java → ...org/bitcoinj/secp256k1/api/Secp256k1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nsensusj/secp256k1/api/SignatureData.java → ...bitcoinj/secp256k1/api/SignatureData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.consensusj.secp256k1.api; | ||
package org.bitcoinj.secp256k1.api; | ||
|
||
/** | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
id 'java-library' | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
//options.release = 9 | ||
} | ||
|
||
ext.moduleName = 'org.bitcoinj.secp256k1.bouncy' | ||
|
||
dependencies { | ||
api project(':secp256k1-api') | ||
} | ||
|
||
jar { | ||
inputs.property("moduleName", moduleName) | ||
manifest { | ||
attributes 'Implementation-Title': 'Secp256k1 Bouncy Castle Implementation', | ||
'Automatic-Module-Name': moduleName, | ||
'Implementation-Version': archiveVersion.get() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...nsusj/secp256k1/bouncy/BouncyKeyPair.java → ...coinj/secp256k1/bouncy/BouncyKeyPair.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...nsusj/secp256k1/bouncy/BouncyPrivKey.java → ...coinj/secp256k1/bouncy/BouncyPrivKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ensusj/secp256k1/bouncy/BouncyPubKey.java → ...tcoinj/secp256k1/bouncy/BouncyPubKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
plugins { | ||
id 'java' | ||
id 'application' | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
//options.release = 22 | ||
} | ||
|
||
ext.moduleName = 'org.bitcoinj.secp256k1.examples-java' | ||
|
||
dependencies { | ||
implementation project(':secp256k1-api') | ||
implementation project(':secp256k1-bouncy') | ||
implementation project(':secp256k1-foreign') | ||
} | ||
|
||
jar { | ||
inputs.property("moduleName", moduleName) | ||
manifest { | ||
attributes 'Implementation-Title': 'Example secp256k1-jdk Apps', | ||
'Automatic-Module-Name': moduleName, | ||
'Implementation-Version': archiveVersion.get() | ||
} | ||
} | ||
|
||
application { | ||
// mainClass = 'org.bitcoinj.secp256k1.examples.Ecdsa' | ||
mainClass = 'org.bitcoinj.secp256k1.examples.Schnorr' | ||
} | ||
|
||
run { | ||
systemProperty "java.library.path", findProperty("javaPath") ?: "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 7 additions & 8 deletions
15
...onsensusj/secp256k1/examples/Schnorr.java → .../bitcoinj/secp256k1/examples/Schnorr.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
id 'java-library' | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
//options.release = 22 | ||
} | ||
|
||
ext.moduleName = 'org.bitcoinj.secp256k1.foreign' | ||
|
||
dependencies { | ||
api project(':secp256k1-api') | ||
} | ||
|
||
jar { | ||
inputs.property("moduleName", moduleName) | ||
manifest { | ||
attributes 'Implementation-Title': 'Secp256k1 libsecp256k1 Foreign Function & Memory implementation', | ||
'Automatic-Module-Name': moduleName, | ||
'Implementation-Version': archiveVersion.get() | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...cp256k1/foreign/CompressedPubKeyPojo.java → ...cp256k1/foreign/CompressedPubKeyPojo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...56k1/foreign/CompressedSignaturePojo.java → ...56k1/foreign/CompressedSignaturePojo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.