diff --git a/gradle.properties b/gradle.properties index 5d8f6d2127..b3c5e874a8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ cordaProductVersion = 5.2.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 26 +cordaApiRevision = 27 # Main kotlin.stdlib.default.dependency = false diff --git a/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml b/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml index 348f44719f..8da5b8870a 100644 --- a/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml +++ b/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml @@ -474,6 +474,18 @@ net.corda.v5.ledger.utxo.UtxoLedgerService: annotation: - NotNull type: net.corda.v5.ledger.utxo.transaction.UtxoTransactionValidator + receiveLedgerTransaction: + annotations: + - Suspendable + - NotNull + default: false + type: public abstract + returnType: net.corda.v5.ledger.utxo.transaction.UtxoLedgerTransaction + params: + session: + annotation: + - NotNull + type: net.corda.v5.application.messaging.FlowSession receiveTransaction: annotations: - Suspendable @@ -526,6 +538,21 @@ net.corda.v5.ledger.utxo.UtxoLedgerService: annotation: - NotNull type: net.corda.v5.application.messaging.FlowSession + sendAsLedgerTransaction: + annotations: + - Suspendable + default: false + type: public abstract + returnType: void + params: + signedTransaction: + annotation: + - NotNull + type: net.corda.v5.ledger.utxo.transaction.UtxoSignedTransaction + sessions: + annotation: + - NotNull + type: java.util.List sendTransaction: annotations: - Suspendable diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java index 09e3bf7ce7..cfa71db0d1 100644 --- a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java @@ -283,6 +283,30 @@ UtxoSignedTransaction receiveTransaction( @NotNull FlowSession session ); + /** + * Sends an unsigned copy of the base LedgerTransaction to counterparty sessions. + * + * @param signedTransaction The {@link UtxoSignedTransaction} whose correspondent {@link UtxoLedgerTransaction} will be sent. + * @param sessions The counterparties who receive the transaction. + */ + @Suspendable + void sendAsLedgerTransaction( + @NotNull UtxoSignedTransaction signedTransaction, + @NotNull List sessions + ); + + /** + * Receives a ledger transaction from the counterparty session. + * + * @param session The counterparty to receive a transaction from. + * @return the {@link UtxoLedgerTransaction} received from counterparty. + */ + @NotNull + @Suspendable + UtxoLedgerTransaction receiveLedgerTransaction( + @NotNull FlowSession session + ); + /** * Creates a query object for a vault named query with the given name. This query can be executed later by calling * {@link PagedQuery#execute()}.