TBD54566975 / tbdex

56 stars 26 forks source link

Add Close.success to the protocol spec #286

Closed KendallWeihe closed 8 months ago

KendallWeihe commented 8 months ago

Closes #257

Reference https://github.com/TBD54566975/tbdex/issues/242#issuecomment-1977002689

  1. Close messages are valid after any message type
  2. Close message introduces a new optional property success of type boolean

Implementors

@jiyoontbd @kirahsapong @diehuxx (please tag anyone else in the comment section if appropriate)

Two things.

First, Close is now valid after any message type. I believe in some implementations we have a function akin to isValidNext() which inspects the message type (& its contents?) and determines if the given message is valid as the next message in the exchange. In places where we do have this code, we'll need to ensure it allows Close messages at any point.

Second, add a new property Close.success which is an optional boolean. Ensure that success is accessible during creation/validation/parsing/etc (wherever appropriate).