sign method

  1. @override
Future<CombineSignedTransactionResult> sign(
  1. ConstructionPayloadsResponse payload, {
  2. SignType? signType = SignType.ed25519,
  3. SigningCallback? callback,
})
override

Implementation

@override
Future<CombineSignedTransactionResult> sign(
  ConstructionPayloadsResponse payload, {
  SignType? signType = SignType.ed25519,
  SigningCallback? callback,
}) async {
  if (signType == SignType.ed25519) {
    final res = await transferCombine(
      account.identity!,
      payload,
    );
    return res;
  }
  if (signType == SignType.ecdsa) {
    final res = await ecTransferCombine(
      account.ecIdentity!,
      payload,
    );
    return res;
  }
  throw UnsupportedError('Sign type $signType is not supported.');
}