Skip to content

Commit 642d273

Browse files
feat: Constellation generate pubkey and address
1 parent 3e36ebc commit 642d273

File tree

3 files changed

+528
-3
lines changed

3 files changed

+528
-3
lines changed

apps/constellation_app/constellation_context.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@
2929
#define CONSTELLATION_CHANGE_INDEX 0x00000000 // 0
3030

3131
#define CONSTELLATION_PUB_KEY_SIZE 33
32-
#define CONSTELLATION_UNCOMPRESSED_PUB_KEY_SIZE 65
33-
#define CONSTELLATION_ACCOUNT_ADDRESS_LENGTH 40
32+
#define CONSTELLATION_UNCOMPRESSED_PUBKEY_SIZE 65
33+
#define CONSTELLATION_ACCOUNT_ADDRESS_SIZE 40
34+
#define PKCS_PREFIX_SIZE 23
35+
#define PKCS_PREFIXED_PUBKEY_SIZE \
36+
PKCS_PREFIX_SIZE + CONSTELLATION_UNCOMPRESSED_PUBKEY_SIZE
37+
#define SHA256_DIGEST_SIZE 32
38+
#define BS58_ENCODED_SIZE 45
3439

3540
/*****************************************************************************
3641
* TYPEDEFS

apps/constellation_app/constellation_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void constellation_main(usb_event_t usb_evt,
130130
switch ((uint8_t)query.which_request) {
131131
case CONSTELLATION_QUERY_GET_PUBLIC_KEYS_TAG:
132132
case CONSTELLATION_QUERY_GET_USER_VERIFIED_PUBLIC_KEY_TAG: {
133-
// constellation_get_pub_keys(&query);
133+
constellation_get_pub_keys(&query);
134134
break;
135135
}
136136
case CONSTELLATION_QUERY_SIGN_TXN_TAG: {

0 commit comments

Comments
 (0)