build

inline fun <T : Serializable> IssueCredential.Companion.build(fromDID: DID, toDID: DID, thid: String?, credentials: Map<String, T> = mapOf()): IssueCredential(source)

Builds an instance of IssueCredential with the provided parameters.

Return

An instance of IssueCredential with the specified parameters.

Parameters

T

The type of the credentials.

fromDID

The DID of the sender.

toDID

The DID of the recipient.

thid

The thread ID (optional).

credentials

The map of credential formats and their corresponding values (default is an empty map).


inline fun <T : Serializable> OfferCredential.Companion.build(fromDID: DID, toDID: DID, thid: String?, credentialPreview: CredentialPreview, credentials: Map<String, T> = mapOf()): OfferCredential(source)

Builds an OfferCredential object with the provided data.

Return

The constructed OfferCredential object.

Parameters

fromDID

The DID of the sender.

toDID

The DID of the recipient.

thid

The thread ID.

credentialPreview

The preview of the credential.

credentials

The map of credentials. Default value is an empty map.


inline fun <T : Serializable> ProposeCredential.Companion.build(fromDID: DID, toDID: DID, thid: String?, credentialPreview: CredentialPreview, credentials: Map<String, T> = mapOf()): ProposeCredential(source)

This method builds a ProposeCredential object based on the provided parameters. The ProposeCredential represents a proposal to issue a credential in the Atala PRISM architecture . The method takes in the following parameters:

Return

A new ProposeCredential object.

Parameters

fromDID

The DID of the sender of the proposal.

toDID

The DID of the recipient of the proposal.

thid

The thread ID of the proposal. Optional.

credentialPreview

The credential preview object that describes the proposed credential.

credentials

A map of credential formats and their corresponding values. The values must be of type T, which must implement the Serializable interface. The default value is an empty map.


inline fun <T : Serializable> RequestCredential.Companion.build(fromDID: DID, toDID: DID, thid: String?, credentials: Map<String, T> = mapOf()): RequestCredential(source)

Builds a RequestCredential object using the provided parameters.

Return

The created RequestCredential object.

Parameters

fromDID

The DID of the sender.

toDID

The DID of the receiver.

thid

The THID (thread ID).

credentials

The map of credential formats and corresponding payloads.