makeMessage

fun makeMessage(ba: ByteArray, tweakMsg: CapdMsg.() -> Unit): CapdMsg

Create a CAPD message but do not send it (typically for debugging)

Parameters

ba

The unencrypted message to send. This function will encrypt it.

tweakMsg

A callback to change the CAPD message. This callback is called before the message POW is "solved", but AFTER the POW target is set. So the caller has the option of changing the POW target, rescindHash, and expiration fields.