signToEc method

  1. @override
Future<MsgSignature> signToEc(
  1. Uint8List hash,
  2. {int? index,
  3. String? id}
)
override

Signs the provided hash and returns the result as a MsgSignature.

Optional parameters:

  • index: The index or position of the signer. Used for multi-signature scenarios.
  • id: An optional identifier associated with the signing process.

Returns a Future representing the r and s values.

Implementation

@override
Future<MsgSignature> signToEc(Uint8List hash,
    {int? index, String? id}) async {
  final privKey = await _getPrivateKey(index ?? 0);
  return privKey.signToEcSignature(hash);
}