sign

abstract suspend fun sign(preimage: HashIDPreimageXdr): Auth.Signature

Signs a HashIDPreimage and returns the signature.

The implementation should:

  1. Convert the preimage to XDR bytes

  2. Hash the bytes with SHA-256

  3. Sign the hash with Ed25519

  4. Return the public key and signature

Return

The signature containing public key and signature bytes

Parameters

preimage

The hash preimage to sign