Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Require salt in Rfq privateData JSON schema (#306)
Browse files Browse the repository at this point in the history
* Require salt in Rfq privateData JSON schema

* Update spec README

* Update examples
  • Loading branch information
Diane Huxley authored Mar 31, 2024
1 parent 6df3807 commit 38cf284
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion hosted/json-schemas/rfq-private.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
}
}
}
}
},
"required": ["salt"]
}
6 changes: 4 additions & 2 deletions specs/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ Message kinds other than RFQ may NOT have property `privateData`. The [RFQ `priv
}
},
"privateData": {
"salt": "1234567890",
"claims": [<VERIFIABLE_CREDENTIAL>], <---- actual
"payinMethod": {
"paymentDetails": <OBJ> <---- actual
Expand Down Expand Up @@ -444,10 +445,10 @@ The salted hash is produced by creating a [digest](#digests) of a JSON array con

The `privateData` field is ephemeral and **MUST** only be present when the message is initially sent to the intended recipient.

This table enumerates the structure of
This table enumerates the structure of `PrivateData`
| field | data type | required | description |
| -------- | ------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |
| `salt` | string | N | |
| `salt` | string | Y | Randomly generated salt used for hashing PrivateData fields |
| `claims` | string[] | N | an array of claims that fulfill the requirements declared in an [Offering](#offering) |
| `payin` | [`PrivatePaymentDetails`](#privatepaymentdetails) | N | A container for the unhashed `payin.paymentDetails` |
| `payout` | [`PrivatePaymentDetails`](#privatepaymentdetails) | N | A container for the unhashed `payout.paymentDetails` |
Expand Down Expand Up @@ -483,6 +484,7 @@ This table enumerates the structure of
"claimsHash": "<HASH_PRIVATE_CLAIMS_0>"
},
"privateData": {
"salt": "1234567890",
"payin": {
"paymentDetails": {
"cardNumber": "1234567890123456",
Expand Down

0 comments on commit 38cf284

Please sign in to comment.