Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendKeyForAccountFlow to return AnonymousParty #95

Open
xavierlepretre opened this issue Apr 23, 2020 · 0 comments
Open

SendKeyForAccountFlow to return AnonymousParty #95

xavierlepretre opened this issue Apr 23, 2020 · 0 comments

Comments

@xavierlepretre
Copy link

xavierlepretre commented Apr 23, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant