Package tbdex.sdk.protocol.models
Object Rfq.Companion
-
- All Implemented Interfaces:
public class Rfq.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Rfq.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Rfqcreate(String to, String from, CreateRfqData rfqData, String protocol, String externalId)Creates a new Rfqmessage, autopopulating the id, creation time, and message kind.final Rfqparse(String payload, Boolean requireAllPrivateData)Takes an existing Rfq in the form of a json string and parses it into a Rfq object. final StringgenerateRandomSalt()Generate random salt, used for salted hashes in RfqPrivateData -
-
Method Detail
-
create
final Rfq create(String to, String from, CreateRfqData rfqData, String protocol, String externalId)
Creates a new
Rfqmessage, autopopulating the id, creation time, and message kind.- Parameters:
to- DID that the message is being sent to.from- DID of the sender.rfqData- Specific parameters relevant to a Rfq.protocol- version of the tbdex protocol.externalId- external reference for the Rfq.- Returns:
Rfq instance.
-
parse
final Rfq parse(String payload, Boolean requireAllPrivateData)
Takes an existing Rfq in the form of a json string and parses it into a Rfq object. Validates object structure and performs an integrity check using the message signature.
- Parameters:
payload- The message as a json string.requireAllPrivateData- If true, validate that all private data properties are present and run integrity check.- Returns:
The json string parsed into a Rfq.
-
generateRandomSalt
final String generateRandomSalt()
Generate random salt, used for salted hashes in RfqPrivateData
-
-
-
-