sign method
BuBytes
sign({
- required Dkls23Curve curve,
- required List<
int> sid, - required List<
int> msgHash, - required List<
int> seeds,
override
Threshold-sign a 32-byte message hash → 64-byte compact signature.
Implementation
@override
BuBytes sign({
required Dkls23Curve curve,
required List<int> sid,
required List<int> msgHash,
required List<int> sharesBlob,
required List<int> seeds,
}) {
ApiValidate.length(msgHash, 32, operation: '$_tag.sign', name: 'msgHash');
if (sid.isEmpty) {
throw CoreErrors.invalidOperationArguments(
'$_tag.sign',
name: 'sid',
reason: 'session id must not be empty.',
);
}
if (sharesBlob.isEmpty) {
throw CoreErrors.invalidOperationArguments(
'$_tag.sign',
name: 'sharesBlob',
reason: 'must not be empty',
);
}
return ApiValidate.call(
'$_tag.sign',
() => inner.sign(
curve: curve,
sid: sid,
msgHash: msgHash,
sharesBlob: sharesBlob,
seeds: seeds,
),
);
}