build

suspend fun build(type: String, content: ByteArray, senderEndpoint: FirstPartyEndpoint, recipientEndpoint: ThirdPartyEndpoint, parcelExpiryDate: ZonedDateTime = maxExpiryDate(), parcelId: ParcelId = ParcelId.generate()): OutgoingMessage

Create an outgoing service message (but don't send it).

Parameters

type

The type of the message (e.g., "application/vnd.awala.ping-v1.ping").

content

The contents of the service message.

senderEndpoint

The endpoint used to send the message.

recipientEndpoint

The endpoint that will receive the message.

parcelExpiryDate

The date when the parcel should expire.

parcelId

The id of the parcel.