Skip to content

Commit 2250549

Browse files
author
ldg-github-ci
committed
[update] Branch develop | Commit 4d6feea809f79efd548fccc0f0af7ff6aece091e
1 parent 3b7e7ad commit 2250549

13 files changed

+524
-330
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
| :rotating_light: | Breaks build |
66
| :warning: | Breaks compatibility with app |
77

8-
## [latest](/) - 2023/12/07
8+
## [latest](/) - 2024/02/02
9+
10+
### Changed
11+
12+
* The SDK source code has been split into multiple smaller files
13+
14+
## [3b7e7ad](/../../commit/3b7e7ad) - 2023/12/07
915

1016
### Fixed
1117

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ Be careful, and weight your choices.
1414
If for some reasons you want to rebuild this SDK manually from [app-ethereum](https://github.com/LedgerHQ/app-ethereum) (reminder: it is rebuild automatically when building app-ethereum itself):
1515

1616
```shell
17-
$> python3 tools/build_sdk.py
17+
$> ./tools/build_sdk.sh
1818
```

include/eth_internals.h

Lines changed: 0 additions & 123 deletions
This file was deleted.

src/asset_info.h

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*******************************************************************************
2+
* Ledger Ethereum App
3+
* (c) 2016-2019 Ledger
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
********************************************************************************/
17+
18+
#pragma once
19+
20+
#include <stdint.h>
21+
#include "common_utils.h"
22+
23+
// NFT
24+
25+
#define COLLECTION_NAME_MAX_LEN 70
26+
27+
typedef struct nftInfo_t {
28+
uint8_t contractAddress[ADDRESS_LENGTH]; // must be first item
29+
char collectionName[COLLECTION_NAME_MAX_LEN + 1];
30+
} nftInfo_t;
31+
32+
// TOKENS
33+
34+
#define MAX_TICKER_LEN 11 // 10 characters + '\0'
35+
#define MAX_ITEMS 2
36+
37+
typedef struct tokenDefinition_t {
38+
uint8_t address[ADDRESS_LENGTH]; // must be first item
39+
#ifdef HAVE_CONTRACT_NAME_IN_DESCRIPTOR
40+
uint8_t contractName[ADDRESS_LENGTH];
41+
#endif
42+
char ticker[MAX_TICKER_LEN];
43+
uint8_t decimals;
44+
} tokenDefinition_t;
45+
46+
// UNION
47+
48+
typedef union extraInfo_t {
49+
tokenDefinition_t token;
50+
nftInfo_t nft;
51+
} extraInfo_t;
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*****************************************************************************
2-
* Ledger Plugin SDK
3-
* (c) 2023 Ledger SAS
1+
/*******************************************************************************
2+
* Ledger Ethereum App
3+
* (c) 2016-2019 Ledger
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -13,16 +13,22 @@
1313
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
16-
*****************************************************************************/
16+
********************************************************************************/
1717

18-
#include "plugin_utils.h"
18+
#pragma once
1919

20-
bool find_selector(uint32_t selector, const uint32_t *array, size_t size, size_t *idx) {
21-
for (size_t i = 0; i < size; ++i) {
22-
if (selector == array[i]) {
23-
if (idx != NULL) *idx = i;
24-
return true;
25-
}
26-
}
27-
return false;
28-
}
20+
#ifdef HAVE_NBGL
21+
#include "ux.h"
22+
#endif
23+
24+
typedef enum { CALLER_TYPE_CLONE, CALLER_TYPE_PLUGIN } e_caller_type;
25+
26+
typedef struct caller_app_t {
27+
const char *name;
28+
#ifdef HAVE_NBGL
29+
const nbgl_icon_details_t *icon;
30+
#endif
31+
char type; // does not have to be set by the caller app
32+
} caller_app_t;
33+
34+
extern caller_app_t *caller_app;

0 commit comments

Comments
 (0)