-
Notifications
You must be signed in to change notification settings - Fork 74
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 CapDataShape #1782
Comments
attn @erights for design feedback |
I am concerned that code would require to know the CapData shape instead of treating it as a opaque thing to pass to marshal. For issues like #1478 we want the flexibility to change the CapData format, including changing which properties may be present. |
Ugh I didn't realize we even had a pattern to enforce the current CapData shape... this is unfortunate. |
We have this in lib-board: https://github.com/Agoric/agoric-sdk/blob/3f47cf03423b46b69851b021a18707b6ce42f056/packages/vats/src/lib-board.js#L23-L30 based on endo/packages/marshal/src/types.js Lines 76 to 81 in 162a916
Is that type in Marshal inaccurate? If so, is there anything a client can do to validate that something is CapData? |
Can you clarify what you mean by "validate that something is CapData" ? Something having a I think at the core I would expect CapData to be |
Any idea why? (Postponing further responses until I understand this) |
Good question. I think the code in lib-board is to satisfy the For the case that motivated this issue, where a client tried to validate the shape before passing it to be unserialized, I think you're right that it should leave that to the marshaller. Regardless, people will be reaching for a CapDataShape and I think Endo should provide it. If that needs to be |
What is the Problem Being Solved?
I recently made a change in agoric/wallet-app where we needed to know the shape of
CapData
. I was unable to export the type and ended up recreating it within the project.It'll be nice to have it available within endo for exporting.
Description of the Design
Export
CapDataShape
Security Considerations
N/A
Scaling Considerations
N/A
Test Plan
N/A
Upgrade Considerations
N/A
The text was updated successfully, but these errors were encountered: