TBD54566975 / tbdex

56 stars 25 forks source link

Make `paymentDetails` field within `PrivatePaymentDetail` object required instead of optional #308

Open kirahsapong opened 4 months ago

kirahsapong commented 4 months ago

paymentDetails is marked as optional within the PrivatePaymentDetail object, which is also optional in privateData.

Proposal: paymentDetails should be required. ie. If passing the optional PrivatePaymentDetail, it must contain paymentDetails.

https://github.com/TBD54566975/tbdex/tree/main/specs/protocol#privatepaymentdetails

| field            | data type | required | description                                                                                                                                                                                                                                |
| ---------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `paymentDetails` | object    | N        | An object containing the properties defined in an Offering's `requiredPaymentDetails` json schema. If `data.payin/payout.paymentDetailsHash` is omitted, then `privateData.payin/payout.paymentDetails` respectively must also be omitted. |