accounts
accounts copied to clipboard
SendKeyForAccountFlow to return AnonymousParty
It would be beneficial, here that:
class SendKeyForAccountFlow(val otherSide: FlowSession) : FlowLogic<Unit>() {
Be instead:
class SendKeyForAccountFlow(val otherSide: FlowSession) : FlowLogic<AnonymousParty>() {
My use case is an atomic sale, 1 NFT in exchange for a bunch of fungible tokens:
- The seller initiates, it has the account's id of the buyer.
- The seller asks the buyer's host what anonymous party to use as the new holder for the NFT, via
RequestKeyForAccountFlow
. - The buyer sends a new anonymous party, and keeps a copy for itself in the session, via the "new"
SendKeyForAccountFlow
. - The seller creates the transaction, signs it and asks for signature from the buyer.
- The buyer receives the transaction, and confirms that the NFT holder is exactly the anonymous party that was previously sent.
For the reason of "the buyer verifies that the transaction is correct", the buyer session needs to know what was sent earlier.
You will notice that this way of doing is already done in confidential identities here for ProvideKeyFlow
.