send static method

Future<AccountBlockTemplate> send(
  1. AccountBlockTemplate transaction,
  2. KeyPair currentKeyPair, {
  3. void generatingPowCallback(
    1. PowStatus
    )?,
  4. dynamic waitForRequiredPlasma = false,
})

Implementation

static Future<AccountBlockTemplate> send(
    AccountBlockTemplate transaction, KeyPair currentKeyPair,
    {void Function(PowStatus)? generatingPowCallback,
    waitForRequiredPlasma = false}) async {
  var z = Zenon();

  await _checkAndSetFields(transaction, currentKeyPair);
  await _setDifficulty(transaction,
      generatingPowCallback: generatingPowCallback,
      waitForRequiredPlasma: waitForRequiredPlasma);
  await _setHashAndSignature(transaction, currentKeyPair);

  await z.ledger.publishRawTransaction(transaction);
  logger.info('Published account-block');
  return transaction;
}