Skip to content

Commit

Permalink
DA5-22: Distribution and validation of draft transactions (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-filipczak authored Jan 8, 2024
1 parent 2998418 commit c193e29
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<net.corda.v5.application.messaging.FlowSession>
sendTransaction:
annotations:
- Suspendable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FlowSession> 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()}.
Expand Down

0 comments on commit c193e29

Please sign in to comment.