postWalletByIdTransactionsWithHttpInfo method

Future<Response> postWalletByIdTransactionsWithHttpInfo(
  1. String id,
  2. SafeTxIn safeTxIn
)

Composes a Safe transaction on the MPC ring and answers its EIP-712 hash together with the owner approval the ring's threshold signature produced.

Composes a Safe transaction on the MPC ring and answers its EIP-712 hash together with the owner approval the ring's threshold signature produced. Only a wallet whose custody is "safe" can do this — any other custody is a 400, because the backend itself is asked whether it can propose rather than the kind being switched on. The ring computes the Safe-tx hash bound to the Safe contract and the chain id, so the hash a caller gets back is the one the Safe will verify. This PROPOSES: it does not execute the transaction.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postWalletByIdTransactionsWithHttpInfo(String id, SafeTxIn safeTxIn,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/wallet/{id}/transactions'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = safeTxIn;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}