solSendTransaction method

Future<TSolSendTransactionResponse> solSendTransaction({
  1. required TSolSendTransactionBody input,
})

Submit a transaction intent describing a transaction you would like to broadcast.

Sign the provided TSolSendTransactionBody with the client's stamp function and submit the request (POST /public/v1/submit/sol_send_transaction).

See also: stampSolSendTransaction.

Implementation

Future<TSolSendTransactionResponse> solSendTransaction({
  required TSolSendTransactionBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_SOL_SEND_TRANSACTION',
  );
  return await request<Map<String, dynamic>, TSolSendTransactionResponse>(
      "/public/v1/submit/sol_send_transaction",
      body,
      (json) => TSolSendTransactionResponse.fromJson(
          transformActivityResponse(json, 'SolSendTransaction')));
}