sign
Adds a signature by signing the transaction hash with the provided keypair.
The signature is created by:
Computing the transaction hash
Signing the hash with the keypair's private key
Creating a decorated signature with the signature hint
Adding it to the signatures list
Parameters
signer
The keypair to sign with (must have private key)
Throws
if the keypair doesn't contain a private key