ethSendTransaction method
Submit a transaction intent describing a transaction you would like to broadcast.
Sign the provided TEthSendTransactionBody with the client's stamp function and submit the request (POST /public/v1/submit/eth_send_transaction).
See also: stampEthSendTransaction.
Implementation
Future<TEthSendTransactionResponse> ethSendTransaction({
required TEthSendTransactionBody 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_ETH_SEND_TRANSACTION',
);
return await request<Map<String, dynamic>, TEthSendTransactionResponse>(
"/public/v1/submit/eth_send_transaction",
body,
(json) => TEthSendTransactionResponse.fromJson(
transformActivityResponse(json, 'EthSendTransaction')));
}