Embedded SDK
Embedded SDK
swap_entrypoints.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * (c) 2023 Ledger
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ********************************************************************************/
16 #pragma once
17 
18 #include <stddef.h>
19 #include <stdbool.h>
20 #include <stdint.h>
21 
22 #include "swap_lib_calls.h"
23 
24 /*
25  * These functions must be defined by the application
26  */
27 
28 /* Check check_address_parameters_t.address_to_check against specified parameters.
29  *
30  * Must set params.result to 0 on error, 1 otherwise */
32 
33 /* Format printable amount including the ticker from specified parameters.
34  *
35  * Must set empty printable_amount on error, printable amount otherwise */
37 
38 /* Backup up transaction parameters and wipe BSS to avoid collusion with
39  * app-exchange BSS data.
40  *
41  * return false on error, true otherwise */
43 
44 /* Set create_transaction.result and call os_lib_end().
45  *
46  * Doesn't return */
47 void __attribute__((noreturn)) swap_finalize_exchange_sign_transaction(bool is_success);
void swap_handle_get_printable_amount(get_printable_amount_parameters_t *params)
void __attribute__((noreturn)) swap_finalize_exchange_sign_transaction(bool is_success)
Definition: main.c:38
void swap_handle_check_address(check_address_parameters_t *params)
bool swap_copy_transaction_parameters(create_transaction_parameters_t *sign_transaction_params)