createOnChainTransactionIndex method

Future<CreateOnChainTransactionIndexResponse> createOnChainTransactionIndex({
  1. required IndexSpec indexSpec,
  2. bool? populate,
  3. CallOptions? options,
})

Returns a CreateOnChainTransactionIndexResponse object for the transaction index created at the given indexSpec.

indexSpec is an IndexSpec representing the index specification to create

populate is a bool representing whether or not to populate the index

options is a CallOptions object that can be used to set additional options for the RPC request.

Throws an Exception if an error occurs during the RPC request.

Implementation

Future<CreateOnChainTransactionIndexResponse> createOnChainTransactionIndex({
  required IndexSpec indexSpec,
  bool? populate,
  CallOptions? options,
}) async {
  final request = CreateOnChainTransactionIndexRequest(
    indexSpec: indexSpec,
    populate: populate,
  );
  final CreateOnChainTransactionIndexResponse response =
      await genusTransactionStub.createOnChainTransactionIndex(
    request,
    options: options,
  );

  return response;
}