#ifndef DK_SEND_APDU_H_
#define DK_SEND_APDU_H_

#include <tz_init_msg.h>
#include <init_tl.h>

#include "tl_dk_ctx.h"
#include "msgs/tz_dk_send_apdu_msg.h"

/**
 * Sends an APDU to the eSE if a SCP session is open.
 * 
 * @param ctx digital key context.
 * @param sendmsg TA command payload.
 * @param respmsg TA command response payload.
 * 
 * @return 0 on success; different value on error.
 */
DK_Result process_send_apdu(
    tl_dk_ctx_t *ctx,
    tz_dk_send_apdu_payload_t *sendmsg,
    tz_dk_send_apdu_payload_t *respmsg);

#endif