broadcastTransaction method

Future<BroadcastTransactionRes> broadcastTransaction({
  1. required IoTransaction transaction,
  2. CallOptions? options,
})

Broadcasts a transaction to the network.

transaction is an IoTransaction to broadcast

options is an CallOptions for runtime options with RPC

Implementation

Future<BroadcastTransactionRes> broadcastTransaction({
  required IoTransaction transaction,
  CallOptions? options,
}) async {
  final BroadcastTransactionReq request = BroadcastTransactionReq(transaction: transaction);
  final BroadcastTransactionRes response = await nodeStub.broadcastTransaction(
    request,
    options: options,
  );
  return response;
}