signHash method

KeyedSignature signHash(
  1. String hash,
  2. WitPrivateKey privateKey
)

Implementation

KeyedSignature signHash(String hash, WitPrivateKey privateKey) {
  final sig = privateKey.signature(hash);
  return KeyedSignature(
    publicKey: PublicKey(bytes: privateKey.publicKey.encode()),
    signature: Signature(secp256k1: Secp256k1Signature(der: sig.encode())),
  );
}