forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connector-corda): add vaultQueryV1 REST API operation + endpoint
Primary change(s): ----------------- 1. Adds a (for now) simplistic endpoint to query ledger state which allows us to retrieve identifiers needed to construct flow requests in certain use-cases. 2. This expands the number of supported use-cases for the Corda v4 (JVM) connector. Notes: ------- Automated testing is work in progress, but it depends on a few other big(er) changes so in an effort to limit the size of this pull request I'm only submitting the steps for manual testing as documented in the package's README.md file. These are steps which I have executed myself and can vouch that they work as expected. Signed-off-by: Peter Somogyvari <[email protected]>
- Loading branch information
Showing
24 changed files
with
527 additions
and
26 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
106 changes: 106 additions & 0 deletions
106
packages/cactus-plugin-ledger-connector-corda/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
1 change: 1 addition & 0 deletions
1
...-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle.properties
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 @@ | ||
version = 2.0.0-rc.2 |
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
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
25 changes: 25 additions & 0 deletions
25
.../org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/VaultQueryV1Request.kt
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,25 @@ | ||
package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model | ||
|
||
import java.util.Objects | ||
import com.fasterxml.jackson.annotation.JsonProperty | ||
import javax.validation.constraints.DecimalMax | ||
import javax.validation.constraints.DecimalMin | ||
import javax.validation.constraints.Email | ||
import javax.validation.constraints.Max | ||
import javax.validation.constraints.Min | ||
import javax.validation.constraints.NotNull | ||
import javax.validation.constraints.Pattern | ||
import javax.validation.constraints.Size | ||
import javax.validation.Valid | ||
|
||
/** | ||
* | ||
* @param contractStateType Valid, fully qualified JVM class name which will be fed into Class.forName(...) | ||
*/ | ||
data class VaultQueryV1Request( | ||
|
||
@get:Size(min=1) | ||
@get:JsonProperty("contractStateType") val contractStateType: kotlin.String? = null | ||
) { | ||
|
||
} |
6 changes: 5 additions & 1 deletion
6
packages/cactus-plugin-ledger-connector-corda/src/main-server/start-app.sh
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,3 +1,7 @@ | ||
#!/bin/bash | ||
|
||
for i in 1 2 3 4 5; do java -jar ${APP}/kotlin-spring/build/libs/cactus-connector-corda-server-0.3.0.jar && break || sleep 15; done | ||
# Without these we get crashes on JDK 17 an above since the introduction of the | ||
# Java Modules system. | ||
EXTRA_JVM_ARGS="" | ||
|
||
for i in 1 2 3; do java $EXTRA_JVM_ARGS -jar ${APP}/kotlin-spring/build/libs/cactus-connector-corda-server-2.0.0-rc.2.jar && break || sleep 5; done |
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
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
Oops, something went wrong.