Open dckc opened 2 years ago
See also plans for more direct support for ocaps in the wallet https://github.com/Agoric/agoric-sdk/issues/3901
If I understand this correctly, this will probably be taken care of when I document continuing offers. (#759)
Note: There's a very good chance I don't understand this correctly, but I have higher priority things in my queue. I'll update this bug when I have time to properly investigate.
Yes, it looks like #759 should be closed as a dup of this.
recent discussion reminded us of the somewhat canonical example in the vaults contract:
closed in #999
in office hours today... thanks Jorge...
---
title: Continuing Invitation
---
sequenceDiagram
actor c as client
participant sw as swartWallet
participant i as invitations
c ->> sw: { id: offer1, source: 'purse' }
sw -->> sw: withdraw inv1
sw -->> zoe: offer(inv1, ...)
zoe -->> sw: seat1
create participant seat1
sw -->> seat1: getOfferResult()
seat1 -->> sw: invitationMakers1
note over c, sw : offerSpec: { id, invitationSpec, proposal, offerArgs }
note over c, sw : invitationSpec: { source: 'continuing', previousOffer: offer1, invitationMakerName: 'AdjustVault', invitationArgs}
c ->> sw : executeOffer(offerSpec)
sw ->> i : makeInvitationsHelper()
i -->> sw : invitationFromSpec
sw ->> i : invitationFromSpec(offerSpec.invitationSpec)
i ->> i : spec.source === 'continuing'
i ->> sw : getInvitationContinuation(previousOffer)
sw ->> sw : offerToInvitationMakers.get(previousOffer)
sw -->> i : invitationMakers1
create participant im as invitationMakers1
i ->> im : invitationMakerName(invitationArgs)
im -->> sw : invitation
For an NFT ticketing system bounty ( https://github.com/Agoric/agoric-sdk/issues/4657 ) we (@samsiegart , @Chris-Hibbert @kennyrowe, @jeetraut and I) recommended the continuing invitation pattern in office hours. There is essentially no documentation, so we sketched something quick-n-dirty:
https://gist.github.com/dckc/9c393be1bd5a147f72c6b42ca12a1aa2#continuing-invitation-pattern