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

Proposal Shapes and Pattern Matchers #880

Closed
0xpatrickdev opened this issue Nov 27, 2023 · 2 comments · Fixed by #1012
Closed

Proposal Shapes and Pattern Matchers #880

0xpatrickdev opened this issue Nov 27, 2023 · 2 comments · Fixed by #1012
Assignees
Labels
patterns-shapes endo patterns, proposal shapes, interface guards

Comments

@0xpatrickdev
Copy link
Member

0xpatrickdev commented Nov 27, 2023

As a developer, I need to specify an Proposal Shape for each type of invitation my contract exposes. Proposal Shapes ensure the user supplied arguments match the contract spec, and also may be referred to as Type Guards. I will also most likely need to make use of the M pattern matcher library (from @endo/patterns, or @agoric/store) to write the offer guards, and will need to understand how that works.

Example usage of M:
https://github.com/Agoric/agoric-sdk/pull/8529/files#diff-cc4f472c22c7a11c23e8fc332c53cf5a4ccaf995c0ceae58acb1c0d45f8c11beR30-R49

Edit (keywords): exo interface, proposal shapes

@0xpatrickdev 0xpatrickdev self-assigned this Dec 4, 2023
@Chris-Hibbert
Copy link
Collaborator

As of #876, there is now a reference from the description of makeInvitation() to the endo README for Patterns. It's vastly insufficient for developers to understand what they can do with Patterns.

@dckc
Copy link
Member

dckc commented Dec 5, 2023

@erights adds:

When documenting Patterns in general, you may find the comments starting at https://github.com/endojs/endo/blob/5a46165480b2453d6a57f5b380304da8eb339a97/packages/patterns/src/types.js#L237 helpful.
For proposal shapes specifically, I did not find anything useful. 😞

@0xpatrickdev 0xpatrickdev changed the title Offer Guards and Pattern Matchers Proposal Shapes and Pattern Matchers Dec 6, 2023
@dckc dckc added the patterns-shapes endo patterns, proposal shapes, interface guards label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patterns-shapes endo patterns, proposal shapes, interface guards
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants