-
Notifications
You must be signed in to change notification settings - Fork 212
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
Wallet can sign an offer without requiring a roundtrip to the chain #3908
Labels
performance
Performance related issues
read-no-tx
topic: reading from the chain without a transaction
wallet
Milestone
Comments
Acceptance Criteria:
|
rowgraus
changed the title
Wallet can make an offer without requiring a roundtrip to the chain
Wallet can sign an offer without requiring a roundtrip to the chain
Oct 8, 2021
11 tasks
status quo: sequenceDiagram
dApp->>bridge: getPublicFacet
bridge->>dApp: publicFacet
dApp->>publicFacet: getVaultInvitation
publicFacet->>dApp: invitation
dApp->>bridge: addOffer(invitation, ...)
bridge->>user: ok?
user->>bridge: ok.
bridge->>zoe: offer(invitation, ...)
design sketch: sequenceDiagram
dApp->>bridge: addOffer({contractPub: "board2342", method: "makeVaultInvitation", give, want})
bridge->>user: {give, want...} ok?
user->>bridge: ok.
bridge->>SmartWallet: addOffer({public: "board2342", method: "makeVaultInvitation"})
SmartWallet->>zoe: getPublicFacet
zoe->>SmartWallet: publicFacet
SmartWallet->>publicFacet: getVaultInvitation
SmartWallet->>zoe: offer(invitation, ...)
|
refinement, based on discussion with @michaelfig sequenceDiagram
participant user
participant RPC
participant walletUI
participant walletSt
participant walletB
participant dApp
walletUI->>RPC: ?: published.wallet.agoric1..
RPC-->>walletUI: stateN
dApp->>+walletB: leader = makeLeader(wk-url)
note left of dApp: creates an iframe to well-known url powerbox.agoric.app
dApp->>dApp: f = makeFollower(leader)
dApp->>dApp: c = leader.makeClient()
dApp->>walletB: f.next()
walletB->>walletSt: getDappState
user->>walletUI: approve dApp
walletSt-->>walletB: filter(stateN, dApp)
walletB-->>dApp: filter(stateN, dApp)
note left of dApp: stateN includes services.board, .zoe
dApp->>walletB: instanceP <- E(E(client).getBoard()).getValue('asdf')
dApp->>walletB: pfP <- E(E(client).getZoe()).getPublicFacet(instanceP)
user->>dApp: send me tokens
dApp->>walletB: invP <- E(pfP).makeInvitation()
dApp->>walletB: E(c).deposit(invP)
dApp->>walletB: offerIdP <- E(c).propose({want: 5tok})
note right of walletB: offerId is edge name e.g.: 45
walletB->>walletUI: proposal
note right of walletUI: hits storage
walletUI->>user: proposal
user->>walletUI: Approve
walletUI->>RPC: tx([trivialActions, acceptZoeOffer])
RPC->>walletUI: stateN'
walletUI->>walletSt: stateN'
walletSt->>walletB: stateN'
note right of walletB: stateN' includes offerstates
walletB->>dApp: filter(stateN', dApp)
Description of the Designdapp will use casting has
transaction manager (TODO: replace with relevant DB terminology)
|
fixed by #5946 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
performance
Performance related issues
read-no-tx
topic: reading from the chain without a transaction
wallet
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: