@JvmStatic fun createSignature(agent: Agent, signerVerKey: String, data: Any): Single<SignatureDecorator>
Creates a signature for any data. The data is serialized to JSON and converted to a byte array using UTF-8 charset. Per the RFC, the message to sign should be a 64-bit integer representing UNIX time and the serialized data from before. Currently, only the ed25519sha256_single signature scheme is supported: we must sign the data using our public key (i.e. verification key). This scheme requires:
agent
- is the agent for which to sign the message
signerVerKey
- is the public key of the signer
Return
single SignatureDecorator is the decorator to add to the message