-
Notifications
You must be signed in to change notification settings - Fork 9
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
Expose inner.send on AppWebsocket #69
Conversation
Why expose this? There shouldn't be anything on the Holochain interface that isn't exposed to the client so there should be a dedicated method for any functionality you need. Is one of the methods doing something that doesn't work for you? |
Robbie and I spoke about this. In that moment I understood the issue better. Right now I'm recalling parts of it but don't completely piece them together. It's to do with avoiding an extra roundtrip between Envoy and Chaperone when signing zome calls from happ UIs. @robbiecarlton to the rescue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awaiting reasoning
Hey, sorry I missed the notifications on this. @ThetaSinner - the issue is that the But in the envoy / chaperone pattern, the keys live in the web browser, so a What we want to do instead is construct the An alternative change to this client would be to just create a
If there are objections to this more general approach, I'm happy to update it to the more restricted |
I see what you're after now. I disagree that this requires an extra round trip though, because the singing mechanism doesn't require you to actually create the signature on demand. If you already have a signature, you can just return it from the If we can't make that work in a tidy way then I'm open to adding a new function to the interface for requesting with a signed zome call. I don't want to see the internals of this type get exposed because they will get used for other things (like calling new conductor functionality before it's been implemented in the client) which willl then break with serialisation errors rather than compiler errors when we make API changes. |
@ThetaSinner - Your proposed solution works. However, it will require some additional moving parts in envoy (associating a signer with each websocket connection, including a hashmap of zome call hashes to signatures or equivalent). If you're open to adding the option to make a presigned zome call, that would be my preference. Seems like that will be a very simple addition to this code base vs a more complicated addition to envoy. This is partly motivated by the fact we're in a pretty big crunch here and this work on the envoy bump is going to be a blocker for the overall holo bump if it doesn't get in soon. I'm happy to make the change, lmk what you think. |
@robbiecarlton Done here #83 |
I'm going to close this now that we have another solution |
No description provided.