Closed 0xpatrickdev closed 5 months ago
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.
@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. :disappointed:
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-R49Edit (keywords): exo interface, proposal shapes