Corda 5 Beta 2 Transaction Signatories & self signing changes.
- This topic has 2 replies, 2 voices, and was last updated 6 months ago by .
-
Topic
-
In Corda 4 and Corda 5 beta 1, the self signing of the transaction is by a seperate function called signInitialTransaction() as in Corda 4 or toSignedTransaction(my key) as in Corda 5 beta 1.
Starting from Corda 5 beta 2, we remove the parameter of toSignedTransaction() functions. As a result, all of the required signatures for a transaction will need to be added to the transaction via the addSignatories() functions when building the transaction. (This signature is most likely the transaction proposer’s signature.)
For example, Alice, Bob, Charlie three parties in a network:
- Alice borrow $10 from Bob, creating a loanstate between Alice and Bob
- Bob as the lender want to transfer his debt to Charlie, so the new loanstate is betwwen Alice and Charlie.
Note that for step 2, Bob as the transaction initiator will propose the transaction. In the old fashion, he will put his own signature on the transaction after the transaction building, but now, the toSignedTransaction() does not take in any parameter now. So he needs to add his signature to the transaction when building the transaction.
- You must be logged in to reply to this topic.
Subscribe to our newsletter to stay up to date on the latest developer news, tools, and articles.