Submit and send the signed transaction

As a Notardec API consumer You have a function to send the signed transaction, so that You don’t have to use the TEOS API directly

POST /device/submitSignedTransaction

{
  "transactionId": "string",
  "signingAddress": "string",
  "signedTransaction": "string"
}
  • transactionId: The ID of the transaction we want to submit.
  • signingAddress: The ID of the wallet that this transaction belongs to.
  • signedTransaction: Signed transaction data
Code Example
export async function getSigningRequestData(
  apiKey: string,
  token: string,
  payload: SubmitSignedTransactionPayload
): Promise<SubmitSignedTransactionDto> {
  const result = await axios.post(`${process.env.NOTARDEC_URL}/device/SubmitSignedTransaction`, payload, {
    headers: {
      'X-API-KEY': apiKey,
      Authorization: `Bearer ${token}`,
    },
  });
  return result.data;
}

Here, the first parameter we pass is the Notardec Key, the second is the token, the third is the request body. The request body and the response body will have the following form:

Request:
{
  "transactionId": "string",
  "signingAddress": "string",
  "signedTransaction": "string"
}
Response
{
  "data": {
    "transactionId": "string",
    "blockchainTransactionId": "string"
  },
  "state": "number",
  "message": "string | null",
  "correlationId": "string | null",
  "errors": "any[] | []"
}